annotate mm7_5.cpp @ 101:8be5293b6b33

odm loading
author Nomad
date Tue, 06 Nov 2012 06:15:25 +0200
parents 51a5b0dc3f30
children 918dca162239
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;
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
307 v1 = "";
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
308 while ( 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
309 {
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
310 if ( !pMessageQueue_50CBD0->uNumMessages )
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
311 break;
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
312
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
313 pMessageQueue_50CBD0->PopMessage(&uMessage, &uMessageParam, (int *)&v199);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
314 switch ( uMessage )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
315 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
316 case UIMSG_ChangeGameState:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
317 uGameState = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
318 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
319 case UIMSG_PlayArcomage:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
320 pVideoPlayer->_4BF5B2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
321 pArcomageGame->bGameInProgress = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
322 PrepareArcomage();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
323 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
324 case UIMSG_StartNPCDialogue:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
325 if ( !uActiveCharacter )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
326 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
327 viewparams->field_48 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
328 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
329 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
330 dword_5B65D0_dialogue_actor_npc_id = pActors[uMessageParam].uNPC_ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
331 v3 = &pActors[uMessageParam];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
332 goto _actor_init_dlg;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
333 case UIMSG_Quit|0x2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
334 case 0x87:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
335 if ( bNoNPCHiring != 1
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
336 && !pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
337 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
338 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
339 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
340 uAction = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
341 uNumSeconds = uMessage - 134;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
342 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
343 v5 = pParty->pHirelings;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
344 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
345 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
346 if ( v5->pName )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
347 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
348 v6 = uAction++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
349 pTmpBuf[v6] = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
350 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
351 ++v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
352 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
353 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
354 while ( (signed int)v5 < (signed int)&pParty->pPickedItem );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
355 _this = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
356 if ( (signed int)pNPCStats->uNumNewNPCs > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
357 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
358 v195 = pNPCStats->pNewNPCData;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
359 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
360 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
361 if ( v195->uFlags & 0x80
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
362 && (!pParty->pHirelings[0].pName || strcmp(v195->pName, pParty->pHirelings[0].pName))
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
363 && (!pParty->pHirelings[1].pName || strcmp(v195->pName, pParty->pHirelings[1].pName)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
364 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
365 v7 = uAction++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
366 pTmpBuf[v7] = _this + 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
367 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
368 ++_this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
369 ++v195;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
370 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
371 while ( _this < (signed int)pNPCStats->uNumNewNPCs );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
372 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
373 if ( (signed int)(uNumSeconds + (unsigned __int8)pParty->field_709) < uAction )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
374 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
375 //Actor::Actor(&actor);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
376 memset(&actor, 0, 0x344u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
377 actor.uNPC_ID += -1 - (unsigned __int8)pParty->field_709 - uNumSeconds;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
378 v3 = &actor;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
379 _actor_init_dlg:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
380 v3->InitializeDialogue(v0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
381 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
382 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
383 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
384 case 0x51:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
385 sub_4BDB56_buy_skill____();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
386 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
387 case UIMSG_AF:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
388 sub_4B2001(uMessageParam);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
389 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
390 case 0x195:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
391 sub_4BCACC_bounties(uMessageParam);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
392 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
393 case 0x88:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
394 sub_4BC49B(uMessageParam);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
395 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
396 case 0x19A:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
397 _4B4224_UpdateNPCTopics(uMessageParam);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
398 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
399 case UIMSG_StartNewGame:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
400 if ( dword_6BE138 == 124 || uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
401 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
402 pIcons_LOD->_40F9C5();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
403 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
404 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
405 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
406 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
407 uGameState = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
408 LABEL_188:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
409 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
410 viewparams->bRedrawGameUI = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
411 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
412 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
413 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
414 ShowStatusBarString(pGlobalTXT_LocalizationStrings[201], 2u);// "Are you sure? Click again to start a New Game"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
415 pAudioPlayer->PlaySound(SOUND_20001, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
416 dword_6BE138 = 124;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
417 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
418 _release_tex_and_continue:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
419 stru_506E40.Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
420 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
421 case UIMSG_Game_OpenLoadGameDialog:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
422 pIcons_LOD->_40F9C5();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
423 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
424 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
425 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
426 pGUIWindow_CurrentMenu->Release();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
427 pCurrentScreen = 12;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
428 GameUI_DrawLoadMenu(v0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
429 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
430 case UIMSG_Quit:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
431 if ( dword_6BE138 == 132 || uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
432 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
433 pIcons_LOD->_40F9C5();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
434 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
435 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
436 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
437 pGUIWindow_CurrentMenu->Release();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
438 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
439 viewparams->bRedrawGameUI = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
440 if ( !uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
441 pAudioPlayer->PlaySound((SoundID)(SOUND_EnteringAHouse|0x1), 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
442 uGameState = 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
443 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
444 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
445 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
446 ShowStatusBarString(pGlobalTXT_LocalizationStrings[82], 2u);// "Are you sure? Click again to quit"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
447 pAudioPlayer->PlaySound(SOUND_20001, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
448 dword_6BE138 = 132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
449 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
450 goto _release_tex_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
451 case 0x80:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
452 pIcons_LOD->_40F9C5();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
453 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
454 pGUIWindow_CurrentMenu->Release();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
455 pCurrentScreen = 2;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
456 v162 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
457 v148 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
458 v141 = (WindowType)8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
459 goto LABEL_439;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
460 case UIMSG_A2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
461 --dword_6A0C9C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
462 if ( dword_6A0C9C < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
463 dword_6A0C9C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
464 v163 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
465 v8 = 199;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
466 v149 = ptr_69BD5C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
467 goto LABEL_60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
468 case UIMSG_A3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
469 ++dword_6A0C9C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
470 if ( dword_6A0C9C >= uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
471 dword_6A0C9C = uMessageParam - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
472 v163 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
473 v8 = 323;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
474 v149 = ptr_69BD58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
475 LABEL_60:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
476 v142 = (WindowType)90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
477 v137 = 17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
478 v133 = 17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
479 v9 = 215;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
480 goto LABEL_733;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
481 case UIMSG_A6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
482 v163 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
483 v8 = 302;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
484 v149 = ptr_69BD60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
485 v9 = 350;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
486 v142 = (WindowType)96;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
487 v137 = 42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
488 v133 = 106;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
489 goto LABEL_733;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
490 case UIMSG_A4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
491 v163 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
492 v8 = 302;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
493 v149 = ptr_69BD64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
494 v9 = 241;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
495 v142 = (WindowType)94;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
496 v137 = 42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
497 v133 = 106;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
498 goto LABEL_733;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
499 case UIMSG_A5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
500 if ( pGUIWindow_CurrentMenu->field_40 == v0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
501 pKeyActionMap->_459ED1(0);
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
502 if ( pCurrentScreen != 11
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
503 || uLoadGameUI_SelectedSlot != dword_6A0C9C + uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
504 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
505 v10 = dword_6A0C9C + uMessageParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
506 if ( dword_6BE138 == dword_6A0C9C + uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
507 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
508 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
509 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
510 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)164;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
511 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
512 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
513 v11 = pMessageQueue_50CBD0->uNumMessages + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
514 v13 = __OFSUB__(pMessageQueue_50CBD0->uNumMessages + 1, 40);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
515 v12 = (signed int)pMessageQueue_50CBD0->uNumMessages - 39 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
516 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
517 if ( v12 ^ v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
518 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
519 pMessageQueue_50CBD0->pMessages[v11].eType = (UIMessageType)82;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
520 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
521 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
522 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
523 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
524 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
525 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
526 uLoadGameUI_SelectedSlot = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
527 dword_6BE138 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
528 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
529 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
530 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
531 pKeyActionMap->_459E5A(0, 19, pGUIWindow_CurrentMenu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
532 if ( strcmp(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
533 (const char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
534 pGlobalTXT_LocalizationStrings[72]) )// "Empty"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
535 strcpy(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
536 (char *)pKeyActionMap->pPressedKeysBuffer,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
537 (const char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
538 pKeyActionMap->uNumKeysPressed = strlen((const char *)pKeyActionMap->pPressedKeysBuffer);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
539 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
540 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
541 case UIMSG_LoadGame:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
542 if ( pSavegameUsedSlots[uLoadGameUI_SelectedSlot] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
543 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
544 LoadGame(uLoadGameUI_SelectedSlot);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
545 uGameState = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
546 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
547 goto _release_tex_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
548 case UIMSG_SaveGame:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
549 if ( pGUIWindow_CurrentMenu->field_40 == v0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
550 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
551 pKeyActionMap->_459ED1(0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
552 strcpy(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
553 (char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
554 (const char *)pKeyActionMap->pPressedKeysBuffer);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
555 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
556 DoSavegame(uLoadGameUI_SelectedSlot);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
557 goto _release_tex_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
558 case UIMSG_StartNewGame|0x2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
559 pGUIWindow_CurrentMenu->Release();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
560 pCurrentScreen = 11;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
561 GameUI_DrawSaveMenu();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
562 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
563 case UIMSG_Game_OpenOptionsDialog:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
564 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
565 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
566 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
567 viewparams->field_48 = v0;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
568 pCurrentScreen = 2;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
569 uTextureID_507C60 = pIcons_LOD->LoadTexture("ControlBG", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
570 uTextureID_507C6C = pIcons_LOD->LoadTexture("con_16x", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
571 uTextureID_507C68 = pIcons_LOD->LoadTexture("con_32x", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
572 uTextureID_507C70 = pIcons_LOD->LoadTexture("con_ArrL", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
573 uTextureID_507C74 = pIcons_LOD->LoadTexture("con_ArrR", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
574 uTextureID_507C64[0] = pIcons_LOD->LoadTexture("con_Smoo", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
575 pTextureIDs_SoundLevels[9] = pIcons_LOD->LoadTexture("convol00", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
576 pTextureIDs_SoundLevels[0] = pIcons_LOD->LoadTexture("convol10", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
577 pTextureIDs_SoundLevels[1] = pIcons_LOD->LoadTexture("convol20", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
578 pTextureIDs_SoundLevels[2] = pIcons_LOD->LoadTexture("convol30", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
579 pTextureIDs_SoundLevels[3] = pIcons_LOD->LoadTexture("convol40", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
580 pTextureIDs_SoundLevels[4] = pIcons_LOD->LoadTexture("convol50", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
581 pTextureIDs_SoundLevels[5] = pIcons_LOD->LoadTexture("convol60", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
582 pTextureIDs_SoundLevels[6] = pIcons_LOD->LoadTexture("convol70", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
583 pTextureIDs_SoundLevels[7] = pIcons_LOD->LoadTexture("convol80", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
584 pTextureIDs_SoundLevels[8] = pIcons_LOD->LoadTexture("convol90", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
585 uTextureID_507C84 = pIcons_LOD->LoadTexture("option04", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
586 uTextureID_507CB0 = pIcons_LOD->LoadTexture("option03", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
587 uTextureID_507CB8 = pIcons_LOD->LoadTexture("option02", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
588 uTextureID_507CB4 = pIcons_LOD->LoadTexture("option01", TEXTURE_16BIT_PALETTE);
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
589 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Options, 0, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
590 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
591 0x16u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
592 0x10Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
593 (uTextureID_507C6C != -1 ? pIcons_LOD->pTextures[uTextureID_507C6C].uTextureWidth : 24),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
594 (uTextureID_507C6C != -1 ? pIcons_LOD->pTextures[uTextureID_507C6C].uTextureHeight : 26),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
595 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
596 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
597 0xB8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
598 0x80u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
599 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
600 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
601 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
602 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
603 0x5Du,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
604 0x10Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
605 (uTextureID_507C68 != -1 ? pIcons_LOD->pTextures[uTextureID_507C68].uTextureWidth : 24),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
606 (uTextureID_507C68 != -1 ? pIcons_LOD->pTextures[uTextureID_507C68].uTextureHeight : 26),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
607 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
608 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
609 0xB8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
610 0x40u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
611 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
612 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
613 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
614 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
615 0xA4u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
616 0x10Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
617 (uTextureID_507C64[0] != -1 ? pIcons_LOD->pTextures[uTextureID_507C64[0]].uTextureWidth : 24),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
618 (uTextureID_507C64[0] != -1 ? pIcons_LOD->pTextures[uTextureID_507C64[0]].uTextureHeight : 26),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
619 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
620 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
621 0xB8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
622 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
623 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
624 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
625 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
626 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
627 0x14u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
628 0x12Fu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
629 (uTextureID_507CB4 != -1 ? pIcons_LOD->pTextures[uTextureID_507CB4].uTextureWidth : 24),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
630 (uTextureID_507CB4 != -1 ? pIcons_LOD->pTextures[uTextureID_507CB4].uTextureHeight : 26),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
631 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
632 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
633 0xB9u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
634 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
635 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
636 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
637 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
638 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
639 0x80u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
640 0x12Fu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
641 (uTextureID_507CB8 != -1 ? pIcons_LOD->pTextures[uTextureID_507CB8].uTextureWidth : 24),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
642 (uTextureID_507CB8 != -1 ? pIcons_LOD->pTextures[uTextureID_507CB8].uTextureHeight : 26),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
643 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
644 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
645 0xBBu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
646 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
647 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
648 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
649 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
650 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
651 0x14u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
652 0x145u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
653 (uTextureID_507CB0 != -1 ? pIcons_LOD->pTextures[uTextureID_507CB0].uTextureWidth : 24),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
654 (uTextureID_507CB0 != -1 ? pIcons_LOD->pTextures[uTextureID_507CB0].uTextureHeight : 26),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
655 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
656 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
657 0xE1u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
658 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
659 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
660 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
661 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
662 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
663 0x80u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
664 0x145u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
665 (uTextureID_507C84 != -1 ? pIcons_LOD->pTextures[uTextureID_507C84].uTextureWidth : 24),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
666 (uTextureID_507C84 != -1 ? pIcons_LOD->pTextures[uTextureID_507C84].uTextureHeight : 26),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
667 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
668 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
669 0xE2u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
670 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
671 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
672 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
673 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
674 ptr_50C9CC = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
675 243u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
676 162u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
677 16u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
678 16u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
679 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
680 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
681 111u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
682 4u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
683 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
684 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
685 &pIcons_LOD->pTextures[uTextureID_507C70],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
686 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
687 ptr_50C9C8 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
688 0x1B3u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
689 0xA2u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
690 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
691 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
692 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
693 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
694 0x6Fu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
695 5u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
696 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
697 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
698 &pIcons_LOD->pTextures[uTextureID_507C74],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
699 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
700 pGUIWindow_CurrentMenu->CreateButton(0x107u, 0xA2u, 0xACu, 0x11u, v0, 0, 0x6Fu, 0, 0, v1, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
701 ptr_50C9CC = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
702 0xF3u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
703 0xD8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
704 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
705 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
706 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
707 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
708 0x70u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
709 4u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
710 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
711 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
712 &pIcons_LOD->pTextures[uTextureID_507C70],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
713 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
714 ptr_50C9C8 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
715 0x1B3u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
716 0xD8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
717 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
718 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
719 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
720 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
721 0x70u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
722 5u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
723 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
724 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
725 &pIcons_LOD->pTextures[uTextureID_507C74],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
726 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
727 pGUIWindow_CurrentMenu->CreateButton(0x107u, 0xD8u, 0xACu, 0x11u, v0, 0, 0x70u, 0, 0, v1, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
728 ptr_50C9CC = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
729 0xF3u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
730 0x10Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
731 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
732 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
733 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
734 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
735 0xBAu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
736 4u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
737 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
738 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
739 &pIcons_LOD->pTextures[uTextureID_507C70],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
740 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
741 ptr_50C9C8 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
742 0x1B3u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
743 0x10Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
744 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
745 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
746 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
747 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
748 0xBAu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
749 5u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
750 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
751 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
752 &pIcons_LOD->pTextures[uTextureID_507C74],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
753 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
754 pGUIWindow_CurrentMenu->CreateButton(0x107u, 0x10Eu, 0xACu, 0x11u, v0, 0, 0xBAu, 0, 0, v1, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
755 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
756 0xF1u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
757 0x12Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
758 0xD6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
759 0x28u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
760 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
761 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
762 0x71u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
763 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
764 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
765 pGlobalTXT_LocalizationStrings[619],// "Return to Game"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
766 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
767 pGUIWindow_CurrentMenu->CreateButton(0x13u, 0x8Cu, 0xD6u, 0x28u, v0, 0, 0x19Fu, 0, 0x4Bu, v1, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
768 v164 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
769 v150 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
770 v143 = 86;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
771 v138 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
772 v134 = 421;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
773 v131 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
774 v129 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
775 v126 = 40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
776 v124 = 214;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
777 v122 = 194;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
778 v120 = 19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
779 goto LABEL_117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
780 case UIMSG_OpenKeyMappingOptions:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
781 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
782 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
783 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
784 viewparams->field_48 = 1;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
785 pCurrentScreen = 26;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
786 uTextureID_507BF4 = pIcons_LOD->LoadTexture("optkb", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
787 uTextureID_507BF8 = pIcons_LOD->LoadTexture("optkb_h", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
788 uTextureID_507BFC = pIcons_LOD->LoadTexture("resume1", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
789 uTextureID_507C00 = pIcons_LOD->LoadTexture("optkb_1", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
790 uTextureID_507C04 = pIcons_LOD->LoadTexture("optkb_2", TEXTURE_16BIT_PALETTE);
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
791 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_KeyMappingOptions, 0, 0);
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
792 pGUIWindow_CurrentMenu->CreateButton(0xF1u, 0x12Eu, 0xD6u, 0x28u, 1, 0, 0x71u, 0, 0, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
793 pGUIWindow_CurrentMenu->CreateButton(19u, 0x12Eu, 0x6Cu, 0x14u, 1, 0, 0x1A0u, 0, 0, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
794 pGUIWindow_CurrentMenu->CreateButton(127u, 0x12Eu, 0x6Cu, 0x14u, 1, 0, 0x1A1u, 0, 0, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
795 pGUIWindow_CurrentMenu->CreateButton(127u, 0x144u, 0x6Cu, 0x14u, 1, 0, 0x1A2u, 0, 0, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
796 pGUIWindow_CurrentMenu->CreateButton(19u, 0x144u, 0x6Cu, 0x14u, 1, 0, 0x7Fu, 0, 0, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
797 pGUIWindow_CurrentMenu->CreateButton(129u, 0x94u, 0x46u, 0x13u, 1, 0, 0x1A3u, 0, 0, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
798 pGUIWindow_CurrentMenu->CreateButton(129u, 0xA7u, 0x46u, 0x13u, 1, 0, 0x1A3u, 1u, 0, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
799 pGUIWindow_CurrentMenu->CreateButton(129u, 0xBAu, 0x46u, 0x13u, 1, 0, 0x1A3u, 2u, 0, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
800 pGUIWindow_CurrentMenu->CreateButton(129u, 0xCDu, 0x46u, 0x13u, 1, 0, 0x1A3u, 3u, 0, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
801 pGUIWindow_CurrentMenu->CreateButton(129u, 224u, 70u, 19u, 1, 0, 0x1A3u, 4u, 0, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
802 pGUIWindow_CurrentMenu->CreateButton(129u, 243u, 70u, 0x13u, 1, 0, 0x1A3u, 5u, 0, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
803 pGUIWindow_CurrentMenu->CreateButton(129u, 262u, 70u, 0x13u, 1, 0, 0x1A3u, 6u, 0, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
804 pGUIWindow_CurrentMenu->CreateButton(350u, 148u, 70u, 0x13u, 1, 0, 0x1A3u, 7u, 0, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
805 pGUIWindow_CurrentMenu->CreateButton(350u, 167u, 70u, 0x13u, 1, 0, 0x1A3u, 8u, 0, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
806 pGUIWindow_CurrentMenu->CreateButton(350u, 186u, 70u, 0x13u, 1, 0, 0x1A3u, 9u, 0, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
807 pGUIWindow_CurrentMenu->CreateButton(350u, 205u, 70u, 0x13u, 1, 0, 0x1A3u, 0xAu, 0, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
808 pGUIWindow_CurrentMenu->CreateButton(350u, 224u, 70u, 0x13u, 1, 0, 0x1A3u, 0xBu, 0, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
809 pGUIWindow_CurrentMenu->CreateButton(350u, 243u, 70u, 0x13u, 1, 0, 0x1A3u, 0xCu, 0, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
810 pGUIWindow_CurrentMenu->CreateButton(350u, 262u, 70u, 0x13u, 1, 0, 0x1A3u, 0xDu, 0, "", 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
811 dword_506E68 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
812 dword_506F08 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
813 memset(word_506E6C, 0, 0x1Cu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
814 word_506E6C[14] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
815 memcpy(pPrevVirtualCidesMapping, pKeyActionMap->pVirtualKeyCodesMapping, 0x78u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
816 goto LABEL_90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
817 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
818 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
819 case UIMSG_ResetKeyMapping|0x1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
820 if ( dword_506E68 != -1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
821 goto LABEL_623;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
822 v14 = uMessageParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
823 if ( dword_506F08 != v0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
824 v14 = uMessageParam + 14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
825 dword_506E68 = v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
826 pKeyActionMap->_459E5A(0, v0, pGUIWindow_CurrentMenu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
827 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
828 case UIMSG_ResetKeyMapping:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
829 v197 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
830 pKeyActionMap->SetDefaultMapping();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
831 uAction = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
832 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
833 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
834 v15 = pKeyActionMap->GetActionVKey((enum InputAction)uAction);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
835 if ( v15 != pPrevVirtualCidesMapping[uAction] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
836 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
837 if ( v197 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
838 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
839 v16 = pKeyActionMap->GetActionVKey((enum InputAction)uAction);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
840 GUI_ReplaceHotkey(LOBYTE(pPrevVirtualCidesMapping[uAction]), v16, v0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
841 v197 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
842 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
843 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
844 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
845 v17 = pKeyActionMap->GetActionVKey((enum InputAction)uAction);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
846 GUI_ReplaceHotkey(LOBYTE(pPrevVirtualCidesMapping[uAction]), v17, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
847 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
848 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
849 pPrevVirtualCidesMapping[uAction] = pKeyActionMap->GetActionVKey(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
850 (enum InputAction)uAction);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
851 v18 = uAction++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
852 v13 = __OFSUB__(uAction, 28);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
853 v12 = uAction - 28 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
854 *((char *)word_506E6C + v18) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
855 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
856 while ( v12 ^ v13 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
857 v165 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
858 v151 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
859 v144 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
860 v139 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
861 v135 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
862 v132 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
863 v130 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
864 v127 = 219;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
865 goto _play_sound_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
866 case 0x1A0:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
867 dword_506F08 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
868 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
869 case UIMSG_StartNPCDialogue|0x100:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
870 dword_506F08 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
871 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
872 case UIMSG_OpenVideoOptions:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
873 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
874 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
875 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
876 viewparams->field_48 = v0;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
877 pCurrentScreen = 28;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
878 uTextureID_507C10 = pIcons_LOD->LoadTexture("optvid", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
879 uTextureID_507C14 = pIcons_LOD->LoadTexture("opvdH-bs", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
880 uTextureID_507C18 = pIcons_LOD->LoadTexture("opvdH-cl", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
881 uTextureID_507C1C = pIcons_LOD->LoadTexture("opvdH-tn", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
882 uTextureID_507C20 = pIcons_LOD->LoadTexture("con_ArrL", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
883 uTextureID_507C24 = pIcons_LOD->LoadTexture("con_ArrR", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
884 pTextureIDs_GammaPositions[0] = pIcons_LOD->LoadTexture("convol10", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
885 pTextureIDs_GammaPositions[1] = pIcons_LOD->LoadTexture("convol20", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
886 pTextureIDs_GammaPositions[2] = pIcons_LOD->LoadTexture("convol30", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
887 pTextureIDs_GammaPositions[3] = pIcons_LOD->LoadTexture("convol40", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
888 pTextureIDs_GammaPositions[4] = pIcons_LOD->LoadTexture("convol50", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
889 pTextureIDs_GammaPositions[5] = pIcons_LOD->LoadTexture("convol60", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
890 pTextureIDs_GammaPositions[6] = pIcons_LOD->LoadTexture("convol70", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
891 pTextureIDs_GammaPositions[7] = pIcons_LOD->LoadTexture("convol80", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
892 pTextureIDs_GammaPositions[8] = pIcons_LOD->LoadTexture("convol90", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
893 pTextureIDs_GammaPositions[9] = pIcons_LOD->LoadTexture("convol00", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
894 uTextureID_507C50 = pIcons_LOD->LoadTexture("opvdG-bs", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
895 uTextureID_507C54 = pIcons_LOD->LoadTexture("opvdG-cl", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
896 uTextureID_507C58 = pIcons_LOD->LoadTexture("opvdG-tn", TEXTURE_16BIT_PALETTE);
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
897 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_VideoOptions, 0, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
898 pGUIWindow_CurrentMenu->CreateButton(0xF1u, 0x12Eu, 0xD6u, 0x28u, v0, 0, 0x71u, 0, 0, v1, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
899 if ( pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
900 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
901 pGUIWindow_CurrentMenu->CreateButton(0x13u, 0x118u, 0xD6u, 0x12u, v0, 0, 0x1A6u, 0, 0, v1, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
902 pGUIWindow_CurrentMenu->CreateButton(0x13u, 0x12Eu, 0xD6u, 0x12u, v0, 0, 0x1A7u, 0, 0, v1, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
903 pGUIWindow_CurrentMenu->CreateButton(0x13u, 0x144u, 0xD6u, 0x12u, v0, 0, 0x1A8u, 0, 0, v1, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
904 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
905 if ( !pRenderer->bWindowMode )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
906 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
907 v0 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
908 if ( GammaController::IsGammaSupported() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
909 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
910 ptr_50C9CC = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
911 0x15u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
912 0xA1u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
913 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
914 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
915 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
916 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
917 0x1A9u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
918 4u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
919 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
920 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
921 &pIcons_LOD->pTextures[uTextureID_507C20],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
922 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
923 ptr_50C9C8 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
924 0xD5u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
925 0xA1u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
926 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
927 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
928 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
929 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
930 0x1A9u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
931 5u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
932 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
933 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
934 &pIcons_LOD->pTextures[uTextureID_507C24],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
935 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
936 v164 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
937 v150 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
938 v143 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
939 v138 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
940 v134 = 425;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
941 v131 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
942 v129 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
943 v126 = 18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
944 v124 = 170;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
945 v122 = 162;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
946 v120 = 42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
947 LABEL_117:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
948 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
949 v120,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
950 v122,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
951 v124,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
952 v126,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
953 v129,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
954 v131,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
955 v134,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
956 v138,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
957 v143,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
958 v150,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
959 v164);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
960 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
961 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
962 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
963 case UIMSG_ToggleTint|0x1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
964 if ( uMessageParam == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
965 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
966 --uGammaPos;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
967 if ( (uGammaPos & 0x80000000u) != 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
968 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
969 uGammaPos = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
970 goto LABEL_128;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
971 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
972 v19 = (double)(signed int)uGammaPos * 0.1 + 0.6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
973 pGame->pGammaController->Initialize(v19);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
974 v166 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
975 v152 = (int)ptr_50C9CC;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
976 v145 = (WindowType)90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
977 v140 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
978 v136 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
979 v20 = 21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
980 goto LABEL_122;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
981 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
982 if ( uMessageParam == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
983 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
984 ++uGammaPos;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
985 if ( (signed int)uGammaPos <= 9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
986 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
987 v21 = (double)(signed int)uGammaPos * 0.1 + 0.6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
988 pGame->pGammaController->Initialize(v21);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
989 v20 = 213;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
990 v166 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
991 v152 = (int)ptr_50C9C8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
992 v145 = (WindowType)90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
993 v140 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
994 v136 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
995 LABEL_122:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
996 GUIWindow::Create(v20, 0xA1u, v136, v140, v145, v152, v166);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
997 goto LABEL_128;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
998 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
999 uGammaPos = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1000 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1001 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1002 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1003 uGammaPos = (pMouse->GetCursorPos(&a2)->x - 42) / 17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1004 v22 = (double)(signed int)uGammaPos * 0.1 + 0.6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1005 pGame->pGammaController->Initialize(v22);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1006 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1007 LABEL_128:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1008 v165 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1009 v151 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1010 v144 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1011 v139 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1012 v135 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1013 v132 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1014 v130 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1015 v127 = 21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1016 goto _play_sound_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1017 case UIMSG_ToggleBloodsplats:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1018 pGame->ToggleFlags2(0x20u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1019 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1020 case UIMSG_ToggleColoredLights:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1021 pRenderer->bUseColoredLights = pRenderer->bUseColoredLights == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1022 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1023 case UIMSG_ToggleTint:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1024 pRenderer->bTinting = pRenderer->bTinting == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1025 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1026 case UIMSG_ChangeMusicVolume:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1027 if ( uMessageParam == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1028 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1029 --uMusicVolimeMultiplier;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1030 if ( (char)uMusicVolimeMultiplier < 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1031 uMusicVolimeMultiplier = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1032 v167 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1033 v23 = 243;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1034 v153 = (int)ptr_50C9CC;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1035 LABEL_136:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1036 GUIWindow::Create(v23, 0xD8u, 0, 0, (enum WindowType)90, v153, v167);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1037 goto LABEL_143;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1038 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1039 if ( uMessageParam == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1040 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1041 ++uMusicVolimeMultiplier;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1042 if ( (char)uMusicVolimeMultiplier > 9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1043 uMusicVolimeMultiplier = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1044 v167 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1045 v23 = 435;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1046 v153 = (int)ptr_50C9C8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1047 goto LABEL_136;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1048 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1049 uMusicVolimeMultiplier = (pMouse->GetCursorPos(&v202)->x - 263) / 17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1050 if ( (char)uMusicVolimeMultiplier > 9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1051 uMusicVolimeMultiplier = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1052 LABEL_143:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1053 if ( uMusicVolimeMultiplier )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1054 pAudioPlayer->PlaySound(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1055 SOUND_Bell,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1056 -1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1057 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1058 -1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1059 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1060 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1061 (signed __int64)(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1062 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1063 pAudioPlayer->SetMusicVolume(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1064 (signed __int64)(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1065 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1066 case UIMSG_ChangeSoundVolume:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1067 if ( uMessageParam == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1068 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1069 --uSoundVolumeMultiplier;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1070 if ( (char)uSoundVolumeMultiplier < 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1071 uSoundVolumeMultiplier = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1072 v168 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1073 v24 = 243;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1074 v154 = (int)ptr_50C9CC;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1075 LABEL_150:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1076 GUIWindow::Create(v24, 0xA2u, 0, 0, (enum WindowType)90, v154, v168);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1077 goto LABEL_157;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1078 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1079 if ( uMessageParam == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1080 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1081 ++uSoundVolumeMultiplier;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1082 if ( (char)uSoundVolumeMultiplier > 8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1083 uSoundVolumeMultiplier = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1084 v168 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1085 v24 = 435;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1086 v154 = (int)ptr_50C9C8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1087 goto LABEL_150;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1088 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1089 uSoundVolumeMultiplier = (pMouse->GetCursorPos(&v207)->x - 263) / 17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1090 if ( (char)uSoundVolumeMultiplier > 8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1091 uSoundVolumeMultiplier = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1092 LABEL_157:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1093 pAudioPlayer->SetMasterVolume(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1094 (signed __int64)(pSoundVolumeLevels[(char)uSoundVolumeMultiplier] * 128.0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1095 v165 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1096 v151 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1097 v144 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1098 v139 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1099 v135 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1100 v132 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1101 v130 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1102 v127 = 218;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1103 goto _play_sound_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1104 case UIMSG_ToggleFlipOnExit:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1105 bFlipOnExit = bFlipOnExit == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1106 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1107 case UIMSG_ToggleAlwaysRun:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1108 bAlwaysRun = bAlwaysRun == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1109 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1110 case UIMSG_ToggleWalkSound:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1111 bWalkSound = bWalkSound == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1112 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1113 case UIMSG_ToggleShowDamage:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1114 bShowDamage = bShowDamage == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1115 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1116 case UIMSG_ChangeVoiceVolume:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1117 if ( uMessageParam == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1118 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1119 --uVoicesVolumeMultiplier;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1120 if ( (char)uVoicesVolumeMultiplier < 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1121 uVoicesVolumeMultiplier = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1122 v169 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1123 v25 = 243;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1124 v155 = (int)ptr_50C9CC;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1125 LABEL_166:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1126 GUIWindow::Create(v25, 0x10Eu, 0, 0, (enum WindowType)90, v155, v169);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1127 goto LABEL_173;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1128 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1129 if ( uMessageParam == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1130 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1131 ++uVoicesVolumeMultiplier;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1132 if ( (char)uVoicesVolumeMultiplier > 8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1133 uVoicesVolumeMultiplier = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1134 v169 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1135 v25 = 435;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1136 v155 = (int)ptr_50C9C8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1137 goto LABEL_166;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1138 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1139 uVoicesVolumeMultiplier = (pMouse->GetCursorPos(&v205)->x - 263) / 17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1140 if ( (char)uVoicesVolumeMultiplier > 8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1141 uVoicesVolumeMultiplier = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1142 LABEL_173:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1143 if ( !uVoicesVolumeMultiplier )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1144 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1145 v165 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1146 v151 = (signed __int64)(pSoundVolumeLevels[(char)uVoicesVolumeMultiplier] * 128.0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1147 v144 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1148 v139 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1149 v135 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1150 v132 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1151 v130 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1152 v127 = 5788;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1153 goto _play_sound_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1154 case UIMSG_SetTurnSpeed:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1155 if ( uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1156 pParty->sRotationY = uMessageParam * pParty->sRotationY / uMessageParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1157 uTurnSpeed = uMessageParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1158 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1159 case UIMSG_SetGraphicsMode:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1160 if ( !bUseLoResSprites )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1161 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1162 byte_6BE388_graphicsmode = uMessageParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1163 LABEL_184:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1164 MM7Initialization();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1165 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1166 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1167 if ( uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1168 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1169 if ( uMessageParam == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1170 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1171 byte_6BE388_graphicsmode = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1172 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1173 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1174 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1175 if ( uMessageParam != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1176 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1177 byte_6BE388_graphicsmode = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1178 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1179 goto LABEL_184;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1180 }
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
1181 ModalWindow(pNPCTopics[453].pText, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1182 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1183 case UIMSG_SkillUp|0x2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1184 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1185 pEventTimer->Resume();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1186 goto LABEL_188;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1187 case UIMSG_OpenQuestBook:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1188 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1189 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1190 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1191 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1192 pEventTimer->Pause();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1193 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1194 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1195 ptr_507BE0 = GUIWindow::Create(493u, 355u, 0, 0, (enum WindowType)99, (int)ptr_507A10, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1196 bFlashQuestBook = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1197 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1198 case UIMSG_OpenAutonotes:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1199 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1200 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1201 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1202 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1203 pEventTimer->Pause();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1204 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1205 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1206 ptr_507BE0 = GUIWindow::Create(527u, 353u, 0, 0, (enum WindowType)99, (int)ptr_507A0C, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1207 bFlashAutonotesBook = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1208 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1209 case UIMSG_OpenMapBook:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1210 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1211 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1212 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1213 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1214 pEventTimer->Pause();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1215 viewparams->sPartyPosX = pParty->vPosition.x;
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
1216 viewparams->sPartyPosZ = pParty->vPosition.y;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1217 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1218 v26 = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1219 v27 = 353;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1220 v28 = 546;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1221 v170 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1222 v156 = (int)ptr_507A08;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1223 goto LABEL_210;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1224 case UIMSG_OpenCalendar:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1225 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1226 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1227 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1228 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1229 pEventTimer->Pause();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1230 pAudioPlayer->StopChannels(-1, -1);
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
1231 v26 = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, uMessage, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1232 v27 = 354;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1233 v28 = 570;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1234 v170 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1235 v156 = (int)dword_507A04;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1236 LABEL_210:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1237 pGUIWindow_CurrentMenu = v26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1238 ptr_507BE0 = GUIWindow::Create(v28, v27, 0, 0, (enum WindowType)99, v156, v170);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1239 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1240 case UIMSG_OpenHistoryBook:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1241 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1242 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1243 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1244 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1245 pEventTimer->Pause();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1246 pAudioPlayer->StopChannels(-1, -1);
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
1247 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, uMessage, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1248 ptr_507BE0 = GUIWindow::Create(0x258u, 0x169u, 0, 0, (enum WindowType)99, (int)ptr_507A00, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1249 bFlashHistoryBook = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1250 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1251 case UIMSG_CloseBook:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1252 back_to_game();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1253 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1254 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1255 if ( pCurrentScreen > 15 )
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1256 {
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1257 if ( pCurrentScreen >= 17
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1258 && (pCurrentScreen <= 18
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1259 || pCurrentScreen == 104) )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1260 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1261 LABEL_229:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1262 if ( dword_50CDC8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1263 goto LABEL_232;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1264 sub_42FC15();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1265 goto LABEL_231;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1266 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1267 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1268 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1269 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1270 if ( pCurrentScreen >= 14
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1271 || pCurrentScreen == 4
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1272 || pCurrentScreen == 10 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1273 goto LABEL_229;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1274 if ( pCurrentScreen == 13
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1275 && !dword_50CDC8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1276 && !dword_5C35C8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1277 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1278 sub_42FC15();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1279 dword_5C35C8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1280 LABEL_231:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1281 uMessageParam = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1282 goto LABEL_232;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1283 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1284 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1285 LABEL_232:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1286 if ( !ptr_507BDC )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1287 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1288 pRenderer->ClearZBuffer(0, 479);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1289 viewparams->bRedrawGameUI = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1290 viewparams->field_48 = v0;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1291 if ( pCurrentScreen )
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1292 {
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1293 if ( pCurrentScreen > 103 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1294 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1295 if ( pCurrentScreen == 104 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1296 goto LABEL_321;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1297 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1298 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1299 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1300 if ( pCurrentScreen < 100 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1301 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1302 switch ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1303 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1304 case 23:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1305 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1306 if ( some_active_character )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1307 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1308 uActiveCharacter = some_active_character;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1309 uActiveCharacter = pParty->GetNextActiveCharacter();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1310 some_active_character = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1311 if ( pParty->bTurnBasedModeOn )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1312 pTurnEngine->_40471C();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1313 dword_50C9D0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1314 dword_50C9D4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1315 dword_50C9D8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1316 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1317 if ( ptr_50C9A4 && ptr_50C9A4->uItemID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1318 {
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
1319 LOBYTE(ptr_50C9A4->uAttributes) &= 0xFu;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1320 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1321 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1322 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1323 goto LABEL_322;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1324 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1325 ptr_507BE0->Release();
26
93bf1d5f6a6d Game loading.
Nomad
parents: 23
diff changeset
1326 //crt_deconstruct_ptr_6A0118();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1327 ptr_507BE0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1328 pEventTimer->Resume();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1329 goto LABEL_322;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1330 case 11:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1331 case 12:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1332 pIcons_LOD->_4114F2();
26
93bf1d5f6a6d Game loading.
Nomad
parents: 23
diff changeset
1333 //crt_deconstruct_ptr_6A0118();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1334 goto LABEL_291;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1335 case 15:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1336 pCurrentScreen = 10;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1337 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1338 case 10:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1339 v29 = ptr_507BB8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1340 goto LABEL_249;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1341 case 25:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1342 v29 = ptr_507BC8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1343 LABEL_249:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1344 v29->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1345 pIcons_LOD->_4114F2();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1346 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1347 viewparams->bRedrawGameUI = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1348 pEventTimer->Resume();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1349 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1350 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1351 thisa = (signed int)&uTextureID_507C60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1352 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1353 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1354 if ( *(int *)thisa )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1355 pIcons_LOD->pTextures[*(int *)thisa].Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1356 thisa += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1357 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1358 while ( thisa < (signed int)&dword_507CBC );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1359 memset(&uTextureID_507C60, 0, 0x5Cu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1360 pIcons_LOD->_40F9C5();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1361 WriteWindowsRegistryInt("soundflag", (char)uSoundVolumeMultiplier);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1362 WriteWindowsRegistryInt("musicflag", (char)uMusicVolimeMultiplier);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1363 WriteWindowsRegistryInt("CharVoices", (char)uVoicesVolumeMultiplier);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1364 WriteWindowsRegistryInt("WalkSound", bWalkSound);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1365 WriteWindowsRegistryInt("ShowDamage", bShowDamage);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1366 WriteWindowsRegistryInt("graphicsmode", (unsigned __int8)byte_6BE388_graphicsmode);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1367 WriteWindowsRegistryInt("valAlwaysRun", bAlwaysRun);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1368 WriteWindowsRegistryInt("FlipOnExit", bFlipOnExit);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1369 if ( !uTurnSpeed )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1370 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1371 v171 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1372 goto LABEL_261;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1373 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1374 if ( uTurnSpeed == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1375 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1376 v171 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1377 LABEL_261:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1378 v30 = v171;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1379 goto LABEL_262;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1380 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1381 if ( uTurnSpeed != 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1382 goto LABEL_291;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1383 v30 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1384 LABEL_262:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1385 v31 = "TurnDelta";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1386 LABEL_263:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1387 WriteWindowsRegistryInt(v31, v30);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1388 LABEL_291:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1389 stru_506E40.Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1390 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1391 case 1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1392 pIcons_LOD->_40F9C5();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1393 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1394 pIcons_LOD->_40F9C5();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1395 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1396 goto LABEL_291;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1397 case 28:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1398 if ( pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1399 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1400 WriteWindowsRegistryInt("Colored Lights", pRenderer->bUseColoredLights);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1401 WriteWindowsRegistryInt("Tinting", pRenderer->bTinting);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1402 WriteWindowsRegistryInt("Bloodsplats", (LOBYTE(pGame->uFlags2) >> 5) & 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1403 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1404 if ( pRenderer->bWindowMode )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1405 goto LABEL_291;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1406 v30 = uGammaPos;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1407 v31 = "GammaPos";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1408 goto LABEL_263;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1409 case 26:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1410 v197 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1411 v32 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1412 while ( *((char *)word_506E6C + v32) != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1413 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1414 ++v32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1415 if ( v32 >= 28 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1416 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1417 thisb = (signed int)&uTextureID_507BF4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1418 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1419 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1420 if ( *(int *)thisb )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1421 pIcons_LOD->pTextures[*(int *)thisb].Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1422 thisb += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1423 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1424 while ( thisb < (signed int)&dword_507C08 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1425 memset(&uTextureID_507BF4, 0, 0x14u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1426 pIcons_LOD->_40F9C5();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1427 uAction = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1428 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1429 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1430 v33 = pKeyActionMap->GetActionVKey((enum InputAction)uAction);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1431 if ( v33 != pPrevVirtualCidesMapping[uAction] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1432 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1433 if ( v197 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1434 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1435 v34 = pKeyActionMap->GetActionVKey((enum InputAction)uAction);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1436 GUI_ReplaceHotkey(v34, LOBYTE(pPrevVirtualCidesMapping[uAction]), v0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1437 v197 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1438 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1439 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1440 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1441 v35 = pKeyActionMap->GetActionVKey((enum InputAction)uAction);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1442 GUI_ReplaceHotkey(v35, LOBYTE(pPrevVirtualCidesMapping[uAction]), 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1443 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1444 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1445 if ( uAction
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1446 && uAction != 2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1447 && uAction != 3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1448 && uAction != v0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1449 && uAction != 25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1450 && uAction != 26 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1451 v172 = (KeyToggleType)v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1452 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1453 v172 = (KeyToggleType)0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1454 pKeyActionMap->SetKeyMapping(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1455 uAction,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1456 pPrevVirtualCidesMapping[uAction],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1457 v172);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1458 ++uAction;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1459 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1460 while ( uAction < 28 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1461 pKeyActionMap->StoreMappings();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1462 goto LABEL_291;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1463 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1464 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1465 goto LABEL_623;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1466 case 5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1467 if ( dword_506F14 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1468 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1469 Rest(_506F18_num_hours_to_sleep);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1470 pParty->pPlayers[3].pConditions[2] = 0i64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1471 pParty->pPlayers[2].pConditions[2] = 0i64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1472 pParty->pPlayers[1].pConditions[2] = 0i64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1473 pParty->pPlayers[0].pConditions[2] = 0i64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1474 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1475 pTexture_RestUI_CurrentSkyFrame->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1476 pTexture_RestUI_CurrentHourglassFrame->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1477 pTexture_RestUI_CurrentHourglassFrame = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1478 pTexture_RestUI_CurrentSkyFrame = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1479 pIcons_LOD->_40F9C5();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1480 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1481 _506F18_num_hours_to_sleep = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1482 dword_506F14 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1483 dword_507B94 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1484 goto LABEL_322;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1485 case 14:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1486 pGUIWindow_CurrentMenu->Release();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1487 pCurrentScreen = 13;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1488 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1489 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1490 case 13:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1491 if ( uDialogueType )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1492 uDialogueType = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1493 if ( uGameState == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1494 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1495 while ( sub_4BD8B5() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1496 ;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1497 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1498 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1499 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1500 if ( sub_4BD8B5() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1501 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1502 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1503 sub_4B1D27();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1504 pAudioPlayer->PlaySound((SoundID)(SOUND_EnteringAHouse|0x1), 814, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1505 pVideoPlayer->Unload();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1506 pGUIWindow_CurrentMenu = ptr_507BC0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1507 goto LABEL_322;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1508 case 18:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1509 if ( uCurrentHouse_Animation == 153 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1510 HousePlaySomeSound(0x99u, 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1511 pVideoPlayer->Unload();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1512 goto LABEL_306;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1513 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1514 LABEL_306:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1515 if ( dword_5B65CC )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1516 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1517 pParty->field_709 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1518 LOBYTE(pNPCStats->pNewNPCData[dword_5B65CC].uFlags) &= 0x7Fu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1519 sub_44A56A();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1520 viewparams->bRedrawGameUI = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1521 dword_5B65CC = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1522 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1523 goto LABEL_317;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1524 case 19:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1525 memset(GameUI_StatusBar_TimedString, 0, 0xC8u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1526 sub_4452BB();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1527 goto LABEL_317;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1528 case 17:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1529 if ( pParty->vPosition.x < -22528 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1530 pParty->vPosition.x = -22528;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1531 if ( pParty->vPosition.x > 22528 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1532 pParty->vPosition.x = 22528;
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
1533 if ( pParty->vPosition.y < -22528 )
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
1534 pParty->vPosition.y = -22528;
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
1535 if ( pParty->vPosition.y > 22528 )
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
1536 pParty->vPosition.y = 22528;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1537 goto LABEL_317;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1538 case 16:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1539 pVideoPlayer->Unload();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1540 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1541 case 7:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1542 goto LABEL_319;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1543 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1544 goto LABEL_322;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1545 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1546 goto LABEL_322;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1547 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1548 LABEL_319:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1549 sub_4196A0();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1550 sub_419379();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1551 LABEL_321:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1552 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1553 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1554 LABEL_322:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1555 if ( ptr_507BD4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1556 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1557 if ( pCurrentScreen == 7 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1558 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1559 pMouse->SetCursorBitmap("MICON2");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1560 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1561 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1562 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1563 ptr_507BD4->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1564 ptr_507BD4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1565 pMouse->SetCursorBitmap("MICON1");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1566 GameUI_StatusBar_TimedStringTimeLeft = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1567 unk_50C9A0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1568 back_to_game();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1569 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1570 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1571 if ( (signed int)uActiveCharacter < v0 || (signed int)uActiveCharacter > 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1572 uActiveCharacter = pParty->GetNextActiveCharacter();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1573 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1574 if ( pGUIWindow_CurrentMenu == ptr_507BC0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1575 ptr_507BC0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1576 pGUIWindow_CurrentMenu = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1577 pEventTimer->Resume();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1578 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1579 viewparams->bRedrawGameUI = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1580 pIcons_LOD->_4355F7();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1581 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1582 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1583 v36 = ptr_507BD4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1584 if ( !ptr_507BD4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1585 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1586 dword_6BE138 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1587 GUIWindow::Create(0x25Au, 0x1C2u, 0, 0, (enum WindowType)90, (int)ptr_5079F0, v0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1588 pEventTimer->Pause();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1589 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1590 ++pIcons_LOD->uTexturePacksCount;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1591 pCurrentScreen = v0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1592 if ( !pIcons_LOD->uNumPrevLoadedFiles )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1593 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
1594 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)3, 0, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1595 uTextureID_507944 = pIcons_LOD->LoadTexture("options", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1596 uTextureID_507940 = pIcons_LOD->LoadTexture("new1", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1597 uTextureID_50793C = pIcons_LOD->LoadTexture("load1", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1598 uTextureID_507938 = pIcons_LOD->LoadTexture("save1", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1599 uTextureID_507934 = pIcons_LOD->LoadTexture("controls1", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1600 uTextureID_507930 = pIcons_LOD->LoadTexture("resume1", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1601 uTextureID_50792C = pIcons_LOD->LoadTexture("quit1", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1602 ptr_50C9C4 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1603 0x13u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1604 0x9Bu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1605 0xD6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1606 0x28u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1607 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1608 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1609 0x7Cu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1610 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1611 0x4Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1612 pGlobalTXT_LocalizationStrings[614],// "New Game"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1613 (Texture *)(uTextureID_507940 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507940] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1614 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1615 ptr_50C9C0 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1616 0x13u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1617 0xD1u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1618 0xD6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1619 0x28u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1620 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1621 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1622 0x7Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1623 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1624 0x53u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1625 pGlobalTXT_LocalizationStrings[615],// "Save Game"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1626 (Texture *)(uTextureID_507938 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507938] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1627 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1628 ptr_50C9BC = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1629 0x13u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1630 0x107u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1631 0xD6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1632 0x28u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1633 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1634 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1635 0x7Du,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1636 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1637 0x4Cu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1638 pGlobalTXT_LocalizationStrings[616],// "Load Game"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1639 (Texture *)(uTextureID_50793C != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_50793C] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1640 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1641 pyt_50C9B8 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1642 0xF1u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1643 0x9Bu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1644 0xD6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1645 0x28u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1646 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1647 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1648 0x7Fu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1649 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1650 0x43u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1651 pGlobalTXT_LocalizationStrings[617],// ""Sound, Keyboard, Game Options:""
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1652 (Texture *)(uTextureID_507934 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507934] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1653 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1654 ptr_50C9B4 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1655 0xF1u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1656 0xD1u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1657 0xD6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1658 0x28u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1659 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1660 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1661 0x84u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1662 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1663 0x51u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1664 pGlobalTXT_LocalizationStrings[618],// "Quit"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1665 (Texture *)(uTextureID_50792C != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_50792C] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1666 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1667 ptr_50C9B0 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1668 0xF1u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1669 0x107u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1670 0xD6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1671 0x28u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1672 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1673 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1674 0x7Bu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1675 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1676 0x52u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1677 pGlobalTXT_LocalizationStrings[619],// "Return to Game"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1678 (Texture *)(uTextureID_507930 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507930] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1679 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1680 pGUIWindow_CurrentMenu->_41D08F(6, v0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1681 viewparams->field_48 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1682 stru_506E40.Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1683 uNumSeconds = (unsigned int)MakeScreenshot(155, 117);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1684 pRenderer->SavePCXImage("gamma.pcx", (char *)uNumSeconds, 155, 117);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1685 free((void *)uNumSeconds);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1686 stru_506E40._40E55E("gamma.pcx", 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1687 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1688 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1689 goto LABEL_333;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1690 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1691 sub_41426F();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1692 _continue:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1693 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1694 case UIMSG_BC:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1695 if ( uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1696 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1697 GUIWindow::Create(0x272u, 0xB3u, 0, 0, (enum WindowType)90, (int)ptr_5079E8, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1698 v37 = (pParty->pHirelings[0].pName != 0)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1699 + (pParty->pHirelings[1].pName != 0)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1700 + (unsigned __int8)pParty->field_70A
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1701 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1702 if ( (unsigned __int8)pParty->field_709 < v37 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1703 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1704 ++pParty->field_709;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1705 if ( (unsigned __int8)pParty->field_709 >= v37 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1706 pParty->field_709 = (pParty->pHirelings[0].pName != 0)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1707 + (pParty->pHirelings[1].pName != 0)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1708 + pParty->field_70A
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1709 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1710 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1711 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1712 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1713 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1714 GUIWindow::Create(0x1D5u, 0xB3u, 0, 0, (enum WindowType)90, (int)ptr_5079EC, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1715 if ( pParty->field_709 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1716 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1717 --pParty->field_709;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1718 if ( pParty->field_709 < 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1719 pParty->field_709 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1720 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1721 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1722 DrawHiredNPCs();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1723 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1724 case UIMSG_OpenRestUI|0x2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1725 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1726 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1727 dword_50CDC8 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1728 sub_42FBDD();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1729 HousePlaySomeSound(uCurrentHouse_Animation, 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1730 pVideoPlayer->Unload();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1731 sub_44603D();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1732 viewparams->bRedrawGameUI = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1733 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
1734 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1735 if ( dword_59117C_teleportx )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1736 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1737 pParty->vPosition.x = dword_59117C_teleportx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1738 _5B65A8_npcdata_uflags_or_other = dword_59117C_teleportx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1739 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1740 if ( dword_591178_teleporty )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1741 {
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
1742 pParty->vPosition.y = dword_591178_teleporty;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1743 _5B65AC_npcdata_fame_or_other = dword_591178_teleporty;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1744 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1745 if ( dword_591174_teleportz )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1746 {
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
1747 pParty->vPosition.z = dword_591174_teleportz;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1748 _5B65B0_npcdata_rep_or_other = dword_591174_teleportz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1749 pParty->uFallStartY = dword_591174_teleportz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1750 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1751 if ( dword_591170_teleport_directiony )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1752 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1753 pParty->sRotationY = dword_591170_teleport_directiony;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1754 _5B65B4_npcdata_loword_house_or_other = dword_591170_teleport_directiony;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1755 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1756 if ( dword_59116C_teleport_directionx )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1757 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1758 pParty->sRotationX = dword_59116C_teleport_directionx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1759 _5B65B8_npcdata_hiword_house_or_other = dword_59116C_teleport_directionx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1760 v38 = dword_591168_teleport_speedz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1761 pParty->uFallSpeed = dword_591168_teleport_speedz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1762 dword_5B65BC = dword_591168_teleport_speedz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1763 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1764 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1765 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1766 v38 = dword_5B65BC;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1767 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1768 if ( *dword_591164_teleport_map_name != 48 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1769 {
27
be2066176d89 On level initialization
Nomad
parents: 26
diff changeset
1770 pGameLoadingUI_ProgressBar->uType = (GUIProgressBar::Type)2;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1771 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
1772 OnMapLeave();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1773 sub_44987B(dword_591164_teleport_map_name, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1774 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1775 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1776 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1777 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1778 dword_597F18 = dword_5C341C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1779 EventProcessor(dword_5C3418, 0, v0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1780 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1781 dword_597F18 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1782 if ( !_strcmpi(byte_6BE3B0, "d05.blv") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1783 pParty->uTimePlayed += 1474560i64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1784 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1785 case 0x19C:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1786 sub_42FC15();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1787 pVideoPlayer->Unload();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1788 sub_44603D();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1789 dword_597F18 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1790 goto LABEL_422;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1791 case UIMSG_CycleCharacters:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1792 v39 = GetAsyncKeyState(VK_SHIFT);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1793 v40 = CycleCharacter(v39);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1794 goto LABEL_421;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1795 case UIMSG_LoadGame|0x8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1796 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1797 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1798 dword_50CDC8 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1799 sub_42FBDD();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1800 v195 = (NPCData *)GetTravelTime();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1801 strcpy(pOutdoor->pLevelFilename, pCurrentMapName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1802 if ( bUnderwater != 1 && pParty->bFlying
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
1803 || pOutdoor->GetTravelDestination(pParty->vPosition.x, pParty->vPosition.y, &pOut, 20) != v0 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1804 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1805 viewparams->bRedrawGameUI = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1806 LABEL_387:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1807 sub_42FC15();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1808 if ( pParty->vPosition.x < -22528 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1809 pParty->vPosition.x = -22528;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1810 if ( pParty->vPosition.x > 22528 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1811 pParty->vPosition.x = 22528;
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
1812 if ( pParty->vPosition.y < -22528 )
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
1813 pParty->vPosition.y = -22528;
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
1814 if ( pParty->vPosition.y > 22528 )
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
1815 pParty->vPosition.y = 22528;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1816 LABEL_317:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1817 sub_44603D();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1818 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1819 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1820 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1821 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1822 pParty->field_6E4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1823 pParty->field_6E0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1824 pStru277->_427D48(v0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1825 sub_44603D();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1826 pEventTimer->Pause();
27
be2066176d89 On level initialization
Nomad
parents: 26
diff changeset
1827 pGameLoadingUI_ProgressBar->_443484((GUIProgressBar::Type)2);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1828 ++pGameLoadingUI_ProgressBar->uProgressMax;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1829 SaveGame(v0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1830 pGameLoadingUI_ProgressBar->Progress();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1831 RestAndHeal(1440 * (signed int)v195);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1832 if ( pParty->uNumFoodRations )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1833 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1834 pParty->RestAndHeal();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1835 if ( ((pParty->uNumFoodRations - (signed int)v195) & 0x80000000u) != 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1836 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1837 thisc = pParty->pPlayers;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1838 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1839 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1840 thisc->SetCondition(v0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1841 ++thisc;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1842 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1843 while ( (signed int)thisc < (signed int)pParty->pHirelings );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1844 ++pParty->field_764;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1845 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1846 Party::TakeFood((unsigned int)v195);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1847 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1848 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1849 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1850 thisd = pParty->pPlayers;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1851 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1852 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1853 thisd->SetCondition(v0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1854 ++thisd;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1855 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1856 while ( (signed int)thisd < (signed int)pParty->pHirelings );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1857 ++pParty->field_764;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1858 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1859 pPaletteManager->ResetNonLocked();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1860 pSpriteFrameTable->ResetSomeSpriteFlags();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1861 strcpy(pCurrentMapName, &pOut);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1862 strcpy(&pLevelName, pCurrentMapName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1863 v41 = strtok(&pLevelName, ".");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1864 strcpy(&pLevelName, v41);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1865 Level_LoadEvtAndStr(&pLevelName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1866 pDecalBuilder->Reset( 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1867 LoadLevel_InitializeLevelEvt();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1868 uLevelMapStatsID = pMapStats->GetMapInfo(pCurrentMapName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1869 bUnderwater = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1870 bNoNPCHiring = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1871 pGame->uFlags2 &= 0xFFFFFFF7u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1872 if ( Is_out15odm_underwater() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1873 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1874 bUnderwater = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1875 pGame->uFlags2 |= 8u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1876 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1877 if ( !_strcmpi(pCurrentMapName, "out15.odm") || !_strcmpi(pCurrentMapName, "d47.blv") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1878 bNoNPCHiring = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1879 v0 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1880 PrepareToLoadODM(1u, (OutdoorCamera *)1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1881 pAudioPlayer->SetMapEAX();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1882 bDialogueUI_InitializeActor_NPC_ID = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1883 OnMapLoad();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1884 pOutdoor->SetFog();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1885 TeleportToStartingPoint(uLevel_StartingPointType);
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
1886 pParty->vPosition.z = GetTerrainHeightsAroundParty2(pParty->vPosition.x, pParty->vPosition.y, (int *)&v213, 0);
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
1887 pParty->uFallStartY = pParty->vPosition.z;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1888 sub_461103();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1889 pEventTimer->Resume();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1890 viewparams->bRedrawGameUI = 1;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
1891 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1892 pGameLoadingUI_ProgressBar->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1893 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1894 goto LABEL_422;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1895 case UIMSG_SaveGame|0x8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1896 goto LABEL_387;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1897 case UIMSG_BE:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1898 if ( pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1899 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1900 LOWORD(v42) = pGame->pVisInstance->get_picked_object_zbuf_val();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1901 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1902 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1903 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1904 uNumSeconds = (unsigned int)pMouse->GetCursorPos(&v210);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1905 v43 = pMouse->GetCursorPos(&v208);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1906 v42 = pRenderer->pActiveZBuffer[*(int *)uNumSeconds + pSRZBufferLineOffsets[v43->y]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1907 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1908 v44 = (unsigned __int16)v42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1909 v45 = v44 & 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1910 uNumSeconds = v44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1911 v46 = v44 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1912 if ( v45 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1913 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1914 v47 = pActors[v46].uAIState == Dead;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1915 goto LABEL_400;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1916 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1917 if ( v45 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1918 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1919 v47 = (pObjectList->pObjects[pLayingItems[v46].uObjectDescID].uFlags & 0x10) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1920 LABEL_400:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1921 if ( !v47 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1922 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1923 goto LABEL_415;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1924 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1925 if ( v45 == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1926 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1927 v48 = pLevelDecorations[v46].field_16_event_id == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1928 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1929 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1930 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1931 if ( v45 != 6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1932 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1933 if ( uCurrentlyLoadedLevelType != v0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1934 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1935 v50 = &pOutdoor->pBModels[v44 >> 9].pFaces[v46 & 0x3F];
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
1936 if ( !(v50->uAttributes & 0x02000000) || !v50->sCogTriggeredID )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1937 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1938 v44 = uNumSeconds;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1939 goto LABEL_415;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1940 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1941 v49 = &pIndoor->pFaces[v46];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1942 if ( !(BYTE3(v49->uAttributes) & 2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1943 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1944 v48 = pIndoor->pFaceExtras[v49->uFaceExtraID].uEventID == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1945 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1946 if ( v48 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1947 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1948 LABEL_415:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1949 v51 = ptr_507BD4->ptr_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1950 *((char *)v51 + 8) &= 0xBFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1951 LABEL_416:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1952 *((short *)v51 + 2) = uMessageParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1953 *((int *)v51 + 3) = v44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1954 pParty->pPlayers[*((short *)v51 + 1)].SetRecoveryTime(300);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1955 v36 = ptr_507BD4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1956 LABEL_333:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1957 v36->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1958 ptr_507BD4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1959 pMouse->SetCursorBitmap("MICON1");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1960 GameUI_StatusBar_TimedStringTimeLeft = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1961 unk_50C9A0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1962 back_to_game();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1963 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1964 case UIMSG_ChangeGameState|0x40:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1965 case 0x8D:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1966 case 0x8F:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1967 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1968 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1969 if ( unk_50C9A0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1970 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1971 v40 = uMessageParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1972 LABEL_421:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1973 uActiveCharacter = v40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1974 LABEL_422:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1975 viewparams->bRedrawGameUI = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1976 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1977 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1978 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1979 if ( ptr_507BD4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1980 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1981 v52 = ptr_507BD4->ptr_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1982 switch ( uMessage )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1983 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1984 case 69:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1985 *((char *)v52 + 8) &= 0xFDu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1986 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1987 case 141:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1988 *((char *)v52 + 9) &= 0xFEu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1989 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1990 case 143:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1991 *((char *)v52 + 9) &= 0xFDu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1992 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1993 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1994 *((short *)v52 + 2) = uMessageParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1995 pParty->pPlayers[*((short *)v52 + 1)].SetRecoveryTime(300);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1996 ptr_507BD4->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1997 ptr_507BD4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1998 pEventTimer->Resume();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1999 pMouse->SetCursorBitmap("MICON1");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2000 GameUI_StatusBar_TimedStringTimeLeft = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2001 unk_50C9A0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2002 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2003 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2004 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2005 case UIMSG_BF:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2006 dword_50CDC8 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2007 sub_42FBDD();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2008 SaveGame(v0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2009 strcpy(pCurrentMapName, pMapStats->pInfos[uHouse_ExitPic].pFilename);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2010 dword_6BE364_game_settings_1 |= v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2011 uGameState = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2012
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2013
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2014 //v53 = p2DEvents_minus1_::30[26 * (unsigned int)ptr_507BC0->ptr_1C];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2015 v53 = p2DEvents[(unsigned int)ptr_507BC0->ptr_1C - 1]._quest_related;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2016
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2017 if ( v53 < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2018 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2019 v54 = abs(v53) - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2020 _5B65B8_npcdata_hiword_house_or_other = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2021 dword_5B65BC = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2022 v55 = dword_4E4560[v54];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2023 _5B65AC_npcdata_fame_or_other = dword_4E4578[v54];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2024 v56 = dword_4E4590[v54];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2025 v57 = dword_4E45A8[v54];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2026 _5B65A8_npcdata_uflags_or_other = v55;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2027 _5B65B4_npcdata_loword_house_or_other = v57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2028 _5B65B0_npcdata_rep_or_other = v56;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2029 dword_5B65C0 = v55 | _5B65AC_npcdata_fame_or_other | v56 | v57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2030 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2031 sub_4BD8B5();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2032 goto LABEL_434;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2033 case UIMSG_C3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2034 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2035 v162 = uMessageParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2036 v148 = 195;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2037 goto LABEL_438;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2038 case UIMSG_B1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2039 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2040 v162 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2041 v148 = 177;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2042 LABEL_438:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2043 v141 = (WindowType)9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2044 LABEL_439:
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2045 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, v141, v148, v162);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2046 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2047 case UIMSG_B2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2048 v165 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2049 v151 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2050 v144 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2051 v139 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2052 bRecallingBeacon = uMessageParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2053 v135 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2054 v132 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2055 v130 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2056 v127 = uMessageParam + 204;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2057 goto _play_sound_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2058 case UIMSG_B4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2059 if ( !pGUIWindow_CurrentMenu )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2060 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2061 v58 = pPlayers[_506348_current_lloyd_playerid + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2062 uNumSeconds = (unsigned int)&v58->pInstalledBeacons[uMessageParam];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2063 if ( bRecallingBeacon )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2064 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2065 if ( !*((int *)&pSavegameThumbnails->pPixels + 10 * uMessageParam) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2066 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2067 v173 = pMapStats->pInfos[sub_410D99_get_map_index(HIWORD(v58->pInstalledBeacons[uMessageParam].field_18))].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2068 v157 = pGlobalTXT_LocalizationStrings[474];// "Recall to %s"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2069 goto _sprintex_2args_draw_status_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2070 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2071 v59 = pMapStats->GetMapInfo(pCurrentMapName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2072 thise = "Not in Map Stats";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2073 if ( v59 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2074 thise = pMapStats->pInfos[v59].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2075 if ( !*((int *)&pSavegameThumbnails->pPixels + 10 * uMessageParam) || !v59 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2076 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2077 v173 = thise;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2078 v157 = pGlobalTXT_LocalizationStrings[476];// "Set to %s"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2079 goto _sprintex_2args_draw_status_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2080 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2081 v174 = pMapStats->pInfos[sub_410D99_get_map_index(*(short *)(uNumSeconds + 26))].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2082 v158 = (unsigned int)thise;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2083 v146 = pGlobalTXT_LocalizationStrings[475];// "Set %s over %s"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2084 _sprintex_draw_status_and_continue:
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
2085 sprintf(pTmpBuf, v146, v158, v174);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2086 goto _set_status_string_pTmpBuf_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2087 case UIMSG_B5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2088 dword_50CDC8 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2089 goto LABEL_453;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2090 case UIMSG_B3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2091 thisf = pPlayers[_506348_current_lloyd_playerid + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2092 v195 = (NPCData *)&thisf->pInstalledBeacons[uMessageParam];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2093 if ( !*(_QWORD *)&v195->pName && bRecallingBeacon )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2094 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2095 byte_506360 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2096 thisf->CanCastSpell(uRequiredMana);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2097 if ( pParty->bTurnBasedModeOn )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2098 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2099 v60 = sRecoveryTime;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2100 pParty->pTurnBasedPlayerRecoveryTimes[_506348_current_lloyd_playerid] = sRecoveryTime;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2101 thisf->SetRecoveryTime(v60);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2102 pTurnEngine->_40471C();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2103 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2104 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2105 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2106 thisf->SetRecoveryTime(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2107 (signed __int64)(flt_6BE3A4_debug_recmod1 * (double)sRecoveryTime * 2.133333333333333));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2108 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2109 pAudioPlayer->PlaySound(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2110 (SoundID)word_4EE088_sound_ids[dword_506338],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2111 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2112 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2113 -1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2114 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2115 dword_50633C,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2116 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2117 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2118 if ( bRecallingBeacon )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2119 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2120 if ( _strcmpi(pCurrentMapName, (const char *)&pGames_LOD->pSubIndices[HIWORD(v195->uProfession)]) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2121 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2122 SaveGame(v0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2123 OnMapLeave();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2124 strcpy(pCurrentMapName, (const char *)&pGames_LOD->pSubIndices[HIWORD(v195->uProfession)]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2125 dword_6BE364_game_settings_1 |= v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2126 uGameState = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2127 _5B65A8_npcdata_uflags_or_other = v195->uFlags;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2128 _5B65AC_npcdata_fame_or_other = v195->fame;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2129 _5B65B0_npcdata_rep_or_other = v195->rep;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2130 _5B65B4_npcdata_loword_house_or_other = LOWORD(v195->house);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2131 _5B65B8_npcdata_hiword_house_or_other = HIWORD(v195->house);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2132 dword_5B65C0 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2133 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2134 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2135 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2136 pParty->vPosition.x = v195->uFlags;
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
2137 pParty->vPosition.y = v195->fame;
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
2138 pParty->vPosition.z = v195->rep;
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
2139 pParty->uFallStartY = pParty->vPosition.z;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2140 pParty->sRotationY = LOWORD(v195->house);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2141 pParty->sRotationX = HIWORD(v195->house);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2142 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2143 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2144 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2145 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2146 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2147 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2148 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2149 }
26
93bf1d5f6a6d Game loading.
Nomad
parents: 23
diff changeset
2150 //crt_deconstruct_ptr_6A0118();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2151 ptr_507BE0->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2152 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2153 ptr_507BE0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2154 pGUIWindow_CurrentMenu = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2155 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2156 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2157 {
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
2158 sprintf(a1, "data\\lloyd%d%d.pcx", _506348_current_lloyd_playerid + 1, uMessageParam + 1);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2159 SaveScreenshot(a1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2160 LoadThumbnailLloydTexture(uMessageParam, _506348_current_lloyd_playerid + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2161 v212 = qword_506350 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2162 v61 = v195;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2163 thisg = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2164 v62 = pParty->uTimePlayed + (signed __int64)((double)(qword_506350 << 7) * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2165 v195->pName = (char *)v62;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2166 v61->uPortraitID = HIDWORD(v62);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2167 v61->uFlags = pParty->vPosition.x;
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
2168 v61->fame = pParty->vPosition.y;
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
2169 v61->rep = pParty->vPosition.z;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2170 LOWORD(v61->house) = LOWORD(pParty->sRotationY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2171 HIWORD(v61->house) = LOWORD(pParty->sRotationX);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2172 if ( (signed int)pGames_LOD->uNumSubIndices / 2 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2173 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2174 uAction = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2175 while ( _strcmpi((const char *)pGames_LOD->pSubIndices + uAction, pCurrentMapName) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2176 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2177 ++thisg;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2178 uAction += 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2179 if ( thisg >= (signed int)pGames_LOD->uNumSubIndices / 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2180 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2181 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2182 HIWORD(v195->uProfession) = thisg;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2183 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2184 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2185 case UIMSG_B7:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2186 if ( uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2187 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2188 switch ( uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2189 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2190 case 1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2191 v63 = 208;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2192 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2193 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2194 v63 = 207;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2195 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2196 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2197 v63 = 211;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2198 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2199 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2200 v63 = 209;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2201 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2202 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2203 if ( uMessageParam != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2204 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2205 LABEL_486:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2206 SaveGame(v0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2207 v64 = pMapStats->GetMapInfo(pCurrentMapName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2208 v65 = uMessageParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2209 if ( v64 == stru_4ECBB8[uMessageParam].uMapInfoID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2210 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2211 pParty->vPosition.x = stru_4ECBB8[v65].pos.x;
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
2212 pParty->vPosition.y = stru_4ECBB8[v65].pos.y;
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
2213 pParty->vPosition.z = stru_4ECBB8[v65].pos.z;
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
2214 pParty->uFallStartY = pParty->vPosition.z;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2215 pParty->sRotationY = stru_4ECBB8[v65].rot_y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2216 pParty->sRotationX = stru_4ECBB8[v65].rot_x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2217 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2218 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2219 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2220 SaveGame(v0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2221 OnMapLeave();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2222 dword_6BE364_game_settings_1 |= v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2223 uGameState = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2224 strcpy(pCurrentMapName, pMapStats->pInfos[stru_4ECBB8[uMessageParam].uMapInfoID].pFilename);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2225 dword_5B65C0 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2226 _5B65A8_npcdata_uflags_or_other = stru_4ECBB8[uMessageParam].pos.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2227 _5B65AC_npcdata_fame_or_other = stru_4ECBB8[uMessageParam].pos.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2228 _5B65B0_npcdata_rep_or_other = stru_4ECBB8[uMessageParam].pos.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2229 v66 = stru_4ECBB8[uMessageParam].rot_x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2230 _5B65B4_npcdata_loword_house_or_other = stru_4ECBB8[uMessageParam].rot_y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2231 _5B65B8_npcdata_hiword_house_or_other = v66;
101
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
2232 InitializeActors();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2233 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2234 v67 = pGUIWindow_CurrentMenu->Hint;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2235 if ( v67 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2236 *((int *)v67 + 17) = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2237 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2238 pParty->pPlayers[(unsigned __int8)byte_50C0C0].CanCastSpell(0x14u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2239 LABEL_434:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2240 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2241 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2242 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2243 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2244 LABEL_771:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2245 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2246 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2247 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2248 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2249 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2250 v63 = 210;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2251 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2252 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2253 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2254 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2255 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2256 v63 = 206;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2257 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2258 if ( !(unsigned __int16)_449B57_test_bit(pParty->_award_bits, v63) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2259 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2260 goto LABEL_486;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2261 case UIMSG_B6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2262 if ( uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2263 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2264 switch ( uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2265 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2266 case 1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2267 v68 = 208;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2268 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2269 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2270 v68 = 207;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2271 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2272 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2273 v68 = 211;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2274 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2275 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2276 v68 = 209;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2277 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2278 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2279 if ( uMessageParam != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2280 goto LABEL_506;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2281 v68 = 210;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2282 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2283 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2284 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2285 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2286 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2287 v68 = 206;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2288 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2289 if ( !(unsigned __int16)_449B57_test_bit(pParty->_award_bits, v68) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2290 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2291 pRenderer->DrawTextureRGB(0, 0x160u, pTexture_StatusBar);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2292 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2293 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2294 LABEL_506:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2295 if ( uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2296 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2297 switch ( uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2298 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2299 case 1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2300 v69 = pMapStats->pInfos[4].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2301 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2302 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2303 v69 = pMapStats->pInfos[3].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2304 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2305 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2306 v69 = pMapStats->pInfos[10].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2307 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2308 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2309 v69 = pMapStats->pInfos[7].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2310 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2311 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2312 if ( uMessageParam != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2313 goto LABEL_519;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2314 v69 = pMapStats->pInfos[8].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2315 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2316 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2317 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2318 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2319 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2320 v69 = pMapStats->pInfos[21].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2321 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2322 v200 = v69;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2323 LABEL_519:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2324 v173 = v200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2325 v157 = pGlobalTXT_LocalizationStrings[35];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2326 goto _sprintex_2args_draw_status_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2327 case UIMSG_ShowFinalWindow:
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
2328 sprintf(
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2329 pFinalMessage,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2330 "%s\n \n%s\n \n%s",
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2331 pGlobalTXT_LocalizationStrings[151],// "Congratulations Adventurer."
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2332 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
2333 pGlobalTXT_LocalizationStrings[167]);// "- The Might and Magic VII Development Team."
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2334 ModalWindow(pFinalMessage, 196);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2335 uGameState = GAME_STATE_FINAL_WINDOW;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2336 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2337 case UIMSG_C4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2338 uGameState = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2339 strcpy((char *)pKeyActionMap->pPressedKeysBuffer, "2");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2340 goto LABEL_524;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2341 case UIMSG_D5|0x8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2342 LABEL_524:
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
2343 sprintf(pTmpBuf, "%s", pKeyActionMap->pPressedKeysBuffer);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2344 memcpy(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2345 &v216,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2346 texture_frame_table_txt_parser((const char *)pKeyActionMap->pPressedKeysBuffer, &v218),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2347 sizeof(v216));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2348 if ( v216.field_0 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2349 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2350 v195 = (NPCData *)((signed int)pGames_LOD->uNumSubIndices / 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2351 v70 = atoi(v216.pProperties[0]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2352 if ( v70 <= 0 || v70 >= 77 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2353 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2354 LABEL_90:
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
2355 v1 = "";
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2356 LABEL_91:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2357 v0 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2358 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2359 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2360 v71 = v70;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2361 strcpy(Str2, pMapStats->pInfos[v70].pFilename);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2362 v72 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2363 if ( (signed int)v195 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2364 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2365 thish = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2366 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2367 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2368 if ( !_strcmpi((const char *)&pGames_LOD->pSubIndices[thish], Str2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2369 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2370 ++thish;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2371 v72 = (NPCData *)((char *)v72 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2372 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2373 while ( (signed int)v72 < (signed int)v195 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2374 if ( (signed int)v72 < (signed int)v195 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2375 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2376 strcpy(pCurrentMapName, (const char *)&pGames_LOD->pSubIndices[(int)v72]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2377 dword_6BE364_game_settings_1 |= 1u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2378 uGameState = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2379 OnMapLeave();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2380 goto LABEL_90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2381 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2382 }
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
2383 sprintf(Str2, "No map found for %s", pMapStats->pInfos[v71].pName);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2384 v73 = Str2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2385 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2386 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2387 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2388 if ( v216.field_0 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2389 goto LABEL_90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2390 v74 = atoi(v216.pProperties[0]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2391 thisi = atoi(v216.pProperties[1]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2392 v75 = atoi(v216.pProperties[2]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2393 v76 = v75;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2394 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2395 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2396 if ( pIndoor->GetSector(v74, thisi, v75) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2397 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2398 v77 = thisi;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2399 LABEL_544:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2400 pParty->vPosition.x = v74;
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
2401 pParty->vPosition.y = v77;
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
2402 pParty->vPosition.z = v76;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2403 pParty->uFallStartY = v76;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2404 goto LABEL_90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2405 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2406 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2407 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2408 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2409 if ( v74 > -32768 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2410 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2411 if ( v74 < 32768 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2412 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2413 v77 = thisi;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2414 if ( thisi > -32768 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2415 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2416 if ( thisi < 32768 && v76 >= 0 && v76 < 10000 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2417 goto LABEL_544;
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 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2422 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2423 v73 = "Can't jump to that location!";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2424 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2425 ShowStatusBarString(v73, 6u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2426 goto LABEL_90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2427 case 0x19:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2428 if ( bUnderwater == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2429 goto LABEL_682;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2430 if ( !uActiveCharacter || (v78 = pPlayers[uActiveCharacter], v78->uTimeToRecovery) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2431 goto LABEL_90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2432 v79 = v78->uQuickSpell;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2433 v175 = uActiveCharacter;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2434 v159 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2435 v147 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2436 v80 = uActiveCharacter - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2437 goto LABEL_679;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2438 case 0x46:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2439 case UIMSG_Quit|0x8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2440 if ( pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2441 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2442 v81 = pGame->pVisInstance->get_picked_object_zbuf_val();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2443 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2444 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2445 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2446 uNumSeconds = (unsigned int)pMouse->GetCursorPos(&v206);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2447 v82 = pMouse->GetCursorPos(&v201);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2448 v81 = pRenderer->pActiveZBuffer[*(int *)uNumSeconds + pSRZBufferLineOffsets[v82->y]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2449 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2450 v83 = v81;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2451 v44 = (unsigned __int16)v81;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2452 v84 = v83 >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2453 if ( (v44 & 7) != 3 || v84 >= 5120 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2454 goto LABEL_90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2455 v51 = ptr_507BD4->ptr_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2456 if ( uMessage == 70 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2457 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2458 *((char *)v51 + 8) &= 0xF7u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2459 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2460 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2461 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2462 if ( uMessage == 140 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2463 *((char *)v51 + 9) &= 0xFEu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2464 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2465 *((char *)v51 + 9) &= 0xFDu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2466 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2467 goto LABEL_416;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2468 case 0x1C:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2469 if ( !uActiveCharacter
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2470 || pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2471 goto LABEL_90;
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2472 ptr_507BC8 = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)104, uMessageParam, 0);
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2473 pCurrentScreen = 25;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2474 pEventTimer->Pause();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2475 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2476 case 0x1B:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2477 if ( !uActiveCharacter )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2478 goto LABEL_90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2479 if ( pParty->bTurnBasedModeOn != v0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2480 goto LABEL_569;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2481 if ( pTurnEngine->field_4 == v0 || pTurnEngine->field_4 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2482 goto LABEL_90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2483 if ( !(pTurnEngine->field_18 & 2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2484 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2485 LABEL_569:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2486 if ( pActors[uMessageParam].uAIState == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2487 stru_50C198.LootActor(&pActors[uMessageParam]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2488 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2489 Actor::StealFrom(uMessageParam);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2490 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2491 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2492 case 0x17:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2493 if ( !uActiveCharacter )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2494 goto LABEL_90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2495 if ( pParty->bTurnBasedModeOn != v0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2496 goto LABEL_577;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2497 if ( pTurnEngine->field_4 == v0 || pTurnEngine->field_4 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2498 goto LABEL_90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2499 if ( !(pTurnEngine->field_18 & 2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2500 LABEL_577:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2501 _42ECB5_PlayerAttacksActor();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2502 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2503 case UIMSG_A7:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2504 v163 = (int)pGlobalTXT_LocalizationStrings[81];// "Exit Rest"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2505 v85 = pButton_RestUI_Exit;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2506 v149 = pButton_RestUI_Exit;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2507 v142 = (WindowType)96;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2508 goto LABEL_731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2509 case UIMSG_ShowStatus_Player|0x1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2510 if ( dword_506F14 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2511 goto LABEL_621;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2512 GUIWindow::Create(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2513 pButton_RestUI_Wait5Minutes->uX,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2514 pButton_RestUI_Wait5Minutes->uY,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2515 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2516 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2517 (enum WindowType)90,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2518 (int)pButton_RestUI_Wait5Minutes,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2519 (int)pGlobalTXT_LocalizationStrings[238]);// "Wait 5 Minutes"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2520 dword_506F14 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2521 _506F18_num_hours_to_sleep = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2522 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2523 case 0x60:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2524 if ( dword_506F14 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2525 goto LABEL_621;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2526 GUIWindow::Create(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2527 pButton_RestUI_Wait1Hour->uX,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2528 pButton_RestUI_Wait1Hour->uY,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2529 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2530 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2531 (enum WindowType)90,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2532 (int)pButton_RestUI_Wait1Hour,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2533 (int)pGlobalTXT_LocalizationStrings[239]);// "Wait 1 Hour"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2534 dword_506F14 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2535 _506F18_num_hours_to_sleep = 60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2536 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2537 case UIMSG_OpenRestUI:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2538 dword_506F14 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2539 RestUI_Initialize();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2540 v86 = 60 * (sub_494820(pParty->uCurrentHour) + 1) - pParty->uCurrentMinute;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2541 _506F18_num_hours_to_sleep = v86;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2542 if ( uMessageParam == 111 || uMessageParam == 114 || uMessageParam == 116 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2543 _506F18_num_hours_to_sleep = v86 + 720;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2544 goto LABEL_615;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2545 case 0x68:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2546 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2547 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2548 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2549 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2550 if ( sub_42F4DA() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2551 goto LABEL_594;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2552 if ( pParty->bTurnBasedModeOn == v0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2553 goto LABEL_595;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2554 if ( !(pParty->uFlags & 0x88) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2555 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2556 RestUI_Initialize();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2557 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2558 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2559 LABEL_594:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2560 if ( pParty->bTurnBasedModeOn == v0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2561 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2562 LABEL_595:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2563 v87 = pGlobalTXT_LocalizationStrings[478];// "You can't rest in turn-based mode!"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2564 goto _draw_status_string_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2565 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2566 v88 = pGlobalTXT_LocalizationStrings[480];// "There are hostile enemies near!"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2567 if ( pParty->uFlags & 0x88 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2568 v88 = pGlobalTXT_LocalizationStrings[479];// "You can't rest here!"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2569 ShowStatusBarString(v88, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2570 v89 = uActiveCharacter;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2571 if ( !uActiveCharacter )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2572 goto LABEL_90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2573 v176 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2574 v160 = 13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2575 goto LABEL_619;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2576 case 0x61:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2577 if ( dword_506F14 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2578 goto LABEL_621;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2579 if ( pParty->uNumFoodRations < uRestUI_FoodRequiredToRest )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2580 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2581 ShowStatusBarString(pGlobalTXT_LocalizationStrings[482], 2u);// "You don't have enough food to rest"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2582 if ( uActiveCharacter && pPlayers[uActiveCharacter]->CanAct() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2583 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2584 v89 = uActiveCharacter;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2585 v176 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2586 v160 = 108;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2587 LABEL_619:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2588 pPlayers[v89]->PlaySound(v160, v176);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2589 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2590 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2591 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2592 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2593 pParty->pPlayers[3].pConditions[2] = pParty->uTimePlayed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2594 pParty->pPlayers[2].pConditions[2] = pParty->uTimePlayed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2595 pParty->pPlayers[1].pConditions[2] = pParty->uTimePlayed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2596 pParty->pPlayers[0].pConditions[2] = pParty->uTimePlayed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2597 v90 = pMapStats->GetMapInfo(pCurrentMapName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2598 if ( !v90 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2599 v90 = rand() % (signed int)pMapStats->uNumMaps + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2600 thisj = &pMapStats->pInfos[v90];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2601 if ( rand() % 100 + 1 <= thisj->field_30 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2602 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2603 v91 = rand() % 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2604 v92 = thisj->field_31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2605 v93 = v91 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2606 if ( v93 > v92 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2607 v195 = (NPCData *)((v93 > v92 + thisj->field_32) + 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2608 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2609 v195 = (NPCData *)v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2610 if ( !sub_45063B(thisj, (int)v195) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2611 v195 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2612 if ( v195 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2613 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2614 v94 = rand() % 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2615 LODWORD(pParty->pPlayers[v94].pConditions[2]) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2616 HIDWORD(pParty->pPlayers[v94].pConditions[2]) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2617 v95 = rand();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2618 Rest(v95 % 6 + 60);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2619 _506F18_num_hours_to_sleep = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2620 dword_506F14 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2621 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2622 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2623 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2624 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2625 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2626 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2627 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2628 ShowStatusBarString(pGlobalTXT_LocalizationStrings[481], 2u);// "Encounter!"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2629 v165 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2630 v151 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2631 v144 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2632 v139 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2633 v135 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2634 v132 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2635 v130 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2636 v127 = 227;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2637 goto _play_sound_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2638 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2639 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2640 Party::TakeFood(uRestUI_FoodRequiredToRest);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2641 _506F18_num_hours_to_sleep = 480;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2642 LABEL_615:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2643 dword_506F14 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2644 pParty->RestAndHeal();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2645 pParty->field_764 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2646 pParty->pPlayers[3].pConditions[2] = pParty->uTimePlayed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2647 pParty->pPlayers[2].pConditions[2] = pParty->uTimePlayed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2648 pParty->pPlayers[1].pConditions[2] = pParty->uTimePlayed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2649 pParty->pPlayers[0].pConditions[2] = pParty->uTimePlayed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2650 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2651 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2652 case UIMSG_ShowStatus_Funds|0x8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2653 if ( dword_506F14 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2654 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2655 LABEL_621:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2656 v96 = pGlobalTXT_LocalizationStrings[477];// "You are already resting!"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2657 goto LABEL_622;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2658 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2659 GUIWindow::Create(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2660 pButton_RestUI_WaitUntilDawn->uX,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2661 pButton_RestUI_WaitUntilDawn->uY,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2662 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2663 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2664 (enum WindowType)90,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2665 (int)pButton_RestUI_WaitUntilDawn,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2666 (int)pGlobalTXT_LocalizationStrings[237]);// "Wait until Dawn"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2667 v97 = sub_494820(pParty->uCurrentHour);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2668 dword_506F14 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2669 _506F18_num_hours_to_sleep = 60 * v97 - pParty->uCurrentMinute;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2670 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2671 case 0x4E:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2672 if ( dword_50654C && byte_506550 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2673 {
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
2674 v173 = pSpellStats->pInfos[dword_50654C + 11 * pPlayers[uActiveCharacter]->pNumSpellBookPage].pName;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2675 v157 = pGlobalTXT_LocalizationStrings[483];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2676 _sprintex_2args_draw_status_and_continue:
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
2677 sprintf(pTmpBuf, v157, v173);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2678 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2679 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2680 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2681 if ( pPlayers[uActiveCharacter]->uQuickSpell )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2682 v177 = pGlobalTXT_LocalizationStrings[584];// "Click here to remove your Quick Spell"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2683 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2684 v177 = pGlobalTXT_LocalizationStrings[484];// "Select a spell then click here to set a QuickSpell"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2685 strcpy(pTmpBuf, v177);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2686 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2687 _set_status_string_pTmpBuf_and_continue:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2688 sub_41C0B8_set_status_string(pTmpBuf);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2689 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2690 case 0x4F:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2691 if ( !uActiveCharacter
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2692 || (uNumSeconds = (unsigned int)pPlayers[uActiveCharacter],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2693 !*(char *)(uNumSeconds + 11 * *(char *)(uNumSeconds + 6734) + uMessageParam + 402)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2694 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2695 if ( sub_4637E0_is_there_popup_onscreen() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2696 dword_507B00_spell_info_to_draw_in_popup = uMessageParam + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2697 v98 = *(char *)(uNumSeconds + 6734);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2698 if ( dword_50654C - 1 == uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2699 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2700 v178 = pSpellStats->pInfos[uMessageParam + 11 * v98 + 1].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2701 v161 = pGlobalTXT_LocalizationStrings[485];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2702 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2703 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2704 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2705 v178 = pSpellStats->pInfos[uMessageParam + 11 * v98 + 1].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2706 v161 = pGlobalTXT_LocalizationStrings[486];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2707 }
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
2708 sprintf(pTmpBuf, v161, v178);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2709 sub_41C0B8_set_status_string(pTmpBuf);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2710 goto LABEL_91;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2711 case 0x58:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2712 GUIWindow::Create(ptr_5064F8->uX, ptr_5064F8->uY, 0, 0, (enum WindowType)90, (int)ptr_5064F8, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2713 if ( !uActiveCharacter )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2714 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2715 thisk = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2716 if ( !byte_506550 || !dword_50654C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2717 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2718 v165 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2719 v151 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2720 v144 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2721 v139 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2722 v135 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2723 v132 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2724 thisk->uQuickSpell = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2725 v130 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2726 dword_50654C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2727 v127 = 203;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2728 goto _play_sound_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2729 }
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
2730 v99 = dword_50654C + 11 * pPlayers[uActiveCharacter]->pNumSpellBookPage;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2731 pPlayers[uActiveCharacter]->uQuickSpell = v99;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2732 stru_A750F8[uActiveCharacter + 3]._494836(v99, uActiveCharacter);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2733 if ( uActiveCharacter )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2734 thisk->PlaySound(12, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2735 byte_506550 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2736 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2737 case 0x33:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2738 if ( !uActiveCharacter )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2739 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2740 v100 = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2741 v195 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2742 uAction = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2743 v101 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2744 thisl = (int)&v100->pActiveSkills[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2745 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2746 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2747 if ( *(short *)thisl )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2748 {
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
2749 if ( v100->pNumSpellBookPage == v101 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2750 uAction = (int)v195;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2751 v102 = (int)v195;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2752 v195 = (NPCData *)((char *)v195 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2753 v217[v102] = v101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2754 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2755 thisl += 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2756 ++v101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2757 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2758 while ( v101 < 9 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2759 if ( !v195 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2760 goto LABEL_662;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2761 if ( GetAsyncKeyState(16) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2762 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2763 --uAction;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2764 if ( uAction < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2765 uAction = (int)((char *)v195 - 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2766 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2767 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2768 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2769 ++uAction;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2770 if ( uAction >= (signed int)v195 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2771 uAction = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2772 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2773 sub_41140B();
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
2774 pPlayers[uActiveCharacter]->pNumSpellBookPage = LOBYTE(v217[uAction]);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2775 goto LABEL_661;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2776 case UIMSG_SaveGame|0x4:
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
2777 if ( pTurnEngine->field_4 == 3 || !uActiveCharacter || uMessageParam == pPlayers[uActiveCharacter]->pNumSpellBookPage )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2778 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2779 sub_41140B();
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
2780 pPlayers[uActiveCharacter]->pNumSpellBookPage = uMessageParam;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2781 LABEL_661:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2782 pGUIWindow_CurrentMenu->_411621();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2783 LABEL_662:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2784 v165 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2785 v151 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2786 v144 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2787 v139 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2788 v135 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2789 v132 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2790 v130 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2791 v127 = rand() % 2 + 204;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2792 goto _play_sound_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2793 case UIMSG_LoadGame|0x4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2794 if ( pTurnEngine->field_4 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2795 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2796 if ( uActiveCharacter )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2797 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2798 uNumSeconds = (unsigned int)pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2799 if ( *(char *)(uNumSeconds + 11 * *(char *)(uNumSeconds + 6734) + uMessageParam + 402) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2800 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2801 if ( dword_50654C - 1 == uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2802 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2803 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2804 pEventTimer->Resume();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2805 viewparams->bRedrawGameUI = v0;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2806 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2807 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2808 v103 = dword_50654C + 11 * *(char *)(uNumSeconds + 6734);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2809 if ( dword_50C9E8 < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2810 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2811 dword_50C9EC[3 * dword_50C9E8] = 142;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2812 dword_50C9F0[3 * dword_50C9E8] = v103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2813 *(&dword_50C9E8 + 3 * dword_50C9E8 + 3) = uActiveCharacter - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2814 ++dword_50C9E8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2815 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2816 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2817 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2818 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2819 byte_506550 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2820 dword_50654C = uMessageParam + 1;
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 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2825 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2826 case 0x8E:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2827 if ( pTurnEngine->field_4 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2828 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2829 v175 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2830 v159 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2831 v147 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2832 goto LABEL_678;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2833 case 0x92:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2834 if ( pTurnEngine->field_4 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2835 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2836 v175 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2837 v159 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2838 v147 = 133;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2839 LABEL_678:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2840 v80 = v199;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2841 v79 = uMessageParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2842 LABEL_679:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2843 _42777D_CastSpell_UseWand_ShootArrow(v79, v80, v147, v159, v175);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2844 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2845 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2846 case 0x69:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2847 if ( pTurnEngine->field_4 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2848 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2849 if ( bUnderwater == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2850 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2851 LABEL_682:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2852 v96 = pGlobalTXT_LocalizationStrings[652];// "You can not do that while you are underwater!"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2853 LABEL_622:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2854 ShowStatusBarString(v96, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2855 LABEL_623:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2856 v165 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2857 v151 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2858 v144 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2859 v139 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2860 v135 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2861 v132 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2862 v130 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2863 v127 = 27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2864 _play_sound_and_continue:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2865 pAudioPlayer->PlaySound((SoundID)v127, v130, v132, v135, v139, v144, v151, v165);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2866 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2867 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2868 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2869 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2870 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2871 if ( uActiveCharacter && !pPlayers[uActiveCharacter]->uTimeToRecovery )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2872 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2873 if ( !pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2874 goto LABEL_693;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2875 if ( pCurrentScreen != 5
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2876 && pCurrentScreen != 7
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2877 && (pCurrentScreen <= 99
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2878 || pCurrentScreen > 103) )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2879 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2880 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2881 LABEL_693:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2882 GUIWindow::Create(0x1DCu, 0x1C2u, 0, 0, (enum WindowType)90, (int)ptr_5079F8, 0);
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2883 pCurrentScreen = 8;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2884 pEventTimer->Pause();
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2885 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)18, 0, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2886 pAudioPlayer->PlaySound((SoundID)48, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2887 viewparams->field_48 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2888 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2889 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2890 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2891 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2892 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2893 case 0x6A:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2894 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2895 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2896 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2897 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2898 ++pIcons_LOD->uTexturePacksCount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2899 if ( !pIcons_LOD->uNumPrevLoadedFiles )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2900 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2901 GUIWindow::Create(0x230u, 0x1C2u, 0, 0, (enum WindowType)90, (int)ptr_5079F4, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2902 viewparams->bRedrawGameUI = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2903 pEventTimer->Pause();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2904 pAudioPlayer->StopChannels(-1, -1);
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2905 pCurrentScreen = 104;
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2906 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)12, 5, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2907 papredoll_dbrds[2] = pIcons_LOD->LoadTexture("BUTTEXI1", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2908 ptr_5076F4 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2909 0x187u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2910 0x13Cu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2911 0x4Bu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2912 0x21u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2913 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2914 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2915 0x71u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2916 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2917 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2918 pGlobalTXT_LocalizationStrings[79],// "Exit"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2919 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2920 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2921 v179);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2922 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2923 case 0x6B:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2924 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2925 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2926 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2927 pEventTimer->Resume();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
2928 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2929 viewparams->bRedrawGameUI = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2930 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2931 stru_506E40.Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2932 uNumSeconds = (unsigned int)MakeScreenshot(155, 117);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2933 pRenderer->SavePCXImage("gamma.pcx", (char *)uNumSeconds, 155, 117);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2934 free((void *)uNumSeconds);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2935 stru_506E40._40E55E("gamma.pcx", 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2936 GUIWindow::Create(0x25Au, 0x1C2u, 0, 0, (enum WindowType)92, (int)ptr_5079F0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2937 LABEL_453:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2938 if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2939 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2940 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2941 goto LABEL_770;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2942 case UIMSG_C0:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2943 dword_50651C = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2944 if ( pMouse->GetCursorPos(&v211)->y > 178 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2945 dword_50651C = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2946 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2947 case UIMSG_A9:
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2948 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
2949 LABEL_707:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2950 dword_506548 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2951 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2952 case UIMSG_AA:
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2953 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
2954 LABEL_709:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2955 dword_506544 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2956 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2957 case 0x55:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2958 bRingsShownInCharScreen ^= v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2959 GUIButton::_41D0D8(ptr_507694);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2960 GUIButton::_41D0D8(ptr_507690);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2961 if ( bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2962 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2963 v128 = (uTextureID_5118C8 != -1 ? pIcons_LOD->pTextures[uTextureID_5118C8].uTextureHeight : 26);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2964 v125 = (uTextureID_5118C8 != -1 ? pIcons_LOD->pTextures[uTextureID_5118C8].uTextureWidth : 24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2965 v123 = 445;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2966 v121 = 470;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2967 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2968 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2969 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2970 v128 = 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2971 v125 = 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2972 v123 = 300;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2973 v121 = 600;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2974 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2975 ptr_507694 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2976 v121,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2977 v123,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2978 v125,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2979 v128,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2980 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2981 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2982 0x55u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2983 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2984 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2985 pGlobalTXT_LocalizationStrings[64],// "Detail Toggle"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2986 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2987 ptr_507690 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2988 0x1DCu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2989 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2990 0xA4u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2991 0x159u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2992 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2993 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2994 0x85u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2995 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2996 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2997 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2998 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2999 goto LABEL_422;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3000 case UIMSG_Quit|0x1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3001 OnPaperdollLeftClick();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3002 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3003 case UIMSG_CloseBook|0x2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3004 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3005 sub_4196A0();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3006 sub_419379();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3007 v85 = pCharacterScreen_StatsBtn;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3008 goto LABEL_716;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3009 case UIMSG_ChangeMusicVolume|0x2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3010 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3011 sub_4196A0();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3012 sub_419379();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3013 sub_419401();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3014 v85 = pCharacterScreen_SkillsBtn;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3015 goto LABEL_716;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3016 case UIMSG_SkillUp:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3017 v104 = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3018 v105 = (int)&v104->pActiveSkills[uMessageParam];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3019 LOWORD(v2) = *(short *)v105;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3020 uNumSeconds = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3021 if ( v104->uSkillPoints < (v2 & 0x3F) + 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3022 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3023 v87 = pGlobalTXT_LocalizationStrings[488];// "You don't have enough skill points!"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3024 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3025 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3026 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3027 if ( (uNumSeconds & 0x3F) < 0x3C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3028 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3029 *(short *)v105 = uNumSeconds + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3030 v104->uSkillPoints -= v104->pActiveSkills[uMessageParam] & 0x3F;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3031 v104->PlaySound(14, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3032 v165 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3033 v151 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3034 v144 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3035 v139 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3036 v135 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3037 v132 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3038 v130 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3039 v127 = 20001;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3040 goto _play_sound_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3041 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3042 v87 = pGlobalTXT_LocalizationStrings[487];// "You have already mastered this skill!"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3043 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3044 _draw_status_string_and_continue:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3045 ShowStatusBarString(v87, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3046 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3047 case UIMSG_ChangeMusicVolume|0x4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3048 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3049 sub_419379();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3050 sub_4196A0();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3051 v85 = pCharacterScreen_InventoryBtn;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3052 LABEL_716:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3053 v163 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3054 v149 = v85;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3055 v142 = (WindowType)91;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3056 goto LABEL_731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3057 case UIMSG_A8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3058 v85 = ptr_50767C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3059 v163 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3060 v149 = ptr_50767C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3061 v142 = (WindowType)97;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3062 goto LABEL_731;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3063 case UIMSG_CloseBook|0x4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3064 sub_419379();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3065 sub_4196A0();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3066 sub_419220();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3067 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 102;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3068 GUIWindow::Create(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3069 pCharacterScreen_AwardsBtn->uX,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3070 pCharacterScreen_AwardsBtn->uY,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3071 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3072 0,
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
3073 (WindowType)(WINDOW_HouseInterior|0x42),
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3074 (int)pCharacterScreen_AwardsBtn,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3075 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3076 sub_419100();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3077 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3078 case 0x47:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3079 switch ( uMessageParam )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3080 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3081 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3082 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3083 case 11:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3084 goto LABEL_707;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3085 case 10:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3086 goto LABEL_709;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3087 case 0:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3088 v85 = pBtn_Book_1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3089 dword_506544 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3090 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3091 case 1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3092 v85 = pBtn_Book_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3093 dword_506548 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3094 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3095 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3096 dword_506540 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3097 if ( dword_506364 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3098 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3099 v85 = pBtn_Book_3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3100 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3101 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3102 dword_50653C = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3103 if ( dword_506364 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3104 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3105 v85 = pBtn_Book_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3106 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3107 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3108 dword_506538 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3109 if ( dword_506364 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3110 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3111 v85 = pBtn_Book_5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3112 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3113 case 5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3114 dword_506534 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3115 if ( dword_506364 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3116 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3117 v85 = pBtn_Book_6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3118 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3119 case 6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3120 v85 = pBtn_Autonotes_Misc;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3121 dword_506530 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3122 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3123 case 7:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3124 v85 = pBtn_Autonotes_Instructors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3125 dword_50652C = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3126 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3127 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3128 v163 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3129 v149 = v85;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3130 v142 = (WindowType)92;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3131 LABEL_731:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3132 v8 = v85->uY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3133 v9 = v85->uX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3134 goto LABEL_732;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3135 case UIMSG_SelectCharacter:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3136 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3137 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3138 GameUI_OnPlayerPortraitLeftClick(uMessageParam);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3139 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3140 case UIMSG_ShowStatus_Funds:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3141 v174 = (char *)pParty->uNumGoldInBank;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3142 v158 = pParty->uNumGold + pParty->uNumGoldInBank;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3143 v146 = pGlobalTXT_LocalizationStrings[489];// "You have %d total gold, %d in the Bank""
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3144 goto _sprintex_draw_status_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3145 case UIMSG_ShowStatus_DateTime:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3146 v195 = (NPCData *)pParty->uCurrentHour;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3147 if ( (signed int)pParty->uCurrentHour <= 12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3148 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3149 if ( !v195 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3150 v195 = (NPCData *)12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3151 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3152 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3153 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3154 v195 = (NPCData *)((char *)v195 - 12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3155 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3156 if ( pParty->uCurrentHour < 0xC || (uNumSeconds = v0, pParty->uCurrentHour >= 0x18) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3157 uNumSeconds = 0;
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
3158 sprintf(
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3159 pTmpBuf,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3160 "%d:%02d%s %s %d %s %d",
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3161 v195,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3162 pParty->uCurrentMinute,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3163 aAMPMNames[uNumSeconds],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3164 aDayNames[pParty->uDaysPlayed % 7],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3165 7 * pParty->uCurrentMonthWeek + pParty->uDaysPlayed % 7 + 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3166 aMonthNames[pParty->uCurrentMonth],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3167 pParty->uCurrentYear);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3168 goto _set_status_string_pTmpBuf_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3169 case UIMSG_ShowStatus_Food:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3170 v173 = (char *)pParty->uNumFoodRations;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3171 v157 = pGlobalTXT_LocalizationStrings[501];// You have %lu food"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3172 goto _sprintex_2args_draw_status_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3173 case UIMSG_ShowStatus_Player:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3174 v106 = pPlayers[uMessageParam];
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
3175 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[429], v106->pName, pClassNames[v106->uClass]);// "%s the %s"
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3176 strcat(pTmpBuf, ": ");
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
3177 v107 = v106->GetMajorConditionIdx();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3178 strcat(pTmpBuf, aCharacterConditionNames[v107]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3179 sub_41C0B8_set_status_string(pTmpBuf);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3180 v108 = 8 * uMessageParam - 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3181 LOBYTE(v108) = v108 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3182 pMouse->uPointingObjectID = v108;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3183 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3184 case UIMSG_ShowStatus_ManaHP:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3185 v109 = pGlobalTXT_LocalizationStrings[212];// "Spell Points"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3186 v110 = pPlayers[uMessageParam];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3187 v111 = v110->GetMaxMana();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3188 v112 = v110->sMana;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3189 v113 = pGlobalTXT_LocalizationStrings[108];// "Hit Points"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3190 v114 = v110->GetMaxHealth();
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
3191 sprintf(pTmpBuf, "%d / %d %s %d / %d %s", v110->sHealth, v114, v113, v112, v111, v109);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3192 goto _set_status_string_pTmpBuf_and_continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3193 case 0xC:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3194 if ( pCurrentScreen == 15 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3195 goto LABEL_762;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3196 sub_420E01();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3197 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3198 case UIMSG_ChangeMusicVolume|0x8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3199 LABEL_762:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3200 sub_421EA6_OnInventoryLeftClick();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3201 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3202 case 0xA:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3203 if ( !pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3204 goto LABEL_772;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3205 v115 = pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3206 if ( !pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3207 goto LABEL_768;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3208 if ( pMessageQueue_50CBD0->pMessages[0].field_8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3209 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3210 v115 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3211 pMessageQueue_50CBD0->uNumMessages = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3212 LABEL_769:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3213 pMessageQueue_50CBD0->pMessages[v115].eType = (UIMessageType)14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3214 LABEL_770:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3215 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3216 goto LABEL_771;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3217 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3218 v115 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3219 pMessageQueue_50CBD0->uNumMessages = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3220 LABEL_768:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3221 if ( (signed int)v115 < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3222 goto LABEL_769;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3223 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3224 case 0xE:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3225 LABEL_772:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3226 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3227 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3228 OnGameViewportClick();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3229 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3230 case 0xF:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3231 if ( pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3232 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3233 LOWORD(v116) = pGame->pVisInstance->get_picked_object_zbuf_val();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3234 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3235 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3236 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3237 uNumSeconds = (unsigned int)pMouse->GetCursorPos(&v209);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3238 v117 = pMouse->GetCursorPos(&v204);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3239 v116 = pRenderer->pActiveZBuffer[*(int *)uNumSeconds + pSRZBufferLineOffsets[v117->y]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3240 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3241 v163 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3242 v149 = (GUIButton *)(unsigned __int16)v116;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3243 v142 = (WindowType)15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3244 goto LABEL_779;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3245 case 0x54:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3246 v163 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3247 v149 = (GUIButton *)uMessageParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3248 v142 = (WindowType)22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3249 LABEL_779:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3250 v8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3251 v9 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3252 LABEL_732:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3253 v137 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3254 v133 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3255 LABEL_733:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3256 GUIWindow::Create(v9, v8, v133, v137, v142, (int)v149, v163);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3257 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3258 case 0x194:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3259 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3260 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3261 OnPressSpace();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3262 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3263 case UIMSG_ChangeSoundVolume|0x100:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3264 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3265 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3266 pParty->uFlags |= 2u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3267 GUIWindow::Create(0x207u, 0x88u, 0, 0, (enum WindowType)90, (int)dword_507A14, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3268 uNumSeconds = 131072;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3269 v118 = 2 * viewparams->uMinimapZoom;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3270 ++viewparams->field_28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3271 viewparams->uMinimapZoom *= 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3272 if ( uCurrentlyLoadedLevelType != LEVEL_Outdoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3273 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3274 if ( (signed int)v118 > 4096 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3275 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3276 viewparams->uMinimapZoom = 4096;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3277 viewparams->field_28 = 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3278 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3279 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3280 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3281 v119 = 2048;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3282 if ( (signed int)v118 <= 2048 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3283 goto LABEL_789;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3284 viewparams->field_28 = 11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3285 goto LABEL_788;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3286 case UIMSG_ChangeMusicVolume|0x100:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3287 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3288 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3289 pParty->uFlags |= 2u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3290 GUIWindow::Create(0x23Eu, 0x88u, 0, 0, (enum WindowType)90, (int)dword_507A18, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3291 uNumSeconds = 32768;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3292 v118 = (unsigned __int64)((signed __int64)(signed int)viewparams->uMinimapZoom << 15) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3293 --viewparams->field_28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3294 viewparams->uMinimapZoom = (unsigned __int64)((signed __int64)(signed int)viewparams->uMinimapZoom << 15) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3295 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3296 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3297 v119 = 512;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3298 if ( (signed int)v118 < 512 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3299 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3300 viewparams->field_28 = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3301 LABEL_788:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3302 v118 = v119;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3303 viewparams->uMinimapZoom = v119;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3304 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3305 LABEL_789:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3306 dword_576E2C = v118;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3307 dword_576E28 = viewparams->field_28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3308 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3309 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3310 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3311 if ( (signed int)v118 < 256 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3312 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3313 viewparams->uMinimapZoom = 256;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3314 viewparams->field_28 = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3315 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3316 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3317 goto _continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3318 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3319 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3320 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3321 pMessageQueue_50CBD0->uNumMessages = dword_50C9E8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3322 memcpy(pMessageQueue_50CBD0->pMessages, dword_50C9EC, 12 * dword_50C9E8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3323 dword_50C9E8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3324 if ( dword_50C9DC )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3325 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3326 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3327 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3328 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)dword_50C9DC;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3329 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = (int)ptr_50C9E0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3330 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3331 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3332 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3333 dword_50C9DC = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3334 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3335 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3336 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3337 if ( dword_50C9D0 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3338 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3339 dword_50C9D8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3340 if ( dword_50C9D8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3341 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3342 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3343 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3344 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)dword_50C9D0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3345 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = dword_50C9D4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3346 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3347 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3348 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3349 dword_50C9D0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3350 dword_50C9D4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3351 dword_50C9D8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3352 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3353 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3354 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3355 pStru277->_427E01_cast_spell();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3356 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3357
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3358
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3359 //----- (004356FF) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3360 void __cdecl back_to_game()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3361 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3362 dword_507BF0_is_there_popup_onscreen = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3363 dword_4E455C = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3364 dword_50CDCC = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3365 if ( ptr_507BC4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3366 free_book_subwindow();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3367 if ( !pCurrentScreen
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3368 && !ptr_507BD4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3369 pEventTimer->Resume();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3370 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3371 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3372 //----- (00435748) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3373 void __cdecl GUI_MainMenuMessageProc()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3374 {
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
3375 //AudioPlayer *v0; // ebp@2
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3376 char *v1; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3377 unsigned int v2; // ecx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3378 void *v3; // edi@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3379 signed int v4; // eax@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3380 int v5; // ecx@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3381 enum PLAYER_SKILL_TYPE v6; // edi@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3382 GUIWindow *v7; // eax@56
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3383 unsigned int v8; // edx@56
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3384 Player *v9; // edi@57
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3385 signed int v10; // eax@58
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3386 GUIButton *v11; // eax@59
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3387 unsigned __int8 v12; // sf@62
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3388 signed int v13; // eax@64
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3389 unsigned int v14; // eax@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3390 int v15; // edi@70
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3391 char v16; // zf@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3392 int v17; // eax@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3393 unsigned int v18; // ecx@105
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3394 int v19; // edi@116
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3395 char v20; // dl@116
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3396 unsigned int v21; // eax@116
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3397 Player *v22; // ecx@116
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3398 char *v23; // ebx@118
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3399 int v24; // eax@118
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3400 unsigned int v25; // eax@120
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3401 unsigned int v26; // ecx@127
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3402 unsigned int v27; // eax@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3403 unsigned __int8 v28; // of@129
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3404 SoundID pSoundID; // [sp-2Ch] [bp-3Ch]@36
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3405 signed int v30; // [sp-28h] [bp-38h]@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3406 unsigned int v31; // [sp-24h] [bp-34h]@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3407 signed int v32; // [sp-20h] [bp-30h]@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3408 unsigned int v33; // [sp-20h] [bp-30h]@105
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3409 signed int v34; // [sp-1Ch] [bp-2Ch]@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3410 unsigned int v35; // [sp-1Ch] [bp-2Ch]@105
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3411 int v36; // [sp-18h] [bp-28h]@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3412 enum WindowType v37; // [sp-18h] [bp-28h]@105
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3413 unsigned int v38; // [sp-14h] [bp-24h]@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3414 int v39; // [sp-14h] [bp-24h]@56
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3415 signed int v40; // [sp-10h] [bp-20h]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3416 signed int v41; // [sp-10h] [bp-20h]@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3417 int v42; // [sp-10h] [bp-20h]@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3418 int v43; // [sp-10h] [bp-20h]@56
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3419 int uNum; // [sp+4h] [bp-Ch]@3
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3420 UIMessageType pUIMessageType; // [sp+8h] [bp-8h]@3
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3421 int v46; // [sp+Ch] [bp-4h]@3
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3422 Player *pPlayer;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3423
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3424 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3425 {
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
3426 //v0 = pAudioPlayer;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3427 v1 = (char *)pParty->pPlayers;
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3428 pPlayer = pParty->pPlayers;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3429 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3430 {
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3431 pMessageQueue_50CBD0->PopMessage(&pUIMessageType, &uNum, &v46);
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3432 switch (pUIMessageType)
3
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3433 {
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3434 case UIMSG_MainMenu_ShowPartyCreationWnd:
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3435 {
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3436 GUIWindow::Create(495, 172, 0, 0, WINDOW_5A, (int)pMainMenu_BtnNew, 0);
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3437 SetCurrentMenuID(MENU_NEWGAME);
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3438 }
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3439 continue;
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3440
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3441 case UIMSG_MainMenu_ShowLoadWindow:
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3442 {
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3443 GUIWindow::Create(495, 227, 0, 0, WINDOW_5A, (int)pMainMenu_BtnLoad, 0);
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3444 SetCurrentMenuID(MENU_SAVELOAD);
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3445 }
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3446 continue;
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3447
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3448 case UIMSG_ShowCredits:
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3449 {
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3450 GUIWindow::Create(495, 282, 0, 0, WINDOW_5A, (int)pMainMenu_BtnCredits, 0);
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3451 SetCurrentMenuID(MENU_CREDITS);
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3452 }
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3453 continue;
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3454
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3455 case UIMSG_ExitToWindows:
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3456 {
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3457 GUIWindow::Create(495, 337, 0, 0, WINDOW_5A, (int)pMainMenu_BtnExit, 0);
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3458 SetCurrentMenuID(MENU_FINISHED);
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3459 }
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3460 continue;
14
Nomad
parents: 4
diff changeset
3461
Nomad
parents: 4
diff changeset
3462 case UIMSG_LoadGame:
Nomad
parents: 4
diff changeset
3463 {
Nomad
parents: 4
diff changeset
3464 if (!pSavegameUsedSlots[uLoadGameUI_SelectedSlot])
Nomad
parents: 4
diff changeset
3465 continue;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
3466
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
3467 SetCurrentMenuID(MENU_LOAD);
14
Nomad
parents: 4
diff changeset
3468 }
Nomad
parents: 4
diff changeset
3469 continue;
3
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3470 }
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
3471
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3472
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3473 switch (pUIMessageType)
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3474 {
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3475 case UIMSG_A5: // WINDOW_5A
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3476 {
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3477 //main menu save/load wnd clicking on savegame lines
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3478 if (pGUIWindow_CurrentMenu->field_40 == 1)
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3479 pKeyActionMap->_459ED1(0);
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3480 if ( pCurrentScreen != 11 || 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 {
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3507 GUIWindow::Create(pGUIWindow_CurrentMenu->uFrameX + 241, pGUIWindow_CurrentMenu->uFrameY + 302,
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3508 61, 28, WINDOW_5E, (int)ptr_69BD64, 0);
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3509 }
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3510 continue;
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3511 }
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3512
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
3513 if ( (signed int)pUIMessageType > UIMSG_PlayerCreationRemoveDownSkill )
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3514 {
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3515 if ( pUIMessageType > UIMSG_A3 )
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3516 {
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3517 if ( pUIMessageType == UIMSG_A6 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3518 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3519 v43 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3520 v39 = (int)ptr_69BD60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3521 v8 = pGUIWindow_CurrentMenu->uFrameY + 302;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3522 v37 = (WindowType)95;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3523 v18 = pGUIWindow_CurrentMenu->uFrameX + 350;
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3524 v35 = 28;
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3525 v33 = 61;
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3526 GUIWindow::Create(v18, v8, v33, v35, v37, v39, v43);
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3527 continue;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3528 }
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3529 if ( pUIMessageType == UIMSG_SelectFacePlayerBack )
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3530 {
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3531 pPlayer = &pParty->pPlayers[uNum];
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3532 v12 = (char)((int)pPlayer->uFace - 1) < 0;
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3533 --pPlayer->uFace;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3534 if ( v12 )
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3535 pPlayer->uFace = 19;
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3536 pPlayer->uVoiceID = pPlayer->uFace;
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3537 pPlayer->SetInitialStats();
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3538 pPlayer->SetSexByVoice();
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3539 pPlayer->RandomizeName();
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3540 v25 = uNum;
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
3541 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem)
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
3542 % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3543 uPlayerCreationUI_SelectedCharacter = v25;
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
3544 GUIWindow::Create(pCreationUI_BtnPressLeft[v25]->uX, pCreationUI_BtnPressLeft[v25]->uY, 0, 0,
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
3545 (enum WindowType)92, (int)pCreationUI_BtnPressLeft[v25], 1);
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
3546 //v0 = pAudioPlayer;
37
cad1f62f21c0 18.10.12
Ritor1
parents: 27
diff changeset
3547 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0.0, 0);
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3548 v22 = pPlayer;
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3549 v22->PlaySound(102, 0);
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3550 v1 = (char *)pParty->pPlayers;
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3551 continue;
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3552 }
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3553 if ( pUIMessageType == UIMSG_SelectFacePlayerForward )
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3554 {
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3555 pPlayer = &pParty->pPlayers[uNum];
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3556 v20 = (char)((int)pPlayer->uFace + 1) % 20;
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3557 pPlayer->uFace = v20;
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3558 pPlayer->uVoiceID = v20;
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3559 pPlayer->SetInitialStats();
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3560 pPlayer->SetSexByVoice();
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3561 pPlayer->RandomizeName();
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3562 v21 = uNum;
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
3563 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem)
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
3564 % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3565 uPlayerCreationUI_SelectedCharacter = v21;
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
3566 GUIWindow::Create(pCreationUI_BtnPressRight[v21]->uX, pCreationUI_BtnPressRight[v21]->uY, 0, 0, (enum WindowType)92,
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
3567 (int)pCreationUI_BtnPressRight[v21], 1);
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
3568 //v0 = pAudioPlayer;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3569 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0);
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3570 v22 = pPlayer;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3571 v22->PlaySound(102, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3572 v1 = (char *)pParty->pPlayers;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3573 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3574 }
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3575 if ( pUIMessageType == UIMSG_AD )
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
3576 {
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
3577 GUIWindow::Create(pMainMenu_BtnNew->uX, pMainMenu_BtnNew->uY, 0, 0, (enum WindowType)90, (int)pMainMenu_BtnNew, 0);
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
3578 SetCurrentMenuID(MENU_LOAD);
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
3579 continue;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3580 }
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3581 if ( pUIMessageType != UIMSG_AE )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3582 continue;
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
3583 GUIWindow::Create(pMainMenu_BtnExit->uX, pMainMenu_BtnExit->uY, 0, 0, (enum WindowType)90, (int)pMainMenu_BtnExit, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3584 LABEL_114:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3585 v40 = 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3586 LABEL_89:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3587 v2 = v40;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
3588 SetCurrentMenuID((MENU_STATE)v2);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3589 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3590 }
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3591 if ( pUIMessageType == UIMSG_A3 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3592 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3593 ++dword_6A0C9C;
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3594 if ( dword_6A0C9C >= uNum )
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3595 dword_6A0C9C = uNum - 1;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3596 if ( dword_6A0C9C < 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3597 dword_6A0C9C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3598 v7 = pGUIWindow_CurrentMenu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3599 v43 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3600 v39 = (int)ptr_69BD58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3601 v8 = pGUIWindow_CurrentMenu->uFrameY + 323;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3602 goto LABEL_105;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3603 }
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3604 if ( pUIMessageType == UIMSG_6B )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3605 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3606 if ( pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3607 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3608 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3609 pEventTimer->Resume();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3610 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3611 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3612 }
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
3613 GUIWindow::Create(602, 450, 0, 0, (enum WindowType)92, (int)ptr_5079F0, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3614 if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3615 continue;
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
3616 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_CloseBook;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3617 goto LABEL_93;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3618 }
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3619 if ( pUIMessageType == UIMSG_CloseBook )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3620 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3621 if ( ptr_507BDC )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3622 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3623 sub_41426F();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3624 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3625 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3626 if ( !(BYTE1(dword_6BE364_game_settings_1) & 0x40) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3627 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3628 v15 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3629 pVideoPlayer->bStopBeforeSchedule = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3630 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3631 viewparams->field_48 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3632 if ( !GetCurrentMenuID() || GetCurrentMenuID() == 6 || GetCurrentMenuID() == 7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3633 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3634 v17 = pCurrentScreen;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3635 LABEL_83:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3636 if ( v17 == 16 )
21
3fa5d0522f92 Both Bink 1.5.21.0 & 3.0.0.0 support added
Nomad
parents: 14
diff changeset
3637 pVideoPlayer->FastForwardToFrame(pVideoPlayer->field_40);
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
3638 if (GetCurrentMenuID() == MENU_7)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3639 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3640 v40 = 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3641 goto LABEL_89;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3642 }
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
3643 if (GetCurrentMenuID() == MENU_Credits)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3644 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3645 v40 = 11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3646 goto LABEL_89;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3647 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3648 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3649 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3650 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3651 LABEL_93:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3652 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3653 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3654 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3655 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3656 }
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 v16 = GetCurrentMenuID() == 8;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3660 v17 = pCurrentScreen;
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3661 if ( v16 && !pCurrentScreen )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3662 goto LABEL_83;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3663 if ( pCurrentScreen == 12 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3664 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3665 pIcons_LOD->_4114F2();
26
93bf1d5f6a6d Game loading.
Nomad
parents: 23
diff changeset
3666 //crt_deconstruct_ptr_6A0118();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3667 pTexture_PCX.Release();
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3668 pTexture_PCX.Load("title.pcx", 0);
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
3669 SetCurrentMenuID(MENU_MAIN);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3670 v15 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3671 LABEL_81:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3672 pGUIWindow_CurrentMenu->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3673 pGUIWindow2->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3674 pGUIWindow2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3675 pEventTimer->Resume();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3676 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3677 viewparams->bRedrawGameUI = v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3678 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3679 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3680 if ( pCurrentScreen == 16 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3681 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3682 pVideoPlayer->Unload();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3683 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3684 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3685 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
3686 if ( pCurrentScreen != 27 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3687 goto LABEL_81;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3688 //VideoPlayer::dtor();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3689 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3690 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3691 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3692 {
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3693 if ( pUIMessageType == UIMSG_PlayerCreationSelectQuality )
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3694 {
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
3695 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem)
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
3696 % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum;
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3697 uPlayerCreationUI_SelectedCharacter = uNum;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3698 LABEL_36:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3699 v42 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3700 v38 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3701 v36 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3702 v34 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3703 v32 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3704 v31 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3705 v30 = 0;
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3706 pSoundID = (SoundID)66;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3707 LABEL_40:
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3708 pAudioPlayer->PlaySound(pSoundID, v30, v31, v32, v34, v36, v38, v42);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3709 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3710 }
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3711 if ( pUIMessageType == UIMSG_PlayerCreationVoiceBack )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3712 {
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3713 v9 = &pPlayer[uNum];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3714 v46 = v9->GetSexByVoice();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3715 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3716 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3717 v12 = ((v9->uVoiceID-- - 1) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3718 if ( v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3719 v9->uVoiceID = 19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3720 v13 = v9->GetSexByVoice();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3721 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3722 while ( v13 != v46 );
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3723 v11 = pCreationUI_BtnPressLeft2[uNum];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3724 goto LABEL_60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3725 }
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3726 if ( pUIMessageType == UIMSG_PlayerCreationVoiceForward )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3727 {
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3728 v9 = &pPlayer[uNum];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3729 v46 = v9->GetSexByVoice();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3730 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3731 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3732 v9->uVoiceID = (signed int)(v9->uVoiceID + 1) % 20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3733 v10 = v9->GetSexByVoice();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3734 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3735 while ( v10 != v46 );
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3736 v11 = pCreationUI_BtnPressRight2[uNum];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3737 LABEL_60:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3738 GUIWindow::Create(v11->uX, v11->uY, 0, 0, (enum WindowType)92, (int)v11, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3739 pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3740 v9->PlaySound(102, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3741 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3742 }
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3743 if ( pUIMessageType == UIMSG_A2 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3744 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3745 --dword_6A0C9C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3746 if ( dword_6A0C9C < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3747 dword_6A0C9C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3748 v7 = pGUIWindow_CurrentMenu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3749 v43 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3750 v39 = (int)ptr_69BD5C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3751 v8 = pGUIWindow_CurrentMenu->uFrameY + 197;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3752 LABEL_105:
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
3753 GUIWindow::Create(v7->uFrameX + 215, v8, 0, 0, (WindowType)90, v39, v43);
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
3754 continue;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3755 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3756 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3757 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3758 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3759 {
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3760 if ( pUIMessageType == UIMSG_PlayerCreationRemoveDownSkill )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3761 {
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3762 uPlayerCreationUI_SelectedCharacter = uNum;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3763 v41 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3764 v1 = (char *)pParty->pPlayers;
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3765 v5 = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
3766 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * uNum;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3767 goto LABEL_44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3768 }
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3769 if ( (signed int)pUIMessageType > UIMSG_3C )
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3770 {
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3771 if ( pUIMessageType == UIMSG_PlayerCreationClickPlus )
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3772 {
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3773 GUIWindow::Create(613, 393, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnPlus, 1);
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3774 (&pPlayer[uPlayerCreationUI_SelectedCharacter])->IncreaseAttribute(
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3775 (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3776 v42 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3777 v38 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3778 v36 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3779 v34 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3780 v32 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3781 v31 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3782 v30 = 0;
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3783 pSoundID = (SoundID)20;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3784 goto LABEL_40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3785 }
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3786 if ( pUIMessageType == UIMSG_PlayerCreationClickMinus )
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3787 {
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3788 GUIWindow::Create(523, 393, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnMinus, 1);
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3789 (&pPlayer[uPlayerCreationUI_SelectedCharacter])->DecreaseAttribute(
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3790 (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3791 v42 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3792 v38 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3793 v36 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3794 v34 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3795 v32 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3796 v31 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3797 v30 = 0;
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3798 pSoundID = (SoundID)23;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3799 goto LABEL_40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3800 }
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3801 if ( pUIMessageType == UIMSG_PlayerCreationSelectActiveSkill )
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3802 {
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3803 auto _t = &pPlayer[uPlayerCreationUI_SelectedCharacter];
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3804 v6 = _t->GetSkillIdxByOrder(uNum + 4);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3805 if ( _t->GetSkillIdxByOrder(3) == 37 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3806 pParty->pPlayers[0].pActiveSkills[v6 + 3486 * uPlayerCreationUI_SelectedCharacter] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3807 v42 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3808 v38 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3809 v36 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3810 v34 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3811 v32 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3812 v31 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3813 v30 = 0;
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3814 pSoundID = (SoundID)24;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3815 goto LABEL_40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3816 }
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
3817 if ( pUIMessageType == UIMSG_PlayerCreationSelectClass )
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
3818 {
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
3819 (&pPlayer[uPlayerCreationUI_SelectedCharacter])->Reset(uNum);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3820 goto LABEL_36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3821 }
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3822 if ( pUIMessageType == UIMSG_PlayerCreationClickOK )
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3823 {
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3824 GUIWindow::Create(580, 431, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnOK, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3825 if ( PlayerCreation_ComputeAttributeBonus() || !sub_4908DE() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3826 GameUI_StatusBar_TimedStringTimeLeft = GetTickCount() + 4000;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3827 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3828 uGameState = 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3829 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3830 }
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3831 if ( pUIMessageType == UIMSG_PlayerCreationClickReset )
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3832 {
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3833 GUIWindow::Create(527, 431, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnReset, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3834 pParty->Reset();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3835 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3836 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3837 {
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3838 if ( pUIMessageType == UIMSG_PlayerCreationRemoveUpSkill )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3839 {
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3840 uPlayerCreationUI_SelectedCharacter = uNum;
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3841 v4 = pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem;
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3842 v46 = pGUIWindow_CurrentMenu->pStartingPosActiveItem;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3843 v41 = 2;
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3844 v5 = v4 % 7 + v46 + 7 * uNum;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3845 LABEL_44:
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3846 pGUIWindow_CurrentMenu->pCurrentPosActiveItem = v5;
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3847 pParty->pPlayers[0].pActiveSkills[(&pPlayer[uPlayerCreationUI_SelectedCharacter])->GetSkillIdxByOrder(v41)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3848 + 3486 * uPlayerCreationUI_SelectedCharacter] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3849 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3850 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3851 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3852 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3853 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3854 {
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3855 switch ( pUIMessageType )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3856 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3857 case 60:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3858 pAudioPlayer->PlaySound((SoundID)24, 0, 0, -1, 0, 0, 0, 0);
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3859 v3 = (void *)uNum;
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
3860 uPlayerCreationUI_SelectedCharacter = uNum;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3861 pKeyActionMap->_459E5A(0, 15, pGUIWindow_CurrentMenu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3862 pGUIWindow_CurrentMenu->ptr_1C = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3863 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3864 case 5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3865 uGameState = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3866 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3867 case 17:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3868 pMouse->SetCursorBitmap("MICON2");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3869 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3870 default:
57
6b3a5283b107 UIMSG_PlayerCreation
Ritor1
parents: 56
diff changeset
3871 if ( pUIMessageType == 58 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3872 goto LABEL_114;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3873 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3874 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3875 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3876 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3877 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3878 while ( pMessageQueue_50CBD0->uNumMessages );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3879 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3880 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3881
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3882 //----- (00436427) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3883 double __cdecl get_shading_dist_mist()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3884 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3885 double result; // st7@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3886
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3887 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3888 result = (double)pOutdoorCamera->shading_dist_mist;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3889 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3890 result = 16192.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3891 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3892 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3893
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3894 //----- (0043643E) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3895 double __cdecl GetPickDepth()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3896 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3897 double result; // st7@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3898
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3899 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3900 result = (double)pOutdoorCamera->uPickDepth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3901 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3902 result = 16192.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3903 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3904 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3905
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3906 //----- (0043648F) --------------------------------------------------------
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
3907 void Vec3_short__to_RenderVertexSoft(RenderVertexSoft *_this, Vec3_short_ *a2)
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
3908 {
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3909 _this->flt_2C = 0.0;
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
3910
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
3911 _this->vWorldPosition.x = a2->x;
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
3912 _this->vWorldPosition.y = a2->y;
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
3913 _this->vWorldPosition.z = a2->z;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3914 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3915
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3916 //----- (004369DB) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3917 void Vec3_float_::Normalize()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3918 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3919 Vec3_float_ *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3920 double v2; // st7@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3921
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3922 auto a1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3923 v1 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3924 v2 = 1.0 / sqrt(a1->x * a1->x + a1->y * a1->y + a1->z * a1->z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3925 v1->x = v2 * v1->x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3926 v1->y = v2 * v1->y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3927 v1->z = v2 * v1->z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3928 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3929
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3930
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3931
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3932
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3933
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3934
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3935
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3936 //----- (004382BC) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3937 __int16 __thiscall sub_4382BC(int _this)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3938 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3939 LOG_DECOMPILATION_WARNING();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3940 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3941 /*__int16 result; // ax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3942 __int16 v14; // sp@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3943 int v15; // [sp-4h] [bp-Ch]@0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3944 signed __int16 v16; // [sp+4h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3945 __int16 v17; // [sp+4h] [bp-4h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3946 __int16 v18; // [sp+4h] [bp-4h]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3947
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3948 v16 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3949 __asm { pushf }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3950 if ( v15 == (v15 ^ 0x200000) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3951 v16 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3952 if ( v16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3953 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3954 result = sub_43847A();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3955 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3956 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3957 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3958 //UNDEF(_ZF);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3959 //UNDEF(_SF);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3960 //UNDEF(_OF);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3961 _CF = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3962 if ( !_ZF )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3963 _CF = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3964 __asm { pushfw }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3965 bProcessorIsNotIntel = (BYTE2(v15) & 1 ^ 1) & 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3966 _CF = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3967 _OF = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3968 _ZF = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3969 _SF = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3970 __asm { pushfw }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3971 v17 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3972 if ( (HIWORD(v15) | 0xF000) & 0xF000 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3973 v17 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3974 __asm { popfw }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3975 result = v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3976 if ( v17 != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3977 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3978 _CF = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3979 _OF = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3980 _ZF = v14 == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3981 _SF = v14 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3982 __asm { pushf }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3983 v18 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3984 if ( v15 != (v15 ^ 0x40000) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3985 v18 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3986 __asm { popf }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3987 result = v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3988 if ( v18 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3989 result = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3990 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3991 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3992 if ( bProcessorIsNotIntel )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3993 HIBYTE(result) |= 0x80u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3994 return result;*/
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3995 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3996
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3997 //----- (004383ED) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3998 int __cdecl sub_4383ED()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3999 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4000 LOG_DECOMPILATION_WARNING();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4001 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4002 /*signed int v9; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4003 int v16; // [sp-4h] [bp-38h]@0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4004 int v17[3]; // [sp+Ch] [bp-28h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4005 char v18; // [sp+18h] [bp-1Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4006 char v19; // [sp+19h] [bp-1Bh]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4007 int v20[4]; // [sp+1Ch] [bp-18h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4008 int v21; // [sp+2Ch] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4009 int v22; // [sp+30h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4010
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4011 v17[0] = *(int *)"------------";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4012 v17[1] = *(int *)"--------";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4013 v17[2] = *(int *)"----";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4014 v18 = asc_4E4938[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4015 v19 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4016 v22 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4017 v20[0] = *(int *)"GenuineIntel";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4018 v20[1] = *(int *)"ineIntel";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4019 v20[2] = *(int *)"ntel";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4020 LOBYTE(v20[3]) = aGenuineintel[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4021 _CF = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4022 _OF = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4023 _ZF = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4024 _SF = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4025 v21 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4026 __asm { pushf }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4027 if ( v16 == (v16 ^ 0x200000) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4028 v21 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4029 if ( (short)v21 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4030 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4031 _EAX = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4032 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4033 v17[0] = _EBX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4034 v17[1] = _EDX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4035 v17[2] = _ECX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4036 v9 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4037 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4038 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4039 if ( *((char *)v17 + v9) != *((char *)v20 + v9) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4040 bProcessorIsNotIntel = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4041 ++v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4042 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4043 while ( v9 < 12 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4044 if ( v9 >= 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4045 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4046 _EAX = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4047 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4048 v22 = _EDX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4049 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4050 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4051 return v22;*/
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4052 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4053
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4054 //----- (0043847A) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4055 __int16 __cdecl sub_43847A()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4056 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4057 __debugbreak();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4058 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4059 /*signed int v5; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4060 char v12[12]; // [sp+Ch] [bp-28h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4061 char v13; // [sp+18h] [bp-1Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4062 char v14; // [sp+19h] [bp-1Bh]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4063 int v15[4]; // [sp+1Ch] [bp-18h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4064 int v16; // [sp+2Eh] [bp-6h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4065 char v17; // [sp+32h] [bp-2h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4066 char v18; // [sp+33h] [bp-1h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4067
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4068 *(int *)v12 = *(int *)"------------";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4069 *(int *)&v12[4] = *(int *)"--------";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4070 *(int *)&v12[8] = *(int *)"----";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4071 v13 = asc_4E4938[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4072 v14 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4073 v18 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4074 v15[0] = *(int *)"GenuineIntel";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4075 v15[1] = *(int *)"ineIntel";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4076 v15[2] = *(int *)"ntel";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4077 v16 = 65535;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4078 LOBYTE(v15[3]) = aGenuineintel[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4079 _EAX = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4080 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4081 *(int *)v12 = _EBX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4082 *(int *)&v12[4] = _EDX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4083 *(int *)&v12[8] = _ECX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4084 v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4085 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4086 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4087 if ( v12[v5] != *((char *)v15 + v5) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4088 bProcessorIsNotIntel = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4089 ++v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4090 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4091 while ( v5 < 12 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4092 if ( v5 >= 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4093 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4094 _EAX = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4095 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4096 v18 = _EAX & 0xF;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4097 LOBYTE(_EAX) = (unsigned __int8)(_EAX & 0xF0) >> 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4098 v17 = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4099 LOWORD(v16) = ((_EAX & 0xF00u) >> 8) & 0xF;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4100 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4101 return v16;*/
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4102 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4103
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4105
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4106 //----- (004385B5) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4107 void stru11::CheckCPU()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4108 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4109 LOG_DECOMPILATION_WARNING();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4110 /*
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4111 int v5; // [sp-4h] [bp-10h]@0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4112 signed int v6; // [sp+4h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4113 signed int v7; // [sp+8h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4114
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4115 _CF = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4116 _OF = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4117 _ZF = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4118 _SF = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4119 v7 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4120 __asm { pushf }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4121 v6 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4122 if ( v5 != (v5 ^ 0x40000) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4123 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4124 __asm { popf }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4125 v6 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4126 __asm { pushf }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4127 if ( v5 != (v5 ^ 0x200000) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4128 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4129 v7 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4130 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4131 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4132 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4133 if ( v6 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4134 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4135 this->field_AC = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4136 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4137 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4138 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4139 if ( v6 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4140 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4141 this->field_AC = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4142 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4143 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4144 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4145 if ( v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4146 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4147 this->field_AC = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4148 RunCPUID();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4149 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4150 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4151 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4152 this->field_AC = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4153 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4154 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4155 }*/
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4156 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4157
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4158 //----- (00438659) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4159 void stru11::RunCPUID()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4160 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4161 __debugbreak();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4162 /*stru11 *v6; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4163 unsigned int uNumOps; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4164 int uNumExtOps; // edi@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4165 char pCyrixString[16]; // [sp+Ch] [bp-60h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4166 char pCentaurString[16]; // [sp+1Ch] [bp-50h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4167 char pAMDString[16]; // [sp+2Ch] [bp-40h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4168 char pIntelString[16]; // [sp+3Ch] [bp-30h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4169 char pCPUString[16]; // [sp+4Ch] [bp-20h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4170 stru11 *thisa; // [sp+5Ch] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4171 char *v35; // [sp+60h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4172 int v36; // [sp+64h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4173 int v37; // [sp+68h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4174
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4175 thisa = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4176 *(int *)pIntelString = *(int *)"GenuineIntel";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4177 *(int *)&pIntelString[4] = *(int *)"ineIntel";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4178 *(int *)&pIntelString[8] = *(int *)"ntel";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4179 pIntelString[12] = aGenuineintel[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4180 *(int *)pAMDString = *(int *)"AuthenticAMD";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4181 *(int *)&pAMDString[4] = *(int *)"enticAMD";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4182 *(int *)&pAMDString[8] = *(int *)"cAMD";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4183 pAMDString[12] = aAuthenticamd[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4184 *(int *)pCyrixString = *(int *)"CyrixInstead";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4185 *(int *)&pCyrixString[4] = *(int *)"xInstead";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4186 *(int *)&pCyrixString[8] = *(int *)"tead";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4187 pCyrixString[12] = aCyrixinstead[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4188 *(int *)pCentaurString = *(int *)"CentaurHauls";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4189 *(int *)&pCentaurString[4] = *(int *)"aurHauls";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4190 *(int *)&pCentaurString[8] = *(int *)"auls";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4191 v37 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4192 v36 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4193 pCentaurString[12] = aCentaurhauls[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4194 v35 = pCPUString;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4195 pCPUString[12] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4196 _EAX = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4197 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4198 v37 = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4199 *(int *)pCPUString = _EBX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4200 *(int *)&pCPUString[4] = _EDX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4201 *(int *)&pCPUString[8] = _ECX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4202 v6 = thisa;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4203 uNumOps = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4204 thisa->cpuid_00000000_ebx_vendorstr1 = _EBX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4205 v6->cpuid_00000000_edx_vendorstr2 = *(int *)&pCPUString[4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4206 v6->cpuid_00000000_ecx_vendorstr3 = *(int *)&pCPUString[8];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4207 v6->cpuid_00000000_eax_numops = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4208 strcpy(v6->pCPUString, pCPUString);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4209 if ( strcmp(pIntelString, pCPUString) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4210 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4211 if ( strcmp(pAMDString, pCPUString) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4212 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4213 if ( strcmp(pCyrixString, pCPUString) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4214 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4215 if ( strcmp(pCentaurString, pCPUString) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4216 v6->uProcessorManufacturer = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4217 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4218 v6->uProcessorManufacturer = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4219 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4220 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4221 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4222 v6->uProcessorManufacturer = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4223 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4224 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4225 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4226 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4227 v6->uProcessorManufacturer = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4228 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4229 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4230 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4231 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4232 v6->uProcessorManufacturer = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4233 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4234 if ( uNumOps >= 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4235 RunCPUID_op1();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4236 if ( uNumOps >= 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4237 RunCPUID_op2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4238 _EAX = 0x80000000u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4239 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4240 if ( !(_EAX & 0x80000000) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4241 _EAX = 0x80000000u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4242 v36 = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4243 v6->cpuid_80000000_edx = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4244 uNumExtOps = _EAX ^ 0x80000000;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4245 if ( (_EAX ^ 0x80000000u) >= 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4246 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4247 _EAX = 0x80000001u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4248 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4249 thisa = (stru11 *)_EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4250 v35 = (char *)_EDX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4251 v6->cpuid_80000001_eax = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4252 v6->cpuid_80000001_edx = (int)v35;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4253 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4254 if ( (unsigned int)uNumExtOps >= 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4255 RunCPUID_ext2_3_4();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4256 if ( (unsigned int)uNumExtOps >= 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4257 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4258 _EAX = 0x80000005u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4259 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4260 thisa = (stru11 *)_EBX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4261 v35 = (char *)_ECX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4262 v36 = _EDX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4263 v6->cpuid_80000005_ebx = _EBX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4264 v6->cpuid_80000005_ecx = (int)v35;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4265 v6->cpuid_80000005_edx = v36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4266 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4267 if ( (unsigned int)uNumExtOps >= 6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4268 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4269 _EAX = 0x80000006u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4270 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4271 v6->cpuid_80000006_ecx = _ECX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4272 }*/
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4273 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4274
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4275 //----- (00438821) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4276 void stru11::RunCPUID_op1()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4277 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4278 __debugbreak();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4279 /*stru11 *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4280 unsigned int v7; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4281 int v8; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4282 int v9; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4283 signed int v10; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4284 int v11; // ecx@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4285 int v12; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4286 signed int v13; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4287 int v14; // ecx@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4288 signed int v15; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4289 int v16; // ecx@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4290 signed int v17; // eax@34
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4291 int v18; // ecx@34
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4292
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4293 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4294 _EAX = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4295 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4296 v7 = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4297 v1->cpuid_00000001_edx = _EDX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4298 v1->cpuid_00000001_eax = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4299 if ( (_EAX & 0x3000) == 8192 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4300 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4301 LOBYTE(v1->cpuid_80000002_registers2[0]) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4302 v7 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4303 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4304 v8 = (v7 >> 8) & 0xF;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4305 switch ( v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4306 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4307 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4308 v1->field_AC = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4309 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4310 case 5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4311 v1->field_AC = 15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4312 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4313 case 6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4314 v1->field_AC = 36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4315 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4316 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4317 v1->field_AC = 49;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4318 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4319 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4320 v9 = v1->uProcessorManufacturer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4321 if ( v9 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4322 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4323 v10 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4324 v11 = v7 & 0x3FF0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4325 while ( v11 != dword_4E4948[2 * v10] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4326 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4327 ++v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4328 if ( v10 >= 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4329 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4330 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4331 v12 = dword_4E494C[2 * v10];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4332 goto LABEL_39;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4333 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4334 if ( v9 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4335 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4336 if ( (v7 & 0xF00) == dword_4E49D0[0] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4337 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4338 v12 = dword_4E49D4[0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4339 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4340 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4341 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4342 v13 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4343 v14 = v7 & 0x3FF0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4344 while ( v14 != dword_4E49D0[2 * v13] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4345 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4346 ++v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4347 if ( v13 >= 9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4348 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4349 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4350 v12 = dword_4E49D4[2 * v13];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4351 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4352 goto LABEL_39;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4353 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4354 if ( v9 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4355 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4356 if ( v9 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4357 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4358 v17 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4359 v18 = v7 & 0x3FF0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4360 while ( v18 != dword_4E4A40[2 * v17] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4361 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4362 ++v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4363 if ( v17 >= 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4364 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4365 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4366 v12 = dword_4E4A44[2 * v17];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4367 goto LABEL_39;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4368 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4369 v15 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4370 v16 = v7 & 0x3FF0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4371 while ( v16 != dword_4E4A18[2 * v15] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4372 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4373 ++v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4374 if ( v15 >= 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4375 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4376 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4377 v1->field_AC = dword_4E4A1C[2 * v15];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4378 LABEL_30:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4379 v12 = 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4380 if ( v1->field_AC == 24 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4381 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4382 if ( _EDX != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4383 v12 = (((_EDX != 261) - 1) & 0xA) + 15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4384 LABEL_39:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4385 v1->field_AC = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4386 }*/
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4387 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4388
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4389 //----- (00438992) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4390 void stru11::RunCPUID_op2()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4391 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4392 __debugbreak();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4393 /*
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4394 stru11 *v1; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4395 int v7; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4396 signed int v8; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4397 unsigned __int8 v9; // al@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4398 signed int v10; // ecx@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4399 unsigned __int8 v11; // al@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4400 int v12; // [sp+Ch] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4401 int v13; // [sp+10h] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4402 int v14; // [sp+14h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4403 int v15; // [sp+18h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4404 int *v16; // [sp+1Ch] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4405
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4406 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4407 v16 = &v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4408 _EAX = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4409 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4410 v12 = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4411 v13 = _EBX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4412 v14 = _ECX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4413 v15 = _EDX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4414 v1->cpuid_00000002_eax = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4415 v1->cpuid_00000002_ebx = v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4416 v1->cpuid_00000002_ecx = v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4417 v1->cpuid_00000002_edx = v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4418 v7 = v1->field_AC;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4419 if ( v7 == 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4420 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4421 v8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4422 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4423 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4424 v9 = *((char *)&v12 + v8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4425 if ( v9 == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4426 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4427 v1->field_AC = 43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4428 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4429 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4430 if ( v9 >= 0x41u && v9 <= 0x43u )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4431 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4432 v1->field_AC = 41;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4433 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4434 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4435 if ( v9 >= 0x44u && v9 <= 0x45u )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4436 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4437 ++v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4438 if ( v8 >= 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4439 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4440 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4441 v1->field_AC = 42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4442 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4443 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4444 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4445 if ( v7 == 45 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4446 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4447 v10 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4448 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4449 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4450 v11 = *((char *)&v12 + v10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4451 if ( v11 >= 0x40u && v11 <= 0x43u )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4452 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4453 v1->field_AC = 46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4454 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4455 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4456 if ( v11 >= 0x44u && v11 <= 0x45u )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4457 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4458 ++v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4459 if ( v10 >= 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4460 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4461 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4462 v1->field_AC = 47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4463 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4464 }*/
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4465 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4466
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4467 //----- (00438A67) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4468 void stru11::RunCPUID_ext2_3_4()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4469 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4470 __debugbreak();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4471 /*stru11 *v1; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4472 stru11 *v17; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4473 int v18[3][4]; // [sp+Ch] [bp-38h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4474 stru11 *v19; // [sp+3Ch] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4475
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4476 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4477 v19 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4478 _EAX = 0x80000002u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4479 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4480 v18[0][0] = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4481 *(_QWORD *)&v18[0][1] = __PAIR__(_ECX, _EBX);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4482 v18[0][3] = _EDX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4483 _EAX = 0x80000003u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4484 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4485 v18[1][0] = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4486 *(_QWORD *)&v18[1][1] = __PAIR__(_ECX, _EBX);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4487 v18[1][3] = _EDX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4488 _EAX = 0x80000004u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4489 __asm { cpuid }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4490 v18[2][0] = _EAX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4491 *(_QWORD *)&v18[2][1] = __PAIR__(_ECX, _EBX);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4492 v18[2][3] = _EDX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4493 v17 = v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4494 memcpy(v1->cpuid_80000002_registers, v18, 0x30u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4495 memcpy((char *)&v17->cpuid_80000002_registers2[0] + 1, v18, 0x30u);*/
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4496 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4497
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4498
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4499
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4500 //----- (00438BDF) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4501 bool MonsterStats::BelongsToSupertype(unsigned int uMonsterInfoID, enum MONSTER_SUPERTYPE eSupertype)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4502 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4503 unsigned __int8 v2; // zf@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4504 char v3; // sf@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4505 unsigned __int8 v4; // of@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4506 bool result; // eax@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4507
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4508 switch ( eSupertype )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4509 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4510 case MONSTER_SUPERTYPE_UNDEAD:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4511 if ( (signed int)uMonsterInfoID >= MONSTER_GHOST_1 && (signed int)uMonsterInfoID <= MONSTER_GHOST_3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4512 || (signed int)uMonsterInfoID >= MONSTER_LICH_1 && (signed int)uMonsterInfoID <= MONSTER_LICH_3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4513 || (signed int)uMonsterInfoID >= MONSTER_SKELETON_1 && (signed int)uMonsterInfoID <= MONSTER_SKELETON_3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4514 || (signed int)uMonsterInfoID >= MONSTER_VAMPIRE_1 && (signed int)uMonsterInfoID <= MONSTER_VAMPIRE_3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4515 || (signed int)uMonsterInfoID >= MONSTER_WIGHT_1 && (signed int)uMonsterInfoID <= MONSTER_WIGHT_3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4516 || (signed int)uMonsterInfoID >= MONSTER_ZOMBIE_1 && (signed int)uMonsterInfoID <= MONSTER_ZOMBIE_3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4517 goto ret_true;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4518 if ( (signed int)uMonsterInfoID < MONSTER_GHOUL_1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4519 goto ret_false;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4520 v4 = __OFSUB__(uMonsterInfoID, (int)MONSTER_GHOUL_3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4521 v2 = uMonsterInfoID == MONSTER_GHOUL_3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4522 v3 = ((uMonsterInfoID - MONSTER_GHOUL_3) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4523 goto false_if_outside;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4524 case MONSTER_SUPERTYPE_KREEGAN:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4525 if ( (signed int)uMonsterInfoID < MONSTER_DEVIL_1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4526 goto ret_false;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4527 v4 = __OFSUB__(uMonsterInfoID, (int)MONSTER_DEVIL_3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4528 v2 = uMonsterInfoID == MONSTER_DEVIL_3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4529 v3 = ((uMonsterInfoID - MONSTER_DEVIL_3) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4530 goto false_if_outside;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4531 case MONSTER_SUPERTYPE_ELF:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4532 if ( (signed int)uMonsterInfoID >= MONSTER_PEASANT_ELF_FEMALE_1_1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4533 && (signed int)uMonsterInfoID <= MONSTER_PEASANT_ELF_MALE_3_3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4534 || (signed int)uMonsterInfoID >= MONSTER_ELF_ARCHER_1 && (signed int)uMonsterInfoID <= MONSTER_ELF_ARCHER_3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4535 goto ret_true;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4536 if ( (signed int)uMonsterInfoID < MONSTER_ELF_SPEARMAN_1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4537 goto ret_false;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4538 v4 = __OFSUB__(uMonsterInfoID, (int)MONSTER_ELF_SPEARMAN_3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4539 v2 = uMonsterInfoID == MONSTER_ELF_SPEARMAN_3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4540 v3 = ((uMonsterInfoID - MONSTER_ELF_SPEARMAN_3) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4541 goto false_if_outside;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4542 case MONSTER_SUPERTYPE_DRAGON:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4543 if ( (signed int)uMonsterInfoID < MONSTER_DRAGON_1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4544 goto ret_false;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4545 v4 = __OFSUB__(uMonsterInfoID, (int)MONSTER_DRAGON_3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4546 v2 = uMonsterInfoID == MONSTER_DRAGON_3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4547 v3 = ((uMonsterInfoID - MONSTER_DRAGON_3) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4548 goto false_if_outside;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4549 case MONSTER_SUPERTYPE_WATER_ELEMENTAL:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4550 if ( (signed int)uMonsterInfoID < MONSTER_ELEMENTAL_WATER_1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4551 goto ret_false;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4552 v4 = __OFSUB__(uMonsterInfoID, (int)MONSTER_ELEMENTAL_WATER_3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4553 v2 = uMonsterInfoID == MONSTER_ELEMENTAL_WATER_3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4554 v3 = ((uMonsterInfoID - MONSTER_ELEMENTAL_WATER_3) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4555 goto false_if_outside;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4556 case MONSTER_SUPERTYPE_TREANT:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4557 if ( (signed int)uMonsterInfoID < MONSTER_TREANT_1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4558 goto ret_false;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4559 v4 = __OFSUB__(uMonsterInfoID, (int)MONSTER_TREANT_3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4560 v2 = uMonsterInfoID == MONSTER_TREANT_3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4561 v3 = ((uMonsterInfoID - MONSTER_TREANT_3) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4562 goto false_if_outside;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4563 case MONSTER_SUPERTYPE_TITAN:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4564 if ( (signed int)uMonsterInfoID < MONSTER_TITAN_1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4565 goto ret_false;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4566 v4 = __OFSUB__(uMonsterInfoID, (int)MONSTER_TITAN_3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4567 v2 = uMonsterInfoID == MONSTER_TITAN_3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4568 v3 = ((uMonsterInfoID - MONSTER_TITAN_3) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4569 false_if_outside:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4570 if ( !((unsigned __int8)(v3 ^ v4) | v2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4571 goto ret_false;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4572 ret_true:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4573 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4574 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4575 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4576 ret_false:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4577 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4578 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4579 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4580 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4581 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4582
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4583
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4584 //----- (00438F8F) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4585 void __cdecl _438F8F_area_of_effect__damage_evaluate()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4586 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4587 int v0; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4588 char *v1; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4589 int v2; // ecx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4590 signed int v3; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4591 LayingItem *v4; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4592 signed int v5; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4593 signed int v6; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4594 unsigned int v7; // edi@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4595 int v8; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4596 __int16 v9; // bx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4597 int v10; // edi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4598 Vec3_int_ v11; // ST04_12@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4599 int v12; // ST0C_4@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4600 Actor *v13; // edi@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4601 int v14; // edx@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4602 int v15; // edx@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4603 int v16; // ebx@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4604 signed int v17; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4605 int v18; // edi@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4606 int v19; // edi@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4607 Vec3_int_ v20; // ST04_12@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4608 Vec3_int_ *v21; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4609 unsigned int v22; // edx@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4610 int v23; // edx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4611 int v24; // eax@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4612 Vec3_int_ v25; // ST04_12@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4613 unsigned int v26; // ebx@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4614 char *v27; // edi@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4615 char *v28; // edi@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4616 int v29; // ebx@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4617 int v30; // eax@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4618 int v31; // edx@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4619 int v32; // eax@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4620 int v33; // ST24_4@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4621 Vec3_int_ v34; // ST04_12@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4622 Vec3_int_ *v35; // eax@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4623 LayingItem *v36; // [sp+0h] [bp-28h]@0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4624 signed int v37; // [sp+4h] [bp-24h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4625 int v38; // [sp+4h] [bp-24h]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4626 signed int v39; // [sp+8h] [bp-20h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4627 int v40; // [sp+8h] [bp-20h]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4628 int v41; // [sp+Ch] [bp-1Ch]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4629 int v42; // [sp+Ch] [bp-1Ch]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4630 int v43; // [sp+10h] [bp-18h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4631 int v44; // [sp+14h] [bp-14h]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4632 unsigned int uActorID; // [sp+18h] [bp-10h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4633 Vec3_int_ *pVelocity; // [sp+1Ch] [bp-Ch]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4634 int a1; // [sp+20h] [bp-8h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4635 int v48; // [sp+24h] [bp-4h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4636
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4637 v0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4638 v43 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4639 if ( stru_50FE08.count > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4640 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4641 pVelocity = &stru_50FE08.vec_4B4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4642 v1 = (char *)stru_50FE08.pZs;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4643 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4644 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4645 v2 = *((short *)v1 - 300) & 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4646 v3 = (signed int)*((short *)v1 - 300) >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4647 v39 = (signed int)*((short *)v1 - 300) >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4648 if ( v2 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4649 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4650 v4 = &pLayingItems[v3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4651 v36 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4652 v5 = v4->field_58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4653 v2 = v5 & 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4654 v3 = v5 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4655 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4656 v41 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4657 v37 = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4658 if ( stru_50FE08.field_3EC[v0] & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4659 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4660 v6 = dword_4F6E08[v3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4661 v7 = v6 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4662 v8 = (v6 & 7) - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4663 uActorID = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4664 if ( v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4665 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4666 if ( v8 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4667 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4668 v9 = *(short *)v1;
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
4669 v10 = pParty->vPosition.y - *((short *)v1 - 100);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4670 a1 = pParty->vPosition.x - *((short *)v1 - 200);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4671 v48 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4672 if ( a1 * a1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4673 + v10 * v10
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
4674 + ((signed int)(pParty->vPosition.z + pParty->uPartyHeight) >> (1 - v9))
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
4675 * ((signed int)(pParty->vPosition.z + pParty->uPartyHeight) >> (1 - v9)) < (unsigned int)((*((short *)v1 + 100) + 32) * (*((short *)v1 + 100) + 32)) )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4676 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4677 v11.z = *(short *)v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4678 v11.y = *((short *)v1 - 100);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4679 v11.x = *((short *)v1 - 200);
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
4680 if ( sub_407A1C(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z + pParty->sEyelevel, v11) )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4681 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4682 v12 = stru_50C198.which_player_would_attack(&pActors[v39]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4683 DamagePlayerFromMonster(*((short *)v1 - 300), stru_50FE08.field_450[v43], pVelocity, v12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4684 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4685 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4686 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4687 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4688 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4689 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4690 v13 = &pActors[v7];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4691 if ( SHIDWORD(v13->pActorBuffs[6].uExpireTime) > 0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4692 || SHIDWORD(v13->pActorBuffs[6].uExpireTime) >= 0 && LODWORD(v13->pActorBuffs[6].uExpireTime)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4693 || v13->CanAct() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4694 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4695 v14 = v13->vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4696 v40 = v13->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4697 v38 = v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4698 v15 = v14 - *((short *)v1 - 100);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4699 v16 = *(short *)v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4700 v42 = v13->vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4701 a1 = v40 - *((short *)v1 - 200);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4702 v17 = v13->uActorHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4703 v18 = v13->uActorRadius;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4704 v44 = v42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4705 v19 = *((short *)v1 + 100) + v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4706 v48 = v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4707 if ( a1 * a1 + v15 * v15 + (v42 + (v17 >> 1) - v16) * (v42 + (v17 >> 1) - v16) < (unsigned int)(v19 * v19) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4708 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4709 v20.z = *(short *)v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4710 v20.y = *((short *)v1 - 100);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4711 v20.x = *((short *)v1 - 200);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4712 if ( sub_407A1C(v40, v38, v42 + 50, v20) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4713 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4714 Vec3_int_::Normalize(&a1, &v48, &v44);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4715 v21 = pVelocity;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4716 v22 = uActorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4717 pVelocity->x = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4718 v21->y = v48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4719 v21->z = v44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4720 sub_43B1B0(*((short *)v1 - 300), v22, v21, stru_50FE08.field_450[v43]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4721 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4722 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4723 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4724 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4725 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4726 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4727 {
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
4728 v23 = pParty->vPosition.y - *((short *)v1 - 100);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4729 v24 = ((signed int)pParty->uPartyHeight >> 1) - *(short *)v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4730 a1 = pParty->vPosition.x - *((short *)v1 - 200);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4731 v48 = v23;
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
4732 if ( a1 * a1 + v23 * v23 + (pParty->vPosition.z + v24) * (pParty->vPosition.z + v24) < (unsigned int)((*((short *)v1 + 100) + 32) * (*((short *)v1 + 100) + 32)) )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4733 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4734 v25.z = *(short *)v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4735 v25.y = *((short *)v1 - 100);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4736 v25.x = *((short *)v1 - 200);
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
4737 if ( sub_407A1C(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z + pParty->sEyelevel, v25) )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4738 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4739 v26 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4740 v27 = (char *)&pParty->pPlayers[0].pConditions[15];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4741 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4742 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4743 if ( !(*((int *)v27 - 1) | *((int *)v27 - 2)) && !*(_QWORD *)v27 && !*((_QWORD *)v27 + 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4744 DamagePlayerFromMonster(*((short *)v1 - 300), stru_50FE08.field_450[v43], pVelocity, v26);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4745 v27 += 6972;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4746 ++v26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4747 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4748 while ( (signed int)v27 < (signed int)&pParty->pHirelings[1].evtb );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4749 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4750 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4751 uActorID = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4752 if ( (signed int)uNumActors > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4753 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4754 v28 = (char *)&pActors[0].vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4755 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4756 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4757 if ( ((Actor *)(v28 - 146))->CanAct() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4758 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4759 v29 = *(short *)v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4760 v30 = *((short *)v28 - 1) - *((short *)v1 - 100);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4761 a1 = *((short *)v28 - 2) - *((short *)v1 - 200);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4762 v31 = *(short *)v28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4763 v48 = v30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4764 v44 = v31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4765 v32 = ((signed int)*((short *)v28 - 4) >> 1) - v29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4766 v33 = *((short *)v28 - 5) + *((short *)v1 + 100);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4767 if ( a1 * a1 + v48 * v48 + (v31 + v32) * (v31 + v32) < (unsigned int)(v33 * v33) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4768 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4769 v34.z = *(short *)v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4770 v34.y = *((short *)v1 - 100);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4771 v34.x = *((short *)v1 - 200);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4772 if ( sub_407A1C(*((short *)v28 - 2), *((short *)v28 - 1), *(short *)v28 + 50, v34) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4773 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4774 Vec3_int_::Normalize(&a1, &v48, &v44);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4775 v35 = pVelocity;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4776 pVelocity->x = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4777 v35->y = v48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4778 v35->z = v44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4779 switch ( v41 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4780 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4781 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4782 DamageMonsterFromParty(*((short *)v1 - 300), uActorID, v35);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4783 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4784 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4785 if ( v36 && pActors[v37].GetActorsRelation((Actor *)(v28 - 146)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4786 sub_43B1B0(*((short *)v1 - 300), uActorID, pVelocity, v36->field_61);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4787 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4788 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4789 sub_43B057(*((short *)v1 - 300), uActorID, v35);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4790 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4791 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4792 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4793 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4794 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4795 ++uActorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4796 v28 += 836;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4797 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4798 while ( (signed int)uActorID < (signed int)uNumActors );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4799 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4800 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4801 ++pVelocity;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4802 v0 = v43 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4803 v1 += 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4804 ++v43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4805 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4806 while ( v43 < stru_50FE08.count );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4807 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4808 stru_50FE08.count = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4809 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4810 // 50FE08: using guessed type stru298 stru_50FE08;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4811
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4812 //----- (00439474) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4813 bool __fastcall DamageMonsterFromParty(signed int a1, unsigned int uActorID_Monster, Vec3_int_ *pVelocity)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4814 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4815 signed int v3; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4816 LayingItem *v4; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4817 int v5; // edx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4818 bool uPlayerID; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4819 Player *pPlayer; // edi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4820 Actor *pMonster; // esi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4821 LayingItem *v9; // ebx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4822 int v10; // eax@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4823 int v11; // ebx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4824 unsigned int v12; // ecx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4825 int v13; // edx@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4826 int v14; // edx@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4827 int v15; // eax@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4828 unsigned __int16 v16; // cx@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4829 int v17; // eax@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4830 int v18; // eax@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4831 unsigned __int8 v19; // zf@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4832 unsigned __int8 v20; // sf@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4833 int v21; // edx@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4834 int v22; // eax@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4835 unsigned __int8 v23; // zf@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4836 unsigned __int8 v24; // sf@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4837 int v25; // edx@51
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4838 int v26; // ecx@51
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4839 signed int v27; // eax@51
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4840 int v28; // eax@53
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4841 signed int v29; // eax@76
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4842 signed int v30; // eax@84
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4843 signed int v31; // eax@92
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4844 int v32; // eax@94
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4845 int v33; // eax@100
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4846 int v34; // eax@104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4847 signed int v35; // eax@104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4848 double v36; // st7@104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4849 float v37; // ST08_4@104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4850 float v38; // ST04_4@104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4851 float v39; // ST00_4@104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4852 int v40; // ebx@107
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4853 unsigned int v41; // ebx@109
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4854 signed __int64 v42; // qax@125
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4855 unsigned __int16 v43; // ax@132
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4856 char v44; // bl@132
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4857 unsigned __int16 v45; // ax@132
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4858 unsigned __int64 v46; // [sp+Ch] [bp-60h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4859 const char *v47; // [sp+14h] [bp-58h]@104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4860 char *pPlayerName; // [sp+18h] [bp-54h]@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4861 char *pMonsterName; // [sp+1Ch] [bp-50h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4862 int v50; // [sp+20h] [bp-4Ch]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4863 unsigned __int64 *v51; // [sp+30h] [bp-3Ch]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4864 int v52; // [sp+34h] [bp-38h]@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4865 int v53; // [sp+38h] [bp-34h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4866 int v54; // [sp+3Ch] [bp-30h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4867 int v55; // [sp+40h] [bp-2Ch]@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4868 signed int a4; // [sp+44h] [bp-28h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4869 PlayerEquipment *v57; // [sp+48h] [bp-24h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4870 int v58; // [sp+4Ch] [bp-20h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4871 int v59; // [sp+50h] [bp-1Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4872 unsigned int uActorID_Monster_; // [sp+54h] [bp-18h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4873 int v61; // [sp+58h] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4874 int v62; // [sp+5Ch] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4875 int uDamageAmount; // [sp+60h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4876 int a2; // [sp+64h] [bp-8h]@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4877 int a3; // [sp+6Bh] [bp-1h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4878
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4879 v3 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4880 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4881 uActorID_Monster_ = uActorID_Monster;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4882 v54 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4883 uDamageAmount = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4884 a4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4885 v61 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4886 v59 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4887 v62 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4888 if ( (a1 & 7) == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4889 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4890 v4 = &pLayingItems[a1 >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4891 uDamageAmount = (int)v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4892 v61 = v4->field_60_distance_related_prolly_lod;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4893 v3 = v4->field_58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4894 v54 = v4->field_58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4895 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4896 v5 = v3 & 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4897 uPlayerID = v3 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4898 if ( v5 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4899 return uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4900 pPlayer = &pParty->pPlayers[uPlayerID];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4901 if ( uPlayerID < 0 && uPlayerID > 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4902 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4903 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
4904 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4905 pMonster = &pActors[uActorID_Monster_];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4906 uPlayerID = pMonster->IsAlive();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4907 if ( uPlayerID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4908 return uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4909 BYTE1(pMonster->uAttributes) |= 0xC0u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4910 if ( pMonster->uAIState == Fleeing )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4911 pMonster->uAttributes |= 0x20000u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4912 v58 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4913 v53 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4914 v57 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4915 if ( !v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4916 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4917 v51 = (unsigned __int64 *)pPlayer->pEquipment.uMainHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4918 v59 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4919 if ( pPlayer->HasItemEquipped(EQUIP_TWO_HANDED) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4920 {
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
4921 v55 = pItemsTable->pItems[*(int *)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * (int)v51 + 5]].uSkillType;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4922 v28 = SkillToMastery(pPlayer->pActiveSkills[v55]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4923 uDamageAmount = v28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4924 if ( v55 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4925 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4926 if ( v55 == 6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4927 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4928 if ( v28 >= 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4929 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4930 LOBYTE(v51) = pPlayer->GetActualSkillLevel(PLAYER_SKILL_MACE) & 0x3F;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4931 v51 = (unsigned __int64 *)(unsigned __int8)v51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4932 if ( rand() % 100 < (unsigned __int8)v51 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4933 v58 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4934 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4935 if ( uDamageAmount >= 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4936 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4937 LOBYTE(v51) = pPlayer->GetActualSkillLevel(PLAYER_SKILL_MACE) & 0x3F;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4938 v51 = (unsigned __int64 *)(unsigned __int8)v51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4939 if ( rand() % 100 < (unsigned __int8)v51 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4940 v53 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4941 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4942 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4943 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4944 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4945 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4946 if ( uDamageAmount >= 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4947 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4948 LOBYTE(v51) = pPlayer->GetActualSkillLevel((PLAYER_SKILL_TYPE)0) & 0x3F;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4949 v51 = (unsigned __int64 *)(unsigned __int8)v51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4950 if ( rand() % 100 < (unsigned __int8)v51 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4951 v58 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4952 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4953 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4954 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4955 v50 = pMonster->pMonsterInfo.uID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4956 a2 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4957 v27 = pPlayer->CalculateMeleeDamageTo(0, 0, v50);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4958 goto LABEL_65;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4959 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4960 v19 = v4->field_48 == 99;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4961 v61 = v4->field_60_distance_related_prolly_lod;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4962 if ( !v19 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4963 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4964 v9 = (LayingItem *)uDamageAmount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4965 v50 = pParty->vPosition.x - *(int *)(uDamageAmount + 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4966 v55 = abs(v50);
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
4967 pMonsterName = (char *)(pParty->vPosition.y - v9->vPosition.y);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4968 v51 = (unsigned __int64 *)abs((int)pMonsterName);
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
4969 pPlayerName = (char *)(pParty->vPosition.z - v9->vPosition.z);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4970 v52 = abs((int)pPlayerName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4971 v61 = v55;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4972 v10 = v55;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4973 v11 = (int)v51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4974 v12 = v52;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4975 if ( v55 < (signed int)v51 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4976 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4977 v10 = (int)v51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4978 v11 = v55;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4979 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4980 if ( v10 < v52 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4981 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4982 v13 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4983 v10 = v52;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4984 v12 = v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4985 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4986 if ( v11 < (signed int)v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4987 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4988 v14 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4989 v12 = v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4990 v11 = v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4991 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4992 uPlayerID = ((unsigned int)(11 * v11) >> 5) + (v12 >> 2) + v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4993 v61 = uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4994 if ( uPlayerID >= 2560 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4995 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4996 if ( v61 >= 5120 && !(BYTE1(pMonster->uAttributes) & 4) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4997 return uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4998 v61 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4999 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5000 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5001 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5002 v61 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5003 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5004 v4 = (LayingItem *)uDamageAmount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5005 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5006 v15 = v4->field_48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5007 if ( v15 == 102 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5008 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5009 v16 = pPlayer->pActiveSkills[7];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5010 v61 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5011 if ( (signed int)SkillToMastery(v16) >= 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5012 a4 = pPlayer->pActiveSkills[7] & 0x3F;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5013 a2 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5014 uDamageAmount = pPlayer->CalculateMeleeDamageTo(1, 1, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5015 goto LABEL_67;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5016 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5017 if ( v15 != 100 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5018 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5019 if ( v15 == 101 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5020 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5021 a2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5022 v18 = pPlayer->CalculateRangedDamageTo(0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5023 v19 = HIDWORD(pMonster->pActorBuffs[15].uExpireTime) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5024 v20 = SHIDWORD(pMonster->pActorBuffs[15].uExpireTime) < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5025 uDamageAmount = v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5026 if ( !v20 && (!(v20 | v19) || LODWORD(pMonster->pActorBuffs[15].uExpireTime)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5027 uDamageAmount >>= 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5028 v59 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5029 goto LABEL_67;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5030 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5031 if ( v15 == 39 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5032 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5033 a4 = 5 * v4->field_4C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5034 a2 = pPlayer->GetSpellSchool(0x27u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5035 v21 = v4->field_4C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5036 v50 = pMonster->sCurrentHP;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5037 pMonsterName = (char *)v4->field_50;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5038 v22 = _43AFE3_calc_spell_damage(39, v21, (signed int)pMonsterName, v50);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5039 v23 = HIDWORD(pMonster->pActorBuffs[15].uExpireTime) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5040 v24 = SHIDWORD(pMonster->pActorBuffs[15].uExpireTime) < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5041 uDamageAmount = v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5042 if ( !v24 && (!(v24 | v23) || LODWORD(pMonster->pActorBuffs[15].uExpireTime)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5043 uDamageAmount >>= 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5044 v59 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5045 LABEL_67:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5046 if ( !stru_50C198.PlayerHitOrMiss(pPlayer, pMonster, v61, a4) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5047 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5048 LABEL_68:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5049 LOWORD(uPlayerID) = pPlayer->PlaySound(52, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5050 return uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5051 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5052 goto LABEL_69;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5053 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5054 if ( v15 == 34 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5055 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5056 uDamageAmount = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5057 a2 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5058 v58 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5059 goto LABEL_67;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5060 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5061 v50 = v4->field_48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5062 a2 = pPlayer->GetSpellSchool(v50);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5063 v25 = v4->field_4C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5064 v26 = v4->field_48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5065 v50 = pMonster->sCurrentHP;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5066 pMonsterName = (char *)v4->field_50;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5067 v27 = _43AFE3_calc_spell_damage(v26, v25, (signed int)pMonsterName, v50);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5068 v59 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5069 v57 = (PlayerEquipment *)1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5070 LABEL_65:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5071 uDamageAmount = v27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5072 goto LABEL_66;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5073 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5074 v50 = pMonster->word_000086_some_monster_id;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5075 a2 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5076 v17 = pPlayer->CalculateRangedDamageTo(v50);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5077 v19 = v4->stru_24.uItemID == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5078 uDamageAmount = v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5079 if ( !v19 && v4->stru_24.uAdditionalValue == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5080 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5081 a2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5082 v57 = (PlayerEquipment *)1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5083 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5084 if ( SHIDWORD(pMonster->pActorBuffs[15].uExpireTime) >= 0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5085 && (SHIDWORD(pMonster->pActorBuffs[15].uExpireTime) > 0 || LODWORD(pMonster->pActorBuffs[15].uExpireTime)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5086 uDamageAmount >>= 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5087 v59 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5088 LABEL_66:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5089 if ( !v57 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5090 goto LABEL_67;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5091 LABEL_69:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5092 if ( pPlayer->pConditions[1] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5093 uDamageAmount >>= 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5094 if ( (signed __int64)pMonster->pActorBuffs[5].uExpireTime > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5095 uDamageAmount = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5096 v61 = stru_50C198.CalcMagicalDamageToActor(pMonster, a2, uDamageAmount);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5097 if ( !v4 && pPlayer->IsUnarmed() && (signed __int64)pPlayer->pPlayerBuffs[6].uExpireTime > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5098 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5099 v50 = pPlayer->pPlayerBuffs[6].uPower;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5100 v29 = stru_50C198.CalcMagicalDamageToActor(pMonster, 8, v50);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5101 v61 += v29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5102 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5103 uDamageAmount = v61;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5104 if ( v59 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5105 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5106 if ( v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5107 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5108 a4 = v4->stru_24._439DF3_get_additional_damage(&a2, &v62);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5109 if ( v62 && pMonster->sCurrentHP > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5110 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5111 pPlayer->sHealth += v61 / 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5112 if ( pPlayer->sHealth > pPlayer->GetMaxHealth() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5113 pPlayer->sHealth = pPlayer->GetMaxHealth();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5114 v62 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5115 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5116 v30 = stru_50C198.CalcMagicalDamageToActor(pMonster, a2, a4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5117 uDamageAmount = v61 + v30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5118 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5119 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5120 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5121 v59 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5122 v57 = &pPlayer->pEquipment;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5123 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5124 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5125 if ( pPlayer->HasItemEquipped((ITEM_EQUIP_TYPE)v59) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5126 {
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
5127 auto _s = (ItemGen *)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v57->uOffHand + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5128 a4 = _s->_439DF3_get_additional_damage(&a2, &v62);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5129 if ( v62 && pMonster->sCurrentHP > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5130 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5131 pPlayer->sHealth += v61 / 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5132 if ( pPlayer->sHealth > pPlayer->GetMaxHealth() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5133 pPlayer->sHealth = pPlayer->GetMaxHealth();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5134 v62 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5135 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5136 v31 = stru_50C198.CalcMagicalDamageToActor(pMonster, a2, a4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5137 uDamageAmount += v31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5138 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5139 ++v59;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5140 v57 = (PlayerEquipment *)((char *)v57 + 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5141 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5142 while ( v59 <= 1 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5143 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5144 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5145 v32 = uDamageAmount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5146 pMonster->sCurrentHP -= uDamageAmount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5147 if ( !v32 && !v58 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5148 goto LABEL_68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5149 if ( pMonster->sCurrentHP > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5150 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5151 Actor::_4030AD(uActorID_Monster_, v54, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5152 Actor::_43AC45(uActorID_Monster_, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5153 if ( bShowDamage )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5154 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5155 v50 = uDamageAmount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5156 pMonsterName = (char *)pMonster;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5157 pPlayerName = pPlayer->pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5158 if ( v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5159 v47 = pGlobalTXT_LocalizationStrings[189];// "%s shoots %s for %lu points"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5160 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5161 v47 = pGlobalTXT_LocalizationStrings[164];// "%s hits %s for %lu damage"
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
5162 sprintf(pTmpBuf, v47, pPlayerName, pMonsterName, v50);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5163 ShowStatusBarString(pTmpBuf, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5164 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5165 v41 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5166 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5167 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5168 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5169 if ( pMonsterStats->pInfos[pMonster->pMonsterInfo.uID].bQuestMonster & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5170 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5171 v33 = byte_4D864C && BYTE2(pGame->uFlags) & 8 ? 10 * pMonster->uActorRadius : pMonster->uActorRadius;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5172 v55 = v33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5173 if ( pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5174 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5175 if ( pGame->uFlags2 & 0x20 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5176 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5177 v50 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5178 pMonsterName = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5179 v34 = pMonster->vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5180 *(float *)&pPlayerName = (double)v55;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5181 v51 = (unsigned __int64 *)v34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5182 *(float *)&v47 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5183 v35 = pMonster->vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5184 *((float *)&v46 + 1) = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5185 *(float *)&v46 = 1.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5186 v36 = (double)(signed int)v51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5187 v51 = (unsigned __int64 *)v35;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5188 v37 = v36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5189 v51 = (unsigned __int64 *)pMonster->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5190 v38 = (double)v35;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5191 v39 = (double)(signed int)v51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5192 pDecalBuilder->AddBloodsplat(v39, v38, v37, 1.0, 0.0, 0.0, *(float *)&pPlayerName, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5193 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5194 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5195 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5196 Actor::Die(uActorID_Monster_);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5197 Actor::_438CF3(uActorID_Monster_);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5198 Actor::_43AC45(uActorID_Monster_, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5199 if ( pMonster->pMonsterInfo.uExp )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5200 sub_4269A2_GivePartyExp(pMonsterStats->pInfos[pMonster->pMonsterInfo.uID].uExp);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5201 v40 = 51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5202 if ( rand() % 100 < 20 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5203 v40 = ((signed int)pMonster->pMonsterInfo.uHP >= 100) + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5204 pPlayer->PlaySound(v40, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5205 v41 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5206 if ( bShowDamage )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5207 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5208 v50 = (int)pMonster;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5209 pMonsterName = (char *)uDamageAmount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5210 pPlayerName = pPlayer->pName; // "%s inflicts %lu points killing %s"
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
5211 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[175], pPlayer->pName, uDamageAmount, pMonster);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5212 ShowStatusBarString(pTmpBuf, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5213 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5214 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5215 if ( SHIDWORD(pMonster->pActorBuffs[20].uExpireTime) >= (signed int)v41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5216 && (SHIDWORD(pMonster->pActorBuffs[20].uExpireTime) > (signed int)v41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5217 || LODWORD(pMonster->pActorBuffs[20].uExpireTime) > v41)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5218 && uDamageAmount != v41 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5219 pPlayer->ReceiveDamage(uDamageAmount, a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5220 v50 = 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5221 v59 = 20 * v61 / (signed int)pMonster->pMonsterInfo.uHP;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5222 if ( (pPlayer->_48EA46_calc_special_bonus_by_items(24) || v58 != v41)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5223 && stru_50C198.GetMagicalResistance(pMonster, 3u) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5224 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5225 LODWORD(v42) = 20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5226 v59 = 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5227 if ( pParty->bTurnBasedModeOn == v41 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5228 v42 = (signed __int64)(flt_6BE3A8_debug_recmod2 * 42.66666666666666);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5229 pMonster->pMonsterInfo.uRecoveryTime += v42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5230 if ( bShowDamage != v41 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5231 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5232 v50 = (int)pMonster;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5233 pMonsterName = pPlayer->pName; // "%s stuns %s"
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
5234 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[635], pPlayer->pName, pMonster);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5235 ShowStatusBarString(pTmpBuf, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5236 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5237 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5238 if ( v53 != v41 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5239 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5240 if ( pMonster->CanAct() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5241 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5242 if ( stru_50C198.GetMagicalResistance(pMonster, 3u) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5243 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5244 LOBYTE(v43) = pPlayer->GetActualSkillLevel(PLAYER_SKILL_MACE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5245 v44 = v43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5246 v45 = SkillToMastery(v43);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5247 v51 = (unsigned __int64 *)(7680 * (v44 & 0x3F));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5248 v46 = pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)v51 * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5249 pMonster->pActorBuffs[6].Apply(v46, v45, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5250 if ( bShowDamage )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5251 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5252 v50 = (int)pMonster;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5253 pMonsterName = pPlayer->pName; // "%s paralyzes %s"
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
5254 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[636], pPlayer->pName, pMonster);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5255 ShowStatusBarString(pTmpBuf, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5256 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5257 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5258 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5259 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5260 if ( v59 > 10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5261 v59 = 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5262 if ( !MonsterStats::BelongsToSupertype(pMonster->pMonsterInfo.uID, MONSTER_SUPERTYPE_TREANT) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5263 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5264 pVelocity->x = (unsigned __int64)(v59 * (signed __int64)pVelocity->x) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5265 pVelocity->y = (unsigned __int64)(v59 * (signed __int64)pVelocity->y) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5266 pVelocity->z = (unsigned __int64)(v59 * (signed __int64)pVelocity->z) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5267 pMonster->vVelocity.x = 50 * LOWORD(pVelocity->x);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5268 pMonster->vVelocity.y = 50 * LOWORD(pVelocity->y);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5269 pMonster->vVelocity.z = 50 * LOWORD(pVelocity->z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5270 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5271 return Actor::AddBloodsplatOnDamageOverlay(uActorID_Monster_, 1, v61);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5272 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5273 // 4D864C: using guessed type char byte_4D864C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5274
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5275
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5276 //----- (00439FCB) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5277 void __fastcall DamagePlayerFromMonster(unsigned int uObjID, int a2, Vec3_int_ *pPos, unsigned int a4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5278 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5279 signed int v4; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5280 unsigned int v5; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5281 Player *v6; // ebx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5282 Actor *v7; // esi@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5283 unsigned int v8; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5284 char *v9; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5285 signed int v10; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5286 int v11; // edx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5287 int v12; // edx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5288 int v13; // edx@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5289 int v14; // edx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5290 int v15; // edx@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5291 int v16; // edx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5292 enum SoundID v17; // eax@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5293 int v18; // eax@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5294 unsigned __int8 v19; // zf@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5295 unsigned __int8 v20; // sf@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5296 unsigned __int16 v21; // ax@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5297 signed int v22; // edi@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5298 int v23; // eax@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5299 signed int v24; // eax@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5300 unsigned __int16 v25; // cx@47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5301 signed int v26; // eax@49
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5302 int v27; // eax@54
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5303 float v28; // ST18_4@58
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5304 double v29; // st7@58
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5305 float v30; // ST08_4@58
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5306 double v31; // st7@58
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5307 float v32; // ST04_4@58
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5308 float v33; // ST00_4@58
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5309 int v34; // edi@61
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5310 int v35; // eax@70
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5311 double v36; // st7@70
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5312 LayingItem *v37; // ebx@77
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5313 int v38; // edi@77
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5314 int v39; // esi@77
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5315 int v40; // eax@77
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5316 int v41; // eax@77
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5317 int v42; // eax@78
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5318 char *v43; // eax@81
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5319 Actor *v44; // esi@82
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5320 char *v45; // edi@84
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5321 unsigned __int16 v46; // ax@84
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5322 int v47; // ebx@105
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5323 int v48; // eax@107
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5324 unsigned __int16 v49; // ax@116
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5325 int v50; // ebx@123
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5326 unsigned __int16 v51; // ax@124
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5327 char v52; // bl@124
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5328 int v53; // eax@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5329 signed int v54; // eax@134
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5330 unsigned __int16 v55; // cx@137
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5331 signed int v56; // eax@139
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5332 int v57; // eax@144
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5333 float v58; // ST18_4@148
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5334 double v59; // st7@148
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5335 float v60; // ST08_4@148
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5336 double v61; // st7@148
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5337 float v62; // ST04_4@148
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5338 float v63; // ST00_4@148
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5339 int v64; // ebx@151
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5340 int v65; // eax@161
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5341 double v66; // st7@161
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5342 signed int v67; // ecx@164
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5343 signed int v68; // eax@170
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5344 int v69; // ecx@170
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5345 int v70; // eax@171
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5346 enum SoundID v71; // [sp+20h] [bp-34h]@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5347 int v72; // [sp+30h] [bp-24h]@164
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5348 double v73; // [sp+40h] [bp-14h]@72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5349 signed int v74; // [sp+44h] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5350 unsigned int v75; // [sp+48h] [bp-Ch]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5351 unsigned int uActorID; // [sp+4Ch] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5352 int v77; // [sp+50h] [bp-4h]@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5353 signed int a4a; // [sp+60h] [bp+Ch]@162
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5354 Player *a4b; // [sp+60h] [bp+Ch]@168
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5355
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5356 v4 = (signed int)uObjID >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5357 v5 = (uObjID & 7) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5358 v74 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5359 uActorID = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5360 if ( v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5361 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5362 if ( v5 != 1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5363 || (v6 = &pParty->pPlayers[a4], v7 = &pActors[v4],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5364 v75 = v6->sHealth,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5365 !stru_50C198.ActorHitOrMiss(v7, v6)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5366 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5367 v8 = v6->pEquipment.uBody;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5368 if ( !v8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5369 || (v9 = (char *)v6 + 36 * v8, v9[516] & 2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5370 || (v10 = pItemsTable->pItems[*((int *)v9 + 124)].uSkillType, v10 < 10)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5371 || v10 > 11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5372 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5373 v14 = rand() % 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5374 if ( !v14 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5375 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5376 v71 = (SoundID)108;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5377 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5378 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5379 v15 = v14 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5380 if ( !v15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5381 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5382 v71 = (SoundID)109;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5383 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5384 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5385 v16 = v15 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5386 if ( !v16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5387 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5388 v71 = (SoundID)110;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5389 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5390 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5391 if ( v16 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5392 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5393 v71 = (SoundID)44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5394 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5395 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5396 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5397 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5398 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5399 v11 = rand() % 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5400 if ( !v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5401 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5402 v71 = (SoundID)105;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5403 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5404 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5405 v12 = v11 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5406 if ( !v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5407 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5408 v71 = (SoundID)106;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5409 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5410 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5411 v13 = v12 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5412 if ( !v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5413 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5414 v71 = (SoundID)107;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5415 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5416 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5417 if ( v13 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5418 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5419 v71 = (SoundID)45;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5420 LABEL_24:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5421 v17 = v71;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5422 goto LABEL_26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5423 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5424 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5425 v17 = (SoundID)a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5426 LABEL_26:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5427 pAudioPlayer->PlaySound(v17, (8 * a4 + 80) | 4, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5428 v18 = Actor::_43B3E0_CalcDamage(v7, v74);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5429 v19 = HIDWORD(v7->pActorBuffs[3].uExpireTime) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5430 v20 = SHIDWORD(v7->pActorBuffs[3].uExpireTime) < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5431 v77 = v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5432 if ( !v20 && (!(v20 | v19) || LODWORD(v7->pActorBuffs[3].uExpireTime) > 0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5433 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5434 v21 = v7->pActorBuffs[3].uPower;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5435 if ( v21 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5436 v77 /= (signed int)v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5437 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5438 if ( v74 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5439 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5440 if ( v74 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5441 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5442 v22 = v7->pMonsterInfo.uAttack2Type;
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 if ( v74 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5447 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5448 v23 = v7->pMonsterInfo.uSpell1ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5449 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5450 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5451 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5452 if ( v74 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5453 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5454 if ( v74 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5455 v22 = v7->pMonsterInfo.field_3C_some_special_attack;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5456 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5457 v22 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5458 goto LABEL_43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5459 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5460 v23 = v7->pMonsterInfo.uSpell2ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5461 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5462 v22 = LOBYTE(pSpellStats->pInfos[v23].uSchool);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5463 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5464 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5465 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5466 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5467 v22 = v7->pMonsterInfo.uAttack1Type;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5468 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5469 LABEL_43:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5470 if ( !(dword_6BE368_debug_settings_2 & 0x10) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5471 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5472 v24 = v6->ReceiveDamage(v77, v22);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5473 if ( SHIDWORD(v6->pPlayerBuffs[10].uExpireTime) >= 0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5474 && (SHIDWORD(v6->pPlayerBuffs[10].uExpireTime) > 0 || LODWORD(v6->pPlayerBuffs[10].uExpireTime)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5475 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5476 v25 = v7->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5477 if ( v25 != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5478 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5479 if ( v25 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5480 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5481 v26 = stru_50C198.CalcMagicalDamageToActor(v7, v22, v24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5482 v7->sCurrentHP -= v26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5483 if ( v26 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5484 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5485 if ( v7->sCurrentHP >= 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5486 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5487 Actor::_4030AD(uActorID, 8 * a4 | 4, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5488 Actor::_43AC45(uActorID, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5489 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5490 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5491 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5492 if ( pMonsterStats->pInfos[v7->pMonsterInfo.uID].bQuestMonster & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5493 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5494 v27 = byte_4D864C && BYTE2(pGame->uFlags) & 8 ? 10 * v7->uActorRadius : v7->uActorRadius;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5495 v74 = v27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5496 if ( pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5497 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5498 if ( pGame->uFlags2 & 0x20 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5499 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5500 v28 = (double)v74;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5501 v74 = v7->vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5502 v29 = (double)v74;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5503 v74 = v7->vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5504 v30 = v29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5505 v31 = (double)v74;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5506 v74 = v7->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5507 v32 = v31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5508 v33 = (double)v74;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5509 pDecalBuilder->AddBloodsplat(v33, v32, v30, 1.0, 0.0, 0.0, v28, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5510 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5511 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5512 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5513 Actor::Die(uActorID);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5514 Actor::_438CF3(uActorID);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5515 Actor::_43AC45(uActorID, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5516 if ( v7->pMonsterInfo.uExp )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5517 sub_4269A2_GivePartyExp(pMonsterStats->pInfos[v7->pMonsterInfo.uID].uExp);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5518 v34 = 51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5519 if ( rand() % 100 < 20 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5520 v34 = ((signed int)v7->pMonsterInfo.uHP >= 100) + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5521 v6->PlaySound(v34, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5522 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5523 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5524 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5525 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5526 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5527 if ( !(dword_6BE368_debug_settings_2 & 0x10)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5528 && v7->pMonsterInfo.uSpecialAttack
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5529 && rand() % 100 < v7->pMonsterInfo.uLevel * v7->pMonsterInfo.uSpecialAttackType )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5530 v6->_48DCF6(v7->pMonsterInfo.uSpecialAttack, v7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5531 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5532 if ( !pParty->bTurnBasedModeOn )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5533 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5534 v35 = v6->GetActualEndurance();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5535 v36 = (double)(20 - v6->_48EA1B_get_static_effect(v35)) * flt_6BE3A4_debug_recmod1 * 2.133333333333333;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5536 v6->SetRecoveryTime((signed __int64)v36);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5537 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5538 if ( v77 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5539 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5540 v73 = (double)(signed int)v75;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5541 if ( (double)v6->GetMaxHealth() * 0.25 < v73 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5542 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5543 if ( v6->sHealth > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5544 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5545 if ( (double)v6->GetMaxHealth() * 0.25 >= (double)v6->sHealth )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5546 v6->PlaySound(48, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5547 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5548 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5549 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5550 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5551 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5552 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5553 v37 = &pLayingItems[uActorID];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5554 v38 = v37->field_58 & 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5555 v39 = v37->field_58 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5556 v40 = v37->field_58 & 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5557 uActorID = v37->field_58 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5558 v41 = v40 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5559 if ( !v41 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5560 goto LABEL_80;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5561 v42 = v41 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5562 if ( !v42 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5563 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5564 v44 = &pActors[v39];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5565 if ( a4 == -1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5566 a4 = stru_50C198.which_player_would_attack(v44);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5567 v45 = (char *)&pParty->pPlayers[a4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5568 v77 = Actor::_43B3E0_CalcDamage(v44, v74);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5569 v46 = v37->uItemType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5570 if ( v37->uItemType == 545 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5571 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5572 LOBYTE(v51) = ((Player *)v45)->GetActualSkillLevel(PLAYER_SKILL_UNARMED);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5573 v52 = v51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5574 if ( (signed int)SkillToMastery(v51) >= 4 && rand() % 100 < (v52 & 0x3F) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5575 {
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
5576 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[637], v45 + 168);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5577 ShowStatusBarString(pTmpBuf, 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5578 ((Player *)v45)->PlaySound(6, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5579 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5580 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5581 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5582 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5583 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5584 if ( v46 != 555
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5585 && v46 != 510
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5586 && v46 != 500
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5587 && v46 != 515
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5588 && v46 != 505
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5589 && v46 != 530
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5590 && v46 != 525
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5591 && v46 != 520
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5592 && v46 != 535
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5593 && v46 != 540 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5594 goto LABEL_115;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5595 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5596 if ( !stru_50C198.ActorHitOrMiss(v44, (Player *)v45) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5597 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5598 if ( *((_QWORD *)v45 + 782) > 0i64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5599 v77 >>= 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5600 if ( ((Player *)v45)->HasEnchantedItemEquipped(36) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5601 v77 >>= 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5602 if ( ((Player *)v45)->HasEnchantedItemEquipped(69) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5603 v77 >>= 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5604 if ( ((Player *)v45)->HasItemEquipped(EQUIP_ARMOUR)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5605 && *(int *)&v45[36 * *((int *)v45 + 1621) + 496] == 504 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5606 v77 >>= 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5607 v75 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5608 v47 = (int)(v45 + 6472);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5609 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5610 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5611 if ( ((Player *)v45)->HasItemEquipped((ITEM_EQUIP_TYPE)v75) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5612 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5613 v48 = *(int *)&v45[36 * *(int *)v47 + 496];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5614 if ( v48 == 520 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5615 v77 >>= 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5616 if ( v48 == 531 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5617 v77 >>= 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5618 if ( ((Player *)v45)->GetEquippedItemEquipType(v75) == 4 && SkillToMastery(*((short *)v45 + 140)) == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5619 v77 >>= 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5620 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5621 ++v75;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5622 v47 += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5623 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5624 while ( (signed int)v75 <= 1 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5625 LABEL_115:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5626 if ( (signed __int64)v44->pActorBuffs[3].uExpireTime > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5627 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5628 v49 = v44->pActorBuffs[3].uPower;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5629 if ( v49 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5630 v77 /= (signed int)v49;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5631 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5632 if ( !v74 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5633 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5634 v50 = v44->pMonsterInfo.uAttack1Type;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5635 goto LABEL_133;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5636 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5637 if ( v74 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5638 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5639 v50 = v44->pMonsterInfo.uAttack2Type;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5640 goto LABEL_133;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5641 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5642 if ( v74 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5643 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5644 v53 = v44->pMonsterInfo.uSpell1ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5645 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5646 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5647 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5648 if ( v74 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5649 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5650 if ( v74 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5651 v50 = v44->pMonsterInfo.field_3C_some_special_attack;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5652 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5653 v50 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5654 LABEL_133:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5655 if ( !(dword_6BE368_debug_settings_2 & 0x10) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5656 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5657 v54 = ((Player *)v45)->ReceiveDamage(v77, v50);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5658 if ( *((int *)v45 + 1553) >= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5659 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5660 if ( *((int *)v45 + 1553) > 0 || *((int *)v45 + 1552) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5661 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5662 v55 = v44->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5663 if ( v55 != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5664 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5665 if ( v55 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5666 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5667 v56 = stru_50C198.CalcMagicalDamageToActor(v44, v50, v54);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5668 v44->sCurrentHP -= v56;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5669 if ( v56 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5670 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5671 if ( v44->sCurrentHP >= 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5672 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5673 Actor::_4030AD(uActorID, 8 * a4 | 4, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5674 Actor::_43AC45(uActorID, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5675 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5676 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5677 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5678 if ( pMonsterStats->pInfos[v44->pMonsterInfo.uID].bQuestMonster & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5679 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5680 v57 = byte_4D864C && BYTE2(pGame->uFlags) & 8 ? 10 * v44->uActorRadius : v44->uActorRadius;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5681 v75 = v57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5682 if ( pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5683 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5684 if ( pGame->uFlags2 & 0x20 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5685 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5686 v58 = (double)(signed int)v75;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5687 v75 = v44->vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5688 v59 = (double)(signed int)v75;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5689 v75 = v44->vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5690 v60 = v59;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5691 v61 = (double)(signed int)v75;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5692 v75 = v44->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5693 v62 = v61;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5694 v63 = (double)(signed int)v75;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5695 pDecalBuilder->AddBloodsplat(v63, v62, v60, 1.0, 0.0, 0.0, v58, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5696 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5697 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5698 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5699 Actor::Die(uActorID);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5700 Actor::_438CF3(uActorID);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5701 Actor::_43AC45(uActorID, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5702 if ( v44->pMonsterInfo.uExp )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5703 sub_4269A2_GivePartyExp(pMonsterStats->pInfos[v44->pMonsterInfo.uID].uExp);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5704 v64 = 51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5705 if ( rand() % 100 < 20 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5706 v64 = ((signed int)v44->pMonsterInfo.uHP >= 100) + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5707 ((Player *)v45)->PlaySound(v64, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5708 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5709 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5710 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5711 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5712 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5713 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5714 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5715 if ( !v74
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5716 && !(dword_6BE368_debug_settings_2 & 0x10)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5717 && v44->pMonsterInfo.uSpecialAttack
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5718 && rand() % 100 < v44->pMonsterInfo.uLevel * v44->pMonsterInfo.uSpecialAttackType )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5719 ((Player *)v45)->_48DCF6(v44->pMonsterInfo.uSpecialAttack, v44);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5720 if ( !pParty->bTurnBasedModeOn )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5721 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5722 v65 = ((Player *)v45)->GetActualEndurance();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5723 v66 = (double)(20 - ((Player *)v45)->_48EA1B_get_static_effect(v65))
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5724 * flt_6BE3A4_debug_recmod1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5725 * 2.133333333333333;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5726 ((Player *)v45)->SetRecoveryTime((signed __int64)v66);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5727 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5728 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5729 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5730 v53 = v44->pMonsterInfo.uSpell2ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5731 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5732 v50 = LOBYTE(pSpellStats->pInfos[v53].uSchool);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5733 goto LABEL_133;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5734 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5735 if ( v42 != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5736 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5737 LABEL_80:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5738 if ( a4 != -1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5739 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5740 v43 = (char *)&pParty->pPlayers[a4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5741 LABEL_168:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5742 a4b = (Player *)v43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5743 if ( v38 != 4 || v37->field_48 != 100 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5744 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5745 v70 = ((Player *)v43)->GetMaxHealth();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5746 v68 = _43AFE3_calc_spell_damage(v37->field_48, v37->field_4C, v37->field_50, v70);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5747 v69 = LOBYTE(pSpellStats->pInfos[v37->field_48].uSchool);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5748 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5749 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5750 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5751 v68 = pParty->pPlayers[uActorID].CalculateRangedDamageTo(0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5752 v69 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5753 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5754 a4b->ReceiveDamage(v68, v69);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5755 if ( v38 == 4 && !qword_A750D8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5756 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5757 qword_A750D8 = 256i64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5758 word_A750E0 = 44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5759 word_A750E2 = uActorID + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5760 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5761 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5762 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5763 v74 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5764 a4a = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5765 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5766 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5767 if ( pPlayers[a4a]->CanAct() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5768 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5769 v67 = v74++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5770 *(&v72 + v67) = a4a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5771 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5772 ++a4a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5773 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5774 while ( a4a <= 4 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5775 if ( v74 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5776 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5777 v43 = &stru_AA1058[3].pSounds[6972 * *(&v72 + rand() % v74) + 40552];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5778 goto LABEL_168;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5779 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5780 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5781
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5782
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5783 //----- (0043A97E) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5784 void __fastcall sub_43A97E(unsigned int uLayingItemID, signed int a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5785 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5786 unsigned int v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5787 unsigned int v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5788 int v4; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5789 int v5; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5790 unsigned int v6; // [sp+10h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5791
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5792 v6 = uLayingItemID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5793 v2 = uLayingItemID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5794 v3 = a2 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5795 v4 = pLayingItems[uLayingItemID].field_58 & 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5796 v5 = (a2 & 7) - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5797 if ( v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5798 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5799 if ( v5 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5800 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5801 layingitem_vel_50FDFC.x = pLayingItems[v2].vVelocity.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5802 layingitem_vel_50FDFC.y = pLayingItems[v2].vVelocity.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5803 layingitem_vel_50FDFC.z = pLayingItems[v2].vVelocity.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5804 Vec3_int_::Normalize(&layingitem_vel_50FDFC.x, &layingitem_vel_50FDFC.y, &layingitem_vel_50FDFC.z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5805 DamagePlayerFromMonster(8 * v6 | 2, pLayingItems[v2].field_61, &layingitem_vel_50FDFC, 0xFFFFFFFFu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5806 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5807 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5808 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5809 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5810 layingitem_vel_50FDFC.x = pLayingItems[v2].vVelocity.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5811 layingitem_vel_50FDFC.y = pLayingItems[v2].vVelocity.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5812 layingitem_vel_50FDFC.z = pLayingItems[v2].vVelocity.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5813 Vec3_int_::Normalize(&layingitem_vel_50FDFC.x, &layingitem_vel_50FDFC.y, &layingitem_vel_50FDFC.z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5814 switch ( v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5815 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5816 case OBJECT_Actor:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5817 sub_43B1B0(8 * v6 | AI_OBJECT_LAYING_ITEM, v3, &layingitem_vel_50FDFC, pLayingItems[v2].field_61);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5818 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5819 case OBJECT_Player:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5820 DamageMonsterFromParty(8 * v6 | AI_OBJECT_LAYING_ITEM, v3, &layingitem_vel_50FDFC);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5821 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5822 case OBJECT_Item:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5823 sub_43B057(8 * v6 | AI_OBJECT_LAYING_ITEM, v3, &layingitem_vel_50FDFC);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5824 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5825 }
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 //----- (0043AA99) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5830 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
5831 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5832 int v7; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5833 int v8; // ST14_4@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5834 int v9; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5835 int anglea; // [sp+20h] [bp+8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5836
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5837 v7 = sRotX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5838 v8 = sDepth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5839 v9 = sRotY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5840 anglea = (unsigned __int64)(stru_5C6E00->SinCos(sRotX) * (signed __int64)sDepth) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5841 *outx = v.x + ((unsigned __int64)(stru_5C6E00->SinCos(v9) * (signed __int64)anglea) >> 16);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5842 *outy = v.y
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5843 + ((unsigned __int64)(stru_5C6E00->SinCos(v9 - stru_5C6E00->uIntegerHalfPi)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5844 * (signed __int64)anglea) >> 16);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5845 *outz = v.z
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5846 + ((unsigned __int64)(stru_5C6E00->SinCos(v7 - stru_5C6E00->uIntegerHalfPi) * (signed __int64)v8) >> 16);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5847 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5848
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5849 //----- (0043AB61) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5850 void Vec3_int_::Normalize(int *x, int *y, int *z)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5851 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5852 int *v3; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5853 int *v4; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5854 signed int v5; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5855
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5856 v3 = x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5857 v4 = y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5858 v5 = sub_452A9E(*y * *y + *z * *z + *x * *x);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5859 *v3 *= 65536 / (v5 | 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5860 *v4 *= 65536 / (v5 | 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5861 *z *= 65536 / (v5 | 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5862 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5863
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5864
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5865
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5866
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5867 //----- (0043AE12) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5868 double __fastcall sub_43AE12(signed int a1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5869 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5870 signed int v1; // ST00_4@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5871 signed int v2; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5872 double v3; // st7@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5873 double result; // st7@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5874
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5875 v1 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5876 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5877 v3 = (double)v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5878 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5879 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5880 if ( v3 < flt_4E4A80[v2 + 5] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5881 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5882 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5883 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5884 while ( v2 < 5 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5885 if ( v2 <= 0 || v2 >= 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5886 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5887 if ( v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5888 result = flt_4E4A80[4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5889 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5890 result = flt_4E4A80[0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5891 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5892 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5893 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5894 result = (flt_4E4A80[v2] - *(float *)&aAuthenticamd[4 * v2 + 12])
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5895 * (v3 - flt_4E4A80[v2 + 4])
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5896 / (flt_4E4A80[v2 + 5] - flt_4E4A80[v2 + 4])
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5897 + flt_4E4A80[v2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5898 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5899 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5900 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5901
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5902 //----- (0043AFE3) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5903 int __fastcall _43AFE3_calc_spell_damage(int a1, int a2, signed int a3, int a4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5904 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5905 int result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5906 unsigned int v5; // [sp-4h] [bp-8h]@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5907
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5908 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5909 if ( a1 == 7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5910 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5911 if ( a3 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5912 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5913 if ( a3 <= 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5914 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5915 v5 = 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5916 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5917 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5918 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5919 if ( a3 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5920 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5921 v5 = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5922 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5923 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5924 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5925 if ( a3 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5926 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5927 v5 = 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5928 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5929 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5930 result = GetDiceResult(a2, v5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5931 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5932 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5933 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5934 if ( a1 == 44 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5935 result = a4 * (LOBYTE(pSpellDatas[40].field_10) + 2 * a2) / 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5936 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5937 result = *((char *)&pSpellDatas[0].field_10 + 20 * a1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5938 + GetDiceResult(a2, *((char *)&pSpellDatas[0].field_10 + 20 * a1 + 1));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5939 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5940 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5941 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5942
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5943 //----- (0043B057) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5944 void __fastcall sub_43B057(unsigned int uObjID, unsigned int uActorID, Vec3_int_ *pVelocity)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5945 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5946 Actor *pActor; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5947 LayingItem *v4; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5948 int v5; // ecx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5949 int v6; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5950 int v7; // edi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5951 unsigned int uActorIDa; // [sp+8h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5952 unsigned int a2; // [sp+Ch] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5953 int a2a; // [sp+Ch] [bp-4h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5954
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5955 uActorIDa = uActorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5956 pActor = &pActors[uActorID];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5957 a2 = uObjID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5958 if ( !pActors[uActorID].IsAlive() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5959 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5960 if ( (a2 & 7) == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5961 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5962 v4 = &pLayingItems[(signed int)a2 >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5963 v5 = v4->field_48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5964 if ( v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5965 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5966 v6 = _43AFE3_calc_spell_damage(v5, v4->field_4C, v4->field_50, pActor->sCurrentHP);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5967 v7 = stru_50C198.CalcMagicalDamageToActor(pActor, 0, v6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5968 pActor->sCurrentHP -= v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5969 if ( v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5970 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5971 if ( pActor->sCurrentHP > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5972 Actor::_4030AD(uActorIDa, a2, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5973 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5974 Actor::Die(uActorIDa);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5975 a2a = 20 * v7 / (signed int)pActor->pMonsterInfo.uHP;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5976 if ( 20 * v7 / (signed int)pActor->pMonsterInfo.uHP > 10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5977 a2a = 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5978 if ( !MonsterStats::BelongsToSupertype(pActor->pMonsterInfo.uID, MONSTER_SUPERTYPE_TREANT) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5979 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5980 pVelocity->x = (unsigned __int64)(a2a * (signed __int64)pVelocity->x) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5981 pVelocity->y = (unsigned __int64)(a2a * (signed __int64)pVelocity->y) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5982 pVelocity->z = (unsigned __int64)(a2a * (signed __int64)pVelocity->z) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5983 pActor->vVelocity.x = 50 * LOWORD(pVelocity->x);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5984 pActor->vVelocity.y = 50 * LOWORD(pVelocity->y);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5985 pActor->vVelocity.z = 50 * LOWORD(pVelocity->z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5986 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5987 Actor::AddBloodsplatOnDamageOverlay(uActorIDa, 1, v7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5988 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5989 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5990 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5991 Actor::_4030AD(uActorIDa, a2, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5992 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5993 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5994 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5995 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5996 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5997
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5998 //----- (0043B1B0) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5999 __int16 __fastcall sub_43B1B0(signed int a1, unsigned int a2, Vec3_int_ *pVelocity, signed int a4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6000 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6001 int v4; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6002 LayingItem *v5; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6003 bool v6; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6004 Actor *v7; // esi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6005 Actor *v8; // edi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6006 char v9; // zf@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6007 __int64 v10; // qax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6008 signed __int16 v11; // cx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6009 signed int v12; // ecx@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6010 int v13; // ecx@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6011 int v14; // edi@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6012 unsigned int uActorID; // [sp+Ch] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6013 signed int v17; // [sp+10h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6014 int v18; // [sp+20h] [bp+Ch]@34
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6015
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6016 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6017 uActorID = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6018 v17 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6019 if ( (a1 & 7) == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6020 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6021 v5 = &pLayingItems[a1 >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6022 v4 = v5->field_60_distance_related_prolly_lod;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6023 v17 = v5->field_58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6024 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6025 LOWORD(v6) = v17 & 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6026 if ( v6 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6027 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6028 v7 = &pActors[a2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6029 v8 = &pActors[v17 >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6030 v6 = pActors[a2].IsAlive();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6031 if ( !v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6032 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6033 v9 = v7->uAIState == 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6034 v7->uLastCharacterIDToHit = v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6035 if ( v9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6036 BYTE2(v7->uAttributes) |= 2u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6037 v6 = stru_50C198._4273BB(v8, v7, v4, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6038 if ( v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6039 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6040 v10 = (unsigned int)Actor::_43B3E0_CalcDamage(v8, a4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6041 if ( (signed __int64)v8->pActorBuffs[3].uExpireTime > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6042 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6043 v11 = v8->pActorBuffs[3].uPower;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6044 if ( v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6045 v10 = (signed int)v10 / (unsigned __int16)v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6046 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6047 if ( SHIDWORD(v7->pActorBuffs[5].uExpireTime) >= SHIDWORD(v10)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6048 && (SHIDWORD(v7->pActorBuffs[5].uExpireTime) > SHIDWORD(v10)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6049 || LODWORD(v7->pActorBuffs[5].uExpireTime) > HIDWORD(v10)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6050 LODWORD(v10) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6051 if ( a4 != HIDWORD(v10) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6052 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6053 if ( a4 - HIDWORD(v10) == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6054 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6055 v12 = v8->pMonsterInfo.uAttack2Type;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6056 if ( SHIDWORD(v7->pActorBuffs[15].uExpireTime) >= SHIDWORD(v10)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6057 && (SHIDWORD(v7->pActorBuffs[15].uExpireTime) > SHIDWORD(v10)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6058 || LODWORD(v7->pActorBuffs[15].uExpireTime) > HIDWORD(v10)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6059 LODWORD(v10) = (signed int)v10 >> 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6060 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6061 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6062 if ( a4 - HIDWORD(v10) == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6063 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6064 v13 = v7->pMonsterInfo.uSpell1ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6065 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6066 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6067 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6068 if ( a4 - HIDWORD(v10) != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6069 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6070 if ( a4 - HIDWORD(v10) == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6071 v12 = v8->pMonsterInfo.field_3C_some_special_attack;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6072 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6073 v12 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6074 LABEL_30:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6075 v14 = stru_50C198.CalcMagicalDamageToActor(v7, v12, v10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6076 v7->sCurrentHP -= v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6077 if ( v14 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6078 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6079 if ( v7->sCurrentHP > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6080 Actor::_4030AD(uActorID, v17, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6081 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6082 Actor::Die(uActorID);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6083 Actor::_43AC45(uActorID, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6084 v18 = 20 * v14 / (signed int)v7->pMonsterInfo.uHP;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6085 if ( 20 * v14 / (signed int)v7->pMonsterInfo.uHP > 10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6086 v18 = 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6087 if ( !MonsterStats::BelongsToSupertype(v7->pMonsterInfo.uID, MONSTER_SUPERTYPE_TREANT) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6088 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6089 pVelocity->x = (unsigned __int64)(v18 * (signed __int64)pVelocity->x) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6090 pVelocity->y = (unsigned __int64)(v18 * (signed __int64)pVelocity->y) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6091 pVelocity->z = (unsigned __int64)(v18 * (signed __int64)pVelocity->z) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6092 v7->vVelocity.x = 50 * LOWORD(pVelocity->x);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6093 v7->vVelocity.y = 50 * LOWORD(pVelocity->y);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6094 v7->vVelocity.z = 50 * LOWORD(pVelocity->z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6095 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6096 LOWORD(v6) = Actor::AddBloodsplatOnDamageOverlay(uActorID, 1, v14);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6097 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6098 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6099 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6100 LOWORD(v6) = Actor::_4030AD(uActorID, v17, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6101 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6102 return v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6103 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6104 v13 = v7->pMonsterInfo.uSpell2ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6105 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6106 v12 = LOBYTE(pSpellStats->pInfos[v13].uSchool);
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 v12 = v8->pMonsterInfo.uAttack1Type;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6110 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6111 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6112 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6113 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6114 return v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6115 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6116
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6117
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6118 //----- (0043BCA7) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6119 int __cdecl CharacterUI_LoadPaperdollTextures()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6120 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6121 int v0; // edi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6122 enum CHARACTER_RACE v1; // ebx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6123 signed int v2; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6124 int v3; // ebx@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6125 Player *v4; // edi@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6126 unsigned __int8 v5; // cl@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6127 int v6; // edi@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6128 unsigned int v7; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6129 Player *v8; // ebx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6130 char *v9; // ebx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6131 char v10; // al@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6132 signed int v11; // edi@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6133 Player *v12; // ebx@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6134 Player *v13; // edi@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6135 int v14; // ebp@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6136 stru331 *v15; // edi@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6137 signed int v16; // ebx@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6138 unsigned int v17; // eax@67
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6139 unsigned int *v18; // ecx@67
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6140 unsigned int *v19; // ebx@68
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6141 int v20; // edi@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6142 int v21; // ebp@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6143 unsigned int v22; // eax@76
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6144 int v23; // ecx@76
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6145 unsigned int v24; // eax@78
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6146 int v25; // ecx@78
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6147 int v26; // ebx@79
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6148 unsigned int v27; // eax@80
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6149 int v28; // ecx@80
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6150 int result; // eax@83
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6151 int v30; // [sp+10h] [bp-28h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6152 signed int v31; // [sp+10h] [bp-28h]@68
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6153 signed int v32; // [sp+10h] [bp-28h]@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6154 signed int v33; // [sp+10h] [bp-28h]@77
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6155 int v34; // [sp+10h] [bp-28h]@79
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6156 char *v35; // [sp+14h] [bp-24h]@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6157 int v36; // [sp+14h] [bp-24h]@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6158 int v37; // [sp+14h] [bp-24h]@77
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6159 signed int v38; // [sp+14h] [bp-24h]@79
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6160 unsigned int *v39; // [sp+18h] [bp-20h]@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6161 int *v40; // [sp+18h] [bp-20h]@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6162 unsigned int *v41; // [sp+1Ch] [bp-1Ch]@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6163 int v42; // [sp+20h] [bp-18h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6164 int v43; // [sp+20h] [bp-18h]@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6165 char pContainer[128]; // [sp+24h] [bp-14h]@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6166
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6167 uTextureID_MAGNIF_B = pIcons_LOD->LoadTexture("MAGNIF-B", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6168 if ( !pParty->uAlignment || pParty->uAlignment == 1 || pParty->uAlignment == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6169 uTextureID_BACKDOLL = pIcons_LOD->LoadTexture("BACKDOLL", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6170 uTextureID_507B04 = uTextureID_right_panel;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6171 v30 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6172 uTextureID_BACKHAND = pIcons_LOD->LoadTexture("BACKHAND", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6173 uTextureID_5118C8 = uTextureID_506438;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6174 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6175 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6176 v42 = v30 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6177 if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(v30 + 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6178 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6179 v0 = v30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6180 v1 = pPlayers[v30 + 1]->GetRace();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6181 v2 = pPlayers[v30 + 1]->GetSexByVoice();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6182 if ( v1 && v1 != 1 && v1 != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6183 v3 = (v2 != 0) + 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6184 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6185 v3 = (v2 != 0) + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6186 wsprintfA(pContainer, "pc23v%dBod", v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6187 papredoll_dbods[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6188 wsprintfA(pContainer, "pc23v%dlad", v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6189 papredoll_dlads[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6190 wsprintfA(pContainer, "pc23v%dlau", v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6191 papredoll_dlaus[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6192 wsprintfA(pContainer, "pc23v%drh", v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6193 papredoll_drhs[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6194 wsprintfA(pContainer, "pc23v%dlh", v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6195 papredoll_dlhs[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6196 wsprintfA(pContainer, "pc23v%dlhu", v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6197 papredoll_dlhus[v0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6198 v4 = pPlayers[v0 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6199 v5 = v4->uFace;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6200 if ( v5 == 12 || v5 == 13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6201 papredoll_dbrds[(char)v5] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6202 papredoll_flying_feet[v4->uFace] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6203 IsPlayerWearingWatersuit[v30 + 1] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6204 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6205 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6206 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6207 v6 = v30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6208 papredoll_dbods[v30] = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6209 dbod_texnames_by_face[pPlayers[v30 + 1]->uFace],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6210 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6211 papredoll_dlads[v30] = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6212 dlad_texnames_by_face[pPlayers[v30 + 1]->uFace],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6213 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6214 papredoll_dlaus[v30] = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6215 dlau_texnames_by_face[pPlayers[v30 + 1]->uFace],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6216 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6217 papredoll_drhs[v30] = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6218 drh_texnames_by_face[pPlayers[v30 + 1]->uFace],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6219 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6220 papredoll_dlhs[v30] = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6221 dlh_texnames_by_face[pPlayers[v30 + 1]->uFace],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6222 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6223 v7 = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6224 dlhu_texnames_by_face[pPlayers[v30 + 1]->uFace],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6225 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6226 v8 = pPlayers[v30 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6227 papredoll_dlhus[v30] = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6228 v9 = (char *)&v8->uFace;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6229 v10 = *v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6230 if ( *v9 == 12 || v10 == 13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6231 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6232 wsprintfA(pContainer, "pc%02dbrd", v10 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6233 v9 = (char *)&pPlayers[v6 + 1]->uFace;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6234 papredoll_dbrds[*v9] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6235 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6236 wsprintfA(pContainer, "item281pc%02d", *v9 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6237 papredoll_flying_feet[pPlayers[v6 + 1]->uFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6238 IsPlayerWearingWatersuit[v30 + 1] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6239 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6240 ++v30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6241 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6242 while ( v42 < 4 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6243 uTextureID_ar_up_up = pIcons_LOD->LoadTexture("ar_up_up", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6244 uTextureID_ar_up_dn = pIcons_LOD->LoadTexture("ar_up_dn", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6245 uTextureID_ar_dn_up = pIcons_LOD->LoadTexture("ar_dn_up", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6246 uTextureID_ar_dn_dn = pIcons_LOD->LoadTexture("ar_dn_dn", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6247 papredoll_dbrds[9] = pIcons_LOD->LoadTexture("ib-cd1-d", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6248 papredoll_dbrds[7] = pIcons_LOD->LoadTexture("ib-cd2-d", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6249 papredoll_dbrds[5] = pIcons_LOD->LoadTexture("ib-cd3-d", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6250 papredoll_dbrds[3] = pIcons_LOD->LoadTexture("ib-cd4-d", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6251 papredoll_dbrds[1] = pIcons_LOD->LoadTexture("ib-cd5-d", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6252 v11 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6253 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6254 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6255 byte_5111C0[v11] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6256 if ( pParty->pPickedItem.uItemID != v11 + 66 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6257 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6258 v12 = pParty->pPlayers;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6259 while ( !sub_43EE15_player_has_item(v11 + 66, v12, 0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6260 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6261 ++v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6262 if ( (signed int)v12 >= (signed int)pParty->pHirelings )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6263 goto LABEL_28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6264 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6265 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6266 byte_5111C0[v11] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6267 LABEL_28:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6268 ++v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6269 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6270 while ( v11 < 54 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6271 *(int *)byte_5111F6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6272 *(int *)&byte_5111F6[4] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6273 *(int *)&byte_5111F6[8] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6274 *(int *)&byte_5111F6[12] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6275 *(int *)&byte_5111F6[16] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6276 v13 = pParty->pPlayers;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6277 v14 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6278 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6279 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6280 if ( sub_43EE15_player_has_item(0x204u, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6281 byte_5111F6[2] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6282 if ( sub_43EE15_player_has_item(0x1F8u, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6283 byte_5111F6[0] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6284 if ( sub_43EE15_player_has_item(0x1F9u, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6285 byte_5111F6[1] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6286 if ( sub_43EE15_player_has_item(0x215u, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6287 byte_5111F6[16] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6288 if ( sub_43EE15_player_has_item(0x200u, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6289 byte_5111F6[3] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6290 if ( sub_43EE15_player_has_item(0x209u, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6291 byte_5111F6[4] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6292 if ( sub_43EE15_player_has_item(0x20Au, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6293 byte_5111F6[5] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6294 if ( sub_43EE15_player_has_item(0x20Bu, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6295 byte_5111F6[6] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6296 if ( sub_43EE15_player_has_item(0x214u, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6297 byte_5111F6[7] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6298 if ( sub_43EE15_player_has_item(0x220u, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6299 byte_5111F6[8] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6300 if ( sub_43EE15_player_has_item(0x20Cu, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6301 byte_5111F6[9] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6302 if ( sub_43EE15_player_has_item(0x217u, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6303 byte_5111F6[10] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6304 if ( sub_43EE15_player_has_item(0x20Du, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6305 byte_5111F6[11] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6306 if ( sub_43EE15_player_has_item(0x212u, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6307 byte_5111F6[12] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6308 if ( sub_43EE15_player_has_item(0x223u, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6309 byte_5111F6[13] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6310 if ( sub_43EE15_player_has_item(0x224u, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6311 byte_5111F6[14] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6312 if ( sub_43EE15_player_has_item(0x226u, v13, 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6313 byte_5111F6[15] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6314 ++v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6315 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6316 while ( (signed int)v13 < (signed int)pParty->pHirelings );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6317 v15 = &stru_511698.field_2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6318 v35 = (char *)&stru_511718.field_18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6319 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6320 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6321 v16 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6322 v39 = (unsigned int *)(v35 - 24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6323 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6324 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6325 _43C91D_FormItemTextureFilename(pContainer, v16 + 100, v14, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6326 v17 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6327 ++v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6328 v18 = v39;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6329 ++v39;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6330 *v18 = v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6331 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6332 while ( v16 < 5 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6333 _43C91D_FormItemTextureFilename(pContainer, 535, v14, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6334 v31 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6335 v19 = (unsigned int *)((char *)v15 - 44);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6336 *(int *)v35 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6337 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6338 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6339 _43C91D_FormItemTextureFilename(pContainer, v31++ + 89, v14, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6340 *v19 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6341 ++v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6342 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6343 while ( v31 < 11 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6344 _43C91D_FormItemTextureFilename(pContainer, 521, v14, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6345 v15->field_0 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6346 _43C91D_FormItemTextureFilename(pContainer, 522, v14, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6347 v15->field_4 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6348 _43C91D_FormItemTextureFilename(pContainer, 523, v14, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6349 v15->field_8 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6350 _43C91D_FormItemTextureFilename(pContainer, 532, v14, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6351 v15->field_C = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6352 _43C91D_FormItemTextureFilename(pContainer, 544, v14, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6353 v15->field_10 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
84
b39bdc150e90 Some inventory stuff
Nomad
parents: 82
diff changeset
6354 if ( _43ED6F_check_party_races(true) )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6355 papredoll_dbrds[11] = pIcons_LOD->LoadTexture("item092v3", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6356 v35 += 28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6357 ++v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6358 ++v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6359 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6360 while ( v14 - 1 < 2 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6361 v43 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6362 v20 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6363 v40 = &dword_511638[0][5];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6364 v21 = (int)paperdoll_array_511290[0][13];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6365 v41 = (unsigned int *)&stru_511718.texid1;
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 if ( sub_43EDB9_get_some_race_sex_relation_2(v20 - 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6369 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6370 _43C91D_FormItemTextureFilename(pContainer, 524, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6371 v32 = 66;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6372 *v41 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6373 v36 = v21 - 152;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6374 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6375 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6376 _43C91D_FormItemTextureFilename(pContainer, v32, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6377 *(int *)(v36 - 4) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6378 _43C91D_FormItemTextureFilename(pContainer, v32, v20, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6379 *(int *)v36 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6380 _43C91D_FormItemTextureFilename(pContainer, v32, v20, 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6381 v22 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6382 v23 = v36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6383 v36 += 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6384 ++v32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6385 *(int *)(v23 + 4) = v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6386 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6387 while ( v32 - 66 < 13 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6388 _43C91D_FormItemTextureFilename(pContainer, 516, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6389 *(int *)v21 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6390 _43C91D_FormItemTextureFilename(pContainer, 516, v20, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6391 *(int *)(v21 + 4) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6392 _43C91D_FormItemTextureFilename(pContainer, 516, v20, 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6393 *(int *)(v21 + 8) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6394 _43C91D_FormItemTextureFilename(pContainer, 505, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6395 *(int *)(v21 + 12) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6396 _43C91D_FormItemTextureFilename(pContainer, 505, v20, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6397 *(int *)(v21 + 16) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6398 _43C91D_FormItemTextureFilename(pContainer, 505, v20, 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6399 *(int *)(v21 + 20) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6400 _43C91D_FormItemTextureFilename(pContainer, 504, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6401 *(int *)(v21 + 24) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6402 _43C91D_FormItemTextureFilename(pContainer, 504, v20, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6403 *(int *)(v21 + 28) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6404 _43C91D_FormItemTextureFilename(pContainer, 504, v20, 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6405 *(int *)(v21 + 32) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6406 _43C91D_FormItemTextureFilename(pContainer, 533, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6407 *(int *)(v21 + 36) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6408 _43C91D_FormItemTextureFilename(pContainer, 533, v20, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6409 *(int *)(v21 + 40) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6410 _43C91D_FormItemTextureFilename(pContainer, 533, v20, 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6411 *(int *)(v21 + 44) = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6412 v33 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6413 v37 = (int)(v40 - 5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6414 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6415 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6416 _43C91D_FormItemTextureFilename(pContainer, v33 + 115, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6417 v24 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6418 ++v33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6419 v25 = v37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6420 v37 += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6421 *(int *)v25 = v24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6422 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6423 while ( v33 < 5 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6424 _43C91D_FormItemTextureFilename(pContainer, 512, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6425 v26 = v43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6426 v38 = 105;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6427 v34 = v43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6428 *v40 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6429 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6430 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6431 _43C91D_FormItemTextureFilename(pContainer, v38, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6432 *(int *)((char *)paperdoll_array_511828 + v34) = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6433 pContainer,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6434 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6435 _43C91D_FormItemTextureFilename(pContainer, v38, v20, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6436 v27 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6437 v28 = v34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6438 v34 += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6439 ++v38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6440 *(int *)((char *)dword_511788 + v28) = v27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6441 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6442 while ( v38 - 105 < 5 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6443 _43C91D_FormItemTextureFilename(pContainer, 525, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6444 *(int *)((char *)&paperdoll_array_511828[0][5] + v43) = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6445 pContainer,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6446 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6447 _43C91D_FormItemTextureFilename(pContainer, 530, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6448 *(int *)((char *)&paperdoll_array_511828[0][6] + v43) = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6449 pContainer,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6450 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6451 _43C91D_FormItemTextureFilename(pContainer, 547, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6452 *(int *)((char *)&paperdoll_array_511828[0][7] + v43) = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6453 pContainer,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6454 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6455 _43C91D_FormItemTextureFilename(pContainer, 548, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6456 *(int *)((char *)&paperdoll_array_511828[0][8] + v43) = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6457 pContainer,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6458 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6459 _43C91D_FormItemTextureFilename(pContainer, 550, v20, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6460 *(int *)((char *)&paperdoll_array_511828[0][9] + v43) = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6461 pContainer,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6462 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6463 _43C91D_FormItemTextureFilename(pContainer, 525, v20, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6464 *(int *)((char *)&dword_51179C + v43) = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6465 pContainer,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6466 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6467 _43C91D_FormItemTextureFilename(pContainer, 530, v20, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6468 *(int *)((char *)&dword_5117A0 + v43) = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6469 pContainer,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6470 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6471 _43C91D_FormItemTextureFilename(pContainer, 547, v20, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6472 *(int *)((char *)&dword_5117A4 + v43) = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6473 pContainer,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6474 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6475 _43C91D_FormItemTextureFilename(pContainer, 548, v20, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6476 *(int *)((char *)&dword_5117A8 + v43) = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6477 pContainer,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6478 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6479 _43C91D_FormItemTextureFilename(pContainer, 550, v20, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6480 *(int *)((char *)&dword_5117AC + v43) = pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6481 pContainer,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6482 TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6483 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6484 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6485 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6486 v26 = v43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6487 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6488 v41 += 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6489 v40 += 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6490 v21 += 204;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6491 ++v20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6492 result = v20 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6493 v43 = v26 + 40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6494 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6495 while ( v20 - 1 < 4 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6496 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6497 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6498
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6499
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6500
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6501 //----- (0043C91D) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6502 int __fastcall _43C91D_FormItemTextureFilename(char *a1, signed int a2, int a3, int a4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6503 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6504 int result; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6505 char v5; // zf@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6506 const char *v6; // [sp-Ch] [bp-18h]@88
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6507 signed int v7; // [sp-8h] [bp-14h]@61
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6508 int v8; // [sp-4h] [bp-10h]@61
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6509 signed int v9; // [sp-4h] [bp-10h]@69
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6510
84
b39bdc150e90 Some inventory stuff
Nomad
parents: 82
diff changeset
6511 result = 0; //BUG fn is void
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6512 if ( a2 <= 500 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6513 {
84
b39bdc150e90 Some inventory stuff
Nomad
parents: 82
diff changeset
6514 //v5 = *((char *)&pBloodsplatContainer->std__vector_pBloodsplats[62].field_20 + a2 + 2) == 0;
b39bdc150e90 Some inventory stuff
Nomad
parents: 82
diff changeset
6515 v5 = byte_5111C0[(a2 - 100) + 32 + 2] == 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6516 LABEL_21:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6517 if ( v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6518 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6519 result = 516;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6520 if ( a2 < 66 || a2 > 78 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6521 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6522 if ( a2 == 516 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6523 goto LABEL_79;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6524 if ( a2 != 504 && a2 != 505 && a2 != 533 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6525 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6526 if ( (a2 < 100 || a2 > 104) && a2 != 524 && a2 != 535 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6527 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6528 if ( a2 >= 115 && a2 <= 119 || a2 == 512 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6529 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6530 if ( a2 == 512 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6531 a2 = 312;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6532 goto LABEL_87;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6533 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6534 if ( (a2 < 89 || a2 > 99) && a2 != 521 && a2 != 522 && a2 != 523 && a2 != 532 && a2 != 544 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6535 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6536 result = 525;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6537 if ( (a2 < 105 || a2 > 109) && a2 != 525 && a2 != 530 && a2 != 547 && a2 != 548 && a2 != 550 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6538 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6539 switch ( a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6540 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6541 case 525:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6542 a2 = 325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6543 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6544 case 530:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6545 a2 = 330;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6546 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6547 case 547:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6548 a2 = 347;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6549 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6550 case 548:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6551 a2 = 348;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6552 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6553 case 550:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6554 a2 = 350;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6555 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6556 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6557 v8 = a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6558 v7 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6559 if ( !a4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6560 goto LABEL_88;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6561 LABEL_91:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6562 v6 = "item%3.3dv%da1";
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
6563 return sprintf(a1, v6, v7, v8);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6564 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6565 if ( a2 == 521 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6566 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6567 a2 = 239;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6568 goto LABEL_87;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6569 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6570 if ( a2 == 522 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6571 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6572 a2 = 240;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6573 goto LABEL_87;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6574 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6575 if ( a2 == 523 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6576 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6577 a2 = 241;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6578 goto LABEL_87;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6579 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6580 if ( a2 != 532 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6581 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6582 if ( a2 == 544 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6583 a2 = 344;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6584 goto LABEL_87;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6585 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6586 v9 = 93;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6587 goto LABEL_70;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6588 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6589 if ( a2 == 524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6590 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6591 a2 = 324;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6592 goto LABEL_87;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6593 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6594 if ( a2 == 535 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6595 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6596 v9 = 104;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6597 LABEL_70:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6598 a2 = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6599 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6600 LABEL_87:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6601 v8 = a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6602 v7 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6603 LABEL_88:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6604 v6 = "item%3.3dv%d";
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
6605 return sprintf(a1, v6, v7, v8);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6606 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6607 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6608 if ( a2 != 516 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6609 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6610 switch ( a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6611 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6612 case 504:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6613 a2 = 235;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6614 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6615 case 505:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6616 a2 = 236;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6617 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6618 case 533:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6619 a2 = 73;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6620 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6621 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6622 LABEL_86:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6623 if ( a4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6624 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6625 if ( a4 != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6626 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6627 if ( a4 != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6628 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6629 v8 = a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6630 v7 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6631 v6 = "item%3.3dv%da2";
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
6632 return sprintf(a1, v6, v7, v8);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6633 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6634 v8 = a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6635 v7 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6636 goto LABEL_91;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6637 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6638 goto LABEL_87;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6639 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6640 LABEL_79:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6641 a2 = 234;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6642 goto LABEL_86;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6643 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6644 result = a2 - 504;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6645 switch ( a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6646 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6647 case 516:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6648 v5 = byte_5111F6[2] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6649 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6650 case 505:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6651 v5 = byte_5111F6[1] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6652 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6653 case 504:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6654 v5 = byte_5111F6[0] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6655 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6656 case 533:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6657 v5 = byte_5111F6[16] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6658 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6659 case 512:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6660 v5 = byte_5111F6[3] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6661 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6662 case 521:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6663 v5 = byte_5111F6[4] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6664 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6665 case 522:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6666 v5 = byte_5111F6[5] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6667 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6668 case 523:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6669 v5 = byte_5111F6[6] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6670 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6671 case 532:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6672 v5 = byte_5111F6[7] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6673 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6674 case 544:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6675 v5 = byte_5111F6[8] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6676 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6677 case 524:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6678 v5 = byte_5111F6[9] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6679 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6680 case 535:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6681 v5 = byte_5111F6[10] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6682 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6683 case 525:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6684 v5 = byte_5111F6[11] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6685 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6686 case 530:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6687 v5 = byte_5111F6[12] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6688 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6689 case 547:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6690 v5 = byte_5111F6[13] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6691 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6692 case 548:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6693 v5 = byte_5111F6[14] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6694 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6695 case 550:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6696 v5 = byte_5111F6[15] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6697 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6698 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6699 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6700 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6701 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6702 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6703
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6704 //----- (0043CC7C) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6705 void __fastcall CharacterUI_DrawPaperdoll(unsigned int uPlayerID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6706 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6707 Player **ppPlayer; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6708 Player *pPlayer; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6709 enum CHARACTER_RACE v3; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6710 signed int v4; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6711 int v5; // edi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6712 unsigned int v6; // ecx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6713 int v7; // ecx@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6714 unsigned int v8; // eax@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6715 int v9; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6716 int v10; // edx@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6717 int v11; // ecx@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6718 int v12; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6719 unsigned int v13; // edi@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6720 unsigned int v14; // ebx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6721 int v15; // ecx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6722 Texture *v16; // ebp@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6723 double v17; // st7@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6724 int v18; // edi@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6725 char *v19; // eax@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6726 Texture *v20; // edi@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6727 unsigned int v21; // eax@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6728 int v22; // edi@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6729 int v23; // eax@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6730 int v24; // ebx@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6731 int v25; // eax@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6732 LODFile_IconsBitmaps *v26; // ecx@42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6733 Texture *v27; // edi@51
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6734 double v28; // st7@51
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6735 char v29; // zf@54
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6736 char *v30; // eax@54
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6737 unsigned int v31; // eax@59
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6738 int v32; // edx@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6739 int v33; // eax@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6740 int v34; // eax@74
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6741 int v35; // ebx@74
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6742 unsigned int v36; // ecx@74
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6743 int v37; // eax@74
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6744 LODFile_IconsBitmaps *v38; // ecx@78
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6745 Texture *v39; // edi@85
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6746 double v40; // st7@87
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6747 int v41; // edi@88
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6748 Texture *v42; // edi@89
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6749 unsigned int v43; // eax@93
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6750 int v44; // edx@94
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6751 int v45; // eax@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6752 int v46; // eax@106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6753 int v47; // ecx@106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6754 int v48; // ebx@106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6755 int v49; // eax@106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6756 LODFile_IconsBitmaps *v50; // ecx@110
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6757 Texture *v51; // edi@117
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6758 double v52; // st7@119
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6759 int v53; // edi@120
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6760 Texture *v54; // edi@121
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6761 char *v55; // eax@122
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6762 unsigned int v56; // eax@127
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6763 int v57; // edi@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6764 int v58; // ecx@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6765 int v59; // ebx@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6766 int v60; // ecx@132
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6767 int v61; // eax@134
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6768 int v62; // ecx@136
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6769 Texture *v63; // edi@145
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6770 double v64; // st7@147
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6771 int v65; // edi@148
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6772 char *v66; // eax@148
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6773 Texture *v67; // edi@149
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6774 Player *v68; // ebx@155
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6775 unsigned int v69; // edx@155
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6776 int v70; // edx@156
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6777 unsigned int v71; // eax@160
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6778 int v72; // edi@161
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6779 int v73; // edx@163
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6780 int v74; // ecx@168
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6781 unsigned int v75; // ebx@170
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6782 int v76; // ecx@172
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6783 Texture *v77; // edi@181
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6784 double v78; // st7@183
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6785 int v79; // edi@184
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6786 char *v80; // eax@184
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6787 Texture *v81; // edi@185
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6788 unsigned int v82; // eax@192
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6789 int v83; // eax@193
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6790 int v84; // eax@197
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6791 int v85; // eax@197
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6792 int v86; // ecx@197
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6793 int v87; // eax@197
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6794 int v88; // eax@198
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6795 int v89; // eax@199
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6796 int v90; // edi@201
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6797 int v91; // edi@213
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6798 int v92; // ebx@213
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6799 int v93; // edi@214
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6800 int v94; // ebx@214
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6801 int v95; // eax@214
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6802 char *v96; // edi@226
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6803 double v97; // st7@228
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6804 int v98; // edi@229
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6805 char *v99; // eax@229
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6806 Render *v100; // ecx@229
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6807 Texture *v101; // edi@230
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6808 int v102; // edi@236
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6809 int v103; // eax@237
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6810 int v104; // ecx@237
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6811 int v105; // edx@237
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6812 int v106; // edx@238
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6813 int v107; // edx@239
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6814 int v108; // edx@240
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6815 int v109; // edi@250
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6816 char *v110; // edx@250
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6817 unsigned int v111; // eax@259
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6818 int v112; // eax@260
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6819 int v113; // eax@260
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6820 int v114; // eax@265
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6821 int v115; // eax@274
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6822 int v116; // ebx@274
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6823 unsigned int v117; // edi@274
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6824 double v118; // st7@286
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6825 int v119; // edi@287
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6826 char *v120; // eax@287
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6827 Texture *v121; // edi@288
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6828 unsigned int v122; // edi@295
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6829 int v123; // ebx@297
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6830 int v124; // edi@298
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6831 int v125; // ecx@303
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6832 int v126; // eax@312
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6833 unsigned int v127; // ebx@314
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6834 int v128; // ecx@316
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6835 Texture *v129; // edi@325
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6836 double v130; // st7@327
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6837 int v131; // edi@328
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6838 char *v132; // eax@328
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6839 Texture *v133; // edi@329
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6840 unsigned int v134; // eax@335
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6841 int v135; // eax@336
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6842 int v136; // edx@336
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6843 int v137; // eax@336
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6844 unsigned int v138; // ebx@339
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6845 int v139; // ecx@339
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6846 Texture *v140; // edi@348
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6847 double v141; // st7@350
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6848 int v142; // edi@351
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6849 char *v143; // eax@351
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6850 Texture *v144; // edi@352
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6851 unsigned int v145; // eax@358
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6852 int v146; // eax@359
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6853 int v147; // ecx@359
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6854 int v148; // eax@359
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6855 int v149; // edx@359
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6856 int v150; // ebx@362
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6857 int v151; // ecx@363
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6858 int v152; // ecx@364
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6859 unsigned int v153; // eax@370
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6860 unsigned int v154; // edi@370
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6861 int v155; // eax@370
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6862 LODFile_IconsBitmaps *v156; // ecx@374
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6863 Texture *v157; // ebp@381
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6864 double v158; // st7@383
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6865 Texture *v159; // edi@385
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6866 char *v160; // eax@386
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6867 unsigned int v161; // eax@393
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6868 int v162; // eax@394
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6869 unsigned int v163; // [sp-Ch] [bp-58h]@230
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6870 unsigned int v164; // [sp-Ch] [bp-58h]@233
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6871 signed int v165; // [sp-Ch] [bp-58h]@235
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6872 char *v166; // [sp-8h] [bp-54h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6873 const char *v167; // [sp-8h] [bp-54h]@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6874 const char *v168; // [sp-8h] [bp-54h]@43
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6875 const char *v169; // [sp-8h] [bp-54h]@79
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6876 const char *v170; // [sp-8h] [bp-54h]@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6877 const char *v171; // [sp-8h] [bp-54h]@141
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6878 const char *v172; // [sp-8h] [bp-54h]@177
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6879 const char *v173; // [sp-8h] [bp-54h]@222
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6880 int v174; // [sp-8h] [bp-54h]@228
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6881 unsigned int v175; // [sp-8h] [bp-54h]@230
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6882 unsigned int v176; // [sp-8h] [bp-54h]@233
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6883 signed int v177; // [sp-8h] [bp-54h]@235
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6884 const char *v178; // [sp-8h] [bp-54h]@242
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6885 const char *v179; // [sp-8h] [bp-54h]@280
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6886 const char *v180; // [sp-8h] [bp-54h]@321
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6887 char *v181; // [sp-8h] [bp-54h]@337
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6888 const char *v182; // [sp-8h] [bp-54h]@344
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6889 const char *v183; // [sp-8h] [bp-54h]@375
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6890 signed int v184; // [sp-4h] [bp-50h]@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6891 signed int v185; // [sp-4h] [bp-50h]@99
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6892 signed int v186; // [sp-4h] [bp-50h]@202
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6893 int v187; // [sp-4h] [bp-50h]@228
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6894 Texture *v188; // [sp-4h] [bp-50h]@230
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6895 Texture *v189; // [sp-4h] [bp-50h]@233
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6896 Texture *v190; // [sp-4h] [bp-50h]@235
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6897 signed int v191; // [sp-4h] [bp-50h]@266
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6898 signed int v192; // [sp-4h] [bp-50h]@304
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6899 unsigned int a3; // [sp+10h] [bp-3Ch]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6900 int a3a; // [sp+10h] [bp-3Ch]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6901 int a3b; // [sp+10h] [bp-3Ch]@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6902 unsigned int a3c; // [sp+10h] [bp-3Ch]@74
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6903 unsigned int a3d; // [sp+10h] [bp-3Ch]@106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6904 int a3e; // [sp+10h] [bp-3Ch]@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6905 int a3f; // [sp+10h] [bp-3Ch]@168
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6906 unsigned int a3g; // [sp+10h] [bp-3Ch]@216
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6907 unsigned int a3h; // [sp+10h] [bp-3Ch]@274
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6908 int a3i; // [sp+10h] [bp-3Ch]@312
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6909 int a3j; // [sp+10h] [bp-3Ch]@336
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6910 int a3k; // [sp+10h] [bp-3Ch]@362
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6911 signed int a2; // [sp+14h] [bp-38h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6912 unsigned int a2a; // [sp+14h] [bp-38h]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6913 Texture *a2b; // [sp+14h] [bp-38h]@49
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6914 int a2c; // [sp+14h] [bp-38h]@74
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6915 int a2d; // [sp+14h] [bp-38h]@106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6916 int a2e; // [sp+14h] [bp-38h]@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6917 int a2f; // [sp+14h] [bp-38h]@168
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6918 int a2g; // [sp+14h] [bp-38h]@214
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6919 int a2h; // [sp+14h] [bp-38h]@274
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6920 Texture *a2i; // [sp+14h] [bp-38h]@284
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6921 int a2j; // [sp+14h] [bp-38h]@312
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6922 int a2k; // [sp+14h] [bp-38h]@336
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6923 Player *v217; // [sp+18h] [bp-34h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6924 int v218; // [sp+1Ch] [bp-30h]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6925 int v219; // [sp+1Ch] [bp-30h]@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6926 int v220; // [sp+1Ch] [bp-30h]@94
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6927 int v221; // [sp+1Ch] [bp-30h]@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6928 int v222; // [sp+1Ch] [bp-30h]@161
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6929 int v223; // [sp+1Ch] [bp-30h]@213
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6930 char v224; // [sp+1Ch] [bp-30h]@237
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6931 int v225; // [sp+1Ch] [bp-30h]@260
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6932 int v226; // [sp+1Ch] [bp-30h]@298
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6933 int v227; // [sp+1Ch] [bp-30h]@336
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6934 int v228; // [sp+1Ch] [bp-30h]@359
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6935 int v229; // [sp+20h] [bp-2Ch]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6936 int v230; // [sp+20h] [bp-2Ch]@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6937 int v231; // [sp+20h] [bp-2Ch]@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6938 int v232; // [sp+20h] [bp-2Ch]@94
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6939 int v233; // [sp+20h] [bp-2Ch]@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6940 int v234; // [sp+20h] [bp-2Ch]@161
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6941 int v235; // [sp+20h] [bp-2Ch]@197
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6942 int v236; // [sp+20h] [bp-2Ch]@260
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6943 int v237; // [sp+20h] [bp-2Ch]@298
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6944 int v238; // [sp+20h] [bp-2Ch]@336
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6945 int v239; // [sp+24h] [bp-28h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6946 int v240; // [sp+28h] [bp-24h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6947 unsigned int v241; // [sp+2Ch] [bp-20h]@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6948 int v242; // [sp+2Ch] [bp-20h]@197
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6949 unsigned int v243; // [sp+2Ch] [bp-20h]@370
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6950 int v244; // [sp+34h] [bp-18h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6951 signed int v245; // [sp+34h] [bp-18h]@361
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6952 unsigned int uPlayerID_; // [sp+38h] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6953 int uPlayerID_a; // [sp+38h] [bp-14h]@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6954 signed int v248; // [sp+40h] [bp-Ch]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6955 int v249; // [sp+40h] [bp-Ch]@358
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6956 signed int v250; // [sp+44h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6957
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6958 ppPlayer = &pPlayers[uPlayerID];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6959 pPlayer = *ppPlayer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6960 uPlayerID_ = uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6961 v217 = *ppPlayer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6962 pIcons_LOD->LoadTexture("sptext01", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6963 v3 = pPlayer->GetRace();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6964 v4 = pPlayer->GetSexByVoice();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6965 v250 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6966 if ( v3 && v3 != 1 && v3 != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6967 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6968 v248 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6969 v5 = (v4 != 0) + 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6970 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6971 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6972 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6973 v248 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6974 v5 = v4 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6975 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6976 v239 = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6977 v244 = (*ppPlayer)->uFace;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6978 pRenderer->ResetClip();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6979 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6980 0x1D3u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6981 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6982 (Texture *)(uTextureID_BACKDOLL != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BACKDOLL] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6983 if ( !IsPlayerWearingWatersuit[uPlayerID_] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6984 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6985 v21 = pPlayer->pEquipment.uBow;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6986 if ( !v21 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6987 goto LABEL_59;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6988 v230 = pPlayer->pEquipment.uBow;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
6989 v22 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v21 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6990 v23 = *(int *)v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6991 v24 = papredoll_4E4C28 + array_4E4C30[v239].equip_x - pItemsTable->pItems[v23].uEquipX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6992 a3b = paperdoll_4E4C2C + array_4E4C30[v239].equip_y - pItemsTable->pItems[v23].uEquipY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6993 v241 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v23].pIconName, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6994 v25 = *(int *)(v22 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6995 if ( !(*(int *)(v22 + 20) & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6996 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6997 if ( v25 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6998 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6999 v27 = (Texture *)(v241 != -1 ? (int)&pIcons_LOD->pTextures[v241] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7000 pRenderer->_4A6776(v24, a3b, v27);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7001 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7002 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7003 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7004 v29 = (v25 & 1) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7005 v30 = (char *)&pIcons_LOD->pTextures[v241];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7006 if ( v29 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7007 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7008 v27 = (Texture *)(v241 != -1 ? (int)v30 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7009 pRenderer->DrawTransparentGreenShade(v24, a3b, (Texture *)(v241 != -1 ? (int)v30 : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7010 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7011 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7012 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7013 v27 = (Texture *)(v241 != -1 ? (int)v30 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7014 pRenderer->DrawTextureTransparent(v24, a3b, (Texture *)(v241 != -1 ? (int)v30 : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7015 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7016 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7017 LABEL_57:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7018 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7019 pRenderer->_4A612A(v24, a3b, v27, v230);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7020 LABEL_59:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7021 v31 = v217->pEquipment.uCloak;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7022 if ( !v31 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7023 goto LABEL_93;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7024 v231 = v217->pEquipment.uCloak;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7025 v32 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v31 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7026 v219 = v32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7027 if ( *(int *)v32 != 525 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7028 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7029 switch ( *(int *)v32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7030 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7031 case 0x212:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7032 v184 = 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7033 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7034 case 0x223:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7035 v184 = 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7036 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7037 case 0x224:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7038 v184 = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7039 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7040 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7041 if ( *(int *)v32 != 550 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7042 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7043 v33 = *(int *)v32 - 105;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7044 LABEL_72:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7045 if ( v33 < 0 || v33 >= 10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7046 goto LABEL_93;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7047 LABEL_74:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7048 v34 = v33 + 10 * v239;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7049 v35 = paperdoll_array_511828[0][v34];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7050 a2c = papredoll_4E4C28 + paperdoll_array_4E5570[0][v34][0];// TODO indexing
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7051 v36 = paperdoll_4E4C2C + paperdoll_array_4E5570[0][v34][1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7052 v37 = *(int *)(v32 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7053 a3c = v36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7054 if ( !(v37 & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7055 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7056 v41 = v35 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7057 if ( v37 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7058 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7059 v42 = (Texture *)(v41 != 0 ? (int)&pIcons_LOD->pTextures[v35] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7060 pRenderer->_4A6776(a2c, v36, v42);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7061 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7062 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7063 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7064 v42 = (Texture *)(v41 != 0 ? (int)&pIcons_LOD->pTextures[v35] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7065 pRenderer->DrawTextureTransparent(a2c, v36, v42);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7066 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7067 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7068 pRenderer->_4A612A(a2c, a3c, v42, v231);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7069 LABEL_93:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7070 v240 = 4 * uPlayerID_ - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7071 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7072 papredoll_4E4C28,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7073 paperdoll_4E4C2C,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7074 (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
7075 v43 = v217->pEquipment.uBody;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7076 if ( !v43 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7077 goto LABEL_127;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7078 v232 = v217->pEquipment.uBody;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7079 v44 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v43 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7080 v220 = v44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7081 if ( *(int *)v44 != 504 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7082 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7083 if ( *(int *)v44 == 505 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7084 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7085 v185 = 14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7086 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7087 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7088 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7089 if ( *(int *)v44 == 516 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7090 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7091 v185 = 13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7092 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7093 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7094 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7095 if ( *(int *)v44 != 533 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7096 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7097 v45 = *(int *)v44 - 66;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7098 LABEL_104:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7099 if ( v45 < 0 || v45 >= 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7100 goto LABEL_127;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7101 LABEL_106:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7102 v46 = 17 * v239 + v45;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7103 a2d = papredoll_4E4C28 + paperdoll_array_4E4E30[0][v46][0];// TODO indexing
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7104 v47 = paperdoll_4E4C2C + paperdoll_array_4E4E30[0][v46][1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7105 v48 = paperdoll_array_511290[0][v46][0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7106 v49 = *(int *)(v44 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7107 a3d = v47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7108 if ( !(v49 & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7109 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7110 v53 = v48 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7111 if ( v49 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7112 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7113 v54 = (Texture *)(v53 != 0 ? (int)&pIcons_LOD->pTextures[v48] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7114 pRenderer->_4A6776(a2d, v47, v54);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7115 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7116 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7117 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7118 v29 = (v49 & 1) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7119 v55 = (char *)&pIcons_LOD->pTextures[v48];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7120 if ( v29 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7121 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7122 v54 = (Texture *)(v53 != 0 ? (int)v55 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7123 pRenderer->DrawTransparentGreenShade(a2d, v47, v54);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7124 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7125 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7126 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7127 v54 = (Texture *)(v53 != 0 ? (int)v55 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7128 pRenderer->DrawTextureTransparent(a2d, v47, v54);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7129 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7130 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7131 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7132 pRenderer->_4A612A(a2d, a3d, v54, v232);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7133 LABEL_127:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7134 v56 = v217->pEquipment.field_20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7135 if ( !v56 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7136 goto LABEL_155;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7137 v233 = v217->pEquipment.field_20;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7138 v57 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v56 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7139 v221 = v57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7140 v58 = *(int *)v57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7141 if ( *(int *)v57 == 529 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7142 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7143 a3e = paperdoll_4E4C2C + paredoll_array_4E54B8[v239][1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7144 a2e = papredoll_4E4C28 + paredoll_array_4E54B8[v239][0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7145 v59 = papredoll_flying_feet[v244];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7146 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7147 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7148 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7149 if ( v58 == 512 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7150 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7151 a3e = paperdoll_4E4C2C + paredoll_array_4E54B8[v239][3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7152 a2e = papredoll_4E4C28 + paredoll_array_4E54B8[v239][2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7153 v59 = dword_511638[v239][5];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7154 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7155 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7156 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7157 v60 = v58 - 115;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7158 if ( v60 < 0 || v60 >= 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7159 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7160 a2e = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7161 a3e = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7162 v59 = dword_511638[v239][0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7163 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7164 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7165 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7166 v61 = v60 + 7 * v239;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7167 a3e = paperdoll_4E4C2C + dword_4E5490[0][v61][1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7168 a2e = papredoll_4E4C28 + dword_4E5490[0][v61][0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7169 v59 = dword_511638[0][v60 + 6 * v239];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7170 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7171 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7172 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7173 v62 = *(int *)(v57 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7174 if ( !(*(int *)(v57 + 20) & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7175 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7176 v65 = v59 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7177 v66 = (char *)&pIcons_LOD->pTextures[v59];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7178 if ( v62 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7179 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7180 v67 = (Texture *)(v65 != 0 ? (int)v66 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7181 pRenderer->_4A6776(a2e, a3e, v67);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7182 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7183 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7184 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7185 if ( v62 & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7186 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7187 v67 = (Texture *)(v65 != 0 ? (int)v66 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7188 pRenderer->DrawTextureTransparent(a2e, a3e, v67);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7189 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7190 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7191 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7192 v67 = (Texture *)(v65 != 0 ? (int)v66 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7193 pRenderer->DrawTransparentGreenShade(a2e, a3e, v67);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7194 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7195 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7196 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7197 pRenderer->_4A612A(a2e, a3e, v67, v233);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7198 LABEL_155:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7199 v68 = v217;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7200 v69 = v217->pEquipment.uMainHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7201 uPlayerID_a = 2 * v239;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7202 if ( !v69
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7203 || (v70 = *(int *)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v69 + 5],
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7204 pItemsTable->pItems[v70].uEquipType != 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7205 && (pItemsTable->pItems[v70].uSkillType != 4 || v217->pEquipment.uOffHand) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7206 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7207 papredoll_4E4C28 + dword_4E5AE0[2 * v239],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7208 paperdoll_4E4C2C + dword_4E5AE0[2 * v239 + 1],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7209 (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
7210 v71 = v217->pEquipment.uBelt;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7211 if ( v71 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7212 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7213 v234 = v217->pEquipment.uBelt;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7214 v72 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v71 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7215 v222 = v72;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7216 if ( *(int *)v72 == 524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7217 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7218 v73 = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7219 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7220 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7221 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7222 if ( *(int *)v72 == 535 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7223 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7224 v73 = 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7225 goto LABEL_168;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7226 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7227 v73 = *(int *)v72 - 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7228 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7229 if ( v73 >= 0 && v73 < 7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7230 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7231 LABEL_168:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7232 v74 = 7 * v239 + v73;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7233 a2f = papredoll_4E4C28 + dword_4E57F0[0][v74][0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7234 a3f = paperdoll_4E4C2C + dword_4E57F0[0][v74][1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7235 if ( v248 != 1 || v73 == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7236 v75 = stru_511718.texids[v74];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7237 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7238 v75 = stru_511718.texids[v73 + 7 * (v239 - 2)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7239 v76 = *(int *)&v217->field_1F5[36 * v71 + 15];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7240 if ( !(*(int *)&v217->field_1F5[36 * v71 + 15] & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7241 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7242 v79 = v75 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7243 v80 = (char *)&pIcons_LOD->pTextures[v75];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7244 if ( v76 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7245 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7246 v81 = (Texture *)(v79 != 0 ? (int)v80 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7247 pRenderer->_4A6776(a2f, a3f, v81);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7248 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7249 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7250 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7251 if ( v76 & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7252 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7253 v81 = (Texture *)(v79 != 0 ? (int)v80 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7254 pRenderer->DrawTextureTransparent(a2f, a3f, v81);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7255 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7256 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7257 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7258 v81 = (Texture *)(v79 != 0 ? (int)v80 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7259 pRenderer->DrawTransparentGreenShade(a2f, a3f, v81);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7260 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7261 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7262 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7263 pRenderer->_4A612A(a2f, a3f, v81, v234);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7264 goto LABEL_191;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7265 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7266 if ( (*(int *)&v217->field_1F5[36 * v71 + 15] & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7267 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7268 if ( (*(int *)&v217->field_1F5[36 * v71 + 15] & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7269 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7270 v172 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7271 goto LABEL_181;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7272 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7273 if ( (*(int *)&v217->field_1F5[36 * v71 + 15] & 0xF0) == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7274 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7275 v172 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7276 goto LABEL_181;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7277 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7278 if ( (*(int *)&v217->field_1F5[36 * v71 + 15] & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7279 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7280 v172 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7281 LABEL_181:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7282 v77 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v172, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7283 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7284 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7285 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7286 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7287 *(char *)(v222 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7288 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7289 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7290 v78 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7291 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7292 a2f,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7293 a3f,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7294 (Texture *)(v75 != -1 ? (int)&pIcons_LOD->pTextures[v75] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7295 v77,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7296 (signed __int64)v78,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7297 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7298 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7299 LABEL_191:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7300 v68 = v217;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7301 goto LABEL_192;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7302 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7303 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7304 v172 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7305 goto LABEL_181;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7306 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7307 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7308 LABEL_192:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7309 v82 = v68->pEquipment.uMainHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7310 if ( v82 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7311 {
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7312 v83 = *(int *)&v68->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v82 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7313 if ( pItemsTable->pItems[v83].uEquipType == 1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7314 || pItemsTable->pItems[v83].uSkillType == 4 && !v68->pEquipment.uOffHand )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7315 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7316 papredoll_4E4C28 + pPaperdollLeftHand[uPlayerID_a],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7317 paperdoll_4E4C2C + pPaperdollLeftHand[uPlayerID_a + 1],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7318 (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
7319 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7320 v84 = v68->pEquipment.uBody;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7321 v235 = v84;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7322 v85 = (int)((char *)v68 + 36 * v84);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7323 v242 = v85;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7324 v86 = *(int *)(v85 + 496);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7325 v87 = *(int *)(v85 + 496) - 504;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7326 if ( v87 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7327 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7328 v88 = v87 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7329 if ( v88 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7330 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7331 v89 = v88 - 11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7332 if ( v89 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7333 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7334 if ( v89 != 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7335 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7336 v90 = v86 - 66;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7337 LABEL_207:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7338 if ( v90 < 0 || v90 > 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7339 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7340 LABEL_259:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7341 v111 = v68->pEquipment.uCloak;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7342 if ( !v111 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7343 goto LABEL_293;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7344 v236 = v68->pEquipment.uCloak;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7345 v112 = (int)&v68->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v111 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7346 v225 = v112;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7347 v113 = *(int *)v112;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7348 if ( v113 != 525 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7349 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7350 switch ( v113 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7351 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7352 case 530:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7353 v191 = 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7354 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7355 case 547:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7356 v191 = 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7357 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7358 case 548:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7359 v191 = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7360 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7361 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7362 if ( v113 != 550 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7363 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7364 v114 = v113 - 105;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7365 LABEL_272:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7366 if ( v114 < 0 || v114 >= 10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7367 goto LABEL_293;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7368 LABEL_274:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7369 v115 = v114 + 10 * v239;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7370 v116 = dword_511788[v115];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7371 v115 *= 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7372 v117 = papredoll_4E4C28 + *(int *)((char *)&dword_4E56B0 + v115);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7373 a2h = papredoll_4E4C28 + *(int *)((char *)&dword_4E56B0 + v115);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7374 a3h = paperdoll_4E4C2C + *(int *)((char *)&dword_4E56B4 + v115);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7375 if ( v116 == pIcons_LOD->FindTextureByName("pending") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7376 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7377 LABEL_292:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7378 v68 = v217;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7379 LABEL_293:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7380 if ( v244 == 12 || v244 == 13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7381 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7382 v122 = papredoll_dbrds[v244];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7383 if ( v122 != pIcons_LOD->FindTextureByName("Pending") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7384 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7385 papredoll_4E4C28 + dword_4E5AD0[2 * v244 - 24],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7386 paperdoll_4E4C2C + dword_4E5AD4[2 * v244 - 24],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7387 (Texture *)(v122 != -1 ? (int)&pIcons_LOD->pTextures[v122] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7388 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7389 v123 = v68->pEquipment.uHelm;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7390 if ( !v123 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7391 goto LABEL_335;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7392 v237 = v123;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7393 v124 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v123 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7394 v226 = v124;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7395 if ( *(int *)v124 != 521 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7396 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7397 switch ( *(int *)v124 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7398 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7399 case 0x20A:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7400 v192 = 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7401 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7402 case 0x20B:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7403 v192 = 13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7404 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7405 case 0x214:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7406 v192 = 14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7407 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7408 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7409 if ( *(int *)v124 != 544 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7410 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7411 v125 = *(int *)v124 - 89;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7412 LABEL_310:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7413 if ( v125 < 0 || v125 >= 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7414 goto LABEL_335;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7415 goto LABEL_312;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7416 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7417 v192 = 15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7418 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7419 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7420 v125 = v192;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7421 LABEL_312:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7422 v126 = 2 * (v125 + 16 * v239);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7423 a2j = papredoll_4E4C28 + dword_4E58D0[v126];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7424 a3i = paperdoll_4E4C2C + dword_4E58D4[v126];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7425 if ( v248 != 1 || *(int *)v124 != 92 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7426 v127 = stru_511698.texids[v125 + 16 * v250];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7427 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7428 v127 = papredoll_dbrds[11];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7429 v128 = *(int *)(v124 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7430 if ( *(int *)(v124 + 20) & 0xF0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7431 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7432 if ( (*(int *)(v124 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7433 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7434 if ( (*(int *)(v124 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7435 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7436 v180 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7437 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7438 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7439 if ( (*(int *)(v124 + 20) & 0xF0) == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7440 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7441 v180 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7442 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7443 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7444 if ( (*(int *)(v124 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7445 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7446 v180 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7447 LABEL_325:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7448 v129 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v180, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7449 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7450 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7451 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7452 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7453 *(char *)(v226 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7454 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7455 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7456 v130 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7457 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7458 a2j,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7459 a3i,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7460 (Texture *)(v127 != -1 ? (int)&pIcons_LOD->pTextures[v127] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7461 v129,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7462 (signed __int64)v130,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7463 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7464 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7465 goto LABEL_335;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7466 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7467 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7468 v180 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7469 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7470 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7471 v131 = v127 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7472 v132 = (char *)&pIcons_LOD->pTextures[v127];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7473 if ( v128 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7474 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7475 v133 = (Texture *)(v131 != 0 ? (int)v132 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7476 pRenderer->_4A6776(a2j, a3i, v133);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7477 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7478 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7479 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7480 if ( v128 & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7481 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7482 v133 = (Texture *)(v131 != 0 ? (int)v132 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7483 pRenderer->DrawTextureTransparent(a2j, a3i, v133);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7484 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7485 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7486 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7487 v133 = (Texture *)(v131 != 0 ? (int)v132 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7488 pRenderer->DrawTransparentGreenShade(a2j, a3i, v133);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7489 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7490 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7491 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7492 pRenderer->_4A612A(a2j, a3i, v133, v237);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7493 LABEL_335:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7494 v134 = v217->pEquipment.uMainHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7495 if ( !v134 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7496 goto LABEL_358;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7497 v238 = v217->pEquipment.uMainHand;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7498 v135 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v134 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7499 v227 = v135;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7500 v136 = *(int *)v135;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7501 v137 = *(int *)v135;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7502 a2k = papredoll_4E4C28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7503 + array_4E4C30[v239].field_8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7504 - pItemsTable->pItems[v137].uEquipX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7505 a3j = paperdoll_4E4C2C
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7506 + array_4E4C30[v239].field_C
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7507 - pItemsTable->pItems[v137].uEquipY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7508 if ( v136 == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7509 v181 = "item64v1";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7510 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7511 v181 = pItemsTable->pItems[v137].pIconName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7512 v138 = pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7513 v139 = *(int *)(v227 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7514 if ( !(*(int *)(v227 + 20) & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7515 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7516 v142 = v138 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7517 v143 = (char *)&pIcons_LOD->pTextures[v138];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7518 if ( v139 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7519 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7520 v144 = (Texture *)(v142 != 0 ? (int)v143 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7521 pRenderer->_4A6776(a2k, a3j, v144);
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 ( v139 & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7526 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7527 v144 = (Texture *)(v142 != 0 ? (int)v143 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7528 pRenderer->DrawTextureTransparent(a2k, a3j, v144);
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 v144 = (Texture *)(v142 != 0 ? (int)v143 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7533 pRenderer->DrawTransparentGreenShade(a2k, a3j, v144);
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(a2k, a3j, v144, v238);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7538 LABEL_358:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7539 v145 = v217->pEquipment.uOffHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7540 v249 = v217->pEquipment.uOffHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7541 if ( !v145 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7542 goto LABEL_393;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7543 v146 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v145 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7544 v228 = v146;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7545 v147 = *(int *)v146;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7546 v148 = *(int *)v146;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7547 v149 = pItemsTable->pItems[v148].uSkillType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7548 if ( v149 != 2 && v149 != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7549 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7550 v245 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7551 LABEL_362:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7552 v150 = papredoll_4E4C28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7553 + array_4E4C30[v239].field_0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7554 - pItemsTable->pItems[v148].uEquipX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7555 a3k = paperdoll_4E4C2C
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7556 + LODWORD(array_4E4C30[v239].field_4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7557 - pItemsTable->pItems[v148].uEquipY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7558 goto LABEL_370;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7559 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7560 v151 = v147 - 400;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7561 v245 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7562 if ( v151 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7563 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7564 v152 = v151 - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7565 if ( v152 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7566 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7567 if ( v152 != 12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7568 goto LABEL_362;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7569 v150 = 595;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7570 a3k = 33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7571 LABEL_370:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7572 v153 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v148].pIconName, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7573 v154 = v153;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7574 v243 = v153;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7575 v155 = *(int *)(v228 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7576 if ( !(*(int *)(v228 + 20) & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7577 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7578 if ( v155 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7579 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7580 v159 = (Texture *)(v243 != -1 ? (int)&pIcons_LOD->pTextures[v243] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7581 pRenderer->_4A6776(v150, a3k, v159);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7582 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7583 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7584 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7585 v29 = (v155 & 1) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7586 v160 = (char *)&pIcons_LOD->pTextures[v243];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7587 if ( v29 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7588 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7589 v159 = (Texture *)(v243 != -1 ? (int)v160 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7590 pRenderer->DrawTransparentGreenShade(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7591 v150,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7592 a3k,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7593 (Texture *)(v243 != -1 ? (int)v160 : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7594 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7595 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7596 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7597 v159 = (Texture *)(v243 != -1 ? (int)v160 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7598 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7599 v150,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7600 a3k,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7601 (Texture *)(v243 != -1 ? (int)v160 : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7602 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7603 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7604 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7605 pRenderer->_4A612A(v150, a3k, v159, v249);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7606 goto LABEL_391;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7607 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7608 if ( (*(int *)(v228 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7609 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7610 if ( (*(int *)(v228 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7611 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7612 v183 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7613 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7614 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7615 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7616 if ( (*(int *)(v228 + 20) & 0xF0) != 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7617 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7618 v156 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7619 if ( (*(int *)(v228 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7620 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7621 v183 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7622 LABEL_381:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7623 v157 = &pIcons_LOD->pTextures[v156->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7624 v183,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7625 TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7626 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7627 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7628 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7629 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7630 *(char *)(v228 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7631 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7632 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7633 v158 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7634 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7635 v150,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7636 a3k,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7637 (Texture *)(v154 != -1 ? (int)&pIcons_LOD->pTextures[v154] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7638 v157,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7639 (signed __int64)v158,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7640 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7641 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7642 LABEL_391:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7643 if ( v245 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7644 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7645 papredoll_4E4C28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7646 + pPaperdollLeftEmptyHand[uPlayerID_a],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7647 paperdoll_4E4C2C
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7648 + pPaperdollLeftEmptyHand[uPlayerID_a + 1],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7649 (Texture *)(*(unsigned int *)((char *)papredoll_dlhs
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7650 + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlhs + v240)] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7651 goto LABEL_393;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7652 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7653 LABEL_380:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7654 v183 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7655 goto LABEL_381;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7656 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7657 v183 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7658 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7659 v156 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7660 goto LABEL_381;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7661 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7662 v156 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7663 goto LABEL_380;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7664 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7665 a3k = 28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7666 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7667 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7668 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7669 a3k = 86;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7670 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7671 v150 = 596;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7672 goto LABEL_370;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7673 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7674 if ( (*(int *)(v227 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7675 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7676 if ( (*(int *)(v227 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7677 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7678 v182 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7679 goto LABEL_348;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7680 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7681 if ( (*(int *)(v227 + 20) & 0xF0) == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7682 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7683 v182 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7684 goto LABEL_348;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7685 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7686 if ( (*(int *)(v227 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7687 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7688 v182 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7689 LABEL_348:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7690 v140 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v182, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7691 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7692 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7693 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7694 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7695 *(char *)(v227 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7696 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7697 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7698 v141 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7699 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7700 a2k,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7701 a3j,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7702 (Texture *)(v138 != -1 ? (int)&pIcons_LOD->pTextures[v138] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7703 v140,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7704 (signed __int64)v141,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7705 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7706 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7707 goto LABEL_358;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7708 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7709 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7710 v182 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7711 goto LABEL_348;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7712 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7713 v125 = 11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7714 goto LABEL_310;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7715 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7716 if ( !(*(int *)(v225 + 20) & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7717 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7718 v119 = v116 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7719 v120 = (char *)&pIcons_LOD->pTextures[v116];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7720 if ( *(int *)(v225 + 20) & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7721 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7722 v121 = (Texture *)(v119 != 0 ? (int)v120 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7723 pRenderer->_4A6776(a2h, a3h, v121);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7724 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7725 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7726 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7727 v121 = (Texture *)(v119 != 0 ? (int)v120 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7728 pRenderer->DrawTextureTransparent(a2h, a3h, v121);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7729 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7730 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7731 pRenderer->_4A612A(a2h, a3h, v121, v236);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7732 goto LABEL_292;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7733 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7734 if ( (*(int *)(v225 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7735 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7736 if ( (*(int *)(v225 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7737 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7738 v179 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7739 goto LABEL_284;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7740 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7741 if ( (*(int *)(v225 + 20) & 0xF0) == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7742 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7743 v179 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7744 goto LABEL_284;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7745 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7746 if ( (*(int *)(v225 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7747 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7748 v179 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7749 LABEL_284:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7750 a2i = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v179, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7751 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7752 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7753 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7754 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7755 *(char *)(v225 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7756 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7757 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7758 v118 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7759 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7760 v117,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7761 a3h,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7762 (Texture *)(v116 != -1 ? (int)&pIcons_LOD->pTextures[v116] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7763 a2i,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7764 (signed __int64)v118,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7765 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7766 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7767 goto LABEL_292;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7768 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7769 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7770 v179 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7771 goto LABEL_284;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7772 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7773 v191 = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7774 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7775 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7776 v114 = v191;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7777 goto LABEL_274;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7778 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7779 v114 = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7780 goto LABEL_272;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7781 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7782 LABEL_209:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7783 if ( v68->pEquipment.uMainHand
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7784 && (v68->GetEquippedItemEquipType(1u) == 1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7785 || v68->GetEquippedItemSkillType(EQUIP_TWO_HANDED) == 4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7786 && !v68->pEquipment.uOffHand) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7787 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7788 v91 = 17 * v239 + v90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7789 v92 = v91;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7790 v223 = paperdoll_array_511290[0][v91][2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7791 if ( v223 == pIcons_LOD->FindTextureByName("pending") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7792 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7793 v93 = 2 * v91;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7794 v94 = paperdoll_array_511290[0][v92][1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7795 a2g = papredoll_4E4C28 + dword_4E5050[v93];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7796 v95 = dword_4E5050[v93 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7797 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7798 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7799 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7800 v94 = v223;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7801 a2g = papredoll_4E4C28 + dword_4E5270[2 * v91];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7802 v95 = dword_4E5270[2 * v91 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7803 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7804 a3g = paperdoll_4E4C2C + v95;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7805 if ( v94 == pIcons_LOD->FindTextureByName("pending") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7806 goto LABEL_258;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7807 if ( *(int *)(v242 + 516) & 0xF0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7808 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7809 if ( (*(int *)(v242 + 516) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7810 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7811 if ( (*(int *)(v242 + 516) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7812 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7813 v173 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7814 goto LABEL_226;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7815 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7816 if ( (*(int *)(v242 + 516) & 0xF0) == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7817 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7818 v173 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7819 goto LABEL_226;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7820 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7821 if ( (*(int *)(v242 + 516) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7822 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7823 v173 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7824 LABEL_226:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7825 v96 = (char *)&pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v173, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7826 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7827 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7828 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7829 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7830 *(char *)(v242 + 516) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7831 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7832 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7833 v187 = 255;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7834 v174 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7835 v97 = (double)GetTickCount();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7836 LABEL_249:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7837 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7838 a2g,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7839 a3g,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7840 (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7841 (Texture *)v96,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7842 (signed __int64)(v97 * 0.1),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7843 v174,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7844 v187);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7845 goto LABEL_258;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7846 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7847 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7848 v173 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7849 goto LABEL_226;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7850 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7851 v98 = v94 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7852 v99 = (char *)&pIcons_LOD->pTextures[v94];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7853 v100 = pRenderer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7854 if ( *(int *)(v242 + 516) & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7855 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7856 v101 = (Texture *)(v98 != 0 ? (int)v99 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7857 v188 = v101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7858 v175 = a3g;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7859 v163 = a2g;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7860 LABEL_231:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7861 v100->_4A6776(v163, v175, v188);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7862 goto LABEL_256;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7863 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7864 if ( *(char *)(v242 + 516) & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7865 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7866 v101 = (Texture *)(v98 != 0 ? (int)v99 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7867 v189 = v101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7868 v176 = a3g;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7869 v164 = a2g;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7870 LABEL_234:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7871 pRenderer->DrawTextureTransparent(v164, v176, v189);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7872 goto LABEL_256;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7873 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7874 v101 = (Texture *)(v98 != 0 ? (int)v99 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7875 v190 = v101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7876 v177 = a3g;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7877 v165 = a2g;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7878 goto LABEL_255;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7879 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7880 v102 = 17 * v239 + v90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7881 v94 = paperdoll_array_511290[0][v102][1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7882 if ( v94 == pIcons_LOD->FindTextureByName("pending") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7883 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7884 LABEL_258:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7885 v68 = v217;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7886 goto LABEL_259;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7887 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7888 v103 = papredoll_4E4C28 + dword_4E5050[2 * v102];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7889 v104 = paperdoll_4E4C2C + dword_4E5050[2 * v102 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7890 v224 = *(int *)(v242 + 516);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7891 v105 = *(int *)(v242 + 516) & 0xF0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7892 a2g = papredoll_4E4C28 + dword_4E5050[2 * v102];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7893 a3g = paperdoll_4E4C2C + dword_4E5050[2 * v102 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7894 if ( !v105 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7895 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7896 v109 = v94 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7897 v110 = (char *)&pIcons_LOD->pTextures[v94];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7898 if ( v224 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7899 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7900 v101 = (Texture *)(v109 != 0 ? (int)v110 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7901 v188 = v101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7902 v175 = v104;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7903 v163 = v103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7904 v100 = pRenderer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7905 goto LABEL_231;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7906 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7907 if ( v224 & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7908 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7909 v101 = (Texture *)(v109 != 0 ? (int)v110 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7910 v189 = v101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7911 v176 = v104;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7912 v164 = v103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7913 v100 = pRenderer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7914 goto LABEL_234;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7915 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7916 v101 = (Texture *)(v109 != 0 ? (int)v110 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7917 v190 = v101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7918 v177 = v104;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7919 v165 = v103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7920 v100 = pRenderer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7921 LABEL_255:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7922 pRenderer->DrawTransparentGreenShade(v165, v177, v190);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7923 LABEL_256:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7924 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7925 pRenderer->_4A612A(a2g, a3g, v101, v235);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7926 goto LABEL_258;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7927 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7928 v106 = v105 - 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7929 if ( v106 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7930 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7931 v107 = v106 - 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7932 if ( !v107 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7933 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7934 v178 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7935 goto LABEL_246;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7936 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7937 v108 = v107 - 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7938 if ( !v108 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7939 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7940 v178 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7941 goto LABEL_246;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7942 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7943 if ( v108 == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7944 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7945 v178 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7946 LABEL_246:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7947 v96 = (char *)&pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v178, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7948 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7949 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7950 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7951 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7952 *(char *)(v242 + 516) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7953 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7954 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7955 v187 = 255;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7956 v174 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7957 v97 = (double)GetTickCount();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7958 goto LABEL_249;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7959 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7960 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7961 v178 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7962 goto LABEL_246;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7963 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7964 v186 = 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7965 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7966 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7967 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7968 v186 = 13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7969 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7970 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7971 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7972 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7973 v186 = 14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7974 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7975 v90 = v186;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7976 goto LABEL_209;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7977 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7978 v90 = 15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7979 goto LABEL_207;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7980 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7981 if ( (*(int *)(v57 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7982 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7983 if ( (*(int *)(v57 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7984 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7985 v171 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7986 goto LABEL_145;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7987 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7988 if ( (*(int *)(v57 + 20) & 0xF0) == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7989 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7990 v171 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7991 goto LABEL_145;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7992 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7993 if ( (*(int *)(v57 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7994 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7995 v171 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7996 LABEL_145:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7997 v63 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v171, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7998 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7999 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8000 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8001 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8002 *(char *)(v221 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8003 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8004 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8005 v64 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8006 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8007 a2e,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8008 a3e,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8009 (Texture *)(v59 != -1 ? (int)&pIcons_LOD->pTextures[v59] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8010 v63,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8011 (signed __int64)v64,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8012 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8013 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8014 goto LABEL_155;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8015 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8016 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8017 v171 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8018 goto LABEL_145;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8019 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8020 if ( (*(int *)(v44 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8021 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8022 if ( (*(int *)(v44 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8023 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8024 v170 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8025 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8026 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8027 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8028 if ( (*(int *)(v44 + 20) & 0xF0) != 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8029 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8030 v50 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8031 if ( (*(int *)(v44 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8032 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8033 v170 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8034 LABEL_117:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8035 v51 = &pIcons_LOD->pTextures[v50->LoadTexture(v170, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8036 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8037 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8038 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8039 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8040 *(char *)(v220 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8041 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8042 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8043 v52 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8044 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8045 a2d,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8046 a3d,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8047 (Texture *)(v48 != -1 ? (int)&pIcons_LOD->pTextures[v48] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8048 v51,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8049 (signed __int64)v52,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8050 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8051 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8052 goto LABEL_127;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8053 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8054 LABEL_116:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8055 v170 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8056 goto LABEL_117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8057 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8058 v170 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8059 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8060 v50 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8061 goto LABEL_117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8062 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8063 v50 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8064 goto LABEL_116;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8065 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8066 v185 = 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8067 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8068 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8069 v45 = v185;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8070 goto LABEL_106;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8071 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8072 v45 = 15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8073 goto LABEL_104;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8074 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8075 if ( (*(int *)(v32 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8076 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8077 if ( (*(int *)(v32 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8078 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8079 v169 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8080 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8081 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8082 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8083 if ( (*(int *)(v32 + 20) & 0xF0) != 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8084 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8085 v38 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8086 if ( (*(int *)(v32 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8087 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8088 v169 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8089 LABEL_85:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8090 v39 = &pIcons_LOD->pTextures[v38->LoadTexture(v169, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8091 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8092 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8093 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8094 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8095 *(char *)(v219 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8096 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8097 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8098 v40 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8099 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8100 a2c,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8101 a3c,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8102 (Texture *)(v35 != -1 ? (int)&pIcons_LOD->pTextures[v35] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8103 v39,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8104 (signed __int64)v40,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8105 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8106 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8107 goto LABEL_93;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8108 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8109 LABEL_84:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8110 v169 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8111 goto LABEL_85;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8112 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8113 v169 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8114 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8115 v38 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8116 goto LABEL_85;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8117 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8118 v38 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8119 goto LABEL_84;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8120 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8121 v184 = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8122 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8123 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8124 v33 = v184;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8125 goto LABEL_74;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8126 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8127 v33 = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8128 goto LABEL_72;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8129 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8130 if ( (*(int *)(v22 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8131 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8132 if ( (*(int *)(v22 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8133 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8134 v168 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8135 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8136 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8137 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8138 if ( (*(int *)(v22 + 20) & 0xF0) != 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8139 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8140 v26 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8141 if ( (*(int *)(v22 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8142 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8143 v168 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8144 LABEL_49:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8145 a2b = &pIcons_LOD->pTextures[v26->LoadTexture(v168, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8146 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8147 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8148 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8149 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8150 *(char *)(v22 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8151 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8152 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8153 v27 = (Texture *)(v241 != -1 ? (int)&pIcons_LOD->pTextures[v241] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8154 v28 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8155 pRenderer->_4A63E6(v24, a3b, v27, a2b, (signed __int64)v28, 0, 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8156 goto LABEL_57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8157 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8158 LABEL_48:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8159 v168 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8160 goto LABEL_49;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8161 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8162 v168 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8163 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8164 v26 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8165 goto LABEL_49;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8166 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8167 v26 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8168 goto LABEL_48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8169 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8170 a3 = paperdoll_4E4C2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8171 a2 = papredoll_4E4C28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8172 v240 = 4 * uPlayerID_ - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8173 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8174 papredoll_4E4C28,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8175 paperdoll_4E4C2C,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8176 (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
8177 //(Texture *)(*(unsigned int *)((char *)papredoll_dbods + v240) != -1 ? 72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8178 // * *(unsigned int *)((char *)papredoll_dbods
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8179 // + v240)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8180 // + 7145548 : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8181 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8182 pRenderer->_4A612A(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8183 a2,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8184 a3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8185 //(Texture *)(*(unsigned int *)((char *)papredoll_dbods + v240) != -1 ? 72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8186 // * *(unsigned int *)((char *)papredoll_dbods
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8187 // + v240)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8188 // + 7145548 : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8189 (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
8190 pPlayer->pEquipment.uBody);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8191 uPlayerID_a = 2 * v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8192 v6 = pPlayer->pEquipment.uMainHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8193 if ( !v6
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8194 || (v7 = *(int *)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v6 + 5], pItemsTable->pItems[v7].uEquipType != 1)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8195 && (pItemsTable->pItems[v7].uSkillType != 4 || pPlayer->pEquipment.uOffHand) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8196 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8197 papredoll_4E4C28 + dword_4E5AE0[2 * v5],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8198 paperdoll_4E4C2C + dword_4E5AE0[2 * v5 + 1],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8199 (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
8200 //(Texture *)(*(unsigned int *)((char *)papredoll_dlads + v240) != -1 ? 72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8201 // * *(unsigned int *)((char *)papredoll_dlads
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8202 // + v240)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8203 // + 7145548 : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8204 v8 = pPlayer->pEquipment.uMainHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8205 if ( v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8206 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8207 v229 = pPlayer->pEquipment.uMainHand;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8208 v9 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v8 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8209 v10 = v5 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8210 v218 = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8211 v11 = *(int *)v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8212 v12 = *(int *)v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8213 v13 = papredoll_4E4C28 + array_4E4C30[v5].field_8 - pItemsTable->pItems[v12].uEquipX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8214 a2a = v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8215 a3a = paperdoll_4E4C2C + *(int *)((char *)&array_4E4C30[0].field_C + v10) - pItemsTable->pItems[v12].uEquipY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8216 if ( v11 == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8217 v166 = "item64v1";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8218 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8219 v166 = pItemsTable->pItems[v12].pIconName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8220 v14 = pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8221 v15 = *(int *)(v218 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8222 if ( *(int *)(v218 + 20) & 0xF0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8223 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8224 if ( (*(int *)(v218 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8225 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8226 if ( (*(int *)(v218 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8227 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8228 v167 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8229 goto LABEL_27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8230 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8231 if ( (*(int *)(v218 + 20) & 0xF0) == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8232 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8233 v167 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8234 goto LABEL_27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8235 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8236 if ( (*(int *)(v218 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8237 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8238 v167 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8239 LABEL_27:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8240 //v16 = (Texture *)(72 * pIcons_LOD->LoadTexture(v167, TEXTURE_16BIT_PALETTE) + 7145548);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8241 v16 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v167, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8242
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8243 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8244 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8245 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8246 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8247 *(char *)(v218 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8248 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8249 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8250 v17 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8251 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8252 v13,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8253 a3a,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8254 (Texture *)(v14 != -1 ? (int)&pIcons_LOD->pTextures[v14] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8255 v16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8256 (signed __int64)v17,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8257 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8258 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8259 goto LABEL_393;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8260 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8261 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8262 v167 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8263 goto LABEL_27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8264 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8265 v18 = v14 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8266 v19 = (char *)&pIcons_LOD->pTextures[v14];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8267 if ( v15 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8268 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8269 v20 = (Texture *)(v18 != 0 ? (int)v19 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8270 pRenderer->_4A6776(a2a, a3a, v20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8271 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8272 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8273 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8274 if ( v15 & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8275 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8276 v20 = (Texture *)(v18 != 0 ? (int)v19 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8277 pRenderer->DrawTextureTransparent(a2a, a3a, v20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8278 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8279 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8280 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8281 v20 = (Texture *)(v18 != 0 ? (int)v19 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8282 pRenderer->DrawTransparentGreenShade(a2a, a3a, v20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8283 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8284 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8285 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8286 pRenderer->_4A612A(a2a, a3a, v20, v229);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8287 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8288 LABEL_393:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8289 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8290 papredoll_4E4C28 + pPaperdollRightHand[uPlayerID_a],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8291 paperdoll_4E4C2C + pPaperdollRightHand[uPlayerID_a + 1],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8292 (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
8293 //(Texture *)(*(unsigned int *)((char *)papredoll_drhs + v240) != -1 ? 72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8294 // * *(unsigned int *)((char *)papredoll_drhs + v240)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8295 // + 7145548 : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8296 v161 = v217->pEquipment.uMainHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8297 if ( v161 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8298 {
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8299 v162 = *(int *)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v161 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8300 if ( pItemsTable->pItems[v162].uEquipType == 1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8301 || pItemsTable->pItems[v162].uSkillType == 4 && !v217->pEquipment.uOffHand )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8302 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8303 papredoll_4E4C28 + pPaperdollLeftHand[uPlayerID_a],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8304 paperdoll_4E4C2C + pPaperdollLeftHand[uPlayerID_a + 1],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8305 (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
8306 //(Texture *)(*(unsigned int *)((char *)papredoll_dlhus + v240) != -1 ? 72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8307 // * *(unsigned int *)((char *)papredoll_dlhus
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8308 // + v240)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8309 // + 7145548 : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8310 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8311 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8312 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8313 0x25Bu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8314 0x12Bu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8315 (Texture *)(uTextureID_MAGNIF_B != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_MAGNIF_B] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8316 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8317 0x1D4u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8318 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8319 (Texture *)(uTextureID_507B04 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507B04] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8320 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8321
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8322
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8323 //----- (0043E825) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8324 void __fastcall CharacterUI_DrawPaperdollWithRingOverlay(unsigned int uPlayerID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8325 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8326 unsigned int v1; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8327 Player *pPlayer; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8328 int v3; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8329 int v4; // edi@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8330 unsigned int v5; // ebx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8331 int v6; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8332 LODFile_IconsBitmaps *v7; // ecx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8333 double v8; // st7@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8334 int v9; // edi@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8335 Texture *v10; // edi@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8336 unsigned __int8 v11; // zf@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8337 Texture *v12; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8338 char v13; // sf@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8339 unsigned __int8 v14; // of@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8340 unsigned int v15; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8341 unsigned int v16; // ebx@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8342 int v17; // eax@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8343 LODFile_IconsBitmaps *v18; // ecx@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8344 double v19; // st7@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8345 int v20; // edi@40
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8346 int v21; // eax@41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8347 signed int v22; // ebx@41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8348 Texture *v23; // edi@41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8349 int v24; // eax@42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8350 char *v25; // eax@42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8351 unsigned int v26; // eax@46
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8352 int v27; // edi@47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8353 unsigned int v28; // ebx@47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8354 int v29; // eax@47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8355 LODFile_IconsBitmaps *v30; // ecx@51
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8356 Texture *v31; // esi@58
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8357 double v32; // st7@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8358 int v33; // esi@61
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8359 int v34; // esi@62
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8360 Texture *v35; // eax@63
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8361 const char *v36; // [sp-8h] [bp-38h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8362 const char *v37; // [sp-8h] [bp-38h]@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8363 const char *v38; // [sp-8h] [bp-38h]@52
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8364 int v39; // [sp+10h] [bp-20h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8365 Texture *v40; // [sp+10h] [bp-20h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8366 int v41; // [sp+10h] [bp-20h]@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8367 Texture *v42; // [sp+10h] [bp-20h]@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8368 int v43; // [sp+10h] [bp-20h]@47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8369 unsigned int a3; // [sp+14h] [bp-1Ch]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8370 unsigned int a2; // [sp+18h] [bp-18h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8371 int v46; // [sp+1Ch] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8372 Player *v47; // [sp+20h] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8373 int v48; // [sp+24h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8374 int v49; // [sp+24h] [bp-Ch]@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8375
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8376 v1 = uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8377 pPlayer = pPlayers[uPlayerID];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8378 v47 = pPlayers[uPlayerID];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8379 pIcons_LOD->LoadTexture("sptext01", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8380 CharacterUI_DrawPaperdoll(v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8381 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8382 0x1D9u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8383 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8384 (Texture *)(uTextureID_BACKHAND != -1 ? &pIcons_LOD->pTextures[uTextureID_BACKHAND] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8385 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8386 0x1D4u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8387 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8388 (Texture *)(uTextureID_507B04 != -1 ? &pIcons_LOD->pTextures[uTextureID_507B04] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8389 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8390 ptr_507694->uX,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8391 ptr_507694->uY,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8392 (Texture *)(uTextureID_5118C8 != -1 ? &pIcons_LOD->pTextures[uTextureID_5118C8] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8393 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8394 v46 = (int)&pPlayer->pEquipment.field_28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8395 v48 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8396 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8397 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8398 if ( !*(int *)v46 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8399 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8400 v39 = *(int *)v46;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8401 v4 = (int)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * *(int *)v46 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8402 a3 = *(int *)((char *)dword_4E5C34 + v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8403 a2 = *(int *)((char *)dword_4E5C1C + v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8404 v5 = pIcons_LOD->LoadTexture(pItemsTable->pItems[*(int *)v4].pIconName, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8405 v6 = *(int *)(v4 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8406 if ( *(int *)(v4 + 20) & 0xF0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8407 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8408 if ( (*(int *)(v4 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8409 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8410 if ( (*(int *)(v4 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8411 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8412 v36 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8413 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8414 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8415 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8416 if ( (*(int *)(v4 + 20) & 0xF0) != 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8417 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8418 v7 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8419 if ( (*(int *)(v4 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8420 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8421 v36 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8422 LABEL_14:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8423 v40 = &pIcons_LOD->pTextures[v7->LoadTexture(v36, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8424 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8425 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8426 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8427 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8428 *(char *)(v4 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8429 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8430 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8431 v8 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8432 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8433 a2,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8434 a3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8435 (Texture *)(v5 != -1 ? (int)&pIcons_LOD->pTextures[v5] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8436 v40,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8437 (signed __int64)v8,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8438 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8439 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8440 goto LABEL_23;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8441 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8442 LABEL_13:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8443 v36 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8444 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8445 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8446 v36 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8447 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8448 v7 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8449 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8450 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8451 v7 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8452 goto LABEL_13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8453 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8454 v9 = v5 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8455 if ( v6 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8456 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8457 v10 = (Texture *)(v9 != 0 ? (int)&pIcons_LOD->pTextures[v5] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8458 pRenderer->_4A6776(a2, a3, v10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8459 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8460 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8461 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8462 v11 = (v6 & 1) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8463 v12 = &pIcons_LOD->pTextures[v5];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8464 if ( v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8465 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8466 v10 = (Texture *)(v9 != 0 ? (int)v12 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8467 pRenderer->DrawTransparentGreenShade(a2, a3, v10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8468 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8469 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8470 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8471 v10 = (Texture *)(v9 != 0 ? (int)v12 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8472 pRenderer->DrawTextureTransparent(a2, a3, v10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8473 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8474 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8475 pRenderer->_4A601E(a2, a3, v10, v39);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8476 LABEL_23:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8477 pPlayer = v47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8478 LABEL_24:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8479 v46 += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8480 v3 = v48 + 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8481 v14 = __OFSUB__(v48 + 4, 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8482 v11 = v48 == 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8483 v13 = v48 - 16 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8484 v48 += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8485 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8486 while ( (unsigned __int8)(v13 ^ v14) | v11 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8487 v15 = pPlayer->pEquipment.field_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8488 if ( !v15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8489 goto LABEL_46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8490 v41 = pPlayer->pEquipment.field_24;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8491 v49 = (int)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v15 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8492 v16 = pIcons_LOD->LoadTexture(pItemsTable->pItems[*(int *)v49].pIconName, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8493 v17 = *(int *)(v49 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8494 if ( !(*(int *)(v49 + 20) & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8495 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8496 v20 = v16 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8497 if ( v17 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8498 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8499 v21 = 9 * v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8500 v22 = 493;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8501 v23 = (Texture *)(v20 != 0 ? (int)&pIcons_LOD->pTextures[8 * v21 / 0x48u] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8502 pRenderer->_4A6776(0x1EDu, 0x5Bu, v23);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8503 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8504 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8505 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8506 v11 = (v17 & 1) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8507 v24 = 9 * v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8508 v22 = 493;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8509 v25 = (char *)&pIcons_LOD->pTextures[8 * v24 / 0x48u];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8510 if ( v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8511 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8512 v23 = (Texture *)(v20 != 0 ? (int)v25 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8513 pRenderer->DrawTransparentGreenShade(493, 91, v23);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8514 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8515 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8516 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8517 v23 = (Texture *)(v20 != 0 ? (int)v25 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8518 pRenderer->DrawTextureTransparent(0x1EDu, 0x5Bu, v23);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8519 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8520 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8521 pRenderer->_4A601E(v22, 91, v23, v41);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8522 pPlayer = v47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8523 goto LABEL_46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8524 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8525 if ( (*(int *)(v49 + 20) & 0xF0) == 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8526 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8527 v18 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8528 goto LABEL_36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8529 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8530 if ( (*(int *)(v49 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8531 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8532 v37 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8533 goto LABEL_34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8534 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8535 if ( (*(int *)(v49 + 20) & 0xF0) == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8536 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8537 v37 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8538 LABEL_34:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8539 v18 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8540 goto LABEL_37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8541 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8542 v18 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8543 if ( (*(int *)(v49 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8544 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8545 v37 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8546 goto LABEL_37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8547 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8548 LABEL_36:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8549 v37 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8550 LABEL_37:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8551 v42 = &pIcons_LOD->pTextures[v18->LoadTexture(v37, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8552 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8553 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8554 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8555 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8556 *(char *)(v49 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8557 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8558 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8559 v19 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8560 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8561 0x1EDu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8562 0x5Bu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8563 (Texture *)(v16 != -1 ? (int)&pIcons_LOD->pTextures[v16] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8564 v42,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8565 (signed __int64)v19,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8566 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8567 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8568 LABEL_46:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8569 v26 = pPlayer->pEquipment.field_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8570 if ( !v26 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8571 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8572 v43 = pPlayer->pEquipment.field_1C;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8573 v27 = (int)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v26 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8574 v28 = pIcons_LOD->LoadTexture(pItemsTable->pItems[*(int *)v27].pIconName, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8575 v29 = *(int *)(v27 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8576 if ( !(*(int *)(v27 + 20) & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8577 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8578 v33 = v28 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8579 if ( v29 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8580 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8581 v34 = v33 != 0 ? (int)&pIcons_LOD->pTextures[v28] : 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8582 pRenderer->_4A6776(0x24Au, 0x58u, (Texture *)v34);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8583 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8584 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8585 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8586 v11 = (v29 & 1) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8587 v35 = &pIcons_LOD->pTextures[v28];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8588 if ( v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8589 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8590 v34 = v33 != 0 ? (int)v35 : 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8591 pRenderer->DrawTransparentGreenShade(586, 88, (Texture *)v34);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8592 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8593 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8594 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8595 v34 = v33 != 0 ? (int)v35 : 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8596 pRenderer->DrawTextureTransparent(0x24Au, 0x58u, (Texture *)v34);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8597 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8598 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8599 pRenderer->_4A601E(586, 88, (Texture *)v34, v43);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8600 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8601 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8602 if ( (*(int *)(v27 + 20) & 0xF0) == 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8603 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8604 v30 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8605 goto LABEL_57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8606 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8607 if ( (*(int *)(v27 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8608 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8609 v38 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8610 goto LABEL_55;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8611 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8612 if ( (*(int *)(v27 + 20) & 0xF0) == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8613 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8614 v38 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8615 LABEL_55:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8616 v30 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8617 goto LABEL_58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8618 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8619 v30 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8620 if ( (*(int *)(v27 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8621 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8622 v38 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8623 goto LABEL_58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8624 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8625 LABEL_57:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8626 v38 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8627 LABEL_58:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8628 v31 = &pIcons_LOD->pTextures[v30->LoadTexture(v38, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8629 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8630 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8631 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8632 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8633 *(char *)(v27 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8634 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8635 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8636 v32 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8637 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8638 0x24Au,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8639 0x58u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8640 (Texture *)(v28 != -1 ? (int)&pIcons_LOD->pTextures[v28] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8641 v31,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8642 (signed __int64)v32,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8643 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8644 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8645 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8646
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8647
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8648 //----- (0043ED6F) --------------------------------------------------------
84
b39bdc150e90 Some inventory stuff
Nomad
parents: 82
diff changeset
8649 bool _43ED6F_check_party_races(bool a1)
b39bdc150e90 Some inventory stuff
Nomad
parents: 82
diff changeset
8650 {
b39bdc150e90 Some inventory stuff
Nomad
parents: 82
diff changeset
8651 bool v6; // zf@5
b39bdc150e90 Some inventory stuff
Nomad
parents: 82
diff changeset
8652
b39bdc150e90 Some inventory stuff
Nomad
parents: 82
diff changeset
8653 for (uint i = 0; i < 4; ++i)
b39bdc150e90 Some inventory stuff
Nomad
parents: 82
diff changeset
8654 {
b39bdc150e90 Some inventory stuff
Nomad
parents: 82
diff changeset
8655 auto player = pParty->pPlayers + i;
b39bdc150e90 Some inventory stuff
Nomad
parents: 82
diff changeset
8656 auto race = player->GetRace();
b39bdc150e90 Some inventory stuff
Nomad
parents: 82
diff changeset
8657
b39bdc150e90 Some inventory stuff
Nomad
parents: 82
diff changeset
8658 if (race != CHARACTER_RACE_HUMAN &&
b39bdc150e90 Some inventory stuff
Nomad
parents: 82
diff changeset
8659 race != CHARACTER_RACE_ELF &&
b39bdc150e90 Some inventory stuff
Nomad
parents: 82
diff changeset
8660 race != CHARACTER_RACE_GOBLIN)
b39bdc150e90 Some inventory stuff
Nomad
parents: 82
diff changeset
8661 v6 = a1 == 1;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8662 else
84
b39bdc150e90 Some inventory stuff
Nomad
parents: 82
diff changeset
8663 v6 = !a1;
b39bdc150e90 Some inventory stuff
Nomad
parents: 82
diff changeset
8664
b39bdc150e90 Some inventory stuff
Nomad
parents: 82
diff changeset
8665 if (v6)
b39bdc150e90 Some inventory stuff
Nomad
parents: 82
diff changeset
8666 return true;
b39bdc150e90 Some inventory stuff
Nomad
parents: 82
diff changeset
8667 }
b39bdc150e90 Some inventory stuff
Nomad
parents: 82
diff changeset
8668 return false;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8669 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8670 // A750D8: using guessed type __int64 qword_A750D8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8671
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8672 //----- (0043EDB9) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8673 bool __thiscall sub_43EDB9_get_some_race_sex_relation_2(unsigned int _this)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8674 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8675 unsigned int v1; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8676 Player **v2; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8677 Player *v3; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8678 enum CHARACTER_RACE v4; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8679 bool result; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8680 char v6; // zf@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8681
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8682 v1 = _this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8683 v2 = &pPlayers[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8684 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8685 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8686 v3 = *v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8687 v4 = v3->GetRace();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8688 result = v3->GetSexByVoice();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8689 if ( !v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8690 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8691 if ( v4 == 1 || v4 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8692 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8693 if ( !result && v1 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8694 goto LABEL_15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8695 v6 = v1 == 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8696 LABEL_11:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8697 if ( v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8698 goto LABEL_15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8699 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8700 if ( (signed int)v2 >= (signed int)&qword_A750D8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8701 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8702 LOBYTE(result) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8703 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8704 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8705 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8706 if ( result || v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8707 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8708 v6 = v1 == 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8709 goto LABEL_11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8710 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8711 LABEL_15:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8712 LOBYTE(result) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8713 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8714 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8715 // A750D8: using guessed type __int64 qword_A750D8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8716
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8717 //----- (0043EE15) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8718 bool __fastcall sub_43EE15_player_has_item(unsigned int uItemID, Player *pPlayer, char a3)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8719 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8720 bool result; // eax@0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8721 signed int v4; // edi@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8722 int *v5; // esi@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8723 signed int v6; // edi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8724 bool *v7; // esi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8725
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8726 if ( !a3 || pParty->pPickedItem.uItemID != uItemID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8727 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8728 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8729 v5 = pPlayer->pInventoryIndices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8730 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8731 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8732 if ( *v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8733 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8734 result = 9 * *v5;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8735 if ( *(int *)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * *v5 + 5] == uItemID )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8736 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8737 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8738 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8739 ++v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8740 if ( v4 >= 126 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8741 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8742 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8743 v7 = (bool *)&pPlayer->pEquipment;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8744 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8745 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8746 result = *v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8747 if ( *v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8748 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8749 result *= 9;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8750 if ( *(int *)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[4 * result + 5] == uItemID )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8751 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8752 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8753 ++v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8754 ++v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8755 if ( v6 >= 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8756 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8757 LOBYTE(result) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8758 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8759 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8760 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8761 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8762 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8763 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8764 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8765 LOBYTE(result) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8766 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8767 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8768
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8769 //----- (0043EE77) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8770 bool __fastcall sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(signed int a1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8771 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8772 bool result; // eax@0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8773 Player *v2; // edx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8774 int v3; // ecx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8775 Player **pPlayers; // esi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8776 unsigned int v5; // ecx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8777 Player *v6; // edx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8778
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8779 if ( a1 < 1 || a1 > 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8780 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8781 if ( !a1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8782 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8783 pPlayers = &::pPlayers[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8784 v5 = 604;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8785 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8786 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8787 result = sub_43EE15_player_has_item(v5, *pPlayers, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8788 if ( !result )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8789 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8790 result = v6->pEquipment.uBody;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8791 if ( !result )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8792 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8793 result *= 9;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8794 if ( *(int *)&v6->spellbook.pDarkSpellbook.bIsSpellAvailable[4 * result + 5] != v5 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8795 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8796 ++pPlayers;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8797 if ( (signed int)pPlayers >= (signed int)&qword_A750D8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8798 goto LABEL_13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8799 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8800 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8801 goto LABEL_6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8802 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8803 result = sub_43EE15_player_has_item(604u, ::pPlayers[a1], 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8804 if ( !result
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8805 || (result = v2->pEquipment.uBody) == 0
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8806 || (result *= 9, *(int *)&v2->spellbook.pDarkSpellbook.bIsSpellAvailable[4 * result + 5] != v3) )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8807 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8808 LABEL_6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8809 LOBYTE(result) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8810 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8811 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8812 LABEL_13:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8813 LOBYTE(result) = 1;
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 // A750D8: using guessed type __int64 qword_A750D8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8817
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8818 //----- (0043EF2B) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8819 void __fastcall WetsuitOn(unsigned int uPlayerID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8820 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8821 unsigned int v1; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8822 Player **v2; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8823 enum CHARACTER_RACE v3; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8824 signed int v4; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8825 int v5; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8826 unsigned __int8 v6; // al@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8827 char pContainer[20]; // [sp+4h] [bp-1Ch]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8828 unsigned int v8; // [sp+18h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8829 int v9; // [sp+1Ch] [bp-4h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8830
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8831 v1 = uPlayerID - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8832 v8 = uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8833 if ( ((uPlayerID - 1) & 0x80000000u) == 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8834 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8835 v2 = &pPlayers[uPlayerID];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8836 v3 = (*v2)->GetRace();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8837 v4 = (*v2)->GetSexByVoice();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8838 if ( v3 && v3 != 1 && v3 != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8839 v5 = (v4 != 0) + 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8840 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8841 v5 = (v4 != 0) + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8842 v9 = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8843 wsprintfA(pContainer, "pc23v%dBod", v5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8844 papredoll_dbods[v1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8845 wsprintfA(pContainer, "pc23v%dlad", v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8846 papredoll_dlads[v1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8847 wsprintfA(pContainer, "pc23v%dlau", v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8848 papredoll_dlaus[v1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8849 wsprintfA(pContainer, "pc23v%drh", v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8850 papredoll_drhs[v1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8851 wsprintfA(pContainer, "pc23v%dlh", v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8852 papredoll_dlhs[v1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8853 wsprintfA(pContainer, "pc23v%dlhu", v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8854 papredoll_dlhus[v1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8855 v6 = pPlayers[v1 + 1]->uFace;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8856 if ( v6 == 12 || v6 == 13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8857 papredoll_dbrds[pPlayers[v8]->uFace] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8858 papredoll_flying_feet[pPlayers[v8]->uFace] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8859 IsPlayerWearingWatersuit[v8] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8860 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8861 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8862
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8863 //----- (0043F0BD) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8864 unsigned int __fastcall WetsuitOff(unsigned int uPlayerID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8865 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8866 unsigned int result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8867 Player **v2; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8868 unsigned int v3; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8869 int v4; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8870 char v5; // al@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8871 char pContainer[20]; // [sp+0h] [bp-18h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8872 unsigned int v7; // [sp+14h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8873
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8874 result = uPlayerID - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8875 v7 = uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8876 if ( ((uPlayerID - 1) & 0x80000000u) == 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8877 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8878 v2 = &pPlayers[uPlayerID];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8879 v3 = uPlayerID - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8880 papredoll_dbods[v3] = pIcons_LOD->LoadTexture(dbod_texnames_by_face[(*v2)->uFace], TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8881 papredoll_dlads[v3] = pIcons_LOD->LoadTexture(dlad_texnames_by_face[(*v2)->uFace], TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8882 papredoll_dlaus[v3] = pIcons_LOD->LoadTexture(dlau_texnames_by_face[(*v2)->uFace], TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8883 papredoll_drhs[v3] = pIcons_LOD->LoadTexture(drh_texnames_by_face[(*v2)->uFace], TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8884 papredoll_dlhs[v3] = pIcons_LOD->LoadTexture(dlh_texnames_by_face[(*v2)->uFace], TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8885 papredoll_dlhus[v3] = pIcons_LOD->LoadTexture(dlhu_texnames_by_face[(*v2)->uFace], TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8886 v4 = (int)&(*v2)->uFace;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8887 v5 = *(char *)v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8888 if ( *(char *)v4 == 12 || v5 == 13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8889 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8890 wsprintfA(pContainer, "pc%02dbrd", v5 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8891 v4 = (int)&(*v2)->uFace;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8892 papredoll_dbrds[*(char *)v4] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8893 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8894 wsprintfA(pContainer, "item281pc%02d", *(char *)v4 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8895 papredoll_flying_feet[(*v2)->uFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8896 result = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8897 IsPlayerWearingWatersuit[v7] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8898 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8899 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8900 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8901
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8902
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8903 //----- (0043F333) --------------------------------------------------------
50
fde5c5acb66e BLV render
Nomad
parents: 46
diff changeset
8904 void stru170::MakeVisibleSectorList()
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8905 {
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8906 int v6; // ebx@3
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8907
50
fde5c5acb66e BLV render
Nomad
parents: 46
diff changeset
8908 uNumVisibleNotEmptySectors = 0;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8909 for (uint i = 0; i < std__vector_000FA8; ++i)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8910 {
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8911 v6 = 0;
50
fde5c5acb66e BLV render
Nomad
parents: 46
diff changeset
8912 if (!uNumVisibleNotEmptySectors)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8913 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8914 LABEL_7:
50
fde5c5acb66e BLV render
Nomad
parents: 46
diff changeset
8915 pVisibleSectorIDs_toDrawDecorsActorsEtcFrom[uNumVisibleNotEmptySectors++] = field_FA8[i].uSectorID;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8916 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8917 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8918 {
50
fde5c5acb66e BLV render
Nomad
parents: 46
diff changeset
8919 while (pVisibleSectorIDs_toDrawDecorsActorsEtcFrom[v6] != field_FA8[i].uSectorID )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8920 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8921 ++v6;
50
fde5c5acb66e BLV render
Nomad
parents: 46
diff changeset
8922 if ( v6 >= uNumVisibleNotEmptySectors)
fde5c5acb66e BLV render
Nomad
parents: 46
diff changeset
8923 {
fde5c5acb66e BLV render
Nomad
parents: 46
diff changeset
8924 pVisibleSectorIDs_toDrawDecorsActorsEtcFrom[uNumVisibleNotEmptySectors++] = field_FA8[i].uSectorID;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8925 continue;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8926 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8927 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8928 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8929 }
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8930 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8931
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8932
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8933 //----- (0043F515) --------------------------------------------------------
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8934 void MessWithBillboards_BLV()
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8935 {
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8936 for (uint i = 0; i < uNumBillboardsToDraw; ++i)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8937 {
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8938 auto p = pBillboardRenderList + i;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8939
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8940 if (p->field_1E & 2 || uCurrentlyLoadedLevelType == LEVEL_Indoor && !p->uIndoorSectorID)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8941 p->uPaletteSubindex = 0;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8942 else
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8943 p->uPaletteSubindex = _43F55F_get_billboard_light_level(p, -1);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8944 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8945 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8946
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8947 //----- (0043F55F) --------------------------------------------------------
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8948 int __fastcall _43F55F_get_billboard_light_level(RenderBillboard *a1, int uBaseLightLevel)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8949 {
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8950 signed int v3; // ecx@2
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8951
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8952 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8953 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8954 v3 = pIndoor->pSectors[a1->uIndoorSectorID].uMinAmbientLightLevel;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8955 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8956 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8957 {
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8958 if ( uBaseLightLevel == -1 )
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8959 v3 = a1->uPaletteSubindex;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8960 else
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8961 v3 = uBaseLightLevel;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8962 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8963 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
8964 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8965
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8966 //----- (0043F5C8) --------------------------------------------------------
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8967 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
8968 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8969 int v5; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8970 signed int v6; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8971 int v8; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8972 int v9; // ebx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8973 unsigned int v10; // ecx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8974 unsigned int v11; // edx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8975 unsigned int v12; // edx@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8976 signed int v13; // ecx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8977 BLVLightMM7 *v16; // esi@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8978 int v17; // ebx@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8979 int v18; // eax@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8980 int v19; // ebx@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8981 unsigned int v20; // ecx@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8982 int v21; // edx@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8983 unsigned int v22; // edx@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8984 unsigned int v23; // edx@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8985 signed int v24; // ecx@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8986 int v26; // ebx@35
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8987 int v27; // eax@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8988 int v28; // ebx@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8989 unsigned int v29; // ecx@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8990 int v30; // edx@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8991 unsigned int v31; // edx@41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8992 unsigned int v32; // edx@43
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8993 signed int v33; // ecx@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8994 int v37; // [sp+Ch] [bp-18h]@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8995 int v38; // [sp+10h] [bp-14h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8996 int v39; // [sp+10h] [bp-14h]@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8997 int v40; // [sp+10h] [bp-14h]@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8998 int v42; // [sp+14h] [bp-10h]@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8999 unsigned int v43; // [sp+18h] [bp-Ch]@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9000 unsigned int v44; // [sp+18h] [bp-Ch]@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9001 unsigned int v45; // [sp+18h] [bp-Ch]@44
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9002
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9003 v6 = uBaseLightLevel;
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
9004 for (uint i = 0; i < pMobileLightsStack->uNumLightsActive; ++i)
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
9005 {
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
9006 auto p = pMobileLightsStack->pLights + i;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9007
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9008 auto distX = abs(p->vPosition.x - x);
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9009 if ( distX <= p->uRadius)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9010 {
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9011 auto distY = abs(p->vPosition.y - y);
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9012 if ( distY <= p->uRadius)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9013 {
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9014 auto distZ = abs(p->vPosition.z - z);
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9015 if ( distZ <= p->uRadius)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9016 {
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9017 v8 = distX;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9018 v9 = distY;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9019 v10 = distZ;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9020 if (distX < distY)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9021 {
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9022 v8 = distY;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9023 v9 = distX;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9024 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9025 if ( v8 < distZ )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9026 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9027 v11 = v8;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9028 v8 = distZ;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9029 v10 = v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9030 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9031 if ( v9 < (signed int)v10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9032 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9033 v12 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9034 v10 = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9035 v9 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9036 }
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9037 v43 = ((unsigned int)(11 * v9) / 32) + (v10 / 4) + v8;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9038 v13 = p->uRadius;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9039 if ( (signed int)v43 < v13 )
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9040 v6 += ((unsigned __int64)(30i64 * (signed int)(v43 << 16) / v13) >> 16) - 30;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9041 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9042 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9043 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9044 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9045
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9046 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9047 {
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9048 auto pSector = pIndoor->pSectors + uSectorID;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9049
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9050 for (uint i = 0; i < pSector->uNumLights; ++i)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9051 {
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
9052 v16 = pIndoor->pLights + pSector->pLights[i];
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
9053 if (~v16->uAtributes & 8)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9054 {
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9055 v17 = abs(v16->vPosition.x - x);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9056 if ( v17 <= v16->uRadius )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9057 {
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9058 v42 = abs(v16->vPosition.y - y);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9059 if ( v42 <= v16->uRadius )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9060 {
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9061 v39 = abs(v16->vPosition.z - z);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9062 if ( v39 <= v16->uRadius )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9063 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9064 v18 = v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9065 v19 = v42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9066 v20 = v39;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9067 if ( v18 < v42 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9068 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9069 v21 = v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9070 v18 = v42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9071 v19 = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9072 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9073 if ( v18 < v39 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9074 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9075 v22 = v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9076 v18 = v39;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9077 v20 = v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9078 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9079 if ( v19 < (signed int)v20 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9080 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9081 v23 = v20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9082 v20 = v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9083 v19 = v23;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9084 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9085 v44 = ((unsigned int)(11 * v19) >> 5) + (v20 >> 2) + v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9086 v24 = v16->uRadius;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9087 if ( (signed int)v44 < v24 )
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9088 v6 += ((unsigned __int64)(30i64 * (signed int)(v44 << 16) / v24) >> 16) - 30;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9089 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9090 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9091 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9092 }
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9093 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9094 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9095
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
9096 for (uint i = 0; i < pStationaryLightsStack->uNumLightsActive; ++i)
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
9097 {
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
9098 auto p = pStationaryLightsStack->pLights + i;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9099 v26 = abs(p->vPosition.x - x);
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9100 if ( v26 <= p->uRadius)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9101 {
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9102 v40 = abs(p->vPosition.y - y);
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9103 if ( v40 <= p->uRadius)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9104 {
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9105 v37 = abs(p->vPosition.z - z);
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9106 if ( v37 <= p->uRadius)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9107 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9108 v27 = v26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9109 v28 = v40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9110 v29 = v37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9111 if ( v27 < v40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9112 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9113 v30 = v27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9114 v27 = v40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9115 v28 = v30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9116 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9117 if ( v27 < v37 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9118 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9119 v31 = v27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9120 v27 = v37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9121 v29 = v31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9122 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9123 if ( v28 < (signed int)v29 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9124 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9125 v32 = v29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9126 v29 = v28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9127 v28 = v32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9128 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9129 v45 = ((unsigned int)(11 * v28) >> 5) + (v29 >> 2) + v27;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9130 v33 = p->uRadius;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9131 if ( (signed int)v45 < v33 )
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9132 v6 += ((unsigned __int64)(30i64 * (signed int)(v45 << 16) / v33) >> 16) - 30;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9133 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9134 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9135 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9136 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9137
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9138 if ( v6 <= 31 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9139 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9140 if ( v6 < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9141 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9142 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9143 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9144 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9145 v6 = 31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9146 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9147 return v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9148 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9149
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9150 //----- (00406051) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9151 __int16 stru262_TurnBased::StartTurn()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9152 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9153 stru262_TurnBased *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9154 int v2; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9155 int v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9156 char *v4; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9157 int v5; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9158 int v6; // eax@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9159 char *v7; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9160 TurnBased_QueueElem *v8; // edi@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9161 unsigned int v9; // edx@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9162 char *v10; // eax@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9163 int v11; // eax@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9164 int v12; // ebx@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9165 char *v13; // edi@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9166 int v15; // [sp+Ch] [bp-10h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9167 TurnBased_QueueElem *v16; // [sp+10h] [bp-Ch]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9168 int v17; // [sp+14h] [bp-8h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9169 int v18; // [sp+14h] [bp-8h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9170 signed int v19; // [sp+18h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9171 int v20; // [sp+18h] [bp-4h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9172
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9173 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9174 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9175 v19 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9176 v3 = v1->uActorQueueSize;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9177 v1->field_1C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9178 v4 = (char *)&v1->pQueue[v3].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9179 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9180 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9181 v17 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9182 if ( v1->uActorQueueSize <= v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9183 goto LABEL_11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9184 v16 = v1->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9185 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9186 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9187 v5 = v16->uPackedID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9188 if ( (v16->uPackedID & 7) == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9189 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9190 LABEL_8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9191 ++v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9192 ++v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9193 if ( v17 >= v1->uActorQueueSize )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9194 goto LABEL_11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9195 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9196 v15 = v5 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9197 if ( !pPlayers[(v5 >> 3) + 1]->CanAct() || v19 != v15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9198 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9199 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9200 goto LABEL_8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9201 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9202 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9203 LABEL_11:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9204 if ( v17 == v1->uActorQueueSize )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9205 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9206 *(int *)v4 = 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9207 v6 = 8 * v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9208 LOBYTE(v6) = 8 * v19 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9209 *((int *)v4 + 2) = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9210 *((int *)v4 - 1) = v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9211 *((int *)v4 + 1) = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9212 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9213 v4 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9214 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9215 ++v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9216 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9217 while ( v19 < 4 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9218 v1->uActorQueueSize = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9219 v20 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9220 if ( ai_arrays_size > v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9221 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9222 v7 = (char *)&v1->pQueue[v3].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9223 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9224 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9225 v18 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9226 if ( v1->uActorQueueSize > v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9227 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9228 v8 = v1->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9229 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9230 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9231 if ( (v8->uPackedID & 7) == 3 && ai_array_4F7DB0_actor_ids[v20] == v8->uPackedID >> 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9232 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9233 ++v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9234 ++v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9235 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9236 while ( v18 < v1->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9237 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9238 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9239 if ( v18 == v1->uActorQueueSize )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9240 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9241 v9 = ai_array_4F7DB0_actor_ids[v20];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9242 *(int *)v7 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9243 *((int *)v7 + 2) = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9244 *((int *)v7 - 1) = 8 * v9 | 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9245 *((int *)v7 + 1) = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9246 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9247 v7 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9248 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9249 ++v20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9250 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9251 while ( v20 < ai_arrays_size );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9252 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9253 ++v1->field_0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9254 v1->uActorQueueSize = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9255 v1->field_10 = 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9256 if ( v3 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9257 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9258 v10 = (char *)&v1->pQueue[0].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9259 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9260 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9261 if ( *(int *)v10 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9262 *(int *)v10 = 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9263 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9264 v10 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9265 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9266 while ( v2 < v1->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9267 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9268 LOWORD(v11) = v1->_4063A1();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9269 v12 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9270 if ( v1->uActorQueueSize > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9271 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9272 v13 = (char *)&v1->pQueue[0].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9273 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9274 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9275 v11 = *((int *)v13 - 1) & 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9276 if ( (char)v11 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9277 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9278 if ( *(int *)v13 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9279 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9280 LOWORD(v11) = v1->_40680F(v12++);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9281 v13 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9282 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9283 while ( v12 < v1->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9284 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9285 return v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9286 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9287 // 4F75D8: using guessed type int ai_arrays_size;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9288
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9289 //----- (004061CA) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9290 void stru262_TurnBased::NextTurn()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9291 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9292 stru262_TurnBased *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9293 TurnBased_QueueElem *v2; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9294 int v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9295 int v4; // edi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9296 Actor *v5; // eax@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9297 int v6; // ecx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9298 signed int v7; // ebx@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9299 int v8; // ebp@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9300 TurnBased_QueueElem *v9; // edi@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9301 int v10; // ecx@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9302 unsigned __int16 v11; // ax@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9303 signed int v12; // edx@35
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9304 signed int v13; // [sp+10h] [bp-4h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9305
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9306 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9307 _404544();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9308 v2 = v1->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9309 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9310 if ( (v1->pQueue[0].uPackedID & 7) == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9311 uActiveCharacter = (v1->pQueue[0].uPackedID >> 3) + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9312 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9313 uActiveCharacter = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9314 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9315 if ( v1->field_1C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9316 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9317 pTurnEngine->field_18 |= 2u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9318 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9319 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9320 pTurnEngine->field_18 &= 0xFFFFFFFDu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9321 if ( v1->pQueue[0].field_4 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9322 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9323 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9324 v13 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9325 if ( v1->uActorQueueSize <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9326 goto LABEL_27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9327 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9328 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9329 if ( (v2->uPackedID & 7) != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9330 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9331 v5 = &pActors[v2->uPackedID >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9332 LOWORD(v6) = v5->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9333 if ( (short)v6 == 4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9334 || (short)v6 == 8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9335 || (short)v6 == 2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9336 || (short)v6 == 3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9337 || (short)v6 == 12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9338 || (short)v6 == 13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9339 || (short)v6 == 18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9340 || (short)v6 == 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9341 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9342 v7 = v5->uCurrentActionLength;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9343 v5->uCurrentActionTime += pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9344 if ( (signed int)v5->uCurrentActionTime < v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9345 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9346 v13 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9347 LABEL_19:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9348 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9349 goto LABEL_20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9350 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9351 v6 = (signed __int16)v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9352 if ( (signed __int16)v6 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9353 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9354 v3 = 0;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9355 v5->uAIState = Dead;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9356 v5->uCurrentActionTime = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9357 v5->uCurrentActionLength = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9358 v5->UpdateAnimation();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9359 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9360 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9361 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9362 if ( v6 != 8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9363 goto LABEL_19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9364 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9365 Actor::_403F58(v2->uPackedID >> 3, dword_4F6E08[v2->uPackedID >> 3], 32, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9366 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9367 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9368 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9369 LABEL_20:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9370 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9371 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9372 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9373 while ( v4 < v1->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9374 if ( v13 != v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9375 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9376 v1->field_18 |= 1u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9377 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9378 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9379 LABEL_27:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9380 v1->field_18 &= 0xFFFFFFFEu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9381 v8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9382 if ( v1->uActorQueueSize > v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9383 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9384 v9 = v1->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9385 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9386 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9387 if ( (v9->uPackedID & 7) != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9388 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9389 v10 = v9->uPackedID >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9390 v11 = pActors[v10].uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9391 if ( v11 != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9392 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9393 if ( v11 != 4 && v11 != 11 && v11 != 19 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9394 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9395 if ( v11 != 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9396 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9397 v12 = dword_4F6E08[v10];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9398 v9->uActionLength = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9399 Actor::_403F58(v10, v12, 32, (AIDirection *)v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9400 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9401 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9402 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9403 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9404 ++v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9405 ++v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9406 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9407 while ( v8 < v1->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9408 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9409 v1->field_4 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9410 pParty->uTimePlayed += __PAIR__(v3, 213);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9411 _494035_timed_effects__water_walking_damage__etc();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9412 v1->uActionPointsLeft = 130;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9413 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9414
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9415 //----- (004063A1) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9416 int stru262_TurnBased::_4063A1()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9417 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9418 stru262_TurnBased *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9419 int v2; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9420 signed int result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9421 int v4; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9422 int v5; // edx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9423 int v6; // edi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9424 int v7; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9425 Actor *v8; // ecx@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9426 unsigned __int16 v9; // dx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9427 int v10; // edi@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9428 int v11; // edx@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9429 char v12; // zf@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9430
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9431 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9432 _404544();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9433 v2 = (int)&v1->pQueue[0].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9434 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9435 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9436 v4 = v1->pQueue[0].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9437 if ( v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9438 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9439 if ( (v1->pQueue[0].uPackedID & 7) == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9440 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9441 v5 = v1->uActorQueueSize;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9442 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9443 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9444 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9445 if ( v5 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9446 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9447 v7 = (int)&v1->pQueue[0].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9448 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9449 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9450 --*(int *)v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9451 v5 = v1->uActorQueueSize;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9452 ++v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9453 v7 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9454 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9455 while ( v6 < v5 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9456 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9457 --v1->field_10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9458 if ( v1->field_10 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9459 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9460 if ( !*(int *)v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9461 goto LABEL_9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9462 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9463 LABEL_24:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9464 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9465 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9466 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9467 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9468 v8 = &pActors[v1->pQueue[0].uPackedID >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9469 if ( v4 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9470 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9471 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9472 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9473 v9 = v8->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9474 if ( v9 == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9475 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9476 if ( v9 == 4 || v9 == 19 || v9 == 11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9477 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9478 v10 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9479 if ( v1->uActorQueueSize > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9480 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9481 v11 = (int)&v1->pQueue[0].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9482 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9483 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9484 v12 = (*(int *)v11)-- == 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9485 if ( v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9486 *(int *)(v11 + 4) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9487 ++v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9488 v11 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9489 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9490 while ( v10 < v1->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9491 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9492 --v1->field_10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9493 if ( v1->field_10 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9494 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9495 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9496 while ( *(int *)v2 > 0 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9497 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9498 LABEL_9:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9499 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9500 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9501 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9502 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9503 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9504
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9505 //----- (00406457) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9506 int stru262_TurnBased::_406457(int a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9507 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9508 stru262_TurnBased *v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9509 signed int v3; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9510 signed int v4; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9511 char *v5; // edx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9512 signed int v6; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9513 int result; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9514 int v8; // edx@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9515 int v9; // ecx@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9516 char v10; // zf@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9517
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9518 v2 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9519 v3 = *(&this->field_0 + 4 * (a2 + 2));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9520 if ( (*((char *)&this->field_0 + 16 * (a2 + 2)) & 7) == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9521 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9522 v4 = v3 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9523 v5 = (char *)&pParty->pTurnBasedPlayerRecoveryTimes[v3 >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9524 v6 = *(int *)v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9525 if ( *(int *)v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9526 *(int *)v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9527 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9528 v6 = pPlayers[v4 + 1]->GetAttackRecoveryTime(0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9529 if ( v6 < 30 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9530 v6 = 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9531 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9532 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9533 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9534 v6 = pMonsterStats->pInfos[pActors[v3 >> 3].pMonsterInfo.uID].uRecoveryTime;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9535 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9536 v2->pQueue[a2].field_4 = v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9537 v2->_404544();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9538 if ( (v2->pQueue[0].uPackedID & 7) == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9539 uActiveCharacter = (v2->pQueue[0].uPackedID >> 3) + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9540 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9541 uActiveCharacter = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9542 result = (int)&v2->pQueue[0].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9543 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9544 while ( *(int *)result > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9545 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9546 if ( v2->field_10 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9547 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9548 v8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9549 if ( v2->uActorQueueSize > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9550 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9551 v9 = (int)&v2->pQueue[0].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9552 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9553 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9554 v10 = (*(int *)v9)-- == 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9555 if ( v10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9556 *(int *)(v9 + 4) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9557 ++v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9558 v9 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9559 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9560 while ( v8 < v2->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9561 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9562 --v2->field_10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9563 if ( v2->field_10 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9564 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9565 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9566 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9567 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9568
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9569 //----- (0040652A) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9570 void stru262_TurnBased::_40652A()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9571 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9572 char *v1; // edx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9573 Actor *v2; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9574 unsigned __int16 v3; // si@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9575 unsigned int v4; // esi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9576 int v5; // [sp+Ch] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9577
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9578 v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9579 if ( this->uActorQueueSize > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9580 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9581 v1 = (char *)&this->pQueue[0].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9582 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9583 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9584 if ( !*(int *)v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9585 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9586 if ( (*(v1 - 4) & 7) == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9587 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9588 v2 = &pActors[*((int *)v1 - 1) >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9589 v3 = v2->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9590 if ( !v3 || v3 == 9 || v3 == 7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9591 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9592 v4 = pMonsterStats->pInfos[v2->pMonsterInfo.uID].uRecoveryTime;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9593 *(int *)v1 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9594 if ( (signed __int64)v2->pActorBuffs[7].uExpireTime > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9595 *(int *)v1 = 2 * v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9596 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9597 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9598 ++v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9599 v1 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9600 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9601 while ( v5 < this->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9602 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9603 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9604
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9605 //----- (004065B0) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9606 __int16 stru262_TurnBased::_4065B0()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9607 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9608 stru262_TurnBased *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9609 signed int v2; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9610 int v3; // ebx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9611 int v4; // edi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9612 unsigned int v5; // edi@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9613
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9614 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9615 LOWORD(v2) = _404544();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9616 if ( v1->pQueue[0].field_4 <= 0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9617 || ((_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
9618 viewparams->bRedrawGameUI = 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9619 v1->pQueue[0].field_4 <= 0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9620 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9621 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9622 if ( v1->uActorQueueSize > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9623 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9624 v4 = (int)v1->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9625 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9626 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9627 v2 = *(int *)v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9628 if ( (*(char *)v4 & 7) == 4 || *(int *)(v4 + 4) > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9629 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9630 if ( *(int *)(v4 + 8) <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9631 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9632 LOWORD(v2) = v2 & 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9633 if ( (char)v2 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9634 LOWORD(v2) = v1->_40680F(v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9635 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9636 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9637 v4 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9638 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9639 while ( v3 < v1->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9640 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9641 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9642 v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9643 if ( v1->uActorQueueSize > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9644 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9645 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9646 LOWORD(v2) = v1->_406648(v5++);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9647 while ( (signed int)v5 < v1->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9648 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9649 return v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9650 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9651
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9652 //----- (00406648) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9653 __int16 stru262_TurnBased::_406648(unsigned int a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9654 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9655 TurnBased_QueueElem *v1; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9656 int v3; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9657 unsigned int v4; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9658 Actor *v5; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9659 signed int v6; // edi@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9660 int v7; // ecx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9661 int v8; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9662 int v9; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9663 int v10; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9664 int v11; // eax@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9665 int v12; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9666 int v13; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9667 int v14; // eax@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9668 unsigned int v15; // ecx@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9669 unsigned int v16; // edx@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9670 int v17; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9671 int v18; // eax@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9672 char v19; // al@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9673 unsigned int v21; // [sp-8h] [bp-50h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9674 int v22; // [sp-8h] [bp-50h]@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9675 AIDirection *v23; // [sp-4h] [bp-4Ch]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9676 unsigned int v24; // [sp-4h] [bp-4Ch]@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9677 char v25; // [sp-4h] [bp-4Ch]@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9678 AIDirection a3; // [sp+Ch] [bp-3Ch]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9679 AIDirection a4; // [sp+28h] [bp-20h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9680 TurnBased_QueueElem *v28; // [sp+44h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9681 unsigned int a2a; // [sp+50h] [bp+8h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9682
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9683 v1 = (TurnBased_QueueElem *)((char *)this + 16 * (a2 + 2));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9684 v28 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9685 v3 = v1->uPackedID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9686 if ( (v1->uPackedID & 7) != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9687 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9688 v4 = v3 >> 3; // turn based only stuff
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9689 a2a = dword_4F6E08[v3 >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9690 memcpy(&a3, Actor::GetDirectionInfo(v1->uPackedID, dword_4F6E08[v3 >> 3], &a3, 0), sizeof(a3));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9691 memcpy(&a4, &a3, sizeof(a4));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9692 v5 = &pActors[v3 >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9693 LOWORD(v3) = v5->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9694 if ( (short)v3 != Dead )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9695 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9696 if ( (short)v3 != Disabled )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9697 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9698 if ( (short)v3 != Removed )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9699 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9700 v6 = v5->uCurrentActionLength;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9701 v5->uCurrentActionTime += pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9702 if ( (signed int)v5->uCurrentActionTime >= v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9703 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9704 v7 = (signed __int16)v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9705 v8 = (signed __int16)v3 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9706 if ( !v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9707 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9708 v19 = stru_50C198.special_ability_use_check(&pActors[v4], v4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9709 stru_50FE08.Add(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9710 v28->uPackedID,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9711 5120,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9712 v5->vPosition.x,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9713 v5->vPosition.y,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9714 v5->vPosition.z + ((signed int)v5->uActorHeight >> 1),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9715 v19,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9716 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9717 goto LABEL_25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9718 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9719 v9 = v8 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9720 if ( v9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9721 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9722 v10 = v9 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9723 if ( !v10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9724 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9725 v11 = v10 - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9726 if ( !v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9727 goto LABEL_25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9728 v12 = v11 - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9729 if ( v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9730 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9731 v13 = v12 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9732 if ( v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9733 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9734 if ( v13 != Dead )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9735 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9736 if ( v7 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9737 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9738 v14 = rand();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9739 v15 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9740 v23 = &a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9741 v16 = a2a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9742 if ( !(v14 % 2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9743 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9744 LOWORD(v3) = Actor::_402F87(v4, a2a, &a4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9745 return v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9746 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9747 v21 = 64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9748 LABEL_26:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9749 LOWORD(v3) = Actor::_403EB6(v15, v16, v21, v23);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9750 return v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9751 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9752 LABEL_21:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9753 v5->uCurrentActionTime = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9754 v5->uCurrentActionLength = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9755 v5->uAIState = Dead;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9756 return pActors[v4].UpdateAnimation();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9757 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9758 v24 = v5->pMonsterInfo.uSpellSkillAndMastery2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9759 v22 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9760 v17 = v5->pMonsterInfo.uSpell2ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9761 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9762 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9763 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9764 v24 = v5->pMonsterInfo.uSpellSkillAndMastery1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9765 v22 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9766 v17 = v5->pMonsterInfo.uSpell1ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9767 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9768 Actor::_404AC7(v4, &a4, v17, v22, v24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9769 LABEL_25:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9770 v16 = a2a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9771 v23 = &a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9772 v21 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9773 v15 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9774 goto LABEL_26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9775 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9776 v18 = v5->pMonsterInfo.uMissleAttack2Type;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9777 v25 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9778 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9779 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9780 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9781 v18 = v5->pMonsterInfo.uMissleAttack1Type;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9782 v25 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9783 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9784 Actor::_404874(v4, &a4, v18, v25);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9785 goto LABEL_25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9786 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9787 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9788 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9789 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9790 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9791 return v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9792 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9793 // 50FE08: using guessed type stru298 stru_50FE08;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9794
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9795 //----- (0040680F) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9796 __int16 stru262_TurnBased::_40680F(int a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9797 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9798 TurnBased_QueueElem *v2; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9799 TurnBased_QueueElem *v3; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9800 TurnBased_QueueElem *v4; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9801 Actor *v5; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9802 unsigned int *v6; // esi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9803 AIDirection *v7; // esi@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9804 int v8; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9805 unsigned int v9; // ecx@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9806 signed int v10; // eax@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9807 unsigned __int8 v11; // sf@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9808 unsigned __int8 v12; // of@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9809 int v13; // esi@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9810 bool v14; // eax@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9811 unsigned __int8 v15; // cl@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9812 AIDirection a3; // [sp+Ch] [bp-44h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9813 AIDirection v18; // [sp+28h] [bp-28h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9814 int a2a; // [sp+44h] [bp-Ch]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9815 unsigned int v20; // [sp+48h] [bp-8h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9816 TurnBased_QueueElem *v21; // [sp+4Ch] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9817 signed int v22; // [sp+58h] [bp+8h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9818
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9819 v2 = (TurnBased_QueueElem *)((char *)this + 16 * (a2 + 2));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9820 v21 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9821 v2->uActionLength = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9822 v3 = (TurnBased_QueueElem *)v2->uPackedID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9823 if ( (unsigned __int8)v3 & 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9824 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9825 v3 = (TurnBased_QueueElem *)((signed int)v3 >> 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9826 v4 = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9827 a2a = (int)v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9828 v5 = &pActors[(int)v3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9829 LOWORD(v3) = v5->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9830 if ( (short)v3 != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9831 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9832 if ( (short)v3 != 4 && (short)v3 != 11 && (short)v3 != 19 && (short)v3 != 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9833 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9834 v6 = (unsigned int *)&dword_4F6E08[(int)v4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9835 Actor::_401221((unsigned int)v4, &dword_4F6E08[(int)v4], 1u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9836 if ( v5->pMonsterInfo.uHostilityType && !*v6 )
29
e62134245ab0 On BLV loading.
Nomad
parents: 27
diff changeset
9837 v5->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Friendly;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9838 v22 = *v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9839 v7 = Actor::GetDirectionInfo(8 * (int)v4 | 3, *v6, &a3, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9840 v8 = v5->uActorRadius;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9841 memcpy(&a3, v7, sizeof(a3));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9842 memcpy(&v18, &a3, sizeof(v18));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9843 v9 = a3.uDistance - v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9844 v20 = a3.uDistance - v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9845 if ( ((a3.uDistance - v8) & 0x80000000u) != 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9846 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9847 v9 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9848 v20 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9849 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9850 if ( (v22 & 7) == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9851 v10 = (unsigned __int8)*(&byte_5C8D1A[89
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9852 * (pMonsterStats->pInfos[pActors[v22 >> 3].pMonsterInfo.uID].uID - 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9853 / 3]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9854 + (v5->pMonsterInfo.uID - 1) / 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9855 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9856 v10 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9857 if ( v10 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9858 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9859 if ( (double)(signed int)v20 < 307.2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9860 goto LABEL_25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9861 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9862 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9863 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9864 if ( v10 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9865 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9866 v12 = __OFSUB__(v9, 1024);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9867 v11 = ((v9 - 1024) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9868 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9869 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9870 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9871 if ( v10 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9872 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9873 v12 = __OFSUB__(v9, 2560);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9874 v11 = ((v9 - 2560) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9875 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9876 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9877 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9878 if ( v10 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9879 goto LABEL_26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9880 v12 = __OFSUB__(v9, 5120);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9881 v11 = ((v9 - 5120) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9882 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9883 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9884 if ( v11 ^ v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9885 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9886 LABEL_25:
29
e62134245ab0 On BLV loading.
Nomad
parents: 27
diff changeset
9887 v5->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Long;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9888 goto LABEL_26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9889 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9890 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9891 LABEL_26:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9892 if ( v5->pMonsterInfo.uHostilityType != 4 || !v22 || (signed int)v9 >= 5120 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9893 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9894 v13 = a2a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9895 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9896 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9897 v13 = a2a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9898 v14 = stru_50C198.special_ability_use_check(v5, a2a);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9899 if ( v14 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9900 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9901 if ( v5->pMonsterInfo.uMissleAttack2Type )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9902 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9903 Actor::_40368B(v13, v22, &v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9904 goto LABEL_43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9905 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9906 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9907 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9908 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9909 if ( v14 > 1 && v14 <= 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9910 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9911 if ( v14 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9912 v15 = v5->pMonsterInfo.uSpell1ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9913 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9914 v15 = v5->pMonsterInfo.uSpell2ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9915 if ( v15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9916 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9917 if ( v14 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9918 Actor::_403854(v13, v22, &v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9919 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9920 Actor::_403A60(v13, v22, &v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9921 goto LABEL_43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9922 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9923 goto LABEL_44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9924 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9925 if ( v5->pMonsterInfo.uMissleAttack1Type )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9926 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9927 Actor::_403476(v13, v22, &v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9928 LABEL_43:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9929 v3 = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9930 v21->field_C = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9931 LABEL_48:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9932 v3->uActionLength = v5->uCurrentActionLength;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9933 return (signed __int16)v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9934 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9935 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9936 LABEL_44:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9937 if ( (double)(signed int)v20 < 307.2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9938 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9939 Actor::_403C6C(v13, v22, &v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9940 v3 = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9941 v21->field_C = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9942 goto LABEL_48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9943 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9944 LABEL_47:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9945 Actor::_403EB6(v13, v22, 0x40u, &v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9946 v3 = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9947 v21->field_C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9948 goto LABEL_48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9949 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9950 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9951 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9952 return (signed __int16)v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9953 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9954
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9955 //----- (00406A63) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9956 void stru262_TurnBased::_406A63()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9957 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9958 stru262_TurnBased *v1; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9959 int v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9960 unsigned __int8 v3; // zf@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9961 unsigned __int8 v4; // sf@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9962 signed int v5; // ecx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9963 AIDirection a3; // [sp+8h] [bp-44h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9964 AIDirection v7; // [sp+24h] [bp-28h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9965 unsigned int v8; // [sp+40h] [bp-Ch]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9966 signed int a2; // [sp+44h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9967 TurnBased_QueueElem *v10; // [sp+48h] [bp-4h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9968
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9969 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9970 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9971 this->field_8 = 64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9972 dword_50C994 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9973 uActiveCharacter = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9974 v3 = this->uActorQueueSize == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9975 v4 = this->uActorQueueSize < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9976 a2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9977 if ( !(v4 | v3) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9978 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9979 v10 = this->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9980 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9981 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9982 v5 = v10->uPackedID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9983 if ( (v10->uPackedID & 7) == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9984 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9985 v8 = dword_4F6E08[v5 >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9986 memcpy(&v7, Actor::GetDirectionInfo(v5, v8, &a3, v2), sizeof(v7));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9987 if ( !v1->_406D10(a2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9988 Actor::_403EB6(v10->uPackedID >> 3, v8, 0x20u, &v7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9989 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9990 ++a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9991 ++v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9992 if ( a2 >= v1->uActorQueueSize )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9993 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9994 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9995 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9996 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9997 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9998 // 50C994: using guessed type int dword_50C994;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9999
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10000 //----- (00406AFE) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10001 void stru262_TurnBased::_406AFE()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10002 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10003 stru262_TurnBased *v1; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10004 TurnBased_QueueElem *v2; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10005 int v3; // esi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10006 int v4; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10007 AIDirection a3; // [sp+4h] [bp-48h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10008 AIDirection v6; // [sp+20h] [bp-2Ch]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10009 stru262_TurnBased *v7; // [sp+3Ch] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10010 unsigned int v8; // [sp+40h] [bp-Ch]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10011 unsigned int v9; // [sp+44h] [bp-8h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10012 int v10; // [sp+48h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10013
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10014 v10 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10015 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10016 v7 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10017 if ( this->uActorQueueSize > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10018 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10019 v2 = this->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10020 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10021 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10022 if ( (v2->uPackedID & 7) == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10023 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10024 v3 = v2->uPackedID >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10025 v8 = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10026 if ( pActors[v3].CanAct() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10027 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10028 v4 = v2->uPackedID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10029 v9 = dword_4F6E08[v3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10030 memcpy(&v6, Actor::GetDirectionInfo(v4, v9, &a3, 0), sizeof(v6));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10031 Actor::_403EB6(v8, v9, 0x20u, &v6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10032 v2->field_C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10033 v2->uActionLength = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10034 v1 = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10035 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10036 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10037 ++v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10038 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10039 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10040 while ( v10 < v1->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10041 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10042 v1->field_4 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10043 v1->field_8 = 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10044 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10045
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10046 //----- (00406B9F) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10047 int stru262_TurnBased::_406B9F()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10048 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10049 signed int result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10050 unsigned __int8 v2; // zf@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10051 unsigned __int8 v3; // sf@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10052 int v4; // esi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10053 unsigned int v5; // esi@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10054 Actor *v6; // ebx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10055 unsigned __int16 v7; // cx@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10056 AIDirection a3; // [sp+0h] [bp-50h]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10057 AIDirection v9; // [sp+1Ch] [bp-34h]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10058 signed int a1; // [sp+38h] [bp-18h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10059 stru262_TurnBased *thisa; // [sp+3Ch] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10060 unsigned int v12; // [sp+40h] [bp-10h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10061 unsigned int v13; // [sp+44h] [bp-Ch]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10062 TurnBased_QueueElem *v14; // [sp+48h] [bp-8h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10063 signed int a2; // [sp+4Ch] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10064
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10065 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10066 thisa = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10067 v2 = this->uActorQueueSize == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10068 v3 = this->uActorQueueSize < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10069 a2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10070 if ( !(v3 | v2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10071 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10072 v14 = this->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10073 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10074 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10075 v4 = v14->uPackedID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10076 a1 = v14->uPackedID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10077 if ( (a1 & 7) != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10078 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10079 v5 = v4 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10080 v12 = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10081 v6 = &pActors[v5];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10082 if ( SHIDWORD(v6->pActorBuffs[5].uExpireTime) < result
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10083 || SHIDWORD(v6->pActorBuffs[5].uExpireTime) <= result && LODWORD(v6->pActorBuffs[5].uExpireTime) <= result )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10084 v13 = result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10085 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10086 v13 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10087 if ( SHIDWORD(v6->pActorBuffs[6].uExpireTime) >= result
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10088 && (SHIDWORD(v6->pActorBuffs[6].uExpireTime) > result || LODWORD(v6->pActorBuffs[6].uExpireTime) > result) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10089 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10090 if ( !(v13 | result | v6->uAIState == 5 | v6->uAIState == 11 | v6->uAIState == 19) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10091 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10092 v13 = dword_4F6E08[v5];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10093 memcpy(&v9, Actor::GetDirectionInfo(a1, v13, &a3, 0), sizeof(v9));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10094 v7 = v6->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10095 if ( v7 == 6 || v7 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10096 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10097 if ( (double)(signed int)v9.uDistance < 307.2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10098 goto LABEL_26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10099 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10100 v6->uCurrentActionTime += pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10101 if ( (signed int)v6->uCurrentActionTime > v6->uCurrentActionLength )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10102 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10103 if ( v7 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10104 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10105 v6->uCurrentActionTime = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10106 v6->uCurrentActionLength = 0;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
10107 v6->uAIState = Dead;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10108 v6->UpdateAnimation();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10109 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10110 if ( !thisa->_406D10(a2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10111 LABEL_26:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10112 Actor::_403EB6(v12, v13, 0x20u, &v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10113 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10114 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10115 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10116 ++a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10117 result = (signed int)thisa;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10118 ++v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10119 if ( a2 >= thisa->uActorQueueSize )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10120 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10121 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10122 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10123 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10124 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10125 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10126
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10127 //----- (00406D10) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10128 bool stru262_TurnBased::_406D10(signed int a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10129 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10130 int v2; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10131 int v3; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10132 Actor *v4; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10133 unsigned __int16 v5; // dx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10134 int *v6; // esi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10135 TurnBased_QueueElem *v7; // edi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10136 int v8; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10137 AIDirection *v9; // esi@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10138 int v10; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10139 unsigned int v11; // ecx@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10140 unsigned __int8 v12; // al@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10141 unsigned __int8 v13; // sf@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10142 unsigned __int8 v14; // of@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10143 unsigned int v15; // edx@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10144 unsigned int v16; // ecx@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10145 TurnBased_QueueElem *v17; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10146 double v18; // st7@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10147 double v19; // st6@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10148 int v21; // [sp-8h] [bp-5Ch]@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10149 int v22; // [sp-8h] [bp-5Ch]@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10150 AIDirection *v23; // [sp-4h] [bp-58h]@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10151 int v24; // [sp-4h] [bp-58h]@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10152 AIDirection a3; // [sp+Ch] [bp-48h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10153 AIDirection pDir; // [sp+28h] [bp-2Ch]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10154 int v27; // [sp+44h] [bp-10h]@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10155 unsigned int v28; // [sp+48h] [bp-Ch]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10156 TurnBased_QueueElem *v29; // [sp+4Ch] [bp-8h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10157 unsigned int uActorID; // [sp+50h] [bp-4h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10158 unsigned int a2a; // [sp+5Ch] [bp+8h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10159
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10160 v2 = *(&this->field_0 + 4 * (a2 + 2));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10161 if ( (v2 & 7) == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10162 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10163 v3 = v2 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10164 uActorID = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10165 v4 = &pActors[v3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10166 v5 = v4->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10167 if ( v5 == 5 || v5 == 4 || v5 == 11 || v5 == 19 || v5 == 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10168 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10169 v6 = &dword_4F6E08[v3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10170 v7 = &pTurnEngine->pQueue[a2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10171 v8 = *v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10172 v29 = &pTurnEngine->pQueue[a2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10173 a2a = v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10174 Actor::_401221(v3, &dword_4F6E08[v3], 1u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10175 if ( v4->pMonsterInfo.uHostilityType && !*v6 )
29
e62134245ab0 On BLV loading.
Nomad
parents: 27
diff changeset
10176 v4->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Friendly;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10177 v9 = Actor::GetDirectionInfo(v7->uPackedID, a2a, &a3, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10178 v10 = v4->uActorRadius;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10179 memcpy(&a3, v9, sizeof(a3));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10180 memcpy(&pDir, &a3, sizeof(pDir));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10181 v11 = a3.uDistance - v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10182 v28 = a3.uDistance - v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10183 if ( ((a3.uDistance - v10) & 0x80000000u) != 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10184 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10185 v11 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10186 v28 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10187 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10188 v12 = v4->pMonsterInfo.uHostilityType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10189 if ( v12 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10190 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10191 if ( (double)(signed int)v28 >= 307.2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10192 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10193 LABEL_20:
29
e62134245ab0 On BLV loading.
Nomad
parents: 27
diff changeset
10194 v4->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Long;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10195 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10196 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10197 if ( v12 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10198 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10199 v14 = __OFSUB__(v11, 1024);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10200 v13 = ((v11 - 1024) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10201 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10202 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10203 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10204 if ( v12 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10205 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10206 v14 = __OFSUB__(v11, 2560);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10207 v13 = ((v11 - 2560) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10208 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10209 if ( v13 ^ v14 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10210 goto LABEL_20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10211 LABEL_21:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10212 if ( (signed __int64)v4->pActorBuffs[4].uExpireTime > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10213 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10214 v15 = a2a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10215 if ( (signed int)v11 < 10240 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10216 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10217 v23 = &pDir;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10218 v16 = uActorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10219 v21 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10220 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10221 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10222 v24 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10223 v22 = 1024;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10224 goto LABEL_58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10225 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10226 if ( v4->pMonsterInfo.uHostilityType != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10227 goto LABEL_46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10228 if ( !(v4->uAttributes & 0x020000) || v4->pMonsterInfo.uAIType == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10229 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10230 if ( v4->pMonsterInfo.uAIType == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10231 goto LABEL_36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10232 if ( v4->pMonsterInfo.uAIType == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10233 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10234 v27 = v4->sCurrentHP;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10235 v18 = (double)v27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10236 v19 = (double)(signed int)v4->pMonsterInfo.uHP * 0.2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10237 goto LABEL_34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10238 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10239 if ( v4->pMonsterInfo.uAIType == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10240 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10241 v27 = v4->sCurrentHP;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10242 v18 = (double)v27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10243 v19 = (double)(signed int)v4->pMonsterInfo.uHP * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10244 LABEL_34:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10245 if ( v19 > v18 && (signed int)v11 < 10240 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10246 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10247 LABEL_36:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10248 v16 = uActorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10249 v15 = a2a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10250 v23 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10251 v21 = 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10252 if ( v4->pMonsterInfo.uMovementType == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10253 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10254 Actor::_403EB6(uActorID, a2a, 0x20u, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10255 goto LABEL_25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10256 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10257 LABEL_24:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10258 Actor::_402968(v16, v15, v21, v23);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10259 LABEL_25:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10260 v17 = v29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10261 v29->field_C = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10262 LABEL_60:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10263 v17->uActionLength = v4->uCurrentActionLength;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10264 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10265 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10266 goto LABEL_39;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10267 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10268 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10269 LABEL_39:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10270 if ( (double)(signed int)v28 < 307.2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10271 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10272 if ( (signed int)v11 < 5120 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10273 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10274 if ( v4->pMonsterInfo.uMissleAttack1Type && (signed int)v11 < 1024 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10275 Actor::_402AD7(uActorID, a2a, uActorID, 32, &pDir);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10276 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10277 Actor::_40281C(uActorID, a2a, 32, &pDir, 307);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10278 goto LABEL_59;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10279 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10280 LABEL_46:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10281 if ( !v4->pMonsterInfo.uMovementType )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10282 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10283 v24 = 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10284 v22 = 1024;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10285 goto LABEL_57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10286 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10287 if ( v4->pMonsterInfo.uMovementType == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10288 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10289 v24 = 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10290 v22 = 2560;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10291 goto LABEL_57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10292 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10293 if ( v4->pMonsterInfo.uMovementType == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10294 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10295 v24 = 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10296 v22 = 5120;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10297 LABEL_57:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10298 v15 = a2a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10299 LABEL_58:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10300 Actor::_4032B2(uActorID, v15, v22, v24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10301 LABEL_59:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10302 v17 = v29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10303 v29->field_C = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10304 goto LABEL_60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10305 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10306 if ( v4->pMonsterInfo.uMovementType == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10307 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10308 Actor::_4032B2(uActorID, a2a, 10240, 32);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10309 goto LABEL_53;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10310 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10311 if ( v4->pMonsterInfo.uMovementType == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10312 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10313 Actor::_403EB6(uActorID, a2a, 0x20u, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10314 LABEL_53:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10315 v17 = v29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10316 v29->field_C = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10317 goto LABEL_60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10318 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10319 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10320 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10321
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10322 //----- (00406FA8) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10323 void stru262_TurnBased::_406FA8()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10324 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10325 unsigned __int8 v1; // zf@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10326 unsigned __int8 v2; // sf@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10327 TurnBased_QueueElem *v3; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10328 int v4; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10329 Actor *v5; // ebx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10330 unsigned __int16 v6; // cx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10331 unsigned int *v7; // edx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10332 unsigned int v8; // esi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10333 unsigned __int8 v9; // of@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10334 AIDirection a3; // [sp+Ch] [bp-6Ch]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10335 AIDirection v11; // [sp+28h] [bp-50h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10336 AIDirection a4; // [sp+44h] [bp-34h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10337 stru262_TurnBased *v13; // [sp+60h] [bp-18h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10338 TurnBased_QueueElem *v14; // [sp+64h] [bp-14h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10339 int uActorID; // [sp+68h] [bp-10h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10340 unsigned int a2; // [sp+6Ch] [bp-Ch]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10341 int v17; // [sp+70h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10342 unsigned int v18; // [sp+74h] [bp-4h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10343
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10344 v17 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10345 v1 = this->uActorQueueSize == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10346 v2 = this->uActorQueueSize < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10347 v13 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10348 if ( !(v2 | v1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10349 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10350 v3 = this->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10351 v18 = (char *)&pTurnEngine - (char *)this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10352 v14 = this->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10353 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10354 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10355 if ( (v3->uPackedID & 7) != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10356 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10357 v4 = v3->uPackedID >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10358 uActorID = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10359 v5 = &pActors[v4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10360 v6 = v5->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10361 if ( v6 != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10362 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10363 if ( v6 != 11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10364 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10365 if ( v6 != 19 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10366 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10367 if ( v6 != 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10368 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10369 v7 = (unsigned int *)&dword_4F6E08[v4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10370 a2 = *v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10371 v8 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10372 Actor::_401221(v4, (int *)v7, 1u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10373 memcpy(&v11, Actor::GetDirectionInfo(*(int *)((char *)&v3->uPackedID + v18), v8, &a3, 0), sizeof(v11));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10374 memcpy(&a4, &v11, sizeof(a4));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10375 v5->uCurrentActionTime += pMiscTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10376 if ( (signed int)v5->uCurrentActionTime >= v5->uCurrentActionLength )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10377 {
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
10378 if (v5->uAIState == Dying)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10379 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10380 v5->uCurrentActionTime = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10381 v5->uCurrentActionLength = 0;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
10382 v5->uAIState = Dead;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10383 v5->UpdateAnimation();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10384 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10385 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10386 if ( rand() % 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10387 Actor::_403EB6(uActorID, a2, 0x40u, &a4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10388 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10389 Actor::_402F87(uActorID, a2, &a4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10390 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10391 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10392 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10393 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10394 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10395 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10396 ++v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10397 v3 = v14 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10398 v9 = __OFSUB__(v17, v13->uActorQueueSize);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10399 v2 = v17 - v13->uActorQueueSize < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10400 ++v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10401 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10402 while ( v2 ^ v9 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10403 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10404 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10405
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10406 //----- (004070EF) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10407 bool __fastcall sub_4070EF_prolly_collide_objects(unsigned int uObjID, unsigned int uObj2ID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10408 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10409 signed int v2; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10410 unsigned int v3; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10411 signed int v4; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10412 int v5; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10413 signed int v6; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10414 int v7; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10415 float v8; // ST24_4@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10416 double v9; // ST18_8@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10417 signed int v10; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10418 int v11; // ecx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10419 signed int v12; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10420 int v13; // esi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10421 int v14; // esi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10422 int v15; // esi@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10423 signed int v16; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10424 int v17; // edi@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10425 int v18; // esi@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10426 int v19; // eax@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10427 float v20; // ST24_4@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10428 double v21; // ST18_8@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10429 signed int v22; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10430 int v23; // ebx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10431 signed int v24; // ecx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10432 int v25; // eax@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10433 int v26; // eax@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10434 BLVSector *v27; // edx@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10435 int v28; // ecx@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10436 BLVFace *v29; // ebx@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10437 Vec3_short_ *v30; // esi@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10438 int v31; // eax@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10439 int v32; // ST50_4@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10440 int v33; // ST54_4@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10441 int v34; // eax@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10442 char v35; // zf@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10443 int v36; // edi@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10444 int v37; // eax@45
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10445 signed int v38; // esi@45
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10446 int v39; // ST4C_4@49
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10447 signed __int64 v40; // qtt@50
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10448 __int16 v42; // bx@58
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10449 int v43; // [sp-8h] [bp-70h]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10450 int v44; // [sp-4h] [bp-6Ch]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10451 int v45; // [sp+Ch] [bp-5Ch]@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10452 __int16 v46; // [sp+10h] [bp-58h]@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10453 int v47; // [sp+18h] [bp-50h]@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10454 int v48; // [sp+1Ch] [bp-4Ch]@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10455 int v49; // [sp+20h] [bp-48h]@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10456 int v50; // [sp+24h] [bp-44h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10457 signed int v51; // [sp+24h] [bp-44h]@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10458 signed int v52; // [sp+28h] [bp-40h]@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10459 signed int v53; // [sp+2Ch] [bp-3Ch]@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10460 signed int v54; // [sp+30h] [bp-38h]@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10461 signed int v55; // [sp+34h] [bp-34h]@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10462 signed int v56; // [sp+38h] [bp-30h]@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10463 signed int v57; // [sp+3Ch] [bp-2Ch]@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10464 int v58; // [sp+44h] [bp-24h]@50
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10465 int v59; // [sp+48h] [bp-20h]@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10466 int v60; // [sp+50h] [bp-18h]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10467 signed int v61; // [sp+50h] [bp-18h]@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10468 int v62; // [sp+54h] [bp-14h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10469 int v63; // [sp+58h] [bp-10h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10470 int v64; // [sp+5Ch] [bp-Ch]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10471 int v65; // [sp+60h] [bp-8h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10472 int v66; // [sp+64h] [bp-4h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10473
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10474 v2 = (signed int)uObjID >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10475 v3 = (uObjID & 7) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10476 v4 = uObj2ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10477 if ( v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10478 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10479 v5 = v3 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10480 if ( v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10481 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10482 if ( v5 != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10483 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10484 v6 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10485 v63 = pLevelDecorations[v6].vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10486 v64 = pLevelDecorations[v6].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10487 v65 = pLevelDecorations[v6].vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10488 v7 = pIndoor->GetSector(v63, v64, v65);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10489 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10490 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10491 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10492 v63 = pActors[v2].vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10493 v64 = pActors[v2].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10494 v8 = (double)pActors[v2].uActorHeight * 0.69999999;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10495 v9 = v8 + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10496 v65 = LODWORD(v9) + pActors[v2].vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10497 v7 = pActors[v2].uSectorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10498 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10499 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10500 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10501 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10502 v10 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10503 v63 = pLayingItems[v10].vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10504 v64 = pLayingItems[v10].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10505 v11 = pLayingItems[v10].vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10506 v7 = pLayingItems[v10].uSectorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10507 v65 = v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10508 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10509 v66 = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10510 v12 = v4 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10511 v13 = (v4 & 7) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10512 if ( v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10513 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10514 v14 = v13 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10515 if ( v14 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10516 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10517 v15 = v14 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10518 if ( v15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10519 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10520 if ( v15 != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10521 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10522 v16 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10523 v17 = pLevelDecorations[v16].vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10524 v18 = pLevelDecorations[v16].vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10525 v44 = pLevelDecorations[v16].vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10526 v60 = pLevelDecorations[v16].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10527 v43 = pLevelDecorations[v16].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10528 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10529 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10530 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10531 v18 = pParty->vPosition.x;
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
10532 v17 = pParty->sEyelevel + pParty->vPosition.z;
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
10533 v60 = pParty->vPosition.y;
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
10534 v44 = pParty->sEyelevel + pParty->vPosition.z;
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
10535 v43 = pParty->vPosition.y;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10536 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10537 v19 = pIndoor->GetSector(v18, v43, v44);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10538 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10539 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10540 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10541 v60 = pActors[v12].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10542 v18 = pActors[v12].vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10543 v20 = (double)pActors[v12].uActorHeight * 0.69999999;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10544 v21 = v20 + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10545 v17 = LODWORD(v21) + pActors[v12].vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10546 v19 = pActors[v12].uSectorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10547 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10548 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10549 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10550 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10551 v22 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10552 v18 = pLayingItems[v22].vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10553 v17 = pLayingItems[v22].vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10554 v60 = pLayingItems[v22].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10555 v19 = pLayingItems[v22].uSectorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10556 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10557 v62 = v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10558 v23 = v18 - v63;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10559 v50 = v17 - v65;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10560 v24 = sub_452A9E(v23 * v23 + (v60 - v64) * (v60 - v64) + v50 * v50);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10561 if ( v24 > 5120 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10562 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10563 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10564 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10565 v25 = 65536;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10566 if ( v24 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10567 v25 = 65536 / v24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10568 v49 = v23 * v25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10569 v47 = v50 * v25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10570 v48 = (v60 - v64) * v25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10571 v56 = v63;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10572 if ( v63 < v18 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10573 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10574 v55 = v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10575 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10576 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10577 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10578 v56 = v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10579 v55 = v63;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10580 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10581 v54 = v64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10582 if ( v64 < v60 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10583 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10584 v53 = v60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10585 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10586 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10587 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10588 v54 = v60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10589 v53 = v64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10590 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10591 v52 = v65;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10592 if ( v65 < v17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10593 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10594 v51 = v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10595 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10596 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10597 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10598 v52 = v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10599 v51 = v65;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10600 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10601 v57 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10602 v26 = v66;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10603 while ( 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10604 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10605 if ( v26 == v62 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10606 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10607 if ( v57 >= 30 || (v27 = pIndoor->pSectors, v28 = v66, v61 = 0, pIndoor->pSectors[v66].uNumPortals <= 0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10608 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10609 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10610 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10611 v29 = &pIndoor->pFaces[v27[v28].pPortals[v61]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10612 v30 = &pIndoor->pVertices[*v29->pVertexIDs];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10613 v45 = *(int *)&v30->x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10614 v46 = v30->z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10615 v31 = v29->pFacePlane_old.vNormal.z * (v46 - v65)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10616 + v29->pFacePlane_old.vNormal.y * (SHIWORD(v45) - v64)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10617 + v29->pFacePlane_old.vNormal.x * ((signed __int16)v45 - v63);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10618 if ( v66 != v29->uSectorID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10619 v31 = -v31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10620 if ( v31 >= 0 && (signed __int16)v45 != v63 && SHIWORD(v45) != v64 && v46 != v65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10621 || v56 > v29->pBounding.x2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10622 || v55 < v29->pBounding.x1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10623 || v54 > v29->pBounding.y2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10624 || v53 < v29->pBounding.y1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10625 || v52 > v29->pBounding.z2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10626 || v51 < v29->pBounding.z1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10627 goto LABEL_54;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10628 v32 = (unsigned __int64)(v49 * (signed __int64)v29->pFacePlane_old.vNormal.x) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10629 v33 = (unsigned __int64)(v47 * (signed __int64)v29->pFacePlane_old.vNormal.z) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10630 v34 = (unsigned __int64)(v48 * (signed __int64)v29->pFacePlane_old.vNormal.y) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10631 v35 = v32 + v33 + v34 == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10632 v36 = v32 + v33 + v34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10633 v59 = v32 + v33 + v34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10634 if ( v35 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10635 goto LABEL_53;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10636 v37 = v65 * v29->pFacePlane_old.vNormal.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10637 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
10638 if ( v36 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10639 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10640 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
10641 goto LABEL_49;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10642 LABEL_53:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10643 v27 = pIndoor->pSectors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10644 LABEL_54:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10645 ++v61;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10646 if ( v61 >= v27[v28].uNumPortals )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10647 goto LABEL_55;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10648 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10649 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
10650 goto LABEL_53;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10651 LABEL_49:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10652 v39 = abs(-(v29->pFacePlane_old.dist
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10653 + v37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10654 + v63 * v29->pFacePlane_old.vNormal.x
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10655 + v64 * v29->pFacePlane_old.vNormal.y)) >> 14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10656 if ( v39 > abs(v36)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10657 || (LODWORD(v40) = v38 << 16, HIDWORD(v40) = v38 >> 16, v58 = v40 / v59, (signed int)(v40 / v59) < 0)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10658 || !sub_4075DB(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10659 v63 + ((signed int)(((unsigned __int64)(v58 * (signed __int64)v49) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10660 v64 + ((signed int)(((unsigned __int64)(v58 * (signed __int64)v48) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10661 v65 + ((signed int)(((unsigned __int64)(v58 * (signed __int64)v47) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10662 v29) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10663 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10664 v28 = v66;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10665 goto LABEL_53;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10666 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10667 if ( v29->uSectorID == v66 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10668 v42 = v29->uBackSectorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10669 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10670 v42 = v29->uSectorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10671 v26 = v42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10672 if ( v42 != v66 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10673 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10674 ++v57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10675 v66 = v42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10676 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10677 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10678 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10679 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10680 LABEL_55:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10681 if ( v66 != v62 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10682 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10683 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10684 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10685
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10686 //----- (004075DB) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10687 bool __fastcall sub_4075DB(int a1, int a2, int a3, BLVFace *a4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10688 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10689 BLVFace *v4; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10690 unsigned int v5; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10691 signed int v6; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10692 char v7; // zf@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10693 int v8; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10694 Vec3_short_ *v9; // ecx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10695 int v10; // edx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10696 signed int v11; // esi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10697 Vec3_short_ *v12; // ecx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10698 int v13; // edx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10699 signed int v14; // esi@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10700 Vec3_short_ *v15; // ecx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10701 int v16; // edx@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10702 int v17; // eax@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10703 bool v18; // esi@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10704 int v19; // ecx@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10705 int v20; // ecx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10706 int v21; // edx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10707 int v22; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10708 signed int v23; // ebx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10709 int v24; // esi@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10710 signed int v25; // eax@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10711 signed __int64 v26; // qtt@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10712 bool result; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10713 int v28; // [sp+8h] [bp-14h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10714 int v29; // [sp+10h] [bp-Ch]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10715 signed int a3a; // [sp+24h] [bp+8h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10716 int a4a; // [sp+28h] [bp+Ch]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10717
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10718 v4 = a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10719 v5 = a4->uAttributes;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10720 if ( v5 & 0x100 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10721 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10722 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10723 v7 = a4->uNumVertices == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10724 a4a = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10725 v8 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10726 if ( !v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10727 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10728 v9 = pIndoor->pVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10729 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10730 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10731 dword_4F5D98_xs[v6] = v9[v4->pVertexIDs[v6]].x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10732 v10 = v4->pVertexIDs[v6++];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10733 dword_4F5CC4_ys[v6] = v9[v10].y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10734 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10735 while ( v6 < v4->uNumVertices );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10736 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10737 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10738 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10739 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10740 v8 = a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10741 if ( v5 & 0x200 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10742 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10743 v11 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10744 v7 = a4->uNumVertices == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10745 a4a = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10746 if ( !v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10747 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10748 v12 = pIndoor->pVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10749 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10750 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10751 dword_4F5D98_xs[v11] = v12[v4->pVertexIDs[v11]].x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10752 v13 = v4->pVertexIDs[v11++];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10753 dword_4F5CC4_ys[v11] = v12[v13].z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10754 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10755 while ( v11 < v4->uNumVertices );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10756 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10757 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10758 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10759 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10760 v14 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10761 v7 = a4->uNumVertices == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10762 a4a = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10763 if ( !v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10764 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10765 v15 = pIndoor->pVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10766 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10767 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10768 dword_4F5D98_xs[v14] = v15[v4->pVertexIDs[v14]].y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10769 v16 = v4->pVertexIDs[v14++];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10770 dword_4F5CC4_ys[v14] = v15[v16].z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10771 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10772 while ( v14 < v4->uNumVertices );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10773 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10774 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10775 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10776 v17 = v4->uNumVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10777 a3a = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10778 dword_4F5D98_xs[v17] = dword_4F5D98_xs[0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10779 dword_4F5CC4_ys[v17 + 1] = dword_4F5CC4_ys[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10780 v28 = v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10781 v18 = dword_4F5CC4_ys[1] >= v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10782 v19 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10783 v29 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10784 if ( v17 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10785 goto LABEL_29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10786 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10787 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10788 if ( a3a >= 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10789 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10790 v20 = v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10791 v21 = dword_4F5CC4_ys[v20 + 2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10792 if ( v18 ^ v21 >= v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10793 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10794 v22 = dword_4F5D98_xs[v20 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10795 if ( v22 >= a4a )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10796 v23 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10797 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10798 v23 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10799 v24 = v23 | dword_4F5D98_xs[v20] < a4a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10800 if ( v24 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10801 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10802 if ( !v24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10803 || (v25 = v22 - dword_4F5D98_xs[v20],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10804 LODWORD(v26) = v25 << 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10805 HIDWORD(v26) = v25 >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10806 dword_4F5D98_xs[v20]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10807 + ((signed int)(((unsigned __int64)(v26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10808 / (v21 - dword_4F5CC4_ys[v20 + 1])
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10809 * ((v8 - dword_4F5CC4_ys[v20 + 1]) << 16)) >> 16)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10810 + 32768) >> 16) >= a4a) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10811 ++a3a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10812 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10813 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10814 v18 = v21 >= v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10815 v19 = v29++ + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10816 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10817 while ( v29 < v28 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10818 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10819 if ( a3a != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10820 LABEL_29:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10821 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10822 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10823 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10824
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10825 //----- (004077F1) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10826 bool __fastcall sub_4077F1(int a1, int a2, int a3, ODMFace *a4, BSPVertexBuffer *a5)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10827 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10828 ODMFace *v5; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10829 unsigned int v6; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10830 signed int v7; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10831 char v8; // zf@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10832 unsigned __int16 *v9; // edx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10833 int v10; // ecx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10834 unsigned __int16 *v11; // edx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10835 int v12; // ecx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10836 int v13; // edx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10837 int v14; // ecx@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10838 int v15; // esi@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10839 bool v16; // edi@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10840 int v17; // ecx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10841 int v18; // edx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10842 int v19; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10843 signed int v20; // ebx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10844 int v21; // edi@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10845 signed int v22; // eax@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10846 signed __int64 v23; // qtt@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10847 bool result; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10848 int v25; // [sp+14h] [bp-8h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10849 int a4a; // [sp+28h] [bp+Ch]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10850 signed int a5a; // [sp+2Ch] [bp+10h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10851
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10852 v5 = a4;
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
10853 v6 = a4->uAttributes;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10854 v7 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10855 if ( v6 & 0x100 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10856 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10857 v8 = a4->uNumVertices == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10858 a4a = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10859 a3 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10860 if ( !v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10861 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10862 v9 = v5->pVertexIDs;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10863 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10864 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10865 ++v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10866 dword_4F5BF4_xs[v7] = a5->pVertices[*v9].x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10867 v10 = *v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10868 ++v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10869 dword_4F5B24_ys[v7] = a5->pVertices[v10].y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10870 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10871 while ( v7 < v5->uNumVertices );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10872 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10873 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10874 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10875 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10876 if ( v6 & 0x200 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10877 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10878 v8 = a4->uNumVertices == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10879 a4a = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10880 if ( !v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10881 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10882 v11 = v5->pVertexIDs;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10883 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10884 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10885 ++v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10886 dword_4F5BF4_xs[v7] = a5->pVertices[*v11].x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10887 v12 = *v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10888 ++v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10889 dword_4F5B24_ys[v7] = a5->pVertices[v12].z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10890 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10891 while ( v7 < v5->uNumVertices );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10892 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10893 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10894 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10895 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10896 v8 = a4->uNumVertices == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10897 a4a = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10898 if ( !v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10899 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10900 v13 = (int)v5->pVertexIDs;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10901 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10902 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10903 ++v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10904 dword_4F5BF4_xs[v7] = a5->pVertices[*(short *)v13].y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10905 v14 = *(short *)v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10906 v13 += 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10907 dword_4F5B24_ys[v7] = a5->pVertices[v14].z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10908 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10909 while ( v7 < v5->uNumVertices );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10910 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10911 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10912 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10913 v15 = v5->uNumVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10914 a5a = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10915 dword_4F5BF4_xs[v15 + 1] = dword_4F5BF4_xs[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10916 dword_4F5B24_ys[v15 + 1] = dword_4F5B24_ys[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10917 v25 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10918 v16 = dword_4F5B24_ys[1] >= a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10919 if ( v15 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10920 goto LABEL_29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10921 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10922 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10923 if ( a5a >= 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10924 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10925 v17 = v25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10926 v18 = dword_4F5B24_ys[v25 + 2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10927 if ( v16 ^ v18 >= a3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10928 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10929 v19 = dword_4F5BF4_xs[v17 + 2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10930 if ( v19 >= a4a )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10931 v20 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10932 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10933 v20 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10934 v21 = v20 | dword_4F5BF4_xs[v17 + 1] < a4a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10935 if ( v21 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10936 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10937 if ( !v21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10938 || (v22 = v19 - dword_4F5BF4_xs[v17 + 1],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10939 LODWORD(v23) = v22 << 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10940 HIDWORD(v23) = v22 >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10941 dword_4F5BF4_xs[v17 + 1]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10942 + ((signed int)(((unsigned __int64)(v23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10943 / (v18 - dword_4F5B24_ys[v17 + 1])
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10944 * ((a3 - dword_4F5B24_ys[v17 + 1]) << 16)) >> 16)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10945 + 32768) >> 16) >= a4a) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10946 ++a5a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10947 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10948 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10949 ++v25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10950 v16 = v18 >= a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10951 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10952 while ( v25 < v15 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10953 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10954 if ( a5a != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10955 LABEL_29:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10956 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10957 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10958 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10959
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10960 //----- (00407A1C) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10961 bool __fastcall sub_407A1C(int x, int z, int y, Vec3_int_ v)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10962 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10963 unsigned int v4; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10964 Vec3_int_ v5; // ST08_12@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10965 int v6; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10966 int v7; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10967 int v8; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10968 signed int v9; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10969 int v10; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10970 int v11; // ecx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10971 int v12; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10972 int v13; // ebx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10973 int v14; // edx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10974 char *v15; // edi@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10975 ODMFace *v16; // esi@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10976 int v17; // ST34_4@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10977 int v18; // ST38_4@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10978 int v19; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10979 char v20; // zf@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10980 int v21; // ebx@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10981 int v22; // eax@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10982 signed int v23; // edi@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10983 int v24; // ST34_4@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10984 signed __int64 v25; // qtt@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10985 int v26; // eax@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10986 Vec3_int_ v27; // ST08_12@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10987 Vec3_int_ v28; // ST08_12@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10988 int v29; // edi@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10989 int v30; // ebx@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10990 int v31; // esi@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10991 signed int v32; // ecx@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10992 int v33; // eax@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10993 int v34; // ecx@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10994 int v35; // eax@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10995 int v36; // ebx@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10996 int v37; // edx@41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10997 char *v38; // edi@51
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10998 ODMFace *v39; // esi@54
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10999 int v40; // ebx@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11000 int v41; // eax@61
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11001 signed int v42; // edi@61
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11002 signed __int64 v43; // qtt@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11003 int v44; // eax@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11004 Vec3_int_ v45; // ST08_12@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11005 int v46; // edi@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11006 int v47; // ebx@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11007 int v48; // esi@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11008 signed int v49; // ecx@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11009 int v50; // eax@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11010 int v51; // edx@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11011 int v52; // ecx@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11012 int v53; // eax@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11013 int v54; // ebx@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11014 int v55; // edi@77
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11015 int v56; // ecx@77
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11016 int v57; // eax@81
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11017 int v58; // esi@81
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11018 int v59; // eax@90
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11019 BLVSector *v60; // edx@90
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11020 int v61; // ecx@90
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11021 BLVFace *v62; // esi@91
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11022 int v63; // ST34_4@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11023 int v64; // ST30_4@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11024 int v65; // eax@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11025 int v66; // ebx@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11026 int v67; // eax@99
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11027 signed int v68; // edi@99
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11028 int v69; // ST2C_4@103
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11029 signed __int64 v70; // qtt@104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11030 int v71; // eax@104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11031 Vec3_int_ v72; // ST08_12@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11032 Vec3_int_ v73; // ST08_12@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11033 int v74; // edi@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11034 int v75; // ebx@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11035 int v76; // esi@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11036 signed int v77; // ecx@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11037 int v78; // eax@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11038 int v79; // edx@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11039 int v80; // ecx@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11040 int v81; // eax@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11041 int v82; // ebx@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11042 int v83; // edi@115
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11043 int v84; // ecx@115
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11044 int v85; // eax@119
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11045 int v86; // esi@119
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11046 int v87; // ecx@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11047 BLVSector *v88; // eax@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11048 int v89; // ecx@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11049 BLVFace *v90; // esi@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11050 int v91; // ebx@136
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11051 int v92; // eax@137
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11052 signed int v93; // edi@137
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11053 signed __int64 v94; // qtt@142
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11054 int v95; // eax@142
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11055 Vec3_int_ v97; // [sp-18h] [bp-94h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11056 int v98; // [sp-Ch] [bp-88h]@88
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11057 int v99; // [sp-Ch] [bp-88h]@126
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11058 int v100; // [sp-8h] [bp-84h]@88
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11059 int v101; // [sp-8h] [bp-84h]@126
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11060 int v102; // [sp-4h] [bp-80h]@88
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11061 int v103; // [sp-4h] [bp-80h]@126
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11062 int v104; // [sp+Ch] [bp-70h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11063 int v105; // [sp+Ch] [bp-70h]@48
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11064 int v106; // [sp+10h] [bp-6Ch]@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11065 int v107; // [sp+10h] [bp-6Ch]@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11066 int v108; // [sp+10h] [bp-6Ch]@104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11067 int v109; // [sp+18h] [bp-64h]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11068 int v110; // [sp+18h] [bp-64h]@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11069 int i; // [sp+18h] [bp-64h]@90
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11070 int v112; // [sp+18h] [bp-64h]@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11071 signed int v113; // [sp+20h] [bp-5Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11072 signed int v114; // [sp+24h] [bp-58h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11073 unsigned __int64 a4; // [sp+28h] [bp-54h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11074 unsigned int a4_8; // [sp+30h] [bp-4Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11075 int v117; // [sp+34h] [bp-48h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11076 int v118; // [sp+34h] [bp-48h]@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11077 int v119; // [sp+34h] [bp-48h]@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11078 int v120; // [sp+34h] [bp-48h]@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11079 int v121; // [sp+38h] [bp-44h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11080 int v122; // [sp+38h] [bp-44h]@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11081 int v123; // [sp+38h] [bp-44h]@76
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11082 int v124; // [sp+38h] [bp-44h]@114
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11083 int v125; // [sp+3Ch] [bp-40h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11084 int v126; // [sp+3Ch] [bp-40h]@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11085 int v127; // [sp+3Ch] [bp-40h]@77
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11086 int v128; // [sp+3Ch] [bp-40h]@115
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11087 int v129; // [sp+40h] [bp-3Ch]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11088 int v130; // [sp+40h] [bp-3Ch]@46
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11089 int v131; // [sp+40h] [bp-3Ch]@78
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11090 int v132; // [sp+40h] [bp-3Ch]@116
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11091 int v133; // [sp+44h] [bp-38h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11092 int v134; // [sp+44h] [bp-38h]@45
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11093 int v135; // [sp+44h] [bp-38h]@81
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11094 int v136; // [sp+44h] [bp-38h]@119
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11095 int v137; // [sp+48h] [bp-34h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11096 int v138; // [sp+48h] [bp-34h]@42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11097 int v139; // [sp+48h] [bp-34h]@82
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11098 int v140; // [sp+48h] [bp-34h]@120
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11099 int v141; // [sp+4Ch] [bp-30h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11100 int v142; // [sp+4Ch] [bp-30h]@41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11101 int v143; // [sp+4Ch] [bp-30h]@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11102 int v144; // [sp+4Ch] [bp-30h]@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11103 int v145; // [sp+50h] [bp-2Ch]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11104 int v146; // [sp+50h] [bp-2Ch]@40
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11105 int v147; // [sp+50h] [bp-2Ch]@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11106 int v148; // [sp+50h] [bp-2Ch]@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11107 int v149; // [sp+54h] [bp-28h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11108 int v150; // [sp+54h] [bp-28h]@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11109 int v151; // [sp+54h] [bp-28h]@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11110 int v152; // [sp+54h] [bp-28h]@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11111 int sDepth; // [sp+58h] [bp-24h]@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11112 int sDeptha; // [sp+58h] [bp-24h]@52
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11113 int sDepthb; // [sp+58h] [bp-24h]@90
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11114 char *a5; // [sp+5Ch] [bp-20h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11115 char *a5a; // [sp+5Ch] [bp-20h]@51
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11116 signed int a5b; // [sp+5Ch] [bp-20h]@83
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11117 signed int a5c; // [sp+5Ch] [bp-20h]@121
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11118 signed int v160; // [sp+60h] [bp-1Ch]@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11119 signed int v161; // [sp+60h] [bp-1Ch]@47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11120 int v162; // [sp+60h] [bp-1Ch]@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11121 int v163; // [sp+64h] [bp-18h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11122 int outx; // [sp+68h] [bp-14h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11123 int outy; // [sp+6Ch] [bp-10h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11124 int outz; // [sp+70h] [bp-Ch]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11125 Vec3_int_ pOut; // [sp+74h] [bp-8h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11126 int ya; // [sp+84h] [bp+8h]@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11127 int yb; // [sp+84h] [bp+8h]@136
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11128 int ve; // [sp+88h] [bp+Ch]@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11129 int va; // [sp+88h] [bp+Ch]@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11130 int vb; // [sp+88h] [bp+Ch]@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11131 int vf; // [sp+88h] [bp+Ch]@136
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11132 int vc; // [sp+88h] [bp+Ch]@136
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11133 int vd; // [sp+88h] [bp+Ch]@142
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11134 int v_4; // [sp+8Ch] [bp+10h]@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11135 int v_4a; // [sp+8Ch] [bp+10h]@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11136 int v_4b; // [sp+8Ch] [bp+10h]@136
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11137 int v_4c; // [sp+8Ch] [bp+10h]@141
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11138 int v_8; // [sp+90h] [bp+14h]@53
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11139
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11140 a4 = __PAIR__(z, x);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11141 v4 = stru_5C6E00->Atan2(v.x - x, v.y - z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11142 v114 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11143 v97.z = y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11144 v113 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11145 a4_8 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11146 *(_QWORD *)&v97.x = a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11147 if ( uCurrentlyLoadedLevelType != LEVEL_Outdoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11148 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11149 Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v97, &pOut.x, &pOut.y, &outz);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11150 v45.z = v.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11151 *(_QWORD *)&v45.x = *(_QWORD *)&v;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11152 Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v45, &outx, &outy, &v163);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11153 v46 = outy - pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11154 v47 = v163 - outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11155 v48 = outx - pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11156 v49 = sub_452A9E(v48 * v48 + v46 * v46 + v47 * v47);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11157 v50 = 65536;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11158 if ( v49 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11159 v50 = 65536 / v49;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11160 v51 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11161 v143 = v48 * v50;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11162 v52 = v46 * v50;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11163 v53 = v47 * v50;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11164 v54 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11165 v147 = v52;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11166 v151 = v53;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11167 v119 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11168 if ( pOut.x < outx )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11169 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11170 v123 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11171 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11172 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11173 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11174 v119 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11175 v123 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11176 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11177 v55 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11178 v56 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11179 v127 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11180 if ( pOut.y < outy )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11181 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11182 v131 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11183 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11184 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11185 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11186 v127 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11187 v131 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11188 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11189 v57 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11190 v58 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11191 v135 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11192 if ( outz < v163 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11193 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11194 v139 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11195 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11196 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11197 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11198 v135 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11199 v139 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11200 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11201 a5b = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11202 while ( !v114 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11203 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11204 if ( a5b )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11205 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11206 v102 = v58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11207 v100 = v55;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11208 v98 = v54;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11209 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11210 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11211 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11212 v102 = v57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11213 v100 = v56;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11214 v98 = v51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11215 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11216 v59 = pIndoor->GetSector(v98, v100, v102);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11217 v60 = pIndoor->pSectors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11218 v61 = 116 * v59;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11219 sDepthb = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11220 for ( i = 116 * v59;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11221 sDepthb < *(__int16 *)((char *)&pIndoor->pSectors->field_C + v61)
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
11222 + 2 * *(__int16 *)((char *)&pIndoor->pSectors->uNumFloors + v61);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11223 ++sDepthb )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11224 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11225 v62 = &pIndoor->pFaces[(*(unsigned __int16 **)((char *)&v60->pWalls + v61))[sDepthb]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11226 if ( v62->uAttributes & 1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11227 || v119 > v62->pBounding.x2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11228 || v123 < v62->pBounding.x1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11229 || v127 > v62->pBounding.y2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11230 || v131 < v62->pBounding.y1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11231 || v135 > v62->pBounding.z2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11232 || v139 < v62->pBounding.z1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11233 || (v63 = (unsigned __int64)(v143 * (signed __int64)v62->pFacePlane_old.vNormal.x) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11234 v64 = (unsigned __int64)(v151 * (signed __int64)v62->pFacePlane_old.vNormal.z) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11235 v65 = (unsigned __int64)(v147 * (signed __int64)v62->pFacePlane_old.vNormal.y) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11236 v20 = v63 + v64 + v65 == 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11237 v66 = v63 + v64 + v65,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11238 v107 = v63 + v64 + v65,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11239 v20) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11240 goto LABEL_107;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11241 v67 = outz * v62->pFacePlane_old.vNormal.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11242 v68 = -(v62->pFacePlane_old.dist
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11243 + v67
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11244 + pOut.y * v62->pFacePlane_old.vNormal.y
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11245 + pOut.x * v62->pFacePlane_old.vNormal.x);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11246 if ( v66 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11247 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11248 if ( v62->pFacePlane_old.dist
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11249 + v67
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11250 + pOut.y * v62->pFacePlane_old.vNormal.y
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11251 + pOut.x * v62->pFacePlane_old.vNormal.x < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11252 goto LABEL_107;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11253 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11254 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11255 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11256 if ( v62->pFacePlane_old.dist
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11257 + v67
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11258 + pOut.y * v62->pFacePlane_old.vNormal.y
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11259 + pOut.x * v62->pFacePlane_old.vNormal.x > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11260 goto LABEL_107;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11261 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11262 v69 = abs(-(v62->pFacePlane_old.dist
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11263 + v67
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11264 + pOut.y * v62->pFacePlane_old.vNormal.y
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11265 + pOut.x * v62->pFacePlane_old.vNormal.x)) >> 14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11266 if ( v69 <= abs(v66) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11267 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11268 LODWORD(v70) = v68 << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11269 HIDWORD(v70) = v68 >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11270 v71 = v70 / v107;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11271 v108 = v70 / v107;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11272 if ( v71 >= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11273 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11274 if ( sub_4075DB(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11275 pOut.x + ((signed int)(((unsigned __int64)(v108 * (signed __int64)v143) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11276 pOut.y + ((signed int)(((unsigned __int64)(v108 * (signed __int64)v147) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11277 outz + ((signed int)(((unsigned __int64)(v108 * (signed __int64)v151) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11278 v62) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11279 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11280 v114 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11281 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11282 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11283 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11284 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11285 v61 = i;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11286 LABEL_107:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11287 v60 = pIndoor->pSectors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11288 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11289 ++a5b;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11290 if ( a5b >= 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11291 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11292 v57 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11293 v56 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11294 v51 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11295 v58 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11296 v55 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11297 v54 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11298 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11299 v72.z = y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11300 *(_QWORD *)&v72.x = a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11301 Vec3_int_::Rotate(32, a4_8 - stru_5C6E00->uIntegerHalfPi, 0, v72, &pOut.x, &pOut.y, &outz);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11302 v73.z = v.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11303 *(_QWORD *)&v73.x = *(_QWORD *)&v;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11304 Vec3_int_::Rotate(32, a4_8 - stru_5C6E00->uIntegerHalfPi, 0, v73, &outx, &outy, &v163);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11305 v74 = outy - pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11306 v75 = v163 - outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11307 v76 = outx - pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11308 v77 = sub_452A9E(v76 * v76 + v74 * v74 + v75 * v75);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11309 v78 = 65536;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11310 if ( v77 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11311 v78 = 65536 / v77;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11312 v79 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11313 v144 = v76 * v78;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11314 v80 = v74 * v78;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11315 v81 = v75 * v78;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11316 v82 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11317 v148 = v80;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11318 v152 = v81;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11319 v120 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11320 if ( pOut.x < outx )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11321 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11322 v124 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11323 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11324 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11325 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11326 v120 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11327 v124 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11328 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11329 v83 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11330 v84 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11331 v128 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11332 if ( pOut.y < outy )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11333 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11334 v132 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11335 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11336 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11337 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11338 v128 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11339 v132 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11340 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11341 v85 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11342 v86 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11343 v136 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11344 if ( outz < v163 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11345 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11346 v140 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11347 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11348 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11349 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11350 v136 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11351 v140 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11352 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11353 a5c = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11354 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11355 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11356 if ( v113 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11357 return !v114 || !v113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11358 if ( a5c )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11359 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11360 v103 = v86;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11361 v101 = v83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11362 v99 = v82;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11363 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11364 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11365 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11366 v103 = v85;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11367 v101 = v84;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11368 v99 = v79;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11369 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11370 v87 = pIndoor->GetSector(v99, v101, v103);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11371 v88 = pIndoor->pSectors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11372 v89 = 116 * v87;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11373 v162 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11374 v112 = v89;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11375 if ( *(__int16 *)((char *)&pIndoor->pSectors->field_C + v89)
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
11376 + 2 * *(__int16 *)((char *)&pIndoor->pSectors->uNumFloors + v89) > 0 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11377 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11378 LABEL_148:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11379 ++a5c;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11380 if ( a5c >= 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11381 return !v114 || !v113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11382 v85 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11383 v84 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11384 v79 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11385 v86 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11386 v83 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11387 v82 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11388 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11389 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11390 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11391 v90 = &pIndoor->pFaces[(*(unsigned __int16 **)((char *)&v88->pWalls + v89))[v162]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11392 if ( v90->uAttributes & 1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11393 || v120 > v90->pBounding.x2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11394 || v124 < v90->pBounding.x1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11395 || v128 > v90->pBounding.y2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11396 || v132 < v90->pBounding.y1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11397 || v136 > v90->pBounding.z2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11398 || v140 < v90->pBounding.z1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11399 || (yb = (unsigned __int64)(v144 * (signed __int64)v90->pFacePlane_old.vNormal.x) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11400 v_4b = (unsigned __int64)(v148 * (signed __int64)v90->pFacePlane_old.vNormal.y) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11401 vf = (unsigned __int64)(v152 * (signed __int64)v90->pFacePlane_old.vNormal.z) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11402 v20 = yb + vf + v_4b == 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11403 v91 = yb + vf + v_4b,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11404 vc = yb + vf + v_4b,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11405 v20) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11406 goto LABEL_145;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11407 v92 = outz * v90->pFacePlane_old.vNormal.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11408 v93 = -(v90->pFacePlane_old.dist
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11409 + v92
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11410 + pOut.y * v90->pFacePlane_old.vNormal.y
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11411 + pOut.x * v90->pFacePlane_old.vNormal.x);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11412 if ( v91 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11413 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11414 if ( v90->pFacePlane_old.dist
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11415 + v92
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11416 + pOut.y * v90->pFacePlane_old.vNormal.y
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11417 + pOut.x * v90->pFacePlane_old.vNormal.x < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11418 goto LABEL_145;
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 if ( v90->pFacePlane_old.dist
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11423 + v92
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11424 + pOut.y * v90->pFacePlane_old.vNormal.y
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11425 + pOut.x * v90->pFacePlane_old.vNormal.x > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11426 goto LABEL_145;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11427 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11428 v_4c = abs(-(v90->pFacePlane_old.dist
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11429 + v92
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11430 + pOut.y * v90->pFacePlane_old.vNormal.y
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11431 + pOut.x * v90->pFacePlane_old.vNormal.x)) >> 14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11432 if ( v_4c <= abs(v91) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11433 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11434 LODWORD(v94) = v93 << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11435 HIDWORD(v94) = v93 >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11436 v95 = v94 / vc;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11437 vd = v94 / vc;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11438 if ( v95 >= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11439 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11440 if ( sub_4075DB(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11441 pOut.x + ((signed int)(((unsigned __int64)(vd * (signed __int64)v144) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11442 pOut.y + ((signed int)(((unsigned __int64)(vd * (signed __int64)v148) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11443 outz + ((signed int)(((unsigned __int64)(vd * (signed __int64)v152) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11444 v90) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11445 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11446 v113 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11447 goto LABEL_148;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11448 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11449 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11450 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11451 v89 = v112;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11452 LABEL_145:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11453 v88 = pIndoor->pSectors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11454 ++v162;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11455 if ( v162 >= *(__int16 *)((char *)&pIndoor->pSectors->field_C + v89)
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
11456 + 2 * *(__int16 *)((char *)&pIndoor->pSectors->uNumFloors + v89) )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11457 goto LABEL_148;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11458 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11459 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11460 Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v97, &pOut.x, &pOut.y, &outz);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11461 v5.z = v.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11462 *(_QWORD *)&v5.x = *(_QWORD *)&v;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11463 Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v5, &outx, &outy, &v163);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11464 v6 = outy - pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11465 v7 = v163 - outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11466 v8 = outx - pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11467 v9 = sub_452A9E(v8 * v8 + v6 * v6 + v7 * v7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11468 v10 = 65536;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11469 if ( v9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11470 v10 = 65536 / v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11471 v125 = v8 * v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11472 v11 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11473 v12 = v7 * v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11474 v13 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11475 v117 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11476 v121 = v6 * v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11477 v149 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11478 if ( pOut.x < outx )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11479 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11480 v145 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11481 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11482 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11483 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11484 v149 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11485 v145 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11486 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11487 v14 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11488 v141 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11489 if ( pOut.y < outy )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11490 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11491 v137 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11492 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11493 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11494 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11495 v141 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11496 v137 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11497 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11498 v133 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11499 if ( outz < v163 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11500 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11501 v129 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11502 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11503 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11504 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11505 v133 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11506 v129 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11507 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11508 v160 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11509 if ( (signed int)pOutdoor->uNumBModels > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11510 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11511 v104 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11512 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11513 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11514 v15 = (char *)&pOutdoor->pBModels[v104].pVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11515 a5 = (char *)&pOutdoor->pBModels[v104].pVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11516 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
11517 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11518 sDepth = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11519 if ( *((int *)v15 + 2) > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11520 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11521 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11522 LABEL_36:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11523 ++v160;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11524 ++v104;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11525 if ( v160 >= (signed int)pOutdoor->uNumBModels )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11526 goto LABEL_37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11527 v14 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11528 v13 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11529 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11530 v106 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11531 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11532 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11533 v16 = (ODMFace *)(v106 + *((int *)a5 + 4));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11534 if ( v149 > v16->pBoundingBox.x2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11535 || v145 < v16->pBoundingBox.x1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11536 || v141 > v16->pBoundingBox.y2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11537 || v137 < v16->pBoundingBox.y1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11538 || v133 > v16->pBoundingBox.z2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11539 || v129 < v16->pBoundingBox.z1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11540 || (v17 = (unsigned __int64)(v125 * (signed __int64)v16->pFacePlane.vNormal.x) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11541 v18 = (unsigned __int64)(v121 * (signed __int64)v16->pFacePlane.vNormal.y) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11542 v19 = (unsigned __int64)(v117 * (signed __int64)v16->pFacePlane.vNormal.z) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11543 v20 = v17 + v18 + v19 == 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11544 v21 = v17 + v18 + v19,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11545 v109 = v17 + v18 + v19,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11546 v20) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11547 goto LABEL_33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11548 v22 = pOut.y * v16->pFacePlane.vNormal.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11549 v23 = -(v16->pFacePlane.dist + v22 + outz * v16->pFacePlane.vNormal.z + pOut.x * v16->pFacePlane.vNormal.x);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11550 if ( v21 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11551 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11552 if ( v16->pFacePlane.dist + v22 + outz * v16->pFacePlane.vNormal.z + pOut.x * v16->pFacePlane.vNormal.x < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11553 goto LABEL_33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11554 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11555 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11556 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11557 if ( v16->pFacePlane.dist + v22 + outz * v16->pFacePlane.vNormal.z + pOut.x * v16->pFacePlane.vNormal.x > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11558 goto LABEL_33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11559 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11560 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
11561 if ( v24 <= abs(v21) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11562 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11563 LODWORD(v25) = v23 << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11564 HIDWORD(v25) = v23 >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11565 v26 = v25 / v109;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11566 v110 = v25 / v109;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11567 if ( v26 >= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11568 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11569 if ( sub_4077F1(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11570 pOut.x + ((signed int)(((unsigned __int64)(v110 * (signed __int64)v125) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11571 pOut.y + ((signed int)(((unsigned __int64)(v110 * (signed __int64)v121) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11572 outz + ((signed int)(((unsigned __int64)(v110 * (signed __int64)v117) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11573 v16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11574 (BSPVertexBuffer *)a5) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11575 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11576 v114 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11577 goto LABEL_36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11578 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11579 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11580 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11581 LABEL_33:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11582 ++sDepth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11583 v106 += 308;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11584 if ( sDepth >= *((int *)a5 + 2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11585 goto LABEL_36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11586 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11587 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11588 LABEL_37:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11589 v27.z = y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11590 *(_QWORD *)&v27.x = a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11591 Vec3_int_::Rotate(32, a4_8 - stru_5C6E00->uIntegerHalfPi, 0, v27, &pOut.x, &pOut.y, &outz);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11592 v28.z = v.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11593 *(_QWORD *)&v28.x = *(_QWORD *)&v;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11594 Vec3_int_::Rotate(32, a4_8 - stru_5C6E00->uIntegerHalfPi, 0, v28, &outx, &outy, &v163);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11595 v29 = outy - pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11596 v30 = v163 - outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11597 v31 = outx - pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11598 v32 = sub_452A9E(v31 * v31 + v29 * v29 + v30 * v30);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11599 v33 = 65536;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11600 if ( v32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11601 v33 = 65536 / v32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11602 v126 = v31 * v33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11603 v34 = v33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11604 v35 = v30 * v33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11605 v36 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11606 v118 = v35;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11607 v122 = v29 * v34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11608 v150 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11609 if ( pOut.x < outx )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11610 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11611 v146 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11612 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11613 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11614 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11615 v150 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11616 v146 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11617 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11618 v37 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11619 v142 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11620 if ( pOut.y < outy )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11621 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11622 v138 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11623 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11624 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11625 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11626 v142 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11627 v138 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11628 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11629 v134 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11630 if ( outz < v163 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11631 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11632 v130 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11633 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11634 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11635 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11636 v134 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11637 v130 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11638 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11639 v161 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11640 if ( (signed int)pOutdoor->uNumBModels > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11641 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11642 v105 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11643 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11644 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11645 v38 = (char *)&pOutdoor->pBModels[v105].pVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11646 a5a = (char *)&pOutdoor->pBModels[v105].pVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11647 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
11648 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11649 sDeptha = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11650 if ( *((int *)v38 + 2) > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11651 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11652 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11653 LABEL_71:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11654 ++v161;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11655 ++v105;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11656 if ( v161 >= (signed int)pOutdoor->uNumBModels )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11657 return !v114 || !v113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11658 v37 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11659 v36 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11660 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11661 v_8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11662 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11663 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11664 v39 = (ODMFace *)(v_8 + *((int *)a5a + 4));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11665 if ( v150 > v39->pBoundingBox.x2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11666 || v146 < v39->pBoundingBox.x1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11667 || v142 > v39->pBoundingBox.y2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11668 || v138 < v39->pBoundingBox.y1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11669 || v134 > v39->pBoundingBox.z2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11670 || v130 < v39->pBoundingBox.z1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11671 || (ya = (unsigned __int64)(v126 * (signed __int64)v39->pFacePlane.vNormal.x) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11672 ve = (unsigned __int64)(v122 * (signed __int64)v39->pFacePlane.vNormal.y) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11673 v_4 = (unsigned __int64)(v118 * (signed __int64)v39->pFacePlane.vNormal.z) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11674 v20 = ya + ve + v_4 == 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11675 v40 = ya + ve + v_4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11676 va = ya + ve + v_4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11677 v20) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11678 goto LABEL_68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11679 v41 = pOut.y * v39->pFacePlane.vNormal.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11680 v42 = -(v39->pFacePlane.dist + v41 + outz * v39->pFacePlane.vNormal.z + pOut.x * v39->pFacePlane.vNormal.x);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11681 if ( v40 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11682 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11683 if ( v39->pFacePlane.dist + v41 + outz * v39->pFacePlane.vNormal.z + pOut.x * v39->pFacePlane.vNormal.x < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11684 goto LABEL_68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11685 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11686 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11687 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11688 if ( v39->pFacePlane.dist + v41 + outz * v39->pFacePlane.vNormal.z + pOut.x * v39->pFacePlane.vNormal.x > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11689 goto LABEL_68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11690 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11691 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
11692 if ( v_4a <= abs(v40) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11693 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11694 LODWORD(v43) = v42 << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11695 HIDWORD(v43) = v42 >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11696 v44 = v43 / va;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11697 vb = v43 / va;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11698 if ( v44 >= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11699 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11700 if ( sub_4077F1(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11701 pOut.x + ((signed int)(((unsigned __int64)(vb * (signed __int64)v126) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11702 pOut.y + ((signed int)(((unsigned __int64)(vb * (signed __int64)v122) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11703 outz + ((signed int)(((unsigned __int64)(vb * (signed __int64)v118) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11704 v39,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11705 (BSPVertexBuffer *)a5a) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11706 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11707 v113 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11708 goto LABEL_71;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11709 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11710 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11711 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11712 LABEL_68:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11713 ++sDeptha;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11714 v_8 += 308;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11715 if ( sDeptha >= *((int *)a5a + 2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11716 goto LABEL_71;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11717 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11718 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11719 return !v114 || !v113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11720 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11721
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11722
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11723 //----- (00408768) --------------------------------------------------------
101
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11724 void InitializeActors()
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11725 {
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11726 signed int v5; // [sp+Ch] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11727 signed int v6; // [sp+10h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11728 signed int v7; // [sp+14h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11729 signed int v8; // [sp+18h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11730
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11731 v8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11732 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11733 v7 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11734 v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11735 if ( !_strcmpi(pCurrentMapName, "d25.blv") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11736 v8 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11737 if ( !_strcmpi(pCurrentMapName, "d26.blv") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11738 v6 = 1;
101
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11739 if (_449B57_test_bit(pParty->_award_bits, 99))
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11740 v7 = 1;
101
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11741 if (_449B57_test_bit(pParty->_award_bits, 100))
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11742 v5 = 1;
101
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11743 for (uint i = 0; i < uNumActors; ++i)
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11744 {
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11745 auto actor = pActors + i;
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11746
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11747 if (actor->CanAct() || actor->uAIState == Disabled)
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11748 {
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11749 actor->vPosition.x = actor->vInitialPosition.x;
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11750 actor->vPosition.y = actor->vInitialPosition.y;
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11751 actor->vPosition.z = actor->vInitialPosition.z;
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11752 actor->sCurrentHP = actor->pMonsterInfo.uHP;
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11753 if (actor->uAIState != Disabled)
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11754 Actor::_403EB6(i, dword_4F6E08[i], actor->pMonsterInfo.uRecoveryTime, 0);
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11755 }
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11756
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11757 actor->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Friendly;
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11758
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11759 if (!v8 || v7)
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11760 if (!v6 || v5)
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11761 if (actor->_438B9B())
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11762 BYTE2(actor->uAttributes) &= 0xF7u;
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11763
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11764 BYTE2(actor->uAttributes) &= 0x7Fu;
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11765 if (BYTE2(actor->uAttributes) & 0x40)
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11766 Actor::_4031C1_update_job(i, pParty->uCurrentHour, 1);
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11767 }
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11768 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11769
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11770 //----- (00408896) --------------------------------------------------------
101
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11771 void InitializeLayingItems()
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11772 {
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11773 for (uint i = 0; i < uNumLayingItems; ++i)
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11774 {
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11775 auto item = pLayingItems + i;
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11776
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11777 if (item->uItemType &&
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11778 (item->uSoundID & 8 || pObjectList->pObjects[item->uItemType].uFlags & 0x10))
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11779 LayingItem::_42F933(i);
8be5293b6b33 odm loading
Nomad
parents: 96
diff changeset
11780 }
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
11781
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
11782 for (uint i = 0; i < 100; ++i)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
11783 array_5118E8.pElements[i].field_C_time_left = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11784 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11785
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11786 //----- (004088E9) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11787 signed int __fastcall sub_4088E9(int a1, int a2, int a3, int a4, int a5, int a6)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11788 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11789 int v6; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11790 int v7; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11791 int v8; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11792 signed int result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11793 int v10; // [sp+Ch] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11794 int v11; // [sp+18h] [bp+8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11795
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11796 v6 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11797 v10 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11798 v7 = a3 - a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11799 v11 = abs(a3 - a1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11800 v8 = abs(a4 - v10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11801 result = sub_452A9E(v11 * v11 + v8 * v8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11802 if ( result )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11803 result = abs((v7 * (v10 - a6) - (a4 - v10) * (v6 - a5)) / result);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11804 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11805 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11806
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11807
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11808 //----- (00408A27) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11809 unsigned int __thiscall SearchAliveActors(unsigned int *pTotalActors)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11810 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11811 unsigned int *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11812 int v2; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11813 unsigned int v3; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11814 signed int v4; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11815 Actor *v5; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11816 unsigned int v6; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11817 int v8; // [sp+Ch] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11818
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11819 v1 = pTotalActors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11820 v2 = GetAlertStatus();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11821 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11822 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11823 *v1 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11824 v8 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11825 if ( (signed int)uNumActors > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11826 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11827 v5 = pActors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11828 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11829 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11830 v6 = v5->uAttributes;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11831 if ( (v6 & 0x100000) == v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11832 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11833 ++*v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11834 if ( v5->IsAlive() == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11835 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11836 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11837 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11838 ++v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11839 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11840 while ( v4 < (signed int)uNumActors );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11841 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11842 return v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11843 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11844
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11845 //----- (00408A7E) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11846 unsigned int __fastcall SearchActorByMonsterID(unsigned int *pTotalActors, int uMonsterID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11847 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11848 unsigned int *v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11849 signed int v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11850 char *v4; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11851 int v5; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11852 int v7; // [sp+8h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11853 int v8; // [sp+Ch] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11854 unsigned int v9; // [sp+10h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11855
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11856 v7 = uMonsterID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11857 v2 = pTotalActors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11858 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11859 v8 = GetAlertStatus();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11860 *v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11861 v9 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11862 if ( (signed int)uNumActors > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11863 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11864 v4 = (char *)&pActors[0].pMonsterInfo.uID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11865 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11866 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11867 v5 = *((int *)v4 - 15); // actor::attributes
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11868 if ( (v5 & 0x100000) == v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11869 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11870 if ( *(short *)v4 - 1 == v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11871 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11872 ++*v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11873 if ( ((Actor *)(v4 - 96))->IsAlive() == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11874 ++v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11875 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11876 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11877 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11878 v4 += 836;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11879 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11880 while ( v3 < (signed int)uNumActors );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11881 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11882 return v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11883 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11884
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11885 //----- (00408AE7) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11886 unsigned int __fastcall SearchActorByGroup(unsigned int *pTotalActors, unsigned int uGroup)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11887 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11888 unsigned int *v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11889 signed int v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11890 char *v4; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11891 int v5; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11892 unsigned int v7; // [sp+8h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11893 int v8; // [sp+Ch] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11894 unsigned int v9; // [sp+10h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11895
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11896 v7 = uGroup;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11897 v2 = pTotalActors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11898 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11899 v8 = GetAlertStatus();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11900 *v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11901 v9 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11902 if ( (signed int)uNumActors > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11903 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11904 v4 = (char *)&pActors[0].uGroup;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11905 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11906 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11907 v5 = *((int *)v4 - 168);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11908 if ( (v5 & 0x100000) == v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11909 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11910 if ( *(int *)v4 == v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11911 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11912 ++*v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11913 if ( ((Actor *)(v4 - 708))->IsAlive() == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11914 ++v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11915 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11916 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11917 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11918 v4 += 836;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11919 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11920 while ( v3 < (signed int)uNumActors );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11921 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11922 return v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11923 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11924
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11925 //----- (00408B54) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11926 unsigned int __fastcall SearchActorByID(unsigned int *pTotalActors, unsigned int a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11927 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11928 unsigned int v2; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11929 unsigned int *v3; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11930 int v4; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11931 unsigned int v5; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11932 unsigned int v6; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11933
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11934 v2 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11935 v3 = pTotalActors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11936 v4 = GetAlertStatus();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11937 v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11938 *v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11939 v6 = pActors[v2].uAttributes;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11940 if ( (v6 & 0x100000) == v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11941 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11942 *v3 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11943 if ( pActors[v2].IsAlive() == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11944 v5 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11945 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11946 return v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11947 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11948
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11949
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11950 //----- (00409BE8) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11951 void __cdecl sub_409BE8()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11952 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11953 void *v0; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11954 stru348 *v1; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11955 int v2; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11956 int v3; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11957
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11958 v0 = ptr_507BC0->ptr_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11959 dword_4E1874 = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11960 v1 = &stru_4E1890[(int)((char *)v0 - 108)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11961 amuint_4E1860 = v1->field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11962 amuint_4E1864 = v1->field_6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11963 amuint_4E1868 = v1->field_8 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11964 amuint_4E186C = v1->field_A - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11965 amuint_4E1870 = v1->field_C - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11966 amuint_505884 = v1->field_E;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11967 amuint_505888 = v1->field_10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11968 amuint_50588C = v1->field_12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11969 dword_4E1878 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11970 dword_4E187C = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11971 dword_4E1880 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11972 dword_4E1884 = v1->field_0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11973 v2 = v1->field_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11974 v3 = v1->field_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11975 dword_4E1888 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11976 dword_4DF3A4 = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11977 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11978 // 4DF3A4: using guessed type int dword_4DF3A4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11979 // 4E1860: using guessed type int amuint_4E1860;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11980 // 4E1864: using guessed type int amuint_4E1864;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11981 // 4E1868: using guessed type int amuint_4E1868;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11982 // 4E186C: using guessed type int amuint_4E186C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11983 // 4E1870: using guessed type int amuint_4E1870;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11984 // 4E1874: using guessed type int dword_4E1874;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11985 // 4E1878: using guessed type int dword_4E1878;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11986 // 4E187C: using guessed type int dword_4E187C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11987 // 4E1880: using guessed type int dword_4E1880;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11988 // 4E1884: using guessed type int dword_4E1884;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11989 // 4E1888: using guessed type int dword_4E1888;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11990 // 505884: using guessed type int amuint_505884;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11991 // 505888: using guessed type int amuint_505888;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11992 // 50588C: using guessed type int amuint_50588C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11993
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11994
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11995
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11996
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11997
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11998
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11999
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12000 //----- (0040D75D) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12001 char __fastcall pGUIWindow0_draws_text(int a1, const char *pText, int *pXY)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12002 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12003 const char *v3; // ST0C_4@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12004 __int64 v4; // qax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12005
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12006 v3 = pText;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12007 v4 = LOBYTE(pFontComic->uFontHeight) - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12008 return pGUIWindow0->DrawText(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12009 pFontComic,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12010 *pXY,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12011 pXY[1] - (((signed int)v4 - HIDWORD(v4)) >> 1) + 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12012 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12013 v3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12014 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12015 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12016 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12017 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12018
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12019
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12020
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12021 //----- (0040DB27) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12022 void __fastcall DrawRect(Vec4_int_ *pXYZW, unsigned __int16 uColor, char bSolidFill)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12023 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12024 Vec4_int_ *v3; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12025 unsigned __int16 v4; // bp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12026 unsigned int i; // ebx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12027
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12028 v3 = pXYZW;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12029 v4 = uColor;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12030 pRenderer->BeginScene();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12031 pRenderer->Clip_v2(0, 0, 639u, 479u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12032 if ( bSolidFill )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12033 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12034 for ( i = v3->y; (signed int)i <= v3->w; ++i )
52
0f4ed4f0f472 BLV minimap: 1/3
Nomad
parents: 51
diff changeset
12035 pRenderer->Line2D(v3->x, i, v3->z, i, v4);
0f4ed4f0f472 BLV minimap: 1/3
Nomad
parents: 51
diff changeset
12036 }
0f4ed4f0f472 BLV minimap: 1/3
Nomad
parents: 51
diff changeset
12037 else
0f4ed4f0f472 BLV minimap: 1/3
Nomad
parents: 51
diff changeset
12038 {
0f4ed4f0f472 BLV minimap: 1/3
Nomad
parents: 51
diff changeset
12039 pRenderer->Line2D(v3->x, v3->y, v3->z, v3->y, v4);
0f4ed4f0f472 BLV minimap: 1/3
Nomad
parents: 51
diff changeset
12040 pRenderer->Line2D(v3->z, v3->y, v3->z, v3->w, v4);
0f4ed4f0f472 BLV minimap: 1/3
Nomad
parents: 51
diff changeset
12041 pRenderer->Line2D(v3->z, v3->w, v3->x, v3->w, v4);
0f4ed4f0f472 BLV minimap: 1/3
Nomad
parents: 51
diff changeset
12042 pRenderer->Line2D(v3->x, v3->w, v3->x, v3->y, v4);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12043 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12044 pRenderer->EndScene();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12045 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12046
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12047
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12048
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12049
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12050 //----- (0040DDB1) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12051 int __fastcall rand_interval(int a, int b)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12052 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12053 return a + rand() % (b - a + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12054 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12055
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12056 //----- (0040DEB4) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12057 char *__fastcall inv_strcat(const char *Source, char *Dest)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12058 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12059 return strcat(Dest, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12060 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12061
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12062 //----- (0040DEBE) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12063 char *__fastcall inv_strcpy(const char *Source, char *Dest)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12064 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12065 return strcpy(Dest, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12066 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12067
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12068 //----- (0040DEC8) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12069 void __fastcall intToString(int val, char *pOut)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12070 {
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
12071 sprintf(pOut, "%d", val);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12072 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12073
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12074 //----- (0040DEDB) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12075 unsigned int __stdcall R8G8B8_to_TargetFormat(int uColor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12076 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12077 return GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat((unsigned __int8)uColor, BYTE1(uColor), BYTE2(uColor));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12078 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12079
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12080 //----- (0040DEF3) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12081 unsigned int __fastcall GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(unsigned __int16 r, unsigned __int16 g, unsigned __int16 b)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12082 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12083 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
12084 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12085
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12086 //----- (0040DF3D) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12087 void __cdecl CallRenderPresent()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12088 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12089 pRenderer->Present();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12090 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12091
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12092
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12093 //----- (0040DFA7) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12094 int __stdcall retzero_sub_40DFA7(int a1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12095 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12096 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12097 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12098 // 40DFA7: using guessed type int __stdcall retzero_sub_40DFA7(int);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12099
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12100 //----- (0040DFD1) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12101 void stru272::_40DFD1()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12102 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12103 stru272 *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12104 stru272_stru0 *v2; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12105
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12106 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12107 v2 = (stru272_stru0 *)malloc(0x5Cu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12108 v1->ptr_0 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12109 v2->field_0 = 0x67707274u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12110 v1->ptr_0->field_8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12111 v1->ptr_0->field_30 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12112 v1->ptr_0->field_58 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12113 v1->ptr_0->field_59 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12114 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12115
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12116 //----- (0040DFFE) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12117 int stru272_stru0::_40DFFE()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12118 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12119 signed int result; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12120
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12121 if ( this->field_0 == 0x67707274 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12122 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12123 this->field_0 = 0x78787878u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12124 free(this);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12125 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12126 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12127 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12128 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12129 result = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12130 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12131 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12132 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12133
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12134 //----- (0040E01A) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12135 int stru272_stru0::_40E01A(int a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12136 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12137 signed int result; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12138
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12139 auto a1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12140 if ( a1->field_0 == 0x67707274 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12141 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12142 a1->field_4 = *(int *)(a2 + 32);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12143 a1->field_C = *(int *)a2 << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12144 a1->field_10 = *(int *)(a2 + 4) << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12145 a1->field_14 = *(int *)(a2 + 8) << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12146 a1->field_18 = *(int *)(a2 + 12) << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12147 a1->field_1C = *(int *)(a2 + 16);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12148 a1->field_20 = *(int *)(a2 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12149 a1->field_24 = *(int *)(a2 + 24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12150 a1->field_28 = *(float *)(a2 + 28) * 65536.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12151 LODWORD(a1->field_2C) = *(int *)(a2 + 36);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12152 a1->field_34 = (signed __int64)(*(float *)(a2 + 40) * 65536.0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12153 a1->field_38 = (signed __int64)(*(float *)(a2 + 44) * 65536.0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12154 a1->field_3C = *(int *)(a2 + 48);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12155 a1->field_40 = *(int *)(a2 + 52);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12156 a1->field_54 = *(int *)(a2 + 56);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12157 a1->field_59 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12158 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12159 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12160 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12161 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12162 result = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12163 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12164 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12165 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12166
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12167 //----- (0040E0F5) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12168 int stru272_stru0::_40E0F5(char a2, char a3)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12169 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12170 signed int result; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12171 int v4; // edx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12172 int v5; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12173
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12174 auto a1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12175 if ( a1->field_0 == 0x67707274 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12176 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12177 if ( a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12178 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12179 a1->field_8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12180 a1->field_30 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12181 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12182 if ( a1->field_59 && a3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12183 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12184 v4 = a1->field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12185 v5 = a1->field_54;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12186 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12187 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12188 *(int *)v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12189 v5 += 28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12190 --v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12191 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12192 while ( v4 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12193 a1->field_58 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12194 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12195 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12196 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12197 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12198 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12199 result = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12200 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12201 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12202 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12203
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12204 //----- (0040E133) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12205 int stru272_stru0::_40E133()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12206 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12207 stru272_stru0 *v1; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12208 int v3; // ST18_4@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12209 double v4; // st7@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12210 double v5; // st6@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12211 char v6; // bl@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12212 int v7; // esi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12213 int v8; // ecx@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12214 signed int v9; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12215 int v10; // ecx@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12216 signed int v11; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12217 signed int v12; // edx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12218 signed int v13; // edx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12219 int v14; // [sp+8h] [bp-10h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12220 int v15; // [sp+Ch] [bp-Ch]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12221 float v16; // [sp+14h] [bp-4h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12222
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12223 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12224 if ( this->field_0 != 0x67707274 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12225 return 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12226 v3 = this->field_8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12227 v16 = this->field_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12228 v4 = (double)v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12229 if ( v3 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12230 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12231 v5 = v16 + this->field_2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12232 v16 = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12233 if ( v5 > v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12234 v16 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12235 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12236 if ( v16 >= 1.0 || this->field_58 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12237 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12238 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12239 v7 = this->field_54;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12240 v14 = (signed __int64)this->field_28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12241 v15 = this->field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12242 while ( *(int *)v7 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12243 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12244 if ( v16 >= 1.0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12245 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12246 *(int *)v7 = v1->field_3C + rand() % (v1->field_40 - v1->field_3C + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12247 *(int *)(v7 + 20) = (rand() % 17 - 8) << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12248 *(int *)(v7 + 24) = (rand() % 17 - 8) << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12249 v12 = v1->field_C + rand() % (v1->field_14 - 1 - v1->field_C + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12250 *(int *)(v7 + 12) = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12251 *(int *)(v7 + 4) = v12 >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12252 v16 = v16 - 1.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12253 v13 = v1->field_10 + rand() % (v1->field_18 - 1 - v1->field_10 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12254 *(int *)(v7 + 16) = v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12255 *(int *)(v7 + 8) = v13 >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12256 --v1->field_8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12257 goto LABEL_13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12258 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12259 LABEL_14:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12260 v7 += 28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12261 --v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12262 if ( !v15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12263 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12264 v1->field_58 = v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12265 v1->field_30 = v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12266 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12267 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12268 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12269 v8 = *(int *)(v7 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12270 --*(int *)v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12271 v9 = v8 + *(int *)(v7 + 12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12272 v10 = v14 + *(int *)(v7 + 24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12273 *(int *)(v7 + 12) = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12274 *(int *)(v7 + 4) = v9 >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12275 v11 = v10 + *(int *)(v7 + 16);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12276 *(int *)(v7 + 24) = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12277 *(int *)(v7 + 16) = v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12278 *(int *)(v7 + 8) = v11 >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12279 LABEL_13:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12280 v6 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12281 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12282 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12283 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12284 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12285
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12286 //----- (0040E2A7) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12287 int stru272_stru0::_40E2A7()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12288 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12289 int result; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12290
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12291 if ( this->field_0 == 0x67707274 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12292 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12293 if ( this->field_8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12294 result = this->field_58 != 0 ? 2 : 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12295 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12296 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12297 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12298 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12299 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12300 result = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12301 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12302 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12303 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12304
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12305
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12306
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12307
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12308
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12309
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12310
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12311 //----- (0040F82D) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12312 void __fastcall ZBuffer_Fill(int *pZBuffer, int uTextureId, int iZValue)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12313 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12314 ZBuffer_DoFill(pZBuffer, (Texture *)(uTextureId != -1 ? 72 * uTextureId + 0x6D084C : 0), iZValue);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12315 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12316
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12317 //----- (0040F845) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12318 __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
12319 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12320 int v7; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12321 int v8; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12322 int v9; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12323 int v10; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12324
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12325 v7 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12326 v8 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12327 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12328 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12329 v9 = a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12330 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12331 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12332 v10 = *(char *)v8++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12333 if ( (char)v10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12334 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12335 if ( (char)v10 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12336 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12337 LOWORD(v10) = *(short *)(a5 + 2 * v10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12338 *(short *)v7 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12339 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12340 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12341 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12342 LOWORD(v10) = a6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12343 *(short *)v7 = a6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12344 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12345 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12346 v7 += 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12347 --v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12348 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12349 while ( v9 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12350 v7 = a7 + v7 - a3 - a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12351 --a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12352 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12353 while ( a4 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12354 return v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12355 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12356
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12357 //----- (0040F89C) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12358 void __fastcall ZBuffer_DoFill(int *pZBuffer, Texture *pTex, int uZValue)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12359 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12360 void *v3; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12361 void *v4; // esi@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12362 int *v5; // edi@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12363 int v6; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12364 int v7; // ecx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12365 Texture *v8; // [sp+Ch] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12366 int *v9; // [sp+10h] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12367 int v10; // [sp+14h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12368 int v11; // [sp+18h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12369 void *v12; // [sp+1Ch] [bp-4h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12370
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12371 v10 = pTex->uTextureWidth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12372 v8 = pTex;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12373 v9 = pZBuffer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12374 v11 = pTex->uTextureHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12375 if ( pIcons_LOD->dword_011BA4 && pTex->uDecompressedSize )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12376 v3 = pTex->UnzipPalette();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12377 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12378 v3 = pTex->pLevelOfDetail0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12379 v12 = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12380 v4 = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12381 v5 = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12382 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12383 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12384 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12385 v7 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12386 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12387 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12388 LOBYTE(v6) = *(char *)v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12389 v4 = (char *)v4 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12390 if ( v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12391 *v5 = uZValue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12392 ++v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12393 --v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12394 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12395 while ( v7 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12396 v5 += 640 - v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12397 --v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12398 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12399 while ( v11 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12400 if ( pIcons_LOD->dword_011BA4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12401 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12402 if ( v8->uDecompressedSize )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12403 free(v12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12404 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12405 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12406
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12407
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12408 //----- (0040F92A) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12409 void __fastcall sub_40F92A(int *pZBuffer, Texture *a2, int a3)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12410 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12411 Texture *v3; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12412 void *v4; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12413 int *v5; // edi@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12414 int v6; // ecx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12415 int *v7; // [sp+Ch] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12416 int v8; // [sp+10h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12417 int v9; // [sp+18h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12418
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12419 v3 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12420 v7 = pZBuffer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12421 v8 = a2->uTextureWidth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12422 v9 = a2->uTextureHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12423 if ( pIcons_LOD->dword_011BA4 && a2->uDecompressedSize )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12424 v4 = a2->UnzipPalette();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12425 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12426 v4 = a2->pLevelOfDetail0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12427 v5 = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12428 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12429 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12430 v6 = v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12431 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12432 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12433 *v5 = a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12434 ++v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12435 --v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12436 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12437 while ( v6 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12438 v5 += 640 - v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12439 --v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12440 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12441 while ( v9 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12442 if ( pIcons_LOD->dword_011BA4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12443 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12444 if ( v3->uDecompressedSize )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12445 free(v4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12446 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12447 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12448
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12449
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12450
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12451
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12452
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12453
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12454
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12455
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12456
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12457
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12458
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12459
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12460
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12461
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12462 //----- (00410AF5) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12463 void __cdecl SetMoonPhaseNames()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12464 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12465 aMoonPhaseNames[0] = pGlobalTXT_LocalizationStrings[150];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12466 aMoonPhaseNames[1] = pGlobalTXT_LocalizationStrings[171];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12467 aMoonPhaseNames[2] = pGlobalTXT_LocalizationStrings[102];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12468 aMoonPhaseNames[3] = pGlobalTXT_LocalizationStrings[169];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12469 aMoonPhaseNames[4] = pGlobalTXT_LocalizationStrings[92];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12470 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12471
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12472 //----- (00410B28) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12473 void __thiscall DrawSpellDescriptionPopup(void *_this)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12474 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12475 Player *v1; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12476 SpellInfo *v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12477 unsigned int v3; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12478 int v4; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12479 LONG v5; // ecx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12480 int v6; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12481 char *v7; // ST44_4@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12482 unsigned __int16 v8; // ax@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12483 GUIWindow a1; // [sp+Ch] [bp-68h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12484 void *v10; // [sp+60h] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12485 POINT a2; // [sp+64h] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12486 int v12; // [sp+6Ch] [bp-8h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12487 int v13; // [sp+70h] [bp-4h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12488
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12489 v1 = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12490 v10 = _this;
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
12491 v2 = &pSpellStats->pInfos[(signed int)((char *)_this + 11 * v1->pNumSpellBookPage) + 1];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12492 if ( pMouse->GetCursorPos(&a2)->y <= 250 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12493 v3 = pMouse->GetCursorPos(&a2)->y + 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12494 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12495 v3 = 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12496 a1.uFrameY = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12497 a1.uFrameWidth = 328;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12498 a1.uFrameHeight = 68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12499 a1.uFrameX = 90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12500 a1.uFrameZ = 417;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12501 a1.uFrameW = v3 + 67;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
12502 a1.Hint = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12503 a2.y = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[431]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12504 v13 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[433]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12505 v12 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[432]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12506 v4 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[96]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12507 v5 = a2.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12508 if ( v13 > a2.y )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12509 v5 = v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12510 if ( v12 > v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12511 v5 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12512 if ( v4 > v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12513 v5 = v4;
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
12514 sprintf(
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12515 pTmpBuf2,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12516 "%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
12517 v2->pDescription,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12518 pGlobalTXT_LocalizationStrings[431],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12519 v5 + 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12520 v5 + 10,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12521 v2->pBasicSkillDesc,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12522 pGlobalTXT_LocalizationStrings[433],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12523 v5 + 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12524 v5 + 10,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12525 v2->pExpertSkillDesc,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12526 pGlobalTXT_LocalizationStrings[432],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12527 v5 + 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12528 v5 + 10,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12529 v2->pMasterSkillDesc,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12530 pGlobalTXT_LocalizationStrings[96],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12531 v5 + 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12532 v5 + 10,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12533 v2->pGrandmasterSkillDesc);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12534 v6 = pFontSmallnum->CalcTextHeight(pTmpBuf2, &a1, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12535 a1.uFrameHeight += v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12536 if ( (signed int)a1.uFrameHeight < 150 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12537 a1.uFrameHeight = 150;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12538 a1.uFrameWidth = 460;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
12539 a1.DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12540 a1.uFrameWidth -= 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12541 a1.uFrameHeight -= 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12542 v7 = v2->pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12543 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12544 a1.uFrameW = a1.uFrameHeight + a1.uFrameY - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12545 v8 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12546 a1.DrawText2(pFontArrus, 0x78u, 0xCu, v8, v7, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12547 a1.DrawText(pFontSmallnum, 120, 44, 0, pTmpBuf2, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12548 a1.uFrameWidth = 108;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12549 a1.uFrameZ = a1.uFrameX + 107;
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
12550 a1.DrawText2(pFontComic, 0xCu, 0x4Bu, 0, pSkillNames[v1->pNumSpellBookPage + 12], 3u);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
12551 sprintf(
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12552 pTmpBuf,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12553 "%s\n%d",
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12554 pGlobalTXT_LocalizationStrings[522],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12555 *(&pSpellDatas[0].field_14
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
12556 + ((unsigned int)LOBYTE(v1->pActiveSkills[v1->pNumSpellBookPage + 12]) >> 6)
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
12557 + 10 * (int)((char *)v10 + 11 * v1->pNumSpellBookPage)));
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12558 a1.DrawText2(pFontComic, 0xCu, a1.uFrameHeight - LOBYTE(pFontComic->uFontHeight) - 16, 0, pTmpBuf, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12559 dword_507B00_spell_info_to_draw_in_popup = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12560 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12561 // 507B00: using guessed type int dword_507B00_spell_info_to_draw_in_popup;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12562
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12563 //----- (00410D99) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12564 signed int __fastcall sub_410D99_get_map_index(int a1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12565 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12566 int v1; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12567 signed int v2; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12568 const char **v3; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12569 char *v4; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12570
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12571 v1 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12572 v2 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12573 if ( _strcmpi(pMapStats->pInfos[1].pFilename, (const char *)&pGames_LOD->pSubIndices[a1]) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12574 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12575 v3 = (const char **)&pMapStats->pInfos[1].pFilename;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12576 v4 = (char *)&pMapStats->pInfos[1].pFilename;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12577 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12578 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12579 if ( !*(int *)v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12580 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12581 v3 += 17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12582 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12583 v4 = (char *)v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12584 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12585 while ( _strcmpi(*v3, (const char *)&pGames_LOD->pSubIndices[v1]) );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12586 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12587 return v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12588 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12589
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12590 //----- (00410DEC) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12591 unsigned int __cdecl DrawLloydBeaconsScreen()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12592 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12593 Player *v0; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12594 char *v1; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12595 unsigned __int16 v2; // ax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12596 unsigned int result; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12597 unsigned int v4; // esi@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12598 unsigned int v5; // ecx@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12599 char v6; // zf@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12600 LloydBeacon *v7; // esi@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12601 int v8; // eax@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12602 unsigned __int64 v9; // kr08_8@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12603 unsigned int v10; // esi@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12604 unsigned int v11; // eax@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12605 char *v12; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12606 char *v13; // ecx@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12607 int v14; // eax@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12608 unsigned int v15; // [sp-10h] [bp-98h]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12609 unsigned __int16 v16; // [sp-Ch] [bp-94h]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12610 int v17; // [sp-8h] [bp-90h]@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12611 char *v18; // [sp-8h] [bp-90h]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12612 Texture *v19; // [sp-4h] [bp-8Ch]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12613 char *v20; // [sp-4h] [bp-8Ch]@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12614 unsigned int v21; // [sp-4h] [bp-8Ch]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12615 GUIWindow v22; // [sp+Ch] [bp-7Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12616 unsigned int v23; // [sp+64h] [bp-24h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12617 __int64 v24; // [sp+68h] [bp-20h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12618 unsigned int v25; // [sp+70h] [bp-18h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12619 char *Str; // [sp+74h] [bp-14h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12620 int v27; // [sp+78h] [bp-10h]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12621 LloydBeacon *v28; // [sp+7Ch] [bp-Ch]@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12622 RGBTexture *v29; // [sp+80h] [bp-8h]@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12623 int uNumMaxBeacons; // [sp+84h] [bp-4h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12624
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12625 v0 = &pParty->pPlayers[_506348_current_lloyd_playerid];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12626 pRenderer->DrawTextureIndexed(8u, 8u, pTexture_LloydBeacons[(unsigned __int8)bRecallingBeacon]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12627 v1 = pGlobalTXT_LocalizationStrings[523]; // Recall Beacon
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12628 v22.uFrameX = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12629 v22.uFrameY = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12630 v22.uFrameWidth = 428;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12631 v22.uFrameHeight = 344;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12632 v22.uFrameZ = 435;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12633 v22.uFrameW = 351;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12634 if ( !bRecallingBeacon )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12635 v1 = pGlobalTXT_LocalizationStrings[375]; // Set Beacon
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
12636 sprintf(pTmpBuf, "%s", v1);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12637 v22.DrawText2(pBook2Font, 0, 22u, 0, pTmpBuf, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12638 if ( bRecallingBeacon )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12639 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12640 pRenderer->DrawTextureTransparent(pBtn_Book_1->uX, pBtn_Book_1->uY, pTex_tab_an_6b__zoom_on);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12641 v19 = pTex_tab_an_6a__zoom_off;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12642 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12643 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12644 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12645 pRenderer->DrawTextureTransparent(pBtn_Book_1->uX, pBtn_Book_1->uY, pTex_tab_an_6a__zoom_off);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12646 v19 = pTex_tab_an_6b__zoom_on;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12647 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12648 pRenderer->DrawTextureTransparent(pBtn_Book_2->uX, pBtn_Book_2->uY, v19);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12649 v2 = v0->pActiveSkills[14];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12650 uNumMaxBeacons = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12651 if ( HIBYTE(v2) & 1 || (v2 & 0x80u) != 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12652 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12653 uNumMaxBeacons = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12654 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12655 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12656 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12657 if ( v2 & 0x40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12658 uNumMaxBeacons = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12659 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12660 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12661 v27 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12662 if ( uNumMaxBeacons > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12663 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12664 v29 = pSavegameThumbnails;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12665 v28 = v0->pInstalledBeacons;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12666 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12667 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12668 v22.uFrameWidth = 92;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12669 v4 = result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12670 v22.uFrameHeight = 68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12671 v5 = pLloydsBeaconsPreviewXs[result];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12672 v22.uFrameY = pLloydsBeaconsPreviewYs[result];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12673 v25 = v22.uFrameY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12674 v22.uFrameX = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12675 v22.uFrameW = v22.uFrameY + 67;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12676 v6 = v29->pPixels == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12677 v22.uFrameZ = v5 + 91;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12678 if ( !v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12679 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12680 if ( !bRecallingBeacon )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12681 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12682 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12683 pLloydsBeacons_SomeXs[v4],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12684 pLloydsBeacons_SomeYs[v4],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12685 pTexture_CurrentBook);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12686 v21 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12687 v18 = pGlobalTXT_LocalizationStrings[19];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12688 v16 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12689 v14 = pSpellFont->CalcTextHeight(pGlobalTXT_LocalizationStrings[19], &v22, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12690 v15 = (signed int)v22.uFrameHeight / 2 - v14 / 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12691 goto LABEL_28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12692 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12693 LABEL_29:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12694 ++v29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12695 ++v28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12696 result = v27++ + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12697 if ( v27 >= uNumMaxBeacons )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12698 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12699 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12700 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12701 pLloydsBeacons_SomeXs[v4],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12702 pLloydsBeacons_SomeYs[v4],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12703 pTexture_CurrentBook);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12704 pRenderer->DrawTextureRGB(pLloydsBeaconsPreviewXs[v4], pLloydsBeaconsPreviewYs[v4], v29);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12705 v7 = v28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12706 Str = pMapStats->pInfos[sub_410D99_get_map_index(HIWORD(v28->field_18))].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12707 v8 = pSpellFont->CalcTextHeight(Str, &v22, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12708 v22.uFrameY += -6 - v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12709 v22.DrawText2(pSpellFont, 0, 0, 1u, Str, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12710 v9 = v7->uBeaconTime - pParty->uTimePlayed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12711 LODWORD(v24) = LODWORD(v7->uBeaconTime) - LODWORD(pParty->uTimePlayed);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12712 HIDWORD(v24) = HIDWORD(v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12713 v23 = (unsigned __int64)((signed __int64)((double)v24 * 0.234375) / 60 / 60) >> 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12714 v10 = (signed __int64)((double)v24 * 0.234375) / 60 / 60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12715 v11 = v10 / 0x18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12716 if ( (unsigned int)((signed __int64)((double)v24 * 0.234375) / 60 / 60) / 0x18 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12717 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12718 v13 = pGlobalTXT_LocalizationStrings[57]; // Days
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12719 if ( v11 > 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12720 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12721 LABEL_24:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12722 v20 = v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12723 v17 = v11 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12724 LABEL_25:
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
12725 sprintf(pTmpBuf, "%lu %s", v17, v20);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12726 v21 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12727 v18 = pTmpBuf;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12728 v16 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12729 v22.uFrameY = v25 + v22.uFrameHeight + 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12730 v15 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12731 LABEL_28:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12732 v22.DrawText2(pSpellFont, 0, v15, v16, v18, v21);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12733 goto LABEL_29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12734 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12735 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12736 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12737 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12738 if ( (signed __int64)(__PAIR__(v23, v10) + 1) <= 23 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12739 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12740 if ( (v23 & 0x80000000u) != 0 || (signed int)v23 <= 0 && v10 <= 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12741 v12 = pGlobalTXT_LocalizationStrings[109];// Hour
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12742 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12743 v12 = pGlobalTXT_LocalizationStrings[110];// Hours
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12744 v20 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12745 v17 = v10 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12746 goto LABEL_25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12747 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12748 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12749 v13 = pGlobalTXT_LocalizationStrings[56]; // Day
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12750 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12751 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12752 LABEL_30:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12753 if ( byte_506360 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12754 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12755 result = pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12756 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12757 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12758 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)181;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12759 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12760 result = 3 * pMessageQueue_50CBD0->uNumMessages + 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12761 *(&pMessageQueue_50CBD0->uNumMessages + result) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12762 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12763 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12764 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12765 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12766 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12767
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12768
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12769 //----- (00411150) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12770 char *__cdecl DrawTownPortalScreen()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12771 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12772 signed int v0; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12773 __int16 v1; // dx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12774 POINT *v2; // edi@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12775 int v3; // edi@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12776 __int16 v4; // dx@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12777 GUIWindow v6; // [sp+Ch] [bp-64h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12778 POINT v7; // [sp+60h] [bp-10h]@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12779 POINT a2; // [sp+68h] [bp-8h]@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12780
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12781 pRenderer->ClearZBuffer(0, 479);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12782 pRenderer->DrawTextureTransparent(8u, 8u, pTexture_CurrentBook);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12783 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12784 0x1D7u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12785 0x1BDu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12786 (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12787 v6.uFrameX = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12788 v6.uFrameY = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12789 v6.uFrameWidth = 460;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12790 v6.uFrameHeight = 344;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12791 v6.uFrameZ = 467;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12792 v6.uFrameW = 351;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12793 v0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12794 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12795 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12796 if ( !v0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12797 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12798 v1 = 206;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12799 LABEL_14:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12800 if ( !(unsigned __int16)_449B57_test_bit(pParty->_award_bits, v1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12801 goto LABEL_16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12802 goto LABEL_15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12803 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12804 if ( v0 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12805 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12806 v1 = 208;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12807 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12808 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12809 if ( v0 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12810 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12811 v1 = 207;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12812 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12813 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12814 if ( v0 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12815 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12816 v1 = 211;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12817 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12818 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12819 if ( v0 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12820 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12821 v1 = 209;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12822 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12823 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12824 if ( v0 == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12825 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12826 v1 = 210;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12827 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12828 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12829 LABEL_15:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12830 pRenderer->_4A612A(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12831 pTownPortalBook_xs[v0],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12832 pTownPortalBook_ys[v0],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12833 *(&pTexture_TownPortalHarmn + v0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12834 v0 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12835 LABEL_16:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12836 ++v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12837 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12838 while ( v0 < 6 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12839 v2 = pMouse->GetCursorPos(&a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12840 v3 = pRenderer->pActiveZBuffer[v2->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v7)->y]] & 0xFFFF;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12841 if ( !v3 ) // Town Portal
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12842 return v6.DrawText2(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12843 if ( v3 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12844 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12845 v4 = 206;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12846 LABEL_30:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12847 if ( (unsigned __int16)_449B57_test_bit(pParty->_award_bits, v4) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12848 goto LABEL_31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12849 return v6.DrawText2(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12850 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12851 if ( v3 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12852 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12853 v4 = 208;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12854 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12855 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12856 if ( v3 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12857 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12858 v4 = 207;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12859 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12860 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12861 if ( v3 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12862 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12863 v4 = 211;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12864 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12865 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12866 if ( v3 == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12867 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12868 v4 = 209;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12869 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12870 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12871 if ( v3 == 6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12872 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12873 v4 = 210;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12874 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12875 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12876 LABEL_31:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12877 pRenderer->DrawTextureIndexed(word_4E1D3A[v3], pTownPortalBook_xs[v3 + 5], *(&pTex_tab_an_6b__zoom_on + v3));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12878 return v6.DrawText2(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12879 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12880 // 4E1D3A: using guessed type __int16 word_4E1D3A[];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12881
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12882 //----- (00411300) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12883 Texture *__fastcall LoadSpellbook(unsigned int uID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12884 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12885 unsigned int v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12886 Player *pPlayer; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12887 char v3; // al@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12888 int v4; // edi@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12889 Texture *result; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12890 char *v6; // edi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12891 unsigned int v7; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12892 unsigned __int8 v8; // sf@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12893 unsigned __int8 v9; // of@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12894 char pContainer[20]; // [sp+Ch] [bp-1Ch]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12895 Texture *v11; // [sp+20h] [bp-8h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12896 int v12; // [sp+24h] [bp-4h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12897
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12898 byte_506550 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12899 v1 = uID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12900 pPlayer = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12901 v3 = pPlayer->uQuickSpell;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12902 if ( v3 && (unsigned __int8)v3 / 11 == v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12903 dword_50654C = (unsigned __int8)v3 - 11 * v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12904 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12905 dword_50654C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12906 v4 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12907 v12 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12908 v11 = (Texture *)&pPlayer->field_152[11 * v1 + 63];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12909 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12910 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12911 result = v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12912 if ( v11->pName[v4] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12913 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12914 v6 = &byte_4E2430[12 * v1] + v4;
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
12915 sprintf(pContainer, "SB%sS%02d", spellbook_texture_filename_suffices[v1], (unsigned __int8)*v6);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12916 v7 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12917 dword_506408[v12] = 72 * v7 + 7145548;
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
12918 sprintf(pContainer, "SB%sC%02d", spellbook_texture_filename_suffices[v1], (unsigned __int8)*v6);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12919 result = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12920 dword_5063D8[v12] = result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12921 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12922 v4 = v12 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12923 v9 = __OFSUB__(v12 + 1, 12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12924 v8 = v12++ - 11 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12925 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12926 while ( v8 ^ v9 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12927 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12928 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12929 // 4E1D18: using guessed type char *spellbook_texture_filename_suffices[8];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12930 // 506408: using guessed type int dword_506408[];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12931 // 50654C: using guessed type int dword_50654C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12932 // 506550: using guessed type char byte_506550;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12933
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12934 //----- (0041140B) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12935 GUIWindow *__cdecl sub_41140B()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12936 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12937 signed int v0; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12938 GUIButton *v1; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12939 GUIButton *v2; // esi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12940 GUIWindow *result; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12941
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12942 v0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12943 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12944 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12945 dword_506404[v0]->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12946 dword_506434[v0]->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12947 --v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12948 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12949 while ( v0 >= -11 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12950 pIcons_LOD->_40F9C5();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12951 v1 = pGUIWindow_CurrentMenu->pControlsHead;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12952 if ( v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12953 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12954 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12955 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12956 v2 = v1->pNext;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12957 pAllocator->FreeChunk(v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12958 v1 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12959 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12960 while ( v2 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12961 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12962 pGUIWindow_CurrentMenu->pControlsHead = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12963 pGUIWindow_CurrentMenu->pControlsTail = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12964 result = pGUIWindow_CurrentMenu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12965 pGUIWindow_CurrentMenu->uNumControls = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12966 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12967 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12968
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12969 //----- (00411473) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12970 void __cdecl sub_411473()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12971 {
84
b39bdc150e90 Some inventory stuff
Nomad
parents: 82
diff changeset
12972 Texture **v0; // esi@1
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12973 Texture **v1; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12974 Texture *v2; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12975 Texture *v3; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12976
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12977 pTexture_pagemask->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12978 pTexture_506448->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12979 pTexture_50643C->Release();
84
b39bdc150e90 Some inventory stuff
Nomad
parents: 82
diff changeset
12980 v0 = &pTextures_tabs[0][1];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12981 v1 = pTextures_5064A0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12982 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12983 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12984 (*v1)->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12985 v2 = (Texture *)*((int *)v0 - 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12986 *v1 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12987 v2->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12988 v3 = *(Texture **)v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12989 *((int *)v0 - 1) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12990 v3->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12991 *(int *)v0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12992 ++v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12993 v0 += 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12994 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12995 while ( (signed int)v1 < (signed int)&pTextures_5064A0[9] );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12996 pAudioPlayer->PlaySound((SoundID)231, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12997 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12998 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12999
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13000
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13001 //----- (00411597) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13002 void __cdecl OnCloseSpellook()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13003 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13004 pAllocator->FreeChunk(pSpellFont);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13005 pSpellFont = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13006 pAllocator->FreeChunk(pBookFont);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13007 pBookFont = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13008 pAllocator->FreeChunk(pBook2Font);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13009 pBook2Font = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13010 pAllocator->FreeChunk(pAutonoteFont);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13011 pAutonoteFont = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13012 pTexture_mapbordr->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13013 pAudioPlayer->PlaySound((SoundID)231, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13014 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13015 dword_506364 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13016 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13017 // 506364: using guessed type int dword_506364;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13018
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13019
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13020
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13021
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13022
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13023
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13024
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13025 //----- (00412AF9) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13026 void __cdecl sub_412AF9()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13027 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13028 int v0; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13029
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13030 v0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13031 if ( uActiveCharacter )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13032 v0 = *((char *)&pParty->pPartyBuffs[5].uExpireTime + 6972 * uActiveCharacter + 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13033 pRenderer->DrawTextureIndexed(8u, 8u, pTextures_5064A0[v0]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13034 pRenderer->DrawTextureIndexed(0x1DCu, 0x1C2u, pTexture_50643C);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13035 pRenderer->DrawTextureIndexed(0x231u, 0x1C2u, pTexture_506448);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13036 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13037
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13038 //----- (00412B58) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13039 void __cdecl sub_412B58()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13040 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13041 Player *v0; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13042 int v1; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13043 unsigned int v2; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13044 Texture *v3; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13045 int v4; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13046 Texture *v5; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13047 Texture *v6; // edx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13048 int v7; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13049 int v8; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13050 POINT *v9; // esi@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13051 int v10; // eax@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13052 Texture *v11; // edx@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13053 int v12; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13054 signed int v13; // ecx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13055 unsigned int v14; // esi@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13056 unsigned int v15; // edi@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13057 Texture *v16; // eax@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13058 unsigned int v17; // [sp-Ch] [bp-2Ch]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13059 unsigned int v18; // [sp-Ch] [bp-2Ch]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13060 unsigned int v19; // [sp-8h] [bp-28h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13061 unsigned int v20; // [sp-8h] [bp-28h]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13062 Texture *v21; // [sp-4h] [bp-24h]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13063 signed int v22; // [sp-4h] [bp-24h]@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13064 int v23[2]; // [sp+10h] [bp-10h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13065 POINT a2; // [sp+18h] [bp-8h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13066
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13067 sub_412AF9();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13068 v0 = pPlayers[uActiveCharacter];
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
13069 v1 = 11 * v0->pNumSpellBookPage;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13070 v2 = pIcons_LOD->FindTextureByName("Pending");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13071 v3 = (Texture *)(v2 != -1 ? (int)&pIcons_LOD->pTextures[v2] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13072 pRenderer->ClearZBuffer(0, 479);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13073 v4 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13074 if ( __OFSUB__(v1, v1 + 11) ^ 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13075 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13076 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13077 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13078 if ( *(&v0->field_152[v1 + 63] + v4) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13079 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13080 v5 = (Texture *)dword_506408[v4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13081 if ( v5 != v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13082 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13083 if ( dword_50654C == v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13084 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13085 v6 = dword_5063D8[v4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13086 v23[0] = (int)dword_5063D8[v4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13087 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13088 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13089 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13090 v23[0] = dword_506408[v4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13091 v6 = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13092 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13093 if ( v6->pLevelOfDetail0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13094 {
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
13095 v7 = 2 * (12 * v0->pNumSpellBookPage + (unsigned __int8)*(&byte_4E2430[12 * v0->pNumSpellBookPage + v4]));
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13096 v19 = pViewport->uViewportY + dword_4E20D0[v7 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13097 v17 = pViewport->uViewportX + dword_4E20D0[v7];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13098 if ( BYTE1(v6->pBits) & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13099 pRenderer->DrawTextureTransparent(v17, v19, v6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13100 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13101 pRenderer->DrawTextureIndexed(v17, v19, v6);
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
13102 v8 = 2 * (12 * v0->pNumSpellBookPage + (unsigned __int8)*(&byte_4E2430[12 * v0->pNumSpellBookPage] + v4));
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13103 pRenderer->_4A612A(dword_4E20D0[v8], dword_4E20D0[v8 + 1], (Texture *)v23[0], v4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13104 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13105 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13106 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13107 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13108 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13109 while ( v4 + v1 - 1 < v1 + 11 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13110 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13111 v9 = pMouse->GetCursorPos(&a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13112 v10 = pRenderer->pActiveZBuffer[v9->x + pSRZBufferLineOffsets[pMouse->GetCursorPos((POINT *)v23)->y]] & 0xFFFF;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13113 if ( v10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13114 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13115 v11 = dword_5063D8[v10];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13116 if ( v11->pLevelOfDetail0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13117 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13118 v21 = dword_5063D8[v10];
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
13119 v12 = 2 * (12 * v0->pNumSpellBookPage + (unsigned __int8)*(&byte_4E2430[12 * v0->pNumSpellBookPage] + v10));
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13120 v20 = pViewport->uViewportY + dword_4E20D0[v12 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13121 v18 = pViewport->uViewportX + dword_4E20D0[v12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13122 if ( BYTE1(v11->pBits) & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13123 pRenderer->DrawTextureTransparent(v18, v20, v21);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13124 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13125 pRenderer->DrawTextureIndexed(v18, v20, v21);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13126 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13127 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13128 v13 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13129 a2.x = (LONG)&v0->pActiveSkills[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13130 v14 = (unsigned int)&v0->pActiveSkills[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13131 v15 = (unsigned int)&v0->pActiveSkills[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13132 v23[0] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13133 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13134 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13135 if ( *(short *)a2.x )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13136 {
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
13137 if ( v0->pNumSpellBookPage == v13 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13138 {
84
b39bdc150e90 Some inventory stuff
Nomad
parents: 82
diff changeset
13139 v16 = pTextures_tabs[v13][1];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13140 switch ( v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13141 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13142 case 0:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13143 v14 = 406;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13144 v22 = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13145 goto LABEL_27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13146 case 1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13147 v14 = 406;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13148 goto LABEL_38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13149 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13150 v14 = 406;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13151 v22 = 84;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13152 goto LABEL_27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13153 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13154 v14 = 406;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13155 goto LABEL_26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13156 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13157 v14 = 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13158 goto LABEL_29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13159 case 5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13160 v15 = 196;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13161 goto LABEL_34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13162 case 6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13163 v15 = 234;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13164 goto LABEL_34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13165 case 7:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13166 v15 = 272;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13167 goto LABEL_34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13168 case 8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13169 v15 = 309;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13170 LABEL_34:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13171 v14 = 405;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13172 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13173 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13174 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13175 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13176 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13177 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13178 {
84
b39bdc150e90 Some inventory stuff
Nomad
parents: 82
diff changeset
13179 v16 = pTextures_tabs[v13][0];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13180 switch ( v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13181 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13182 case 0:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13183 v14 = 415;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13184 v22 = 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13185 goto LABEL_27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13186 case 1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13187 v14 = 415;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13188 LABEL_38:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13189 v22 = 46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13190 goto LABEL_27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13191 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13192 v14 = 415;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13193 v22 = 83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13194 goto LABEL_27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13195 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13196 v14 = 415;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13197 LABEL_26:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13198 v22 = 121;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13199 LABEL_27:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13200 v15 = v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13201 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13202 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13203 v14 = 415;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13204 LABEL_29:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13205 v15 = 158;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13206 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13207 case 5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13208 v15 = 196;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13209 goto LABEL_46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13210 case 6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13211 v15 = 234;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13212 goto LABEL_46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13213 case 7:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13214 v15 = 271;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13215 goto LABEL_46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13216 case 8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13217 v15 = 307;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13218 LABEL_46:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13219 v14 = 416;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13220 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13221 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13222 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13223 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13224 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13225 pRenderer->DrawTextureTransparent(v14, v15, v16);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13226 v13 = v23[0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13227 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13228 a2.x += 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13229 ++v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13230 v23[0] = v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13231 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13232 while ( v13 < 9 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13233 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13234 // 506408: using guessed type int dword_506408[];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13235 // 50654C: using guessed type int dword_50654C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13236
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13237 //----- (00412E85) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13238 char __cdecl sub_412E85()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13239 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13240 unsigned int v0; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13241 unsigned int v1; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13242 int v2; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13243 const char *v3; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13244 signed int v4; // ecx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13245 int v5; // ecx@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13246 int v6; // eax@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13247 int v7; // esi@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13248 char *v8; // eax@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13249 int v9; // eax@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13250 unsigned int v11; // [sp-8h] [bp-64h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13251 unsigned int v12; // [sp-8h] [bp-64h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13252 Texture *v13; // [sp-4h] [bp-60h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13253 Texture *v14; // [sp-4h] [bp-60h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13254 GUIWindow a1; // [sp+8h] [bp-54h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13255
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13256 pRenderer->DrawTextureIndexed(pViewport->uViewportX, pViewport->uViewportY, pTextures_5064A0[11]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13257 if ( dword_506548 || !dword_506528 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13258 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13259 v13 = pTex_tab_an_6a__zoom_off;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13260 v11 = pViewport->uViewportY + 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13261 v0 = pViewport->uViewportX + 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13262 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13263 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13264 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13265 v13 = pTex_tab_an_6b__zoom_on;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13266 v11 = pViewport->uViewportY + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13267 v0 = pViewport->uViewportX + 398;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13268 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13269 pRenderer->DrawTextureTransparent(v0, v11, v13);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13270 if ( dword_506544 || dword_506528 + dword_506520 >= dword_506524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13271 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13272 v14 = pTex_tab_an_7a__zoot_off;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13273 v12 = pViewport->uViewportY + 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13274 v1 = pViewport->uViewportX + 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13275 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13276 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13277 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13278 v14 = pTex_tab_an_7b__zoot_on;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13279 v12 = pViewport->uViewportY + 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13280 v1 = pViewport->uViewportX + 398;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13281 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13282 pRenderer->DrawTextureTransparent(v1, v12, v14);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13283 if ( !byte_5C6D50[dword_506528] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13284 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13285 v2 = pStru179->field_0[dword_506528];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13286 a1.uFrameWidth = 460;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13287 a1.uFrameX = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13288 a1.uFrameY = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13289 a1.uFrameHeight = 344;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13290 v3 = (const char *)pStorylineText->field_4[3 * v2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13291 a1.uFrameZ = 467;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13292 a1.uFrameW = 351;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13293 if ( v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13294 a1.DrawText2(pBook2Font, 0, 0x16u, 0, v3, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13295 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13296 a1.uFrameX = 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13297 a1.uFrameY = 70;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13298 a1.uFrameWidth = 360;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13299 a1.uFrameHeight = 264;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13300 v4 = LOBYTE(pAutonoteFont->uFontHeight) - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13301 a1.uFrameZ = 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13302 a1.uFrameHeight = v4 * 264 / v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13303 a1.uFrameW = a1.uFrameHeight + 69;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13304 if ( dword_506544 && dword_506528 + dword_506520 < dword_506524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13305 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13306 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13307 v5 = dword_50651C++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13308 dword_506528 += dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13309 byte_506130[v5] = dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13310 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13311 if ( dword_506548 && dword_50651C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13312 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13313 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13314 --dword_50651C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13315 dword_506528 -= (unsigned __int8)byte_506130[dword_50651C];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13316 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13317 if ( !dword_506520 || dword_506528 < 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13318 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13319 dword_506528 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13320 dword_50651C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13321 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13322 dword_506544 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13323 v6 = pStru179->field_0[dword_506528];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13324 dword_506548 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13325 dword_506520 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13326 v7 = *(&pStorylineText->field_0 + 3 * v6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13327 v8 = sub_495461(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13328 *((char **)&pStorylineText->field_0 + 3 * v6),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13329 uActiveCharacter - 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13330 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13331 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13332 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13333 (__int64 *)&pParty->field_3C.field_440[2 * v6 + 42]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13334 if ( v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13335 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13336 v9 = pAutonoteFont->_44C6C2(v8, &a1, 1u, (unsigned __int8)byte_5C6D50[dword_506528]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13337 LOBYTE(v8) = a1.DrawText(pAutonoteFont, 1, 0, 0, (const char *)v9, 0, a1.uFrameY + a1.uFrameHeight, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13338 ++dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13339 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13340 return (char)v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13341 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13342
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13343
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13344 //----- (00413126) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13345 void __cdecl DrawSpellbook_Quests()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13346 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13347 unsigned int v0; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13348 unsigned int v1; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13349 int v2; // ecx@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13350 int v3; // ebx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13351 int v4; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13352 const char *v5; // edi@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13353 int v6; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13354 unsigned int v7; // edi@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13355 unsigned int v8; // [sp-8h] [bp-68h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13356 unsigned int v9; // [sp-8h] [bp-68h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13357 Texture *v10; // [sp-4h] [bp-64h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13358 Texture *v11; // [sp-4h] [bp-64h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13359 GUIWindow a1; // [sp+Ch] [bp-54h]@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13360
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13361 pRenderer->DrawTextureIndexed(pViewport->uViewportX, pViewport->uViewportY, pTexture_CurrentBook);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13362 if ( dword_506548 || !dword_506528 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13363 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13364 v10 = pTex_tab_an_6a__zoom_off;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13365 v8 = pViewport->uViewportY + 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13366 v0 = pViewport->uViewportX + 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13367 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13368 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13369 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13370 v10 = pTex_tab_an_6b__zoom_on;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13371 v8 = pViewport->uViewportY + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13372 v0 = pViewport->uViewportX + 398;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13373 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13374 pRenderer->DrawTextureTransparent(v0, v8, v10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13375 if ( dword_506544 || dword_506528 + dword_506520 >= dword_506524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13376 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13377 v11 = pTex_tab_an_7a__zoot_off;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13378 v9 = pViewport->uViewportY + 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13379 v1 = pViewport->uViewportX + 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13380 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13381 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13382 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13383 v11 = pTex_tab_an_7b__zoot_on;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13384 v9 = pViewport->uViewportY + 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13385 v1 = pViewport->uViewportX + 398;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13386 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13387 pRenderer->DrawTextureTransparent(v1, v9, v11);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13388 a1.uFrameWidth = 460;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13389 a1.uFrameHeight = 344;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13390 a1.uFrameX = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13391 a1.uFrameY = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13392 a1.uFrameZ = 467;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13393 a1.uFrameW = 351;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13394 a1.DrawText2(pBook2Font, 0, 0x16u, 0, pGlobalTXT_LocalizationStrings[174], 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13395 a1.uFrameX = 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13396 a1.uFrameY = 70;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13397 a1.uFrameWidth = 360;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13398 a1.uFrameHeight = 264;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13399 a1.uFrameZ = 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13400 a1.uFrameW = 333;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13401 if ( dword_506544 && dword_506528 + dword_506520 < dword_506524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13402 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13403 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13404 v2 = dword_50651C++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13405 dword_506528 += dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13406 byte_506130[v2] = dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13407 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13408 if ( dword_506548 && dword_50651C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13409 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13410 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13411 --dword_50651C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13412 dword_506528 -= (unsigned __int8)byte_506130[dword_50651C];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13413 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13414 if ( !dword_506520 || (v3 = dword_506528, dword_506528 < 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13415 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13416 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13417 dword_50651C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13418 dword_506528 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13419 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13420 dword_506544 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13421 dword_506548 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13422 dword_506520 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13423 while ( v3 < dword_506524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13424 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13425 v4 = pStru179->field_0[v3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13426 ++dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13427 v5 = (&dword_722F10)[4 * v4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13428 a1.DrawText(pAutonoteFont, 1, 0, 0, (&dword_722F10)[4 * v4], 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13429 v6 = pAutonoteFont->CalcTextHeight(v5, &a1, 1, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13430 v7 = a1.uFrameY + v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13431 if ( (signed int)(a1.uFrameY + v6) > (signed int)a1.uFrameHeight )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13432 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13433 pRenderer->DrawTextureTransparent(0x64u, v7 + 12, pTextures_5064A0[10]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13434 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13435 a1.uFrameY = v7 + 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13436 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13437 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13438
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13439
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13440 //----- (0041338E) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13441 void __cdecl DrawSpellbook_Autonotes()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13442 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13443 unsigned int v0; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13444 unsigned int v1; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13445 signed int v2; // ebp@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13446 unsigned int v3; // eax@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13447 unsigned int v4; // eax@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13448 unsigned int v5; // eax@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13449 unsigned int v6; // eax@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13450 unsigned int v7; // eax@42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13451 signed int v8; // ebp@47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13452 int v9; // eax@52
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13453 int v10; // eax@56
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13454 int v11; // edx@57
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13455 int v12; // ebp@64
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13456 int v13; // eax@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13457 const char *v14; // edi@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13458 int v15; // eax@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13459 unsigned int v16; // edi@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13460 unsigned int v17; // [sp-8h] [bp-70h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13461 unsigned int v18; // [sp-8h] [bp-70h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13462 unsigned int v19; // [sp-8h] [bp-70h]@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13463 unsigned int v20; // [sp-8h] [bp-70h]@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13464 unsigned int v21; // [sp-8h] [bp-70h]@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13465 unsigned int v22; // [sp-8h] [bp-70h]@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13466 unsigned int v23; // [sp-8h] [bp-70h]@42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13467 Texture *v24; // [sp-4h] [bp-6Ch]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13468 Texture *v25; // [sp-4h] [bp-6Ch]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13469 Texture *v26; // [sp-4h] [bp-6Ch]@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13470 Texture *v27; // [sp-4h] [bp-6Ch]@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13471 Texture *v28; // [sp-4h] [bp-6Ch]@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13472 Texture *v29; // [sp-4h] [bp-6Ch]@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13473 Texture *v30; // [sp-4h] [bp-6Ch]@42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13474 signed __int16 v31; // [sp+10h] [bp-58h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13475 char *v32; // [sp+10h] [bp-58h]@49
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13476 GUIWindow a1; // [sp+14h] [bp-54h]@46
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13477
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13478 v31 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13479 pRenderer->DrawTextureIndexed(pViewport->uViewportX, pViewport->uViewportY, pTexture_AutonotesBook);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13480 if ( dword_506548 || !dword_506528 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13481 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13482 v24 = pTex_tab_an_6a__zoom_off;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13483 v17 = pViewport->uViewportY + 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13484 v0 = pViewport->uViewportX + 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13485 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13486 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13487 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13488 v24 = pTex_tab_an_6b__zoom_on;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13489 v17 = pViewport->uViewportY + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13490 v0 = pViewport->uViewportX + 398;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13491 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13492 pRenderer->DrawTextureTransparent(v0, v17, v24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13493 if ( dword_506544 || dword_506528 + dword_506520 >= dword_506524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13494 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13495 v25 = pTex_tab_an_7a__zoot_off;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13496 v18 = pViewport->uViewportY + 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13497 v1 = pViewport->uViewportX + 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13498 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13499 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13500 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13501 v25 = pTex_tab_an_7b__zoot_on;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13502 v18 = pViewport->uViewportY + 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13503 v1 = pViewport->uViewportX + 398;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13504 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13505 pRenderer->DrawTextureTransparent(v1, v18, v25);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13506 if ( !dword_506540 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13507 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13508 if ( dword_506568 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13509 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13510 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13511 pViewport->uViewportX + 408,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13512 pViewport->uViewportY + 113,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13513 pTexture_506390);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13514 v2 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13515 goto LABEL_16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13516 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13517 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13518 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13519 if ( !dword_506568 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13520 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13521 LABEL_14:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13522 v2 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13523 goto LABEL_15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13524 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13525 v2 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13526 v31 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13527 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13528 LABEL_15:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13529 dword_506568 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13530 pRenderer->DrawTextureTransparent(pViewport->uViewportX + 398, pViewport->uViewportY + 113, pTexture_506394);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13531 LABEL_16:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13532 if ( dword_50653C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13533 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13534 if ( dword_506568 != v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13535 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13536 v31 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13537 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13538 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13539 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13540 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13541 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13542 if ( dword_506568 != v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13543 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13544 v26 = pTexture_506388;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13545 v19 = pViewport->uViewportY + 150;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13546 v3 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13547 goto LABEL_22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13548 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13549 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13550 v26 = pTexture_50638C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13551 dword_506568 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13552 v19 = pViewport->uViewportY + 150;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13553 v3 = pViewport->uViewportX + 399;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13554 LABEL_22:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13555 pRenderer->DrawTextureTransparent(v3, v19, v26);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13556 if ( dword_506538 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13557 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13558 if ( dword_506568 != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13559 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13560 v31 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13561 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13562 }
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 if ( dword_506568 != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13567 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13568 v27 = pTexture_506380;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13569 v20 = pViewport->uViewportY + 188;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13570 v4 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13571 goto LABEL_28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13572 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13573 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13574 v27 = pTexture_506384;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13575 dword_506568 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13576 v20 = pViewport->uViewportY + 188;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13577 v4 = pViewport->uViewportX + 397;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13578 LABEL_28:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13579 pRenderer->DrawTextureTransparent(v4, v20, v27);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13580 if ( dword_506534 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13581 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13582 if ( dword_506568 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13583 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13584 v31 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13585 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13586 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13587 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13588 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13589 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13590 if ( dword_506568 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13591 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13592 v28 = pTexture_506378;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13593 v21 = pViewport->uViewportY + 226;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13594 v5 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13595 goto LABEL_34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13596 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13597 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13598 v28 = pTexture_50637C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13599 dword_506568 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13600 v21 = pViewport->uViewportY + 226;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13601 v5 = pViewport->uViewportX + 397;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13602 LABEL_34:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13603 pRenderer->DrawTextureTransparent(v5, v21, v28);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13604 if ( dword_506530 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13605 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13606 if ( dword_506568 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13607 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13608 v31 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13609 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13610 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13611 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13612 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13613 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13614 if ( dword_506568 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13615 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13616 v29 = pTexture_506370;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13617 v22 = pViewport->uViewportY + 263;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13618 v6 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13619 goto LABEL_40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13620 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13621 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13622 v29 = pTexture_506374;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13623 dword_506568 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13624 v22 = pViewport->uViewportY + 264;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13625 v6 = pViewport->uViewportX + 397;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13626 LABEL_40:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13627 pRenderer->DrawTextureTransparent(v6, v22, v29);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13628 if ( dword_50652C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13629 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13630 if ( dword_506568 != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13631 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13632 v31 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13633 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13634 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13635 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13636 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13637 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13638 if ( dword_506568 != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13639 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13640 v30 = pTexture_506368;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13641 v23 = pViewport->uViewportY + 302;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13642 v7 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13643 goto LABEL_46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13644 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13645 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13646 v30 = pTexture_50636C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13647 dword_506568 = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13648 v23 = pViewport->uViewportY + 302;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13649 v7 = pViewport->uViewportX + 397;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13650 LABEL_46:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13651 pRenderer->DrawTextureTransparent(v7, v23, v30);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13652 a1.uFrameWidth = 460;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13653 a1.uFrameHeight = 344;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13654 a1.uFrameX = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13655 a1.uFrameY = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13656 a1.uFrameZ = 467;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13657 a1.uFrameW = 467;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13658 a1.DrawText2(pBook2Font, 0, 0x16u, 0, pGlobalTXT_LocalizationStrings[154], 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13659 a1.uFrameX = 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13660 a1.uFrameY = 70;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13661 a1.uFrameWidth = 360;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13662 a1.uFrameHeight = 264;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13663 a1.uFrameZ = 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13664 a1.uFrameW = 333;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13665 if ( v31 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13666 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13667 dword_506524 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13668 dword_506528 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13669 dword_50651C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13670 dword_506520 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13671 v8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13672 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13673 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13674 if ( dword_72371C[2 * v8] == dword_506568 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13675 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13676 v32 = (&dword_723718_autonote_related)[8 * (signed __int16)v8];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13677 if ( (short)v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13678 {
26
93bf1d5f6a6d Game loading.
Nomad
parents: 23
diff changeset
13679 if ( (unsigned __int16)_449B57_test_bit(pParty->_autonote_bits, v8) && v32 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13680 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13681 v9 = dword_506520++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13682 pStru179->field_0[v9] = (signed __int16)v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13683 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13684 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13685 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13686 ++v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13687 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13688 while ( v8 < 196 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13689 dword_506524 = dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13690 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13691 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13692 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13693 if ( dword_506544 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13694 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13695 v10 = dword_506520 + dword_506528;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13696 if ( dword_506520 + dword_506528 < dword_506524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13697 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13698 v11 = dword_50651C++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13699 byte_506130[v11] = dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13700 dword_506528 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13701 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13702 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13703 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13704 if ( dword_506548 && dword_50651C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13705 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13706 --dword_50651C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13707 dword_506528 -= (unsigned __int8)byte_506130[dword_50651C];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13708 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13709 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13710 if ( !dword_506520 || dword_506528 < 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13711 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13712 dword_506528 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13713 dword_50651C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13714 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13715 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13716 v12 = dword_506528;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13717 dword_50652C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13718 dword_506544 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13719 dword_506548 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13720 dword_506520 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13721 dword_506530 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13722 dword_506534 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13723 dword_506538 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13724 dword_50653C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13725 dword_506540 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13726 while ( v12 < dword_506524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13727 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13728 v13 = pStru179->field_0[v12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13729 ++dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13730 v14 = (&dword_723718_autonote_related)[8 * v13];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13731 a1.DrawText(pAutonoteFont, 1, 0, 0, (&dword_723718_autonote_related)[8 * v13], 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13732 v15 = pAutonoteFont->CalcTextHeight(v14, &a1, 1, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13733 v16 = a1.uFrameY + v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13734 if ( (signed int)(a1.uFrameY + v15) > (signed int)a1.uFrameHeight )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13735 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13736 pRenderer->DrawTextureTransparent(0x64u, v16 + 12, pTextures_5064A0[10]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13737 ++v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13738 a1.uFrameY = v16 + 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13739 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13740 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13741
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13742
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13743 //----- (00413980) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13744 char *__cdecl DrawSpellbook_Map()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13745 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13746 unsigned int v0; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13747 unsigned int v1; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13748 unsigned int v2; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13749 unsigned int v3; // eax@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13750 unsigned int v4; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13751 unsigned int v5; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13752 int v6; // eax@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13753 unsigned int v7; // eax@35
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13754 unsigned int v9; // [sp-8h] [bp-E0h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13755 unsigned int v10; // [sp-8h] [bp-E0h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13756 unsigned int v11; // [sp-8h] [bp-E0h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13757 unsigned int v12; // [sp-8h] [bp-E0h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13758 unsigned int v13; // [sp-8h] [bp-E0h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13759 unsigned int v14; // [sp-8h] [bp-E0h]@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13760 Texture *v15; // [sp-4h] [bp-DCh]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13761 Texture *v16; // [sp-4h] [bp-DCh]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13762 Texture *v17; // [sp-4h] [bp-DCh]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13763 Texture *v18; // [sp-4h] [bp-DCh]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13764 Texture *v19; // [sp-4h] [bp-DCh]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13765 Texture *v20; // [sp-4h] [bp-DCh]@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13766 char Str[120]; // [sp+Ch] [bp-CCh]@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13767 GUIWindow v22; // [sp+84h] [bp-54h]@35
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13768
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13769 pRenderer->DrawTextureIndexed(pViewport->uViewportX, pViewport->uViewportY, pTextures_5064A0[12]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13770 if ( dword_506548 || viewparams->field_2C / 128 >= 12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13771 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13772 v15 = pTex_tab_an_6a__zoom_off;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13773 v9 = pViewport->uViewportY + 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13774 v0 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13775 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13776 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13777 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13778 v15 = pTex_tab_an_6b__zoom_on;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13779 v9 = pViewport->uViewportY + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13780 v0 = pViewport->uViewportX + 398;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13781 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13782 pRenderer->DrawTextureTransparent(v0, v9, v15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13783 if ( dword_506544 || viewparams->field_2C / 128 <= 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13784 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13785 v16 = pTex_tab_an_7a__zoot_off;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13786 v10 = pViewport->uViewportY + 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13787 v1 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13788 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13789 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13790 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13791 v16 = pTex_tab_an_7b__zoot_on;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13792 v10 = pViewport->uViewportY + 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13793 v1 = pViewport->uViewportX + 398;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13794 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13795 pRenderer->DrawTextureTransparent(v1, v10, v16);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13796 if ( dword_506540 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13797 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13798 v17 = pTexture_506390;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13799 v11 = pViewport->uViewportY + 113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13800 v2 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13801 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13802 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13803 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13804 v17 = pTexture_506394;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13805 v11 = pViewport->uViewportY + 113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13806 v2 = pViewport->uViewportX + 398;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13807 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13808 pRenderer->DrawTextureTransparent(v2, v11, v17);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13809 if ( dword_50653C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13810 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13811 v18 = pTexture_506388;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13812 v12 = pViewport->uViewportX + 150;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13813 v3 = pViewport->uViewportY + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13814 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13815 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13816 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13817 v18 = pTexture_50638C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13818 v12 = pViewport->uViewportX + 150;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13819 v3 = pViewport->uViewportY + 399;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13820 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13821 pRenderer->DrawTextureTransparent(v3, v12, v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13822 if ( dword_506538 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13823 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13824 v19 = pTexture_506380;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13825 v13 = pViewport->uViewportY + 188;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13826 v4 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13827 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13828 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13829 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13830 v19 = pTexture_506384;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13831 v13 = pViewport->uViewportY + 188;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13832 v4 = pViewport->uViewportX + 397;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13833 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13834 pRenderer->DrawTextureTransparent(v4, v13, v19);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13835 if ( dword_506534 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13836 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13837 v20 = pTexture_506378;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13838 v14 = pViewport->uViewportY + 226;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13839 v5 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13840 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13841 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13842 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13843 v20 = pTexture_50637C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13844 v14 = pViewport->uViewportY + 226;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13845 v5 = pViewport->uViewportX + 397;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13846 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13847 pRenderer->DrawTextureTransparent(v5, v14, v20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13848 if ( dword_506544 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13849 viewparams->_443291();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13850 if ( dword_506548 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13851 viewparams->_443249();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13852 if ( dword_506540 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13853 viewparams->_443219();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13854 if ( dword_50653C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13855 viewparams->_443231();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13856 if ( dword_506538 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13857 viewparams->_44323D();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13858 v6 = dword_506534;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13859 if ( dword_506534 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13860 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13861 viewparams->_443225();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13862 v6 = dword_506534;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13863 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13864 if ( dword_506548 | dword_506544 | dword_506540 | dword_50653C | dword_506538 | v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13865 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13866 dword_506548 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13867 dword_506544 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13868 dword_506534 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13869 dword_506538 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13870 dword_50653C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13871 dword_506540 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13872 DrawSpellbook_Map_sub(0x61u, 0x31u, 0x169u, 313, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13873 pRenderer->DrawTextureTransparent(0x4Bu, 0x16u, pTexture_mapbordr);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13874 v22.uFrameWidth = 460;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13875 v22.uFrameHeight = 344;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13876 v22.uFrameX = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13877 v22.uFrameY = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13878 v22.uFrameZ = 467;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13879 v22.uFrameW = 467;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13880 v7 = pMapStats->GetMapInfo(pCurrentMapName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13881 if ( v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13882 v22.DrawText2(pBook2Font, 0xFFFFFFF2u, 0xCu, 0, pMapStats->pInfos[v7].pName, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13883 v22.uFrameX = 0;
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
13884 sprintf(Str, pGlobalTXT_LocalizationStrings[659], pParty->vPosition.x, pParty->vPosition.y);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13885 return v22.DrawText2(pFontComic, 0, 0x140u, 0, Str, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13886 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13887
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13888
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13889 //----- (00413CC6) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13890 void __thiscall DrawSpellbook(unsigned int uBook)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13891 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13892 unsigned int v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13893
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13894 v1 = uBook;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13895 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13896 471u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13897 445u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13898 (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13899 switch ( v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13900 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13901 case 0xB1u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13902 DrawLloydBeaconsScreen();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13903 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13904 case 0xC3u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13905 DrawTownPortalScreen();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13906 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13907 case 0xC8u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13908 DrawSpellbook_Quests();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13909 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13910 case 0xC9u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13911 DrawSpellbook_Autonotes();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13912 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13913 case 0xCAu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13914 DrawSpellbook_Map();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13915 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13916 case 0xCBu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13917 DrawSpellbook_Calendar();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13918 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13919 case 0xE0u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13920 sub_412E85();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13921 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13922 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13923 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13924
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13925 //----- (00413D3C) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13926 char *__cdecl GetDayPart()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13927 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13928 if ( pParty->uCurrentHour > 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13929 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13930 if ( pParty->uCurrentHour == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13931 return pGlobalTXT_LocalizationStrings[55];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13932 if ( pParty->uCurrentHour == 20 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13933 return pGlobalTXT_LocalizationStrings[566];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13934 if ( pParty->uCurrentHour <= 0x14 || pParty->uCurrentHour > 0x17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13935 return pGlobalTXT_LocalizationStrings[56];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13936 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13937 return pGlobalTXT_LocalizationStrings[567];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13938 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13939
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13940 //----- (00413D6F) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13941 char __cdecl DrawSpellbook_Calendar()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13942 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13943 unsigned int v0; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13944 char *v1; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13945 int v2; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13946 char *v3; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13947 GUIWindow a1; // [sp+Ch] [bp-60h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13948 unsigned int v6; // [sp+60h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13949 int v7; // [sp+64h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13950 int a5; // [sp+68h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13951
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13952 v0 = pParty->uCurrentHour;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13953 v6 = pMapStats->GetMapInfo(pCurrentMapName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13954 a5 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0x4Bu, 0x4Bu, 0x4Bu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13955 pRenderer->DrawTextureIndexed(pViewport->uViewportX, pViewport->uViewportY, pTextures_5064A0[13]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13956 v7 = (unsigned __int8)pDayMoonPhase[pParty->uDaysPlayed];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13957 if ( (signed int)v0 <= 12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13958 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13959 if ( !v0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13960 v0 = 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13961 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13962 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13963 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13964 v0 -= 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13965 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13966 a1.uFrameX = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13967 a1.uFrameY = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13968 a1.uFrameWidth = 460;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13969 a1.uFrameHeight = 344;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13970 a1.uFrameZ = 467;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13971 a1.uFrameW = 467;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13972 a1.DrawText2(pBook2Font, 0, 0x16u, 0, pGlobalTXT_LocalizationStrings[186], 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13973 v1 = GetDayPart();
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
13974 sprintf(
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13975 pTmpBuf,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13976 "%s\t100:\t110%d:%02d %s - %s",
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13977 pGlobalTXT_LocalizationStrings[526],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13978 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13979 pParty->uCurrentMinute,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13980 aAMPMNames[v2],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13981 v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13982 a1.DrawText(pBookFont, 70, 55, a5, pTmpBuf, 0, 0, 0);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
13983 sprintf(
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13984 pTmpBuf,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13985 "%s\t100:\t110%d - %s",
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13986 pGlobalTXT_LocalizationStrings[56],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13987 pParty->uDaysPlayed + 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13988 aDayNames[pParty->uDaysPlayed % 7]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13989 a1.DrawText(pBookFont, 70, 2 * LOBYTE(pBookFont->uFontHeight) + 49, a5, pTmpBuf, 0, 0, 0);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
13990 sprintf(
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13991 pTmpBuf,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13992 "%s\t100:\t110%d - %s",
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13993 pGlobalTXT_LocalizationStrings[146],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13994 pParty->uCurrentMonth + 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13995 aMonthNames[pParty->uCurrentMonth]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13996 a1.DrawText(pBookFont, 70, 4 * LOBYTE(pBookFont->uFontHeight) + 43, a5, pTmpBuf, 0, 0, 0);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
13997 sprintf(pTmpBuf, "%s\t100:\t110%d", pGlobalTXT_LocalizationStrings[245], pParty->uCurrentYear);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13998 a1.DrawText(pBookFont, 70, 6 * LOBYTE(pBookFont->uFontHeight) + 37, a5, pTmpBuf, 0, 0, 0);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
13999 sprintf(pTmpBuf, "%s\t100:\t110%s", pGlobalTXT_LocalizationStrings[530], aMoonPhaseNames[v7]);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14000 a1.DrawText(pBookFont, 70, 8 * LOBYTE(pBookFont->uFontHeight) + 31, a5, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14001 if ( v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14002 v3 = pMapStats->pInfos[v6].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14003 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14004 v3 = "Unknown";
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
14005 sprintf(pTmpBuf, "%s\t100:\t110%s", pGlobalTXT_LocalizationStrings[531], v3);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14006 return a1.DrawText(pBookFont, 70, 10 * LOBYTE(pBookFont->uFontHeight) + 25, a5, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14007 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14008
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14009 //----- (00413FF1) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14010 void __cdecl SetMonthNames()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14011 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14012 aMonthNames[0] = pGlobalTXT_LocalizationStrings[415];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14013 aMonthNames[1] = pGlobalTXT_LocalizationStrings[416];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14014 aMonthNames[2] = pGlobalTXT_LocalizationStrings[417];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14015 aMonthNames[3] = pGlobalTXT_LocalizationStrings[418];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14016 aMonthNames[4] = pGlobalTXT_LocalizationStrings[419];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14017 aMonthNames[5] = pGlobalTXT_LocalizationStrings[420];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14018 aMonthNames[6] = pGlobalTXT_LocalizationStrings[421];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14019 aMonthNames[7] = pGlobalTXT_LocalizationStrings[422];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14020 aMonthNames[8] = pGlobalTXT_LocalizationStrings[423];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14021 aMonthNames[9] = pGlobalTXT_LocalizationStrings[424];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14022 aMonthNames[10] = pGlobalTXT_LocalizationStrings[425];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14023 aMonthNames[11] = pGlobalTXT_LocalizationStrings[426];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14024 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14025
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14026 //----- (0041406F) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14027 void __cdecl SetDayNames()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14028 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14029 aDayNames[0] = pGlobalTXT_LocalizationStrings[145];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14030 aDayNames[1] = pGlobalTXT_LocalizationStrings[230];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14031 aDayNames[2] = pGlobalTXT_LocalizationStrings[243];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14032 aDayNames[3] = pGlobalTXT_LocalizationStrings[227];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14033 aDayNames[4] = pGlobalTXT_LocalizationStrings[91];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14034 aDayNames[5] = pGlobalTXT_LocalizationStrings[188];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14035 aDayNames[6] = pGlobalTXT_LocalizationStrings[222];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14036 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14037
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14038 //----- (004140BB) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14039 void __cdecl SetSpellSchoolNames()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14040 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14041 aSpellSchoolNames[0] = pGlobalTXT_LocalizationStrings[87];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14042 aSpellSchoolNames[1] = pGlobalTXT_LocalizationStrings[6];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14043 aSpellSchoolNames[2] = pGlobalTXT_LocalizationStrings[240];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14044 aSpellSchoolNames[3] = pGlobalTXT_LocalizationStrings[70];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14045 aSpellSchoolNames[4] = pGlobalTXT_LocalizationStrings[214];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14046 aSpellSchoolNames[5] = pGlobalTXT_LocalizationStrings[142];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14047 aSpellSchoolNames[6] = pGlobalTXT_LocalizationStrings[29];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14048 aSpellSchoolNames[7] = pGlobalTXT_LocalizationStrings[133];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14049 aSpellSchoolNames[8] = pGlobalTXT_LocalizationStrings[54];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14050 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14051
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14052 //----- (0041411B) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14053 void __cdecl SetAttributeNames()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14054 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14055 aAttributeNames[0] = pGlobalTXT_LocalizationStrings[144];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14056 aAttributeNames[1] = pGlobalTXT_LocalizationStrings[116];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14057 aAttributeNames[2] = pGlobalTXT_LocalizationStrings[163];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14058 aAttributeNames[3] = pGlobalTXT_LocalizationStrings[75];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14059 aAttributeNames[4] = pGlobalTXT_LocalizationStrings[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14060 aAttributeNames[5] = pGlobalTXT_LocalizationStrings[211];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14061 aAttributeNames[6] = pGlobalTXT_LocalizationStrings[136];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14062 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14063
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14064 //----- (00414162) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14065 void __cdecl uGameUIFontMain_initialize()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14066 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14067 uGameUIFontMain = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xAu, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14068 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14069
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14070 //----- (00414174) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14071 void __cdecl uGameUIFontShadow_initialize()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14072 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14073 uGameUIFontShadow = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE6u, 214u, 193u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14074 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14075
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14076
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14077
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14078
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14079
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14080 //----- (004141CA) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14081 GUIWindow *__fastcall ModalWindow(const char *pStr, int a4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14082 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14083 const char *v2; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14084 int v3; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14085 GUIWindow *result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14086
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14087 v2 = pStr;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14088 v3 = a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14089 pEventTimer->Pause();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14090 dword_506F0C[0] = pCurrentScreen;
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
14091 result = GUIWindow::Create(0, 0, 640, 480, WINDOW_FinalWindow, v3, (int)v2);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14092 ptr_507BDC = result;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14093 pCurrentScreen = 22;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14094 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14095 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14096 // 4E28F8: using guessed type int pCurrentScreen;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14097
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14098 //----- (0041420D) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14099 void __cdecl sub_41420D_press_esc()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14100 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14101 GUIWindow v0; // [sp+4h] [bp-54h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14102
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
14103 sprintf(pTmpBuf2, "%s\n \n%s", ptr_507BDC->Hint, pGlobalTXT_LocalizationStrings[61]);// Press Escape
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14104 v0.Hint = pTmpBuf2;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14105 v0.uFrameWidth = 400;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14106 v0.uFrameHeight = 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14107 v0.uFrameX = 120;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14108 v0.uFrameY = 140;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14109 v0.uFrameZ = 519;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14110 v0.uFrameW = 239;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14111 v0.DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14112 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14114 //----- (0041426F) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14115 void __cdecl sub_41426F()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14116 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14117 GUIWindow *v0; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14118
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14119 v0 = ptr_507BDC;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14120 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14121 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14122 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)(int)ptr_507BDC->ptr_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14123 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14124 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14125 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14126 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14127 v0->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14128 ptr_507BDC = 0;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14129 pCurrentScreen = dword_506F0C[0];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14130 pEventTimer->Resume();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14131 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14132 // 4E28F8: using guessed type int pCurrentScreen;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14133
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14134 //----- (004142D3) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14135 char __cdecl GameMenuUI_DrawKeyBindings()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14136 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14137 unsigned int v0; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14138 int v1; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14139 unsigned int v2; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14140 GUIWindow *v3; // edx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14141 signed int v4; // ecx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14142 signed int v5; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14143 const char *v6; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14144 unsigned int v7; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14145 const char *v8; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14146 unsigned int v9; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14147 const char *v10; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14148 unsigned int v11; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14149 const char *v12; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14150 unsigned int v13; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14151 const char *v14; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14152 unsigned int v15; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14153 const char *v16; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14154 unsigned int v17; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14155 const char *v18; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14156 unsigned int v19; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14157 const char *v20; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14158 unsigned int v21; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14159 signed int v22; // ebp@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14160 const char *v23; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14161 unsigned int v24; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14162 const char *v25; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14163 unsigned int v26; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14164 const char *v27; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14165 unsigned int v28; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14166 const char *v29; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14167 unsigned int v30; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14168 const char *v31; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14169 unsigned int v32; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14170 const char *v33; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14171 unsigned int v34; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14172 const char *v35; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14173 unsigned int v36; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14174 const char *v37; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14175 unsigned int v38; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14176 const char *v39; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14177 unsigned int v40; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14178 const char *v41; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14179 unsigned int v42; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14180 const char *v43; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14181 unsigned int v44; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14182 const char *v45; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14183 unsigned int v46; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14184 const char *v47; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14185 unsigned int v48; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14186 const char *v49; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14187 unsigned int v50; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14188 const char *v51; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14189 unsigned int v52; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14190 const char *v53; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14191 unsigned int v54; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14192 const char *v55; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14193 unsigned int v56; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14194 const char *v57; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14195 unsigned int v58; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14196 unsigned int v59; // eax@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14197 int v61; // [sp-14h] [bp-28h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14198 const char *v62; // [sp-10h] [bp-24h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14199 int v63; // [sp-Ch] [bp-20h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14200 int v64; // [sp-8h] [bp-1Ch]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14201 unsigned int v65; // [sp-4h] [bp-18h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14202 unsigned int a5; // [sp+10h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14203
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14204 v0 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14205 a5 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14206 if ( byte_4E28FC )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14207 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14208 v1 = dword_507C0C + 15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14209 dword_507C0C = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14210 if ( v1 == 255 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14211 byte_4E28FC = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14212 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14213 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14214 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14215 v1 = dword_507C0C - 15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14216 dword_507C0C = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14217 if ( v1 == 15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14218 byte_4E28FC = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14219 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14220 v2 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(v1, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14221 v3 = pGUIWindow_CurrentMenu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14222 dword_507C08 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14223 if ( pGUIWindow_CurrentMenu->field_40 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14224 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14225 pPrevVirtualCidesMapping[dword_506E68] = pKeyActionMap->pPressedKeysBuffer[0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14226 memset(word_506E6C, 0, 0x1Cu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14227 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14228 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14229 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14230 v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14231 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14232 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14233 if ( v4 != v5 && pPrevVirtualCidesMapping[v4] == pPrevVirtualCidesMapping[v5] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14234 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14235 *((char *)word_506E6C + v4) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14236 *((char *)word_506E6C + v5) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14237 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14238 ++v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14239 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14240 while ( v5 < 28 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14241 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14242 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14243 while ( v4 < 28 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14244 dword_506E68 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14245 v3->field_40 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14246 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14247 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14248 8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14249 8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14250 (Texture *)(uTextureID_507BF4 != -1 ? &pIcons_LOD->pTextures[uTextureID_507BF4] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14251 if ( dword_506F08 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14252 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14253 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14254 0x13u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14255 0x12Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14256 (Texture *)(uTextureID_507C00 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C00] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14257 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, v0, ascii_4E2D5C, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14258 v6 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[0]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14259 v7 = sub_414D24(0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14260 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 142, v7, v6, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14261 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, v0, ascii_4E2D50, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14262 v8 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[1]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14263 v9 = sub_414D24(1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14264 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 163, v9, v8, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14265 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, v0, ascii_4E2D48, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14266 v10 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[2]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14267 v11 = sub_414D24(2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14268 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 184, v11, v10, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14269 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, v0, ascii_4E2D40, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14270 v12 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[3]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14271 v13 = sub_414D24(3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14272 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 205, v13, v12, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14273 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, v0, ascii_4E2D38, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14274 v14 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[4]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14275 v15 = sub_414D24(4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14276 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 226, v15, v14, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14277 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, v0, ascii_4E2D30, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14278 v16 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[5]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14279 v17 = sub_414D24(5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14280 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 247, v17, v16, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14281 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, v0, ascii_4E2D28, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14282 v18 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[6]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14283 v19 = sub_414D24(6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14284 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 268, v19, v18, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14285 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, v0, ascii_4E2D1C, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14286 v20 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[7]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14287 v21 = sub_414D24(7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14288 v22 = 350;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14289 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 142, v21, v20, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14290 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, a5, ascii_4E2D14, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14291 v23 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[8]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14292 v24 = sub_414D24(8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14293 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 163, v24, v23, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14294 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, a5, ascii_4E2D0C, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14295 v25 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[9]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14296 v26 = sub_414D24(9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14297 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 184, v26, v25, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14298 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, a5, ascii_4E2D04, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14299 v27 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[10]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14300 v28 = sub_414D24(10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14301 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 205, v28, v27, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14302 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, a5, ascii_4E2CFC, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14303 v29 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[11]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14304 v30 = sub_414D24(11);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14305 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 226, v30, v29, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14306 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, a5, ascii_4E2CF0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14307 v31 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[12]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14308 v32 = sub_414D24(12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14309 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 247, v32, v31, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14310 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, a5, ascii_4E2CE8, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14311 v65 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14312 v64 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14313 v63 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14314 v62 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[13]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14315 v61 = 13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14316 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14317 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14318 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14319 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14320 0x7Fu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14321 0x12Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14322 (Texture *)(uTextureID_507C04 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C04] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14323 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, v0, ascii_4E2CDC, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14324 v33 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[14]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14325 v34 = sub_414D24(14);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14326 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 142, v34, v33, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14327 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, v0, ascii_4E2CD4, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14328 v35 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[15]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14329 v36 = sub_414D24(15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14330 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 163, v36, v35, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14331 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, v0, ascii_4E2CC8, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14332 v37 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[16]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14333 v38 = sub_414D24(16);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14334 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 184, v38, v37, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14335 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, v0, ascii_4E2CBC, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14336 v39 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[17]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14337 v40 = sub_414D24(17);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14338 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 205, v40, v39, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14339 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, v0, ascii_4E2CB0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14340 v41 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[18]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14341 v42 = sub_414D24(18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14342 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 226, v42, v41, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14343 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, v0, ascii_4E2CA4, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14344 v43 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[19]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14345 v44 = sub_414D24(19);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14346 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 247, v44, v43, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14347 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, v0, ascii_4E2C9C, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14348 v45 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[20]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14349 v46 = sub_414D24(20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14350 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 268, v46, v45, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14351 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, v0, ascii_4E2C90, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14352 v47 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[21]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14353 v48 = sub_414D24(21);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14354 v22 = 350;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14355 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 142, v48, v47, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14356 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, a5, ascii_4E2C84, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14357 v49 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[22]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14358 v50 = sub_414D24(22);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14359 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 163, v50, v49, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14360 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, a5, ascii_4E2C7C, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14361 v51 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[23]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14362 v52 = sub_414D24(23);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14363 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 184, v52, v51, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14364 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, a5, ascii_4E2C70, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14365 v53 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[24]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14366 v54 = sub_414D24(24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14367 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 205, v54, v53, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14368 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, a5, ascii_4E2C68, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14369 v55 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[25]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14370 v56 = sub_414D24(25);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14371 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 226, v56, v55, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14372 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, a5, ascii_4E2C5C, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14373 v57 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[26]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14374 v58 = sub_414D24(26);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14375 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 247, v58, v57, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14376 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, a5, ascii_4E2C54, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14377 v65 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14378 v64 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14379 v63 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14380 v62 = pKeyActionMap->GetVKeyDisplayName(pWindowList_at_506F50_minus1_indexing[0]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14381 v61 = 27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14382 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14383 v59 = sub_414D24(v61);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14384 return pGUIWindow_CurrentMenu->DrawText(pFontLucida, v22, 268, v59, v62, v63, v64, v65);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14385 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14386
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14387
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14388 //----- (00414D24) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14389 unsigned int __thiscall sub_414D24(int _this)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14390 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14391 int v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14392 unsigned int v2; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14393 unsigned int v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14394 unsigned int result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14395
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14396 v1 = _this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14397 v2 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE1u, 0xCDu, 0x23u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14398 v3 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFu, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14399 result = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14400 if ( dword_506E68 == v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14401 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14402 if ( GetTickCount() % 0x3E8 <= 0x1F4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14403 result = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14404 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14405 result = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14406 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14407 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14408 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14409 if ( *((char *)word_506E6C + v1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14410 result = dword_507C08;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14411 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14412 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14413 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14414 // 506E68: using guessed type int dword_506E68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14415 // 506E6C: using guessed type __int16 word_506E6C[18];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14416 // 507C08: using guessed type int dword_507C08;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14417
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14418 //----- (00414D9A) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14419 void __cdecl GameMenuUI_DrawVideoOptions()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14420 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14421 const char *v0; // ST0C_4@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14422 unsigned __int16 v1; // ax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14423 int v2; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14424 GUIWindow v3; // [sp+8h] [bp-54h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14425
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14426 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14427 8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14428 8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14429 (Texture *)(uTextureID_507C10 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C10] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14430 if ( !pRenderer->bWindowMode && GammaController::IsGammaSupported() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14431 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14432 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14433 17 * uGammaPos + 42,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14434 162u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14435 (Texture *)(pTextureIDs_GammaPositions[uGammaPos] != -1 ? &pIcons_LOD->pTextures[pTextureIDs_GammaPositions[uGammaPos]] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14436 pRenderer->DrawTextureRGB(0x112u, 0xA9u, &stru_506E40);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14437 v3.uFrameX = 22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14438 v0 = pGlobalTXT_LocalizationStrings[226];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14439 v3.uFrameY = 190;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14440 v3.uFrameWidth = 211;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14441 v3.uFrameHeight = 79;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14442 v3.uFrameZ = 232;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14443 v3.uFrameW = 268;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14444 v1 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14445 v3.DrawText2(pFontSmallnum, 0, 0, v1, v0, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14446 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14447 if ( !pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14448 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14449 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14450 0x14u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14451 0x119u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14452 (Texture *)(uTextureID_507C50 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C50] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14453 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14454 0x14u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14455 0x12Fu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14456 (Texture *)(uTextureID_507C54 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C54] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14457 v2 = uTextureID_507C58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14458 goto LABEL_12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14459 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14460 if ( pGame->uFlags2 & 0x20 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14461 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14462 0x14u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14463 0x119u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14464 (Texture *)(uTextureID_507C14 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C14] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14465 if ( pRenderer->bUseColoredLights )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14466 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14467 0x14u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14468 0x12Fu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14469 (Texture *)(uTextureID_507C18 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C18] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14470 if ( pRenderer->bTinting )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14471 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14472 v2 = uTextureID_507C1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14473 LABEL_12:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14474 pRenderer->DrawTextureIndexed(0x14u, 0x145u, (Texture *)(v2 != -1 ? &pIcons_LOD->pTextures[v2] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14475 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14476 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14477
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14478
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14479
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14480 //----- (00414F82) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14481 void __cdecl sub_414F82_DrawGameOptions()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14482 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14483 signed int v0; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14484
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14485 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14486 8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14487 8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14488 (Texture *)(uTextureID_507944 != -1 ? &pIcons_LOD->pTextures[uTextureID_507944] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14489 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14490 8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14491 0x84u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14492 (Texture *)(uTextureID_507C60 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C60] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14493 v0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14494 if ( uTurnSpeed == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14495 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14496 v0 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14497 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14498 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14499 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14500 if ( uTurnSpeed == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14501 v0 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14502 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14503 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14504 dword_4E2910[v0],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14505 0x10Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14506 (Texture *)(uTextureID_507C64[v0] != -1 ? &pIcons_LOD->pTextures[uTextureID_507C64[v0]] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14507 if ( bWalkSound )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14508 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14509 0x14u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14510 0x12Fu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14511 (Texture *)(uTextureID_507CB4 != -1 ? &pIcons_LOD->pTextures[uTextureID_507CB4] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14512 if ( bShowDamage )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14513 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14514 0x80u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14515 0x12Fu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14516 (Texture *)(uTextureID_507CB8 != -1 ? &pIcons_LOD->pTextures[uTextureID_507CB8] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14517 if ( bFlipOnExit )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14518 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14519 0x80u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14520 0x145u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14521 (Texture *)(uTextureID_507C84 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C84] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14522 if ( bAlwaysRun )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14523 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14524 0x14u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14525 0x145u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14526 (Texture *)(uTextureID_507CB0 != -1 ? &pIcons_LOD->pTextures[uTextureID_507CB0] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14527 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14528 17 * (char)uSoundVolumeMultiplier + 265,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14529 0xA2u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14530 (Texture *)(pTextureIDs_SoundLevels[(char)uSoundVolumeMultiplier] != -1 ? &pIcons_LOD->pTextures[pTextureIDs_SoundLevels[(char)uSoundVolumeMultiplier]] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14531 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14532 17 * (char)uMusicVolimeMultiplier + 265,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14533 0xD8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14534 (Texture *)(pTextureIDs_SoundLevels[(char)uMusicVolimeMultiplier] != -1 ? &pIcons_LOD->pTextures[pTextureIDs_SoundLevels[(char)uMusicVolimeMultiplier]] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14535 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14536 17 * (char)uVoicesVolumeMultiplier + 265,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14537 0x10Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14538 (Texture *)(pTextureIDs_SoundLevels[(char)uVoicesVolumeMultiplier] != -1 ? &pIcons_LOD->pTextures[pTextureIDs_SoundLevels[(char)uVoicesVolumeMultiplier]] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14539 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14540
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14541
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14542
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14543
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14544 //----- (004151D9) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14545 void __fastcall DrawPopupWindow(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14546 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14547 unsigned int v4; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14548 Texture *v5; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14549 signed int uTileWidth; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14550 int v7; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14551 int v8; // ecx@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14552 unsigned int v9; // ebx@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14553 int v10; // [sp+10h] [bp-28h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14554 signed int uTileHeight; // [sp+18h] [bp-20h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14555 int v12; // [sp+1Ch] [bp-1Ch]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14556 int v13; // [sp+20h] [bp-18h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14557 int a5; // [sp+24h] [bp-14h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14558 unsigned int a5a; // [sp+24h] [bp-14h]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14559 unsigned int a4; // [sp+28h] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14560 int uNumXTiles; // [sp+2Ch] [bp-Ch]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14561 unsigned int uNumXTilesa; // [sp+2Ch] [bp-Ch]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14562 unsigned int uNumXTilesb; // [sp+2Ch] [bp-Ch]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14563 unsigned int a2a; // [sp+30h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14564 unsigned int v21; // [sp+34h] [bp-4h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14565 unsigned int v22; // [sp+34h] [bp-4h]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14566
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14567 v4 = uY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14568 a2a = uX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14569 a4 = uX + uWidth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14570 pRenderer->Clip(uX, v4, uX + uWidth, v4 + uHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14571 v5 = (Texture *)(uTextureID_Parchment != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Parchment] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14572 uTileWidth = (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureWidth : 24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14573 v13 = (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureWidth : 24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14574 uTileHeight = (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureHeight : 26);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14575 if ( (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureWidth : 24)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14576 && (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureHeight : 26) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14577 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14578 uNumXTiles = (signed int)uWidth / uTileWidth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14579 if ( (signed int)uWidth % uTileWidth )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14580 ++uNumXTiles;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14581 a5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14582 v21 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14583 v7 = uNumXTiles + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14584 v10 = uNumXTiles + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14585 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14586 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14587 uNumXTilesa = a2a - v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14588 if ( v7 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14589 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14590 v12 = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14591 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14592 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14593 uNumXTilesa += v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14594 pRenderer->DrawTextureIndexed(uNumXTilesa, v21, v5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14595 --v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14596 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14597 while ( v12 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14598 v7 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14599 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14600 v21 += uTileHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14601 v8 = a5++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14602 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14603 while ( v8 < (signed int)uHeight / uTileHeight );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14604 a5a = v4 + uHeight - 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14605 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14606 a2a,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14607 v4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14608 (Texture *)(uTextureID_5076AC != -1 ? &pIcons_LOD->pTextures[uTextureID_5076AC] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14609 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14610 a2a,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14611 a5a,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14612 (Texture *)(uTextureID_5076B4 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076B4] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14613 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14614 a4 - 32,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14615 v4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14616 (Texture *)(uTextureID_5076A8 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076A8] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14617 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14618 a4 - 32,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14619 a5a,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14620 (Texture *)(uTextureID_5076B0 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_5076B0] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14621 uNumXTilesb = a2a + 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14622 v22 = v4 + uHeight - 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14623 if ( (signed int)uWidth > 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14624 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14625 pRenderer->Clip(a2a + 32, v4, a4 - 32, v4 + uHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14626 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14627 uNumXTilesb,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14628 v4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14629 (Texture *)(uTextureID_507698 != -1 ? &pIcons_LOD->pTextures[uTextureID_507698] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14630 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14631 uNumXTilesb,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14632 v22,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14633 (Texture *)(uTextureID_5076A4 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076A4] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14634 if ( (signed int)uWidth > 512 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14635 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14636 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14637 a2a + 544,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14638 v4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14639 (Texture *)(uTextureID_507698 != -1 ? &pIcons_LOD->pTextures[uTextureID_507698] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14640 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14641 a2a + 544,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14642 v22,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14643 (Texture *)(uTextureID_5076A4 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076A4] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14644 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14645 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14646 v9 = v4 + 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14647 if ( (signed int)uHeight > 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14648 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14649 pRenderer->Clip(a2a, v9, a4, a5a);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14650 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14651 a2a,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14652 v9,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14653 (Texture *)(uTextureID_5076A0 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076A0] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14654 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14655 a4 - 10,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14656 v9,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14657 (Texture *)(uTextureID_50769C != -1 ? &pIcons_LOD->pTextures[uTextureID_50769C] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14658 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14659 pRenderer->ResetClip();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14660 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14661 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14662
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14663
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14664 //----- (00415485) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14665 char *__cdecl DrawCopyrightWindow()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14666 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14667 GUIWindow Dst; // [sp+8h] [bp-54h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14668
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14669 memset(&Dst, 0, 0x54u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14670 Dst.uFrameWidth = 624;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14671 Dst.uFrameHeight = 256;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14672 Dst.uFrameX = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14673 Dst.uFrameY = 30; // c 1999 The 3DO Company.
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14674 Dst.uFrameHeight = pFontSmallnum->CalcTextHeight(pGlobalTXT_LocalizationStrings[157], &Dst, 24, 0)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14675 + 2 * LOBYTE(pFontSmallnum->uFontHeight)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14676 + 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14677 Dst.uFrameY = 470 - Dst.uFrameHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14678 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14679 Dst.uFrameW = 469;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14680 Dst.DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14681 Dst.uFrameWidth -= 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14682 Dst.uFrameX += 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14683 Dst.uFrameY += 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14684 Dst.uFrameHeight -= 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14685 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14686 Dst.uFrameW = Dst.uFrameY + Dst.uFrameHeight - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14687 return Dst.DrawText2(pFontSmallnum, 0, 0xCu, 0, pGlobalTXT_LocalizationStrings[157], 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14688 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14689
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14690
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14691
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14692
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14693 //----- (004156F0) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14694 void __cdecl GUI_UpdateWindows()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14695 {
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14696 GUIWindow *pWindow; // esi@4
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14697 unsigned int pWindowType; // eax@4
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14698 int v2; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14699 int v3; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14700 int v4; // eax@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14701 int v5; // eax@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14702 int v6; // eax@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14703 int v7; // eax@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14704 int v8; // eax@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14705 int v9; // eax@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14706 void *v10; // eax@41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14707 int v11; // ecx@42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14708 int v12; // eax@48
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14709 int v13; // eax@49
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14710 int v14; // eax@57
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14711 int v15; // eax@58
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14712 int v16; // eax@59
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14713 int v17; // eax@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14714 int v18; // eax@61
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14715 int v19; // eax@62
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14716 void *v20; // ebp@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14717 char *v21; // edx@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14718 GUIButton *v22; // ebp@79
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14719 char *v23; // edx@80
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14720 char v24; // zf@81
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14721 unsigned int v25; // eax@91
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14722 int v26; // eax@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14723 unsigned int v27; // ebp@106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14724 GUIWindow *v28; // ecx@109
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14725 unsigned int v29; // eax@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14726 GUIFont *v30; // ST1C_4@115
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14727 int v31; // eax@115
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14728 void *v32; // ebp@118
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14729 int v33; // eax@119
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14730 int v34; // eax@120
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14731 int v35; // eax@121
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14732 int v36; // eax@122
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14733 int v37; // eax@123
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14734 int v38; // eax@124
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14735 int v39; // eax@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14736 char *v40; // edx@138
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14737 unsigned int v41; // eax@142
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14738 GUIButton *v42; // ebp@146
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14739 char *v43; // edx@146
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14740 unsigned int v44; // [sp-1Ch] [bp-124h]@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14741 unsigned int v45; // [sp-18h] [bp-120h]@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14742 Texture *v46; // [sp-14h] [bp-11Ch]@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14743 Texture *v47; // [sp-14h] [bp-11Ch]@86
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14744 int i; // [sp+0h] [bp-108h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14745 ItemGen _this; // [sp+4h] [bp-104h]@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14746 GUIButton Dst; // [sp+28h] [bp-E0h]@133
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14747 ItemGen v51; // [sp+E4h] [bp-24h]@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14748
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
14749 if (GetCurrentMenuID() != MENU_CREATEPARTY)
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
14750 sub_41CD4F(34);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14751 for ( i = 1; i <= uNumVisibleWindows; ++i )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14752 {
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
14753 //v0 = (GUIWindow *)&pWindowList_at_506F50_minus1_indexing[21 * pVisibleWindowsIdxs[i]];
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14754 pWindow = &pWindowList[pVisibleWindowsIdxs[i] - 1];
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14755 pWindowType = pWindow->eWindowType;
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14756
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14757 switch (pWindow->eWindowType)
3
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
14758 {
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
14759 case WINDOW_MainMenu_Load:
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
14760 GameUI_MainMenu_DrawLoad();
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
14761 continue;
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14762
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14763 case WINDOW_5E: // window that initiates savegame loading
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14764 {
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14765 if (pWindow->Hint != (char *)1)
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14766 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14767 auto v20 = (GUIButton *)pWindow->ptr_1C;
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14768 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, v20->pTextures[0]);
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14769 v21 = pWindow->Hint;
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14770 viewparams->bRedrawGameUI = 1;
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14771 if ( v21 && v21 != (char *)1 )
14
Nomad
parents: 4
diff changeset
14772 v20->DrawLabel(v21, pFontCreate, 0, 0);
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14773 pWindow->Release();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14774 if (pCurrentScreen == 11)
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14775 pMessageQueue_50CBD0->SendMessage(UIMSG_SaveGame, 0, 0);
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14776 else
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14777 pMessageQueue_50CBD0->SendMessage(UIMSG_LoadGame, 0, 0);
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14778 }
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14779 continue;
3
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
14780 }
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
14781
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
14782
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14783 if ( (signed int)pWindowType > 70 )
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14784 {
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14785 if ( (signed int)pWindowType > 95 )
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14786 {
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14787 v33 = pWindowType - 96;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14788 if ( !v33 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14789 {
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14790 if ( pWindow->Hint != (char *)1 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14791 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14792 v42 = (GUIButton *)pWindow->ptr_1C;
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14793 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, v42->pTextures[0]);
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14794 v43 = pWindow->Hint;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14795 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14796 if ( v43 && v43 != (char *)1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14797 v42->DrawLabel(v43, pFontCreate, 0, 0);
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14798 pWindow->Release();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14799 if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14800 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14801 v41 = pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14802 LABEL_151:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14803 pMessageQueue_50CBD0->pMessages[v41].eType = (UIMessageType)113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14804 LABEL_152:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14805 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14806 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14807 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14808 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14809 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14810 v34 = v33 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14811 if ( v34 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14812 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14813 v35 = v34 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14814 if ( v35 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14815 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14816 v36 = v35 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14817 if ( v36 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14818 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14819 v37 = v36 - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14820 if ( v37 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14821 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14822 v38 = v37 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14823 if ( v38 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14824 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14825 if ( v38 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14826 GameMenuUI_DrawVideoOptions();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14827 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14828 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14829 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14830 GameMenuUI_DrawKeyBindings();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14831 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14832 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14833 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14834 {
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14835 pWindow->DrawMessageBox(0);
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14836 pWindow->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0);
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14837 pWindow->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14838 if ( !pKeyActionMap->field_204 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14839 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14840 v51.Reset();
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14841 pWindow->Release();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14842 pEventTimer->Resume();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14843 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14844 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14845 v39 = atoi((const char *)pKeyActionMap->pPressedKeysBuffer);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14846 if ( v39 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14847 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14848 if ( v39 < 800 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14849 SpawnActor(v39);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14850 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14851 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14852 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14853 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14854 }
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14855 v46 = (Texture *)*((_DWORD *)pWindow->ptr_1C + 15);
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14856 v45 = pWindow->uFrameY;
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14857 v44 = pWindow->uFrameX;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14858 LABEL_18:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14859 pRenderer->DrawTextureIndexed(v44, v45, v46);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14860 LABEL_114:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14861 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14862 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14863 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14864 memset(&Dst, 0, 0xBCu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14865 Dst.uZ = 197;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14866 Dst.uW = 197;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14867 Dst.uX = 27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14868 Dst.uY = 161;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14869 Dst.uWidth = 171;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14870 Dst.uHeight = 37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14871 Dst.pParent = pButton_RestUI_WaitUntilDawn->pParent;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14872 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14873 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, *((Texture **)pWindow->ptr_1C + 15));
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14874 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14875 Dst.DrawLabel(pGlobalTXT_LocalizationStrings[183], pFontCreate, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14876 Dst.pParent = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14877 goto LABEL_134;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14878 }
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14879 if ( pWindow->Hint != (char *)1 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14880 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14881 v32 = pWindow->ptr_1C;
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14882 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, *((Texture **)v32 + 16));
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14883 goto LABEL_138;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14884 }
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14885 if ( pWindowType == 95 )
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14886 {
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14887 if ( pWindow->Hint != (char *)1 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14888 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14889 v32 = pWindow->ptr_1C;
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14890 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, *((Texture **)v32 + 15));
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14891 LABEL_138:
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14892 v40 = pWindow->Hint;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14893 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14894 if ( v40 && v40 != (char *)1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14895 ((GUIButton *)v32)->DrawLabel(v40, pFontCreate, 0, 0);
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14896 pWindow->Release();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14897 LABEL_142:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14898 v41 = pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14899 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14900 goto LABEL_151;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14901 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14902 }
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14903 v14 = pWindowType - 80;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14904 if ( v14 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14905 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14906 v15 = v14 - 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14907 if ( !v15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14908 {
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14909 pWindow->DrawMessageBox(0);
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14910 pWindow->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0);
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14911 pWindow->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14912 if ( !pKeyActionMap->field_204 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14913 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14914 _this.Reset();
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14915 pWindow->Release();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14916 pEventTimer->Resume();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14917 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14918 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14919 v26 = atoi((const char *)pKeyActionMap->pPressedKeysBuffer);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14920 if ( v26 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14921 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14922 if ( v26 < 800 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14923 {
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
14924 _this.uAttributes |= 1u;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14925 _this.uItemID = v26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14926 if ( pItemsTable->pItems[v26].uEquipType == 12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14927 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14928 _this.uNumCharges = rand() % 6 + pItemsTable->pItems[_this.uItemID].uDamageMod + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14929 _this.uMaxCharges = LOBYTE(_this.uNumCharges);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14930 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14931 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14932 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14933 if ( v26 >= 221 && v26 < 271 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14934 _this._bonus_type = rand() % 10 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14935 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14936 pItemsTable->SetSpecialBonus(&_this);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14937 pParty->SetHoldingItem(&_this);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14938 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14939 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14940 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14941 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14942 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14943 v16 = v15 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14944 if ( !v16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14945 {
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14946 if ( pWindow->Hint != (char *)1 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14947 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14948 v22 = (GUIButton *)pWindow->ptr_1C;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14949 if ( (v22->uX & 0x80000000u) == 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14950 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14951 if ( (signed int)v22->uX <= 640 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14952 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14953 v25 = v22->uY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14954 if ( (v25 & 0x80000000u) == 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14955 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14956 if ( (signed int)v25 <= 480 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14957 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14958 v47 = v22->pTextures[0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14959 goto LABEL_94;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14960 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14961 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14962 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14963 }
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14964 v23 = pWindow->Hint;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14965 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14966 if ( v23 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14967 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14968 v24 = v23 == (char *)1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14969 goto LABEL_82;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14970 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14971 LABEL_134:
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14972 v28 = pWindow;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14973 goto LABEL_110;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14974 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14975 v17 = v16 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14976 if ( !v17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14977 {
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14978 if ( pWindow->Hint != (char *)1 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14979 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14980 v22 = (GUIButton *)pWindow->ptr_1C;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14981 v47 = v22->pTextures[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14982 LABEL_94:
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14983 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, v47);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14984 LABEL_80:
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14985 v23 = pWindow->Hint;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14986 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14987 if ( v23 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14988 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14989 v24 = v23 == (char *)1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14990 LABEL_82:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14991 if ( !v24 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14992 v22->DrawLabel(v23, pFontCreate, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14993 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14994 goto LABEL_134;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14995 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14996 v18 = v17 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14997 if ( !v18 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14998 {
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14999 if ( pWindow->Hint != (char *)1 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15000 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15001 v22 = (GUIButton *)pWindow->ptr_1C;
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15002 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, v22->pTextures[0]);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15003 goto LABEL_80;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15004 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15005 v19 = v18 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15006 if ( !v19 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15007 {
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15008 if ( pWindow->Hint != (char *)1 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15009 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15010 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, *((Texture **)pWindow->ptr_1C + 16));
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15011 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15012 goto LABEL_134;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15013 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15014 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15015 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15016 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15017 v27 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15018 if ( ptr_507BD0->field_40 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15019 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15020 ptr_507BD0->DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15021 ptr_507BD0->DrawText(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15022 pFontCreate,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15023 30,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15024 40,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15025 v27,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15026 (const char *)pKeyActionMap->pPressedKeysBuffer,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15027 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15028 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15029 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15030 v30 = pFontCreate;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15031 v31 = pFontCreate->GetLineWidth((const char *)pKeyActionMap->pPressedKeysBuffer);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15032 ptr_507BD0->DrawFlashingInputCursor(v31 + 30, 40, v30);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15033 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15034 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15035 if ( ptr_507BD0->field_40 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15036 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15037 v29 = pMessageQueue_50CBD0->uNumMessages;
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15038 pWindow->field_40 = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15039 if ( (signed int)v29 < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15040 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15041 pMessageQueue_50CBD0->pMessages[v29].eType = (UIMessageType)(int)ptr_507BD0->ptr_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15042 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15043 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15044 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15045 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15046 pEventTimer->Resume();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15047 ptr_507BD0->Release();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15048 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15049 goto LABEL_114;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15050 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15051 if ( ptr_507BD0->field_40 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15052 {
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15053 pWindow->field_40 = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15054 pEventTimer->Resume();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15055 v28 = ptr_507BD0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15056 LABEL_110:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15057 v28->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15058 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15059 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15060 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15061 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15062 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15063 {
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15064 if ( pWindowType == 70 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15065 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15066 sub_41420D_press_esc();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15067 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15068 }
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15069 if ( (signed int)pWindowType > 18 )
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15070 {
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15071 if ( (signed int)pWindowType > 25 )
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15072 {
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15073 v12 = pWindowType - 26;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15074 if ( v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15075 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15076 v13 = v12 - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15077 if ( v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15078 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15079 if ( v13 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15080 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15081 pRenderer->ClearZBuffer(0, 479);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15082 draw_leather();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15083 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15084 CharacterUI_DrawPaperdoll(uActiveCharacter);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15085 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15086 ptr_5076F4->uX,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15087 ptr_5076F4->uY,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15088 (Texture *)(uTextureID_x_x_u != -1 ? &pIcons_LOD->pTextures[uTextureID_x_x_u] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15089 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15090 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15091 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15092 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15093 sub_467FB6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15094 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15095 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15096 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15097 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15098 TransitionUI_Draw();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15099 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15100 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15101 }
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15102 if ( pWindowType != 25 )
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15103 {
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15104 v7 = pWindowType - 19;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15105 if ( v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15106 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15107 v8 = v7 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15108 if ( v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15109 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15110 v9 = v8 - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15111 if ( v9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15112 {
3
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
15113 //if ( v9 == 1 )
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
15114 // sub_4606F7();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15115 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15116 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15117 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15118 sub_4606FE();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15119 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15120 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15121 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15122 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15123 if ( pCurrentScreen == 10 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15124 {
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15125 Chest::DrawChestUI((unsigned int)pWindow->ptr_1C);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15126 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15127 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15128 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15129 if ( pCurrentScreen == 15 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15130 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15131 pRenderer->ClearZBuffer(0, 479);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15132 draw_leather();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15133 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15134 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15135 ptr_5076F4->uX,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15136 ptr_5076F4->uY,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15137 (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15138 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15139 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15140 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15141 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15142 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15143 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15144 DrawBranchlessDialogueUI();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15145 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15146 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15147 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15148 pWindowList[pVisibleWindowsIdxs[i] - 1]._4B3157();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15149 if ( !ptr_507BC0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15150 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15151 v10 = ptr_507BC0->ptr_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15152 if ( (signed int)v10 >= 53 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15153 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15154 v11 = pParty->field_3C._shop_ban_times[2 * (_DWORD)v10 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15155 if ( !__PAIR__(v11, pParty->field_3C._shop_ban_times[2 * (_DWORD)v10])
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15156 || v11 < SHIDWORD(pParty->uTimePlayed)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15157 || v11 <= SHIDWORD(pParty->uTimePlayed)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15158 && (unsigned int)pParty->field_3C._shop_ban_times[2 * (_DWORD)v10] <= LODWORD(pParty->uTimePlayed) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15159 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15160 if ( (signed int)v10 < 53 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15161 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15162 pParty->field_3C._shop_ban_times[2 * (_DWORD)v10] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15163 pParty->field_3C._shop_ban_times[2 * (_DWORD)v10 + 1] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15164 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15165 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15166 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15167 goto LABEL_142;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15168 }
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15169 if ( pWindowType == 18 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15170 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15171 sub_412B58();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15172 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15173 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15174 {
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15175 if ( (signed int)pWindowType > 10 )
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15176 {
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15177 v5 = pWindowType - 12;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15178 if ( v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15179 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15180 v6 = v5 - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15181 if ( v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15182 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15183 if ( v6 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15184 TravelUI_Draw();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15185 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15186 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15187 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15188 RestUI_Draw();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15189 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15190 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15191 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15192 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15193 QuickRefDraw();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15194 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15195 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15196 }
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15197 if ( pWindowType != 10 )
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15198 {
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15199 v2 = pWindowType - 3;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15200 if ( v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15201 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15202 v3 = v2 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15203 if ( v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15204 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15205 v4 = v3 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15206 if ( v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15207 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15208 if ( v4 == 3 )
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15209 DrawSpellbook((unsigned int)pWindow->ptr_1C);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15210 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15211 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15212 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15213 sub_414F82_DrawGameOptions();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15214 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15215 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15216 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15217 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15218 CharacterUI_CharacterScreen_Draw(uActiveCharacter);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15219 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15220 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15221 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15222 v46 = (Texture *)(uTextureID_507944 != -1 ? &pIcons_LOD->pTextures[uTextureID_507944] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15223 v45 = pViewport->uViewportY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15224 v44 = pViewport->uViewportX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15225 goto LABEL_18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15226 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15227 DrawDialogueUI();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15228 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15229 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15230 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15231 if ( GetCurrentMenuID() == -1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15232 GameUI_DrawFoodAndGold();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15233 if ( sub_4637E0_is_there_popup_onscreen() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15234 sub_416D62_ShowPopupWindow_MonsterRecord_ItemInfo_etcsub_416D62(0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15235 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15236
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15237
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15238
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15239
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15240
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15241
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15242
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15243 //----- (00416196) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15244 void __cdecl identify_item()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15245 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15246 Player *v0; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15247 POINT *v1; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15248 signed int v2; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15249 signed int v3; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15250 int v4; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15251 char v5; // sf@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15252 int v6; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15253 int v7; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15254 unsigned __int16 v8; // ax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15255 int v9; // edi@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15256 int v10; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15257 int v11; // edx@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15258 LONG v12; // edx@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15259 signed int v13; // edx@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15260 int v14; // edx@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15261 unsigned int v15; // edi@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15262 signed int v16; // edx@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15263 int v17; // eax@54
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15264 unsigned int v18; // edx@57
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15265 int v19; // eax@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15266 int v20; // edi@67
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15267 int v21; // eax@72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15268 int v22; // ecx@74
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15269 int v23; // edx@78
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15270 int v24; // eax@79
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15271 int v25; // eax@80
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15272 int v26; // eax@84
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15273 ItemGen *v27; // esi@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15274 unsigned int v28; // eax@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15275 ItemGen *v29; // edi@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15276 unsigned int v30; // ecx@103
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15277 double v31; // st7@112
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15278 unsigned __int64 v32; // qax@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15279 unsigned int v33; // ecx@117
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15280 int v34; // eax@126
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15281 unsigned int v35; // ecx@127
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15282 double v36; // st7@132
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15283 signed __int64 v37; // qax@135
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15284 unsigned int v38; // eax@138
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15285 Vec3_int_ v39; // [sp-18h] [bp-A8h]@83
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15286 int *v40; // [sp-Ch] [bp-9Ch]@83
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15287 int *v41; // [sp-8h] [bp-98h]@83
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15288 int *v42; // [sp-4h] [bp-94h]@83
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15289 GUIWindow v43; // [sp+Ch] [bp-84h]@137
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15290 unsigned int pY; // [sp+60h] [bp-30h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15291 int v45; // [sp+64h] [bp-2Ch]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15292 unsigned int pX; // [sp+68h] [bp-28h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15293 int v47; // [sp+6Ch] [bp-24h]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15294 POINT y; // [sp+70h] [bp-20h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15295 POINT a2; // [sp+78h] [bp-18h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15296 Vec3_int_ pOut; // [sp+80h] [bp-10h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15297 unsigned int v51; // [sp+8Ch] [bp-4h]@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15298
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15299 if ( dword_50CDCC )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15300 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15301 v0 = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15302 v1 = pMouse->GetCursorPos(&a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15303 pOut.z = pRenderer->pActiveZBuffer[v1->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&y)->y]] & 0xFFFF;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15304 pMouse->GetClickPos(&pX, &pY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15305 if ( !pOut.z )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15306 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15307 if ( (signed int)pX <= 13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15308 || (signed int)pX >= 462
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15309 || (v2 = pX - 14,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15310 v3 = pY - 17,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15311 pX = v2,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15312 pY = v3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15313 v4 = 14 * (v3 >> 5),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15314 v2 >>= 5,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15315 v5 = v2 + v4 < 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15316 v6 = v2 + v4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15317 pOut.z = v6,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15318 v5)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15319 || v6 > 126
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15320 || (v7 = v0->GetItemIDAtInventoryIndex(&pOut.z)) == 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15321 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15322 pOut.z = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15323 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15324 if ( !v0->CanAct() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15325 {
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
15326 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[427], v0->pName, pGlobalTXT_LocalizationStrings[541]);
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15327 v43.Hint = pTmpBuf;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15328 v43.uFrameWidth = 384;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15329 v43.uFrameHeight = 180;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15330 v43.uFrameY = 40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15331 if ( pMouse->GetCursorPos(&a2)->x <= 320 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15332 v38 = pMouse->GetCursorPos(&a2)->x + 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15333 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15334 v38 = pMouse->GetCursorPos(&a2)->x - 414;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15335 v43.uFrameX = v38;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15336 v43.DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15337 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15338 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15339 --pOut.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15340 LOBYTE(v8) = v0->GetActualSkillLevel(PLAYER_SKILL_ALCHEMY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15341 v9 = v8 & 0x3F;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15342 v45 = v8 & 0x3F;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15343 pOut.y = SkillToMastery(v8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15344 v10 = pOut.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15345 if ( pParty->pPickedItem.uItemID == 220 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15346 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15347 LABEL_116:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15348 GameUI_DrawItemInfo(&v0->pInventoryItems[v10]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15349 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15350 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15351 if ( (signed int)pParty->pPickedItem.uItemID < 200
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15352 || (signed int)pParty->pPickedItem.uItemID > 219
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15353 || (v11 = (int)((char *)v0 + 36 * pOut.z), *(int *)(v11 + 532) != 220) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15354 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15355 if ( (signed int)pParty->pPickedItem.uItemID < 221
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15356 || (signed int)pParty->pPickedItem.uItemID > 271
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15357 || (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
15358 || v13 > 271 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15359 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15360 if ( pParty->pPickedItem.uItemID != 236
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15361 && ((signed int)pParty->pPickedItem.uItemID < 246 || (signed int)pParty->pPickedItem.uItemID > 250)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15362 && pParty->pPickedItem.uItemID != 263
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15363 && pParty->pPickedItem.uItemID != 233 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15364 goto LABEL_116;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15365 v27 = &v0->pInventoryItems[pOut.z];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15366 v28 = v27->uItemID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15367 v51 = pItemsTable->pItems[v27->uItemID].uEquipType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15368 v29 = (ItemGen *)(1800 * pParty->pPickedItem._bonus_type);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15369 if ( pParty->pPickedItem.uItemID != 233 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15370 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15371 if ( pParty->pPickedItem.uItemID == 236 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15372 {
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
15373 v35 = v27->uAttributes;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15374 if ( v35 & 2 || (v51 & 0x80000000u) != 0 || (signed int)v51 > 12 || (signed int)v28 >= 500 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15375 goto LABEL_92;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15376 LOWORD(v35) = v35 | 0x210;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
15377 v27->uAttributes = v35;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15378 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15379 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15380 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15381 if ( (signed int)pParty->pPickedItem.uItemID <= 245 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15382 goto LABEL_92;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15383 if ( (signed int)pParty->pPickedItem.uItemID <= 250 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15384 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15385 v27->UpdateTempBonus(pParty->uTimePlayed);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15386 v33 = v27->uItemID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15387 if ( (signed int)v27->uItemID >= 64 && (signed int)v33 <= 65
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
15388 || (pOut.y = v27->uAttributes, pOut.y & 2)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15389 || v27->uAdditionalValue
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15390 || v27->_bonus_type
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15391 || v51 && v51 != 1 && v51 != 2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15392 || (signed int)v33 >= 500 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15393 goto LABEL_92;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15394 v34 = *(int *)&aSbwb00[4 * pParty->pPickedItem.uItemID + 4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15395 a2.y = (int)v29 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15396 v31 = (double)(signed int)((int)v29 << 7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15397 v27->uAdditionalValue = v34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15398 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15399 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15400 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15401 if ( pParty->pPickedItem.uItemID != 263
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15402 || (v27->UpdateTempBonus(pParty->uTimePlayed), v30 = v27->uItemID, (signed int)v27->uItemID >= 64)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15403 && (signed int)v30 <= 65
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
15404 || (pOut.y = v27->uAttributes, pOut.y & 2)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15405 || v27->uAdditionalValue
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15406 || v27->_bonus_type
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15407 || v51 && v51 != 1 && v51 != 2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15408 || (signed int)v30 >= 500 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15409 goto LABEL_92;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15410 a2.y = (int)v29 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15411 v27->uAdditionalValue = 40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15412 v31 = (double)a2.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15413 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15414 v32 = pParty->uTimePlayed + (signed int)(signed __int64)(v31 * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15415 LODWORD(v27->uExpireTime) = v32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15416 LODWORD(v32) = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15417 LOBYTE(v32) = LOBYTE(pOut.y) | 0x18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15418 HIDWORD(v27->uExpireTime) = HIDWORD(v32);
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
15419 v27->uAttributes = v32;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15420 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15421 dword_50C9A8 = 256;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15422 goto LABEL_92;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15423 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15424 v36 = (70.0 - (double)pParty->pPickedItem._bonus_type) * 0.01;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15425 if ( v36 < 0.0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15426 v36 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15427 if ( v51 != 12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15428 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15429 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15430 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15431 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15432 a2.y = v27->uMaxCharges;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15433 v37 = (signed __int64)((double)a2.y - v36 * (double)a2.y);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15434 v27->uMaxCharges = v37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15435 v27->uNumCharges = (unsigned __int8)v37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15436 goto LABEL_92;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15437 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15438 v14 = v13 - 222;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15439 v15 = pParty->pPickedItem.uItemID - 222;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15440 v47 = v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15441 y.y = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15442 if ( pParty->pPickedItem.uItemID == 221 || v51 == 221 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15443 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15444 v16 = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15445 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15446 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15447 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15448 v16 = *(short *)&pItemsTable->field_EDE0[2 * (v14 + 50 * v15) + 388];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15449 v10 = pOut.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15450 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15451 v51 = v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15452 if ( v45 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15453 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15454 if ( v16 < 225 || v16 > 227 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15455 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15456 if ( v16 < 228 || v16 > 239 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15457 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15458 if ( v16 < 240 || v16 > 261 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15459 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15460 if ( v16 >= 262 && pOut.y != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15461 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15462 LABEL_53:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15463 v51 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15464 goto LABEL_54;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15465 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15466 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15467 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15468 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15469 if ( pOut.y <= 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15470 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15471 LABEL_38:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15472 v51 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15473 goto LABEL_54;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15474 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15475 }
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 ( pOut.y == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15480 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15481 LABEL_35:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15482 v51 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15483 goto LABEL_54;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15484 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15485 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15486 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15487 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15488 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15489 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15490 if ( v16 >= 225 && v16 <= 227 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15491 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15492 v51 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15493 goto LABEL_54;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15494 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15495 if ( v16 >= 228 && v16 <= 239 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15496 goto LABEL_35;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15497 if ( v16 >= 240 && v16 <= 261 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15498 goto LABEL_38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15499 if ( v16 >= 262 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15500 goto LABEL_53;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15501 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15502 LABEL_54:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15503 pOut.y = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15504 pOut.x = v10 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15505 v17 = (int)v0->pInventoryIndices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15506 while ( *(int *)v17 != pOut.x )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15507 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15508 ++pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15509 v17 += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15510 if ( pOut.y >= 126 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15511 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15512 v18 = y.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15513 goto LABEL_59;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15514 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15515 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15516 v18 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15517 LABEL_59:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15518 if ( !v51 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15519 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15520 LABEL_115:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15521 v10 = pOut.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15522 goto LABEL_116;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15523 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15524 if ( v51 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15525 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15526 v0->RemoveItemAtInventoryIndex(v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15527 v26 = rand();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15528 v0->ReceiveDamage(v26 % 11 + 10, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15529 pAudioPlayer->PlaySound(SOUND_8, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15530 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15531 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15532 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15533 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15534 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15535 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15536 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15537 v42 = (int *)&a2.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15538 v41 = (int *)&y.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15539 v40 = (int *)&pOut;
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
15540 v39.z = pParty->vPosition.z + pParty->sEyelevel;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15541 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15542 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15543 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15544 if ( v51 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15545 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15546 v0->RemoveItemAtInventoryIndex(v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15547 v25 = rand();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15548 v0->ReceiveDamage(v25 % 71 + 30, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15549 v23 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15550 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15551 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15552 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15553 if ( v51 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15554 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15555 v0->RemoveItemAtInventoryIndex(v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15556 v24 = rand();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15557 v0->ReceiveDamage(v24 % 201 + 50, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15558 v23 = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15559 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15560 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15561 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15562 if ( v51 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15563 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15564 if ( v51 != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15565 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15566 v19 = v0->AddItem(0xFFFFFFFFu, 0xDCu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15567 if ( v19 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15568 *(int *)&v0->field_1F5[36 * v19 + 15] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15569 v20 = v47 + 50 * v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15570 v0->pInventoryItems[pOut.z].uItemID = v51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15571 v0->pInventoryItems[pOut.z]._bonus_type = (pParty->pPickedItem._bonus_type
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15572 + v0->pInventoryItems[pOut.z]._bonus_type)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15573 / 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15574 v0->SetVariable(VAR_AutoNotes, *(short *)&pItemsTable->field_10168[2 * v20 + 388]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15575 LABEL_74:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15576 v22 = (int)((char *)v0 + 36 * pOut.z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15577 if ( !BYTE2(pItemsTable->pItems[*(int *)(v22 + 532) + 1].uItemID) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15578 *(int *)(v22 + 552) |= 1u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15579 if ( !dword_4E455C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15580 goto LABEL_92;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15581 v0->PlaySound(16, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15582 goto LABEL_91;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15583 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15584 if ( v45 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15585 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15586 if ( *(int *)(a2.y + 532) == 221 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15587 *(int *)(a2.y + 532) = pParty->pPickedItem.uItemID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15588 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15589 *(int *)(a2.y + 536) = pParty->pPickedItem._bonus_type;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15590 v21 = v0->AddItem(0xFFFFFFFFu, 0xDCu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15591 if ( v21 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15592 *(int *)&v0->field_1F5[36 * v21 + 15] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15593 goto LABEL_74;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15594 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15595 goto LABEL_115;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15596 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15597 v0->RemoveItemAtInventoryIndex(v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15598 v0->SetCondition(0x10u, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15599 v23 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15600 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15601 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15602 v0->_4160CA(v23);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15603 pAudioPlayer->PlaySound(SOUND_8, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15604 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15605 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15606 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15607 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15608 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15609 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15610 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15611 v42 = (int *)&a2.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15612 v41 = (int *)&y.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15613 v40 = (int *)&pOut;
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
15614 v39.z = pParty->vPosition.z + pParty->sEyelevel;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15615 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15616 *(_QWORD *)&v39.x = *(_QWORD *)&pParty->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15617 Vec3_int_::Rotate(64, pParty->sRotationY, pParty->sRotationX, v39, v40, v41, v42);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15618 sub_42F7EB_DropItemAt(0x41Bu, pOut.x, y.y, a2.y, 0, 1, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15619 if ( dword_4E455C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15620 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15621 if ( v0->CanAct() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15622 v0->PlaySound(17, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15623 ShowStatusBarString(pGlobalTXT_LocalizationStrings[444], 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15624 LABEL_91:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15625 dword_4E455C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15626 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15627 LABEL_92:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15628 pMouse->RemoveHoldingItem();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15629 dword_50CDCC = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15630 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15631 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15632 *(int *)(v11 + 536) = v9 + pItemsTable->pItems[pParty->pPickedItem.uItemID].uDamageDice;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15633 switch ( pParty->pPickedItem.uItemID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15634 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15635 case 0xC8u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15636 case 0xC9u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15637 case 0xCAu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15638 case 0xCBu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15639 case 0xCCu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15640 v0->pInventoryItems[pOut.z].uItemID = 222;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15641 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15642 case 0xCDu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15643 case 0xCEu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15644 case 0xCFu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15645 case 0xD0u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15646 case 0xD1u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15647 v0->pInventoryItems[pOut.z].uItemID = 223;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15648 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15649 case 0xD2u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15650 case 0xD3u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15651 case 0xD4u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15652 case 0xD5u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15653 case 0xD6u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15654 v0->pInventoryItems[pOut.z].uItemID = 224;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15655 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15656 case 0xD7u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15657 case 0xD8u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15658 case 0xD9u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15659 case 0xDAu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15660 case 0xDBu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15661 v0->pInventoryItems[pOut.z].uItemID = 221;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15662 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15663 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15664 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15665 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15666 pMouse->RemoveHoldingItem();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15667 dword_50CDCC = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15668 if ( dword_4E455C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15669 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15670 v0->PlaySound(16, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15671 dword_4E455C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15672 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15673 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15674
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15675
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15676 //----- (00416B01) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15677 void __thiscall sub_416B01(void *_this)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15678 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15679 int v1; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15680 int v2; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15681 NPCData *v3; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15682 NPCData *v4; // esi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15683 NPCData *v5; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15684 NPCData *v6; // esi@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15685 const CHAR *v7; // eax@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15686 unsigned int v8; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15687 unsigned int v9; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15688 const char *v10; // ST14_4@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15689 char *v11; // esi@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15690 const char *v12; // ST18_4@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15691 unsigned __int16 v13; // ax@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15692 char *v14; // eax@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15693 GUIWindow a1; // [sp+Ch] [bp-60h]@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15694 int a2; // [sp+60h] [bp-Ch]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15695 void *v17; // [sp+64h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15696 LPCSTR lpsz; // [sp+68h] [bp-4h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15697
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15698 v17 = _this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15699 if ( bNoNPCHiring != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15700 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15701 v1 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15702 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15703 v3 = pParty->pHirelings;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15704 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15705 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15706 if ( v3->pName )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15707 pTmpBuf[v1++] = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15708 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15709 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15710 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15711 while ( (signed int)v3 < (signed int)&pParty->pPickedItem );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15712 lpsz = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15713 if ( (signed int)pNPCStats->uNumNewNPCs > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15714 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15715 v4 = pNPCStats->pNewNPCData;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15716 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15717 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15718 if ( v4->uFlags & 0x80
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15719 && (!pParty->pHirelings[0].pName || strcmp(v4->pName, pParty->pHirelings[0].pName))
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15720 && (!pParty->pHirelings[1].pName || strcmp(v4->pName, pParty->pHirelings[1].pName)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15721 pTmpBuf[v1++] = (char)lpsz + 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15722 ++lpsz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15723 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15724 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15725 while ( (signed int)lpsz < (signed int)pNPCStats->uNumNewNPCs );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15726 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15727 if ( (signed int)((char *)v17 + (unsigned __int8)pParty->field_709) < v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15728 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15729 uDialogue_SpeakingActorNPC_ID = -1 - (unsigned __int8)pParty->field_709 - (int)v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15730 v5 = GetNewNPCData(uDialogue_SpeakingActorNPC_ID, (int)&a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15731 v6 = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15732 if ( v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15733 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15734 if ( a2 == 57 )
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
15735 v7 = pNPCTopics[512].pText;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15736 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15737 v7 = (const CHAR *)*(&pNPCStats->field_13A5C + 5 * v5->uProfession);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15738 lpsz = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15739 if ( !v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15740 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15741 lpsz = (LPCSTR)*(&pNPCStats->field_13A64 + 5 * v6->uProfession);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15742 if ( !lpsz )
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
15743 lpsz = "";
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15744 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15745 a1.Hint = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15746 a1.uFrameX = 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15747 a1.uFrameY = 60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15748 a1.uFrameWidth = 276;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15749 a1.uFrameZ = 313;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15750 a1.uFrameHeight = pFontArrus->CalcTextHeight(lpsz, &a1, 0, 0)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15751 + 2 * LOBYTE(pFontArrus->uFontHeight)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15752 + 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15753 if ( (signed int)a1.uFrameHeight < 130 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15754 a1.uFrameHeight = 130;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15755 a1.uFrameWidth = 400;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15756 a1.uFrameZ = a1.uFrameX + 399;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15757 a1.DrawMessageBox(0);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
15758 sprintf(pTmpBuf2, "NPC%03d", v6->uPortraitID);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15759 v8 = pIcons_LOD->LoadTexture(pTmpBuf2, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15760 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15761 a1.uFrameX + 22,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15762 a1.uFrameY + 36,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15763 (Texture *)(v8 != -1 ? &pIcons_LOD->pTextures[v8] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15764 v9 = v6->uProfession;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15765 if ( v9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15766 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15767 v10 = v6->pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15768 v11 = pTmpBuf;
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
15769 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[429], v10, aNPCProfessionNames[v9]);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15770 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15771 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15772 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15773 v12 = v6->pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15774 v11 = pTmpBuf;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15775 strcpy(pTmpBuf, v12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15776 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15777 v13 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15778 a1.DrawText2(pFontArrus, 0, 0xCu, v13, v11, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15779 a1.uFrameWidth -= 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15780 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15781 v14 = sub_495461((char *)lpsz, uActiveCharacter - 1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15782 a1.DrawText(pFontArrus, 100, 36, 0, v14, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15783 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15784 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15785 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15786 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15787
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15788
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15789 //----- (00416D62) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15790 void sub_416D62_ShowPopupWindow_MonsterRecord_ItemInfo_etcsub_416D62(Vec2_int_ *_this)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15791 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15792 signed int v1; // eax@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15793 char *v2; // eax@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15794 void *v3; // ecx@52
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15795 unsigned int v4; // eax@59
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15796 int v5; // esi@62
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15797 signed int v6; // esi@64
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15798 signed int v7; // esi@69
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15799 ItemGen *v8; // ecx@70
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15800 unsigned int v9; // eax@72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15801 unsigned int v10; // eax@76
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15802 char v11; // zf@83
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15803 GUIButton *v12; // esi@84
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15804 unsigned int v13; // ecx@85
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15805 char *v14; // edi@85
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15806 signed int v15; // eax@92
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15807 int v16; // eax@95
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15808 int v17; // eax@96
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15809 enum PLAYER_SKILL_TYPE v18; // eax@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15810 char *v19; // eax@99
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15811 unsigned int v20; // eax@108
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15812 unsigned int v21; // eax@109
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15813 const char *v22; // eax@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15814 char *v23; // ebx@112
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15815 char *v24; // edx@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15816 unsigned int v25; // eax@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15817 GUIWindow a1; // [sp+4h] [bp-74h]@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15818 double v27; // [sp+58h] [bp-20h]@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15819 struct tagPOINT Point; // [sp+60h] [bp-18h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15820 char *v29; // [sp+68h] [bp-10h]@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15821 float v30; // [sp+6Ch] [bp-Ch]@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15822 unsigned int pX; // [sp+70h] [bp-8h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15823 unsigned int pY; // [sp+74h] [bp-4h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15824
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15825 if ( pCurrentScreen == 16 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15826 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15827 if ( _this )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15828 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15829 pX = _this->x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15830 pY = _this->y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15831 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15832 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15833 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15834 pMouse->GetClickPos(&pX, &pY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15835 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15836 if ( pRenderer->bWindowMode )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15837 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15838 GetCursorPos(&Point);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15839 ScreenToClient(hWnd, &Point);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15840 if ( Point.x < 1 || Point.y < 1 || Point.x > 638 || Point.y > 478 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15841 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15842 back_to_game();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15843 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15844 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15845 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15846 if ( pParty->pPickedItem.uItemID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15847 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15848 v1 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15849 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15850 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15851 if ( (signed int)pX > word_4E2930[v1]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15852 && (signed int)pX < word_4E2938[v1]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15853 && (signed int)pY > 375
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15854 && (signed int)pY < 466 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15855 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15856 pPlayers[uActiveCharacter]->UseItem_DrinkPotion_etc(v1 + 1, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15857 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15858 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15859 ++v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15860 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15861 while ( v1 < 4 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15862 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15863 pEventTimer->Pause();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15864 if ( pCurrentScreen <= 10 )
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15865 {
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15866 if ( pCurrentScreen == 10 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15867 {
82
f9a33f75bae3 Qick Record
Nomad
parents: 67
diff changeset
15868 __debugbreak();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15869 if ( !pPlayers[uActiveCharacter]->CanAct() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15870 {
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
15871 sprintf(
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15872 pTmpBuf,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15873 pGlobalTXT_LocalizationStrings[427],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15874 pPlayers[uActiveCharacter]->pName,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15875 pGlobalTXT_LocalizationStrings[541]);
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15876 a1.Hint = pTmpBuf;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15877 a1.uFrameWidth = 384;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15878 a1.uFrameHeight = 180;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15879 a1.uFrameY = 40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15880 if ( (signed int)pX <= 320 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15881 v10 = pX + 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15882 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15883 v10 = pX - 414;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15884 a1.uFrameX = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15885 goto LABEL_42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15886 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15887 v9 = pX + pSRZBufferLineOffsets[pY];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15888 if ( !(pRenderer->pActiveZBuffer[v9] & 0xFFFF) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15889 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15890 v8 = (ItemGen *)(&pOtherOverlayList->pOverlays[49].field_4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15891 + 2662 * (unsigned int)ptr_507BB8->ptr_1C
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15892 + 18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15893 * *((short *)&pChests[0].mm7__vector_pItems[139].uExpireTime
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15894 + (pRenderer->pActiveZBuffer[v9] & 0xFFFF)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15895 + 2662 * (unsigned int)ptr_507BB8->ptr_1C
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15896 + 3));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15897 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15898 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15899 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15900 if ( pCurrentScreen )
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15901 {
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15902 if ( pCurrentScreen != 3 )
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15903 {
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15904 if ( pCurrentScreen != 7 )
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15905 {
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15906 if ( pCurrentScreen == 8 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15907 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15908 if ( dword_507B00_spell_info_to_draw_in_popup )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15909 DrawSpellDescriptionPopup((void *)(dword_507B00_spell_info_to_draw_in_popup - 1));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15910 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15911 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15912 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15913 LABEL_119:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15914 if ( (signed int)pX > 467
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15915 && pCurrentScreen != 14 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15916 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15917 LABEL_126:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15918 identify_item();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15919 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15920 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15921 if ( (signed int)pY >= 345 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15922 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15923 if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 100 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15924 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15925 CharacterUI_StatsTab_ShowHint();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15926 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15927 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15928 if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 101 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15929 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15930 CharacterUI_SkillsTab_ShowHint();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15931 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15932 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15933 v11 = pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15934 LABEL_125:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15935 if ( !v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15936 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15937 goto LABEL_126;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15938 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15939 if ( !dword_506364
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15940 || (signed int)pX < (signed int)pViewport->uViewportX
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15941 || (signed int)pX > (signed int)pViewport->uViewportZ
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15942 || (signed int)pY < (signed int)pViewport->uViewportY
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15943 || (signed int)pY > (signed int)pViewport->uViewportW
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15944 || (v2 = (char *)sub_444564(), (a1.Hint = v2) == 0) )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15945 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15946 v30 = (double)(pFontArrus->GetLineWidth(v2) + 32);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15947 v27 = v30 + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15948 v29 = (char *)LODWORD(v27);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15949 a1.uFrameWidth = LODWORD(v27);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15950 a1.uFrameX = pX + 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15951 a1.uFrameY = pY + 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15952 goto LABEL_41;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15953 }
82
f9a33f75bae3 Qick Record
Nomad
parents: 67
diff changeset
15954 if (GetCurrentMenuID() > 0)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15955 goto LABEL_132;
82
f9a33f75bae3 Qick Record
Nomad
parents: 67
diff changeset
15956
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15957 if ( (signed int)pY > (signed int)pViewport->uViewportW )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15958 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15959 a1.ptr_1C = (void *)((signed int)pX / 118);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15960 if ( (signed int)pX / 118 < 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15961 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15962 a1.Hint = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15963 a1.uFrameWidth = 400;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15964 a1.uFrameHeight = 200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15965 a1.uFrameX = 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15966 a1.uFrameY = 60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15967 pAudioPlayer->StopChannels(-1, -1);
82
f9a33f75bae3 Qick Record
Nomad
parents: 67
diff changeset
15968 a1.DrawQuickCharRecord();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15969 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15970 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15971 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15972 if ( (signed int)pX > (signed int)pViewport->uViewportZ )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15973 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15974 if ( (signed int)pY >= 130 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15975 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15976 if ( (signed int)pX >= 476 && (signed int)pX <= 636 && (signed int)pY >= 240 && (signed int)pY <= 300 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15977 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15978 a1.Hint = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15979 a1.uFrameWidth = 400;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15980 a1.uFrameHeight = 200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15981 a1.uFrameX = 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15982 a1.uFrameY = 60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15983 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15984 a1._41D73D_draw_buff_tooltip();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15985 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15986 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15987 if ( (signed int)pX < 485 || (signed int)pX > 548 || (signed int)pY < 156 || (signed int)pY > 229 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15988 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15989 if ( (signed int)pX < 566 || (signed int)pX > 629 || (signed int)pY < 156 || (signed int)pY > 229 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15990 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15991 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15992 v3 = (void *)1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15993 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15994 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15995 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15996 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15997 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15998 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15999 sub_416B01(v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16000 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16001 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16002 a1.Hint = _4443D5_GetMinimapRightClickText();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16003 a1.uFrameWidth = 256;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16004 a1.uFrameX = 130;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16005 a1.uFrameY = 140;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16006 LABEL_41:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16007 a1.uFrameHeight = 64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16008 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16009 LABEL_42:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16010 a1.DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16011 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16012 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16013 a1.Hint = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16014 a1.uFrameWidth = 320;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16015 a1.uFrameHeight = 320;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16016 v4 = pX - 350;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16017 if ( (signed int)pX <= 320 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16018 v4 = pX + 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16019 a1.uFrameX = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16020 a1.uFrameY = 40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16021 if ( pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16022 LOWORD(v5) = pGame->pVisInstance->get_picked_object_zbuf_val();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16023 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16024 v5 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16025 v6 = (unsigned __int16)v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16026 if ( (v6 & 7) != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16027 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16028 if ( (v6 & 7) == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16029 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16030 if ( pRenderer->uNumSceneBegins )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16031 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16032 a1.DrawMessageBox(1);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16033 MonsterPopup_Draw(v6 >> 3, &a1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16034 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16035 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16036 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16037 pRenderer->BeginScene();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16038 a1.DrawMessageBox(1);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16039 MonsterPopup_Draw(v6 >> 3, &a1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16040 pRenderer->EndScene();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16041 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16042 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16043 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16044 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16045 v7 = v6 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16046 if ( pObjectList->pObjects[pLayingItems[v7].uObjectDescID].uFlags & 0x10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16047 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16048 v8 = &pLayingItems[v7].stru_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16049 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16050 GameUI_DrawItemInfo(v8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16051 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16052 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16053 if ( pCurrentScreen == 13 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16054 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16055 if ( (signed int)pY < 345 && (signed int)pX < 469 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16056 sub_4B1A2D();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16057 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16058 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16059 if ( pCurrentScreen <= 13 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16060 goto LABEL_132;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16061 if ( pCurrentScreen <= 15 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16062 goto LABEL_119;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16063 if ( pCurrentScreen != 21 )
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16064 {
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16065 v11 = pCurrentScreen == 23;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16066 goto LABEL_125;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16067 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16068 a1.Hint = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16069 v12 = pGUIWindow_CurrentMenu->pControlsHead;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16070 if ( !v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16071 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16072 v13 = pY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16073 v14 = v29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16074 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16075 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16076 if ( v12->uButtonType != 1 && v12->uButtonType != 3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16077 || (signed int)pX < (signed int)v12->uX
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16078 || (signed int)pX > (signed int)v12->uZ
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16079 || (signed int)v13 < (signed int)v12->uY
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16080 || (signed int)v13 > (signed int)v12->uW )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16081 goto LABEL_117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16082 v15 = v12->uControlID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16083 if ( v15 <= 65 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16084 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16085 if ( v15 == 65 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16086 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16087 a1.Hint = pClassDescriptions[v12->uControlParam];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16088 v14 = pClassNames[v12->uControlParam];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16089 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16090 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16091 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16092 if ( v15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16093 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16094 v16 = v15 - 62;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16095 if ( v16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16096 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16097 v17 = v16 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16098 if ( v17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16099 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16100 if ( v17 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16101 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16102 v18 = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].GetSkillIdxByOrder(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16103 v12->uControlParam + 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16104 v14 = pSkillNames[v18];
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16105 a1.Hint = pSkillDesc[v18];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16106 v13 = pY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16107 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16108 goto LABEL_117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16109 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16110 v14 = pGlobalTXT_LocalizationStrings[668];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16111 v19 = pGlobalTXT_LocalizationStrings[669];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16112 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16113 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16114 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16115 v14 = pGlobalTXT_LocalizationStrings[670];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16116 v19 = pGlobalTXT_LocalizationStrings[671];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16117 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16118 goto LABEL_116;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16119 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16120 a1.Hint = pAttributeDescriptions[(signed int)v12->uControlParam % 7];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16121 v14 = aAttributeNames[(signed int)v12->uControlParam % 7];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16122 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16123 goto LABEL_117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16124 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16125 if ( v15 == 66 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16126 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16127 v19 = pGlobalTXT_LocalizationStrings[664];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16128 v14 = pGlobalTXT_LocalizationStrings[665];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16129 goto LABEL_116;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16130 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16131 if ( v15 == 67 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16132 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16133 v19 = pGlobalTXT_LocalizationStrings[666];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16134 v14 = pGlobalTXT_LocalizationStrings[667];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16135 goto LABEL_116;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16136 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16137 if ( v15 > 71 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16138 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16139 LABEL_117:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16140 v12 = v12->pNext;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16141 if ( !v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16142 goto LABEL_112;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16143 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16144 if ( v15 > 75 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16145 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16146 if ( v15 == 118 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16147 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16148 v20 = v12->uControlParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16149 v14 = pParty->pPlayers[v20].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16150 v19 = pClassDescriptions[pParty->pPlayers[v20].uClass];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16151 LABEL_116:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16152 a1.Hint = v19;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16153 goto LABEL_117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16154 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16155 goto LABEL_117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16156 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16157 v21 = pParty->pPlayers[v12->uControlParam].GetSkillIdxByOrder(v15 - 72);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16158 v13 = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16159 pY = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16160 if ( (v21 & 0x80000000u) != 0 || (signed int)v21 >= 37 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16161 goto LABEL_117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16162 v22 = CharacterUI_GetSkillDescText(v12->uControlParam, (enum PLAYER_SKILL_TYPE)v21);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16163 strcpy(pTmpBuf2, v22);
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16164 a1.Hint = pTmpBuf2;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16165 v14 = pSkillNames[pY];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16166 LABEL_112:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16167 v23 = a1.Hint;
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16168 if ( a1.Hint )
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16169 {
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16170 v24 = a1.Hint;
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16171 a1.Hint = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16172 a1.uFrameWidth = 384;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16173 a1.uFrameHeight = 256;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16174 a1.uFrameX = 128;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16175 a1.uFrameY = 40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16176 a1.uFrameHeight = pFontSmallnum->CalcTextHeight(v24, &a1, 24, 0)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16177 + 2 * LOBYTE(pFontLucida->uFontHeight)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16178 + 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16179 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16180 a1.uFrameW = a1.uFrameY + a1.uFrameHeight - 1;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16181 a1.DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16182 a1.uFrameX += 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16183 a1.uFrameWidth -= 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16184 a1.uFrameY += 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16185 a1.uFrameHeight -= 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16186 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16187 a1.uFrameW = a1.uFrameY + a1.uFrameHeight - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16188 v25 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
16189 sprintf(pTmpBuf, format_4E2D80, v25, v14);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16190 a1.DrawText2(pFontCreate, 0, 0, 0, pTmpBuf, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16191 a1.DrawText(pFontSmallnum, 1, LOBYTE(pFontLucida->uFontHeight), 0, v23, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16192 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16193 LABEL_132:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16194 dword_507BF0_is_there_popup_onscreen = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16195 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16196 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16197
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16198
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16199 //----- (004175C0) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16200 void __thiscall UI_OnMouseLeftClick(int *pXY)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16201 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16202 int *pXY_; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16203 signed int y; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16204 signed int x; // ecx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16205 unsigned int v4; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16206 signed int v5; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16207 signed int v6; // esi@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16208 int v7; // esi@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16209 GUIWindow *v8; // edx@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16210 GUIButton *i; // esi@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16211 signed int v10; // eax@50
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16212 int v11; // ecx@52
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16213 unsigned int pX; // [sp+14h] [bp-8h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16214 unsigned int pY; // [sp+18h] [bp-4h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16215
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16216 pXY_ = pXY;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16217 if ( pCurrentScreen == 16
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16218 || sub_4637E0_is_there_popup_onscreen() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16219 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16220 if ( pGUIWindow2 && pGUIWindow2->ptr_1C == (void *)33 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16221 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16222 sub_4452BB();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16223 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16224 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16225 if ( pXY_ )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16226 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16227 x = *pXY_;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16228 y = pXY_[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16229 pX = *pXY_;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16230 pY = y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16231 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16232 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16233 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16234 pMouse->GetClickPos(&pX, &pY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16235 y = pY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16236 x = pX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16237 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16238 if ( pCurrentScreen
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16239 || !dword_507B98_ctrl_pressed )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16240 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16241 v4 = GetCurrentMenuID();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16242 x = pX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16243 if ( (v4 & 0x80000000u) == 0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16244 || (signed int)pX < (signed int)pViewport->uViewportX
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16245 || (signed int)pX > (signed int)pViewport->uViewportZ )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16246 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16247 y = pY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16248 LABEL_30:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16249 v7 = uNumVisibleWindows;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16250 if ( uNumVisibleWindows < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16251 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16252 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16253 {
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
16254 //v8 = (GUIWindow *)&pWindowList_at_506F50_minus1_indexing[21 * pVisibleWindowsIdxs[v7]];
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
16255 v8 = &pWindowList[pVisibleWindowsIdxs[v7] - 1];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16256 if ( x >= (signed int)v8->uFrameX )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16257 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16258 if ( x <= (signed int)v8->uFrameZ && y >= (signed int)v8->uFrameY && y <= (signed int)v8->uFrameW )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16259 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16260 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16261 --v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16262 if ( v7 < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16263 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16264 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16265 for ( i = v8->pControlsHead; ; i = i->pNext )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16266 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16267 if ( !i )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16268 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16269 if ( i->uButtonType == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16270 goto LABEL_41;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16271 if ( i->uButtonType != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16272 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16273 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
16274 goto LABEL_50;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16275 y = pY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16276 x = pX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16277 LABEL_45:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16278 ;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16279 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16280 if ( i->uButtonType != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16281 goto LABEL_45;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16282 LABEL_41:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16283 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
16284 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16285 LABEL_50:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16286 i->field_2C = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16287 v10 = pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16288 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16289 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16290 v10 = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16291 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16292 }
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
16293 //v11 = i->uControlParam;
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
16294 pMessageQueue_50CBD0->SendMessage((UIMessageType)i->uControlID, i->uControlParam, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16295 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16296 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16297 goto LABEL_45;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16298 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16299 y = pY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16300 if ( (signed int)pY < (signed int)pViewport->uViewportY || (signed int)pY > (signed int)pViewport->uViewportW )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16301 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16302 if ( pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16303 v5 = pGame->pVisInstance->get_picked_object_zbuf_val();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16304 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16305 v5 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16306 v6 = (unsigned __int16)v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16307 if ( (v5 & 7) == 3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16308 && uActiveCharacter
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16309 && v5 < 33554432
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16310 && pPlayers[uActiveCharacter]->CanAct()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16311 && pPlayers[uActiveCharacter]->CanSteal() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16312 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16313 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16314 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16315 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16316 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v6 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16317 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16318 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16319 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16320 if ( pParty->bTurnBasedModeOn == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16321 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16322 if ( pTurnEngine->field_4 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16323 pTurnEngine->field_18 |= 8u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16324 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16325 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16326 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16327
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16328
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16329
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16330 //----- (00417871) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16331 void __thiscall sub_417871(int *pXY)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16332 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16333 POINT v1; // [sp+0h] [bp-18h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16334 POINT a2; // [sp+8h] [bp-10h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16335 unsigned int pY; // [sp+10h] [bp-8h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16336 unsigned int pX; // [sp+14h] [bp-4h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16337
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16338 if ( !pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16339 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16340 if ( pXY )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16341 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16342 pX = *pXY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16343 pY = pXY[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16344 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16345 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16346 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16347 pMouse->GetClickPos(&pX, &pY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16348 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16349 pMouse->GetCursorPos(&a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16350 pMouse->GetCursorPos(&v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16351 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16352 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16353
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16354 //----- (004178C4) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16355 void __cdecl sub_4178C4()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16356 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16357 if ( pArcomageGame->bGameInProgress == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16358 {
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
16359 if (pAsyncMouse)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16360 pArcomageGame->stru1.field_0 = 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16361 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16362 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16363
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16364 //----- (004178E1) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16365 void __cdecl sub_4178E1()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16366 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16367 if ( pArcomageGame->bGameInProgress == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16368 {
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
16369 if (pAsyncMouse)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16370 pArcomageGame->stru1.field_0 = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16371 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16372 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16373
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16374 //----- (004178FE) --------------------------------------------------------
82
f9a33f75bae3 Qick Record
Nomad
parents: 67
diff changeset
16375 unsigned int __fastcall UI_GetHealthManaStringColor(signed int a1, signed int a2)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16376 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16377 unsigned __int16 v2; // dx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16378 unsigned __int16 v3; // cx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16379 int v5; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16380 unsigned __int16 v6; // [sp-4h] [bp-8h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16381
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16382 if ( a1 <= a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16383 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16384 if ( a1 == a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16385 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16386 v5 = 100 * a1 / a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16387 v3 = 255;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16388 if ( v5 >= 25 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16389 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16390 v6 = 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16391 v2 = 255;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16392 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16393 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16394 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16395 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16396 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16397 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16398 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16399 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16400 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16401 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16402 v2 = 255;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16403 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16404 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16405 return GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(v3, v2, v6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16406 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16407
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16408 //----- (00417939) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16409 signed int __thiscall GetConditionDrawColor(unsigned int uConditionIdx)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16410 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16411 unsigned int v1; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16412 signed int v2; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16413 unsigned int v3; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16414 unsigned int v4; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16415 unsigned int v6; // [sp+Ch] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16416
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16417 v1 = uConditionIdx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16418 v2 = 65535;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16419 v3 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE1u, 0xCDu, 0x23u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16420 v6 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0x23u, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16421 v4 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16422 switch ( v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16423 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16424 case 0u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16425 case 1u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16426 case 3u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16427 case 4u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16428 case 5u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16429 case 6u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16430 case 7u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16431 v2 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16432 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16433 case 2u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16434 case 8u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16435 case 9u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16436 case 0xCu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16437 case 0xDu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16438 v2 = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16439 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16440 case 0xAu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16441 case 0xBu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16442 case 0xEu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16443 case 0xFu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16444 case 0x10u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16445 v2 = v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16446 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16447 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16448 return v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16449 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16450 return v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16451 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16452
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16453 //----- (004179BC) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16454 char __fastcall sub_4179BC_draw_tooltip(const char *a1, const char *a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16455 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16456 const char *v2; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16457 const char *v3; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16458 unsigned int v4; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16459 GUIWindow Dst; // [sp+Ch] [bp-5Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16460 POINT v6; // [sp+60h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16461
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16462 v2 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16463 v3 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16464 memset(&Dst, 0, 0x54u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16465 Dst.uFrameWidth = 384;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16466 Dst.uFrameHeight = 256;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16467 Dst.uFrameX = 128;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16468 Dst.uFrameY = pMouse->GetCursorPos(&v6)->y + 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16469 Dst.uFrameHeight = pFontSmallnum->CalcTextHeight(v2, &Dst, 24, 0) + 2 * LOBYTE(pFontLucida->uFontHeight) + 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16470 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16471 Dst.uFrameW = Dst.uFrameY + Dst.uFrameHeight - 1;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16472 Dst.DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16473 Dst.uFrameX += 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16474 Dst.uFrameWidth -= 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16475 Dst.uFrameY += 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16476 Dst.uFrameHeight -= 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16477 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16478 Dst.uFrameW = Dst.uFrameY + Dst.uFrameHeight - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16479 v4 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
16480 sprintf(pTmpBuf, format_4E2D80, v4, v3);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16481 Dst.DrawText2(pFontCreate, 0, 0, 0, pTmpBuf, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16482 return Dst.DrawText(pFontSmallnum, 1, LOBYTE(pFontLucida->uFontHeight), 0, v2, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16483 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16484
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16485 //----- (00417AD4) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16486 unsigned int __fastcall sub_417AD4(unsigned int uPlayerClass, enum PLAYER_SKILL_TYPE uPlayerSkillType, signed int a3)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16487 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16488 enum PLAYER_SKILL_TYPE v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16489 signed int v4; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16490 unsigned int v5; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16491 int v6; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16492 int v7; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16493 int v8; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16494 unsigned __int8 v9; // sf@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16495 unsigned __int8 v10; // of@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16496 int v11; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16497 int v12; // eax@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16498 unsigned int yellow; // [sp+Ch] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16499 unsigned int red; // [sp+10h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16500 unsigned int white; // [sp+14h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16501
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16502 v3 = uPlayerSkillType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16503 v4 = uPlayerClass;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16504 white = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16505 red = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16506 yellow = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16507 v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16508 v6 = v4 % 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16509 if ( !(v4 % 4) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16510 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16511 v11 = 37 * v4 + v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16512 if ( byte_4ED970_skill_learn_ability_by_class_table[0][v11] >= a3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16513 goto LABEL_8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16514 if ( byte_4ED970_skill_learn_ability_by_class_table[1][v11] < a3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16515 && byte_4ED970_skill_learn_ability_by_class_table[2][v11] < a3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16516 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16517 v12 = byte_4ED970_skill_learn_ability_by_class_table[3][v11];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16518 v10 = __OFSUB__(v12, a3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16519 v9 = v12 - a3 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16520 LABEL_15:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16521 v5 = red;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16522 if ( v9 ^ v10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16523 return v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16524 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16525 return yellow;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16526 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16527 if ( v6 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16528 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16529 v7 = 37 * v4 + v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16530 if ( byte_4ED970_skill_learn_ability_by_class_table[0][v7] >= a3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16531 goto LABEL_8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16532 if ( byte_4ED970_skill_learn_ability_by_class_table[1][v7] < a3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16533 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16534 v8 = byte_4ED970_skill_learn_ability_by_class_table[2][v7];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16535 v10 = __OFSUB__(v8, a3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16536 v9 = v8 - a3 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16537 goto LABEL_15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16538 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16539 return yellow;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16540 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16541 if ( v6 > 1 && v6 <= 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16542 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16543 if ( byte_4ED970_skill_learn_ability_by_class_table[v4][v3] < a3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16544 return red;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16545 LABEL_8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16546 v5 = white;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16547 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16548 return v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16549 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16550
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16551 //----- (00417BB5) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16552 const char *__fastcall CharacterUI_GetSkillDescText(unsigned int uPlayerID, enum PLAYER_SKILL_TYPE uPlayerSkillType)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16553 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16554 enum PLAYER_SKILL_TYPE v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16555 unsigned int v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16556 int v4; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16557 int v5; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16558 Player *pPlayer; // ebx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16559 char v7; // al@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16560 char v8; // cl@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16561 unsigned int v9; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16562 unsigned int v10; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16563 unsigned int v11; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16564 enum PLAYER_SKILL_TYPE v12; // edi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16565 unsigned int v13; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16566 unsigned int v14; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16567 enum PLAYER_SKILL_TYPE v15; // esi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16568 int v16; // edi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16569 char v17; // al@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16570 int v18; // ST5C_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16571 int v19; // ST4C_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16572 int v20; // ST3C_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16573 int v21; // ST2C_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16574 int v22; // ST1C_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16575 char *v23; // esi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16576 unsigned int v24; // eax@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16577 unsigned int v25; // eax@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16578 unsigned int v26; // eax@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16579 unsigned int v27; // ecx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16580 enum PLAYER_SKILL_TYPE v28; // ebx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16581 unsigned int v29; // eax@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16582 char a2[1200]; // [sp+Ch] [bp-538h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16583 char Source[120]; // [sp+4BCh] [bp-88h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16584 unsigned __int16 *v33; // [sp+534h] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16585 int v34; // [sp+538h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16586 unsigned __int16 *v35; // [sp+53Ch] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16587 enum PLAYER_SKILL_TYPE v36; // [sp+540h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16588
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16589 v2 = uPlayerSkillType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16590 v3 = uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16591 v36 = uPlayerSkillType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16592 v4 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[431]);// Normal
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16593 v34 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[433]);// Expert
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16594 v33 = (unsigned __int16 *)pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[432]);// Master
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16595 v5 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[96]);// Grand
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16596 v35 = (unsigned __int16 *)v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16597 if ( v34 > v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16598 v35 = (unsigned __int16 *)v34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16599 if ( (signed int)v33 > (signed int)v35 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16600 v35 = v33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16601 if ( v5 > (signed int)v35 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16602 v35 = (unsigned __int16 *)v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16603 pPlayer = &pParty->pPlayers[v3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16604 v33 = &pPlayer->pActiveSkills[v2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16605 v7 = pPlayer->GetActualSkillLevel(v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16606 v8 = LOBYTE(pPlayer->pActiveSkills[v2]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16607 a2[0] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16608 Source[0] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16609 if ( (v8 & 0x3F) == (v7 & 0x3F) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16610 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16611 strcpy(a2, "%s\n\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16612 v24 = sub_417AD4(pPlayer->uClass, v2, 1);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
16613 sprintf(Source, format_4E2DC8, v24);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16614 strcat(a2, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16615 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16616 v25 = sub_417AD4(pPlayer->uClass, v36, 2);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
16617 sprintf(Source, format_4E2DC8, v25);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16618 strcat(a2, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16619 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16620 v26 = sub_417AD4(pPlayer->uClass, v36, 3);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
16621 sprintf(Source, format_4E2DC8, v26);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16622 strcat(a2, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16623 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16624 v27 = pPlayer->uClass;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16625 v28 = v36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16626 v29 = sub_417AD4(v27, v36, 4);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
16627 sprintf(Source, format_4E2DC8, v29);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16628 strcat(a2, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16629 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16630
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16631 v23 = static_sub_417BB5_out_string;
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
16632 sprintf(
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16633 static_sub_417BB5_out_string,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16634 a2,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16635 pSkillDesc[v28],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16636 pGlobalTXT_LocalizationStrings[431], // Normal
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16637 (char *)v35 + 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16638 v35 + 5,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16639 pNormalSkillDesc[v28],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16640 pGlobalTXT_LocalizationStrings[433], // Expert
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16641 (char *)v35 + 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16642 v35 + 5,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16643 pExpertSkillDesc[v28],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16644 pGlobalTXT_LocalizationStrings[432], // Master
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16645 (char *)v35 + 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16646 v35 + 5,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16647 pMasterSkillDesc[v28],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16648 pGlobalTXT_LocalizationStrings[96], // Grand
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16649 (char *)v35 + 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16650 v35 + 5,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16651 pGrandSkillDesc[v28]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16652 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16653 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16654 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16655 strcpy(a2, "%s\n\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16656 v9 = sub_417AD4(pPlayer->uClass, v2, 1);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
16657 sprintf(Source, format_4E2DC8, v9);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16658 strcat(a2, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16659 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16660 v10 = sub_417AD4(pPlayer->uClass, v36, 2);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
16661 sprintf(Source, format_4E2DC8, v10);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16662 strcat(a2, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16663 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16664 v11 = sub_417AD4(pPlayer->uClass, v36, 3);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
16665 sprintf(Source, format_4E2DC8, v11);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16666 strcat(a2, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16667 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16668 v12 = v36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16669 v13 = sub_417AD4(pPlayer->uClass, v36, 4);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
16670 sprintf(Source, format_4E2DC8, v13);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16671 strcat(a2, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16672 strcat(a2, "%s\t%03d:\t%03d%s\t000\n\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16673 v14 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
16674 sprintf(Source, format_4E2DC8, v14);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16675 strcat(a2, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16676 strcat(a2, "%s: +%d");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16677 v15 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16678 v16 = (int)(v35 + 5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16679 v15 = (PLAYER_SKILL_TYPE)((int)v15 * 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16680 v34 = (int)((char *)v35 + 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16681 v17 = pPlayer->GetActualSkillLevel(v36);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16682 v18 = *(int *)((char *)pGrandSkillDesc + v15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16683 v19 = *(int *)((char *)pMasterSkillDesc + v15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16684 v20 = *(int *)((char *)pExpertSkillDesc + v15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16685 v21 = *(int *)((char *)pNormalSkillDesc + v15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16686 v22 = *(int *)((char *)pSkillDesc + v15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16687 v23 = static_sub_417BB5_out_string;
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
16688 sprintf(
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16689 static_sub_417BB5_out_string,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16690 a2,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16691 v22,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16692 pGlobalTXT_LocalizationStrings[431],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16693 v34,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16694 v16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16695 v21,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16696 pGlobalTXT_LocalizationStrings[433],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16697 v34,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16698 v16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16699 v20,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16700 pGlobalTXT_LocalizationStrings[432],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16701 v34,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16702 v16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16703 v19,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16704 pGlobalTXT_LocalizationStrings[96],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16705 v34,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16706 v16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16707 v18,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16708 pGlobalTXT_LocalizationStrings[623],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16709 (v17 & 0x3F) - (*(char *)v33 & 0x3F));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16710 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16711 return v23;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16712 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16713
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16714 //----- (00417FE5) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16715 char __cdecl CharacterUI_SkillsTab_ShowHint()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16716 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16717 unsigned int v0; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16718 unsigned int v1; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16719 GUIButton *i; // esi@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16720 const char *v3; // eax@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16721 unsigned int pX; // [sp+4h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16722 unsigned int pY; // [sp+8h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16723
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16724 pMouse->GetClickPos(&pX, &pY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16725 v0 = pX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16726 v1 = pY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16727 if ( (signed int)pX < 24 || (signed int)pX > 455 || (signed int)pY < 18 || (signed int)pY > 36 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16728 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16729 for ( i = pGUIWindow_CurrentMenu->pControlsHead; i; i = i->pNext )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16730 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16731 if ( i->uControlID == 121
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16732 && (signed int)v0 >= (signed int)i->uX
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16733 && (signed int)v0 <= (signed int)i->uZ
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16734 && (signed int)v1 >= (signed int)i->uY
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16735 && (signed int)v1 <= (signed int)i->uW )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16736 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16737 v3 = CharacterUI_GetSkillDescText(uActiveCharacter - 1, (enum PLAYER_SKILL_TYPE)i->uControlParam);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16738 sub_4179BC_draw_tooltip(pSkillNames[i->uControlParam], v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16739 v1 = pY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16740 v0 = pX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16741 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16742 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16743 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16744 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16745 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16746 LOBYTE(v1) = sub_4179BC_draw_tooltip(pGlobalTXT_LocalizationStrings[207], pSkillPointsAttributeDescription);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16747 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16748 return v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16749 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16750
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16751 //----- (00418083) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16752 char __cdecl CharacterUI_StatsTab_ShowHint()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16753 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16754 LONG _x; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16755 Player *_y; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16756 int v2; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16757 __int16 *v3; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16758 LONG v4; // edx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16759 signed int v5; // edx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16760 char *v6; // ecx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16761 char *v7; // ebx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16762 unsigned int v8; // ebx@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16763 unsigned __int64 v9; // kr00_8@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16764 char *v10; // ST2C_4@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16765 signed int v11; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16766 char *v12; // ecx@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16767 char *v13; // eax@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16768 Player *v14; // esi@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16769 int v15; // ebx@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16770 int v16; // eax@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16771 POINT a2; // [sp+Ch] [bp-24h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16772 __int64 v19; // [sp+14h] [bp-1Ch]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16773 char *v20; // [sp+1Ch] [bp-14h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16774 Player *v21; // [sp+20h] [bp-10h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16775 unsigned int v22; // [sp+24h] [bp-Ch]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16776 int *v23; // [sp+28h] [bp-8h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16777 const char *v24; // [sp+2Ch] [bp-4h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16778
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16779 _x = pMouse->GetCursorPos(&a2)->x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16780 _y = (Player *)pMouse->GetCursorPos(&a2)->y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16781 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16782 v3 = &array_4E2940[0].field_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16783 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16784 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16785 v4 = *(v3 - 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16786 if ( _x >= v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16787 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16788 if ( _x <= v4 + v3[1] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16789 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16790 v5 = *v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16791 if ( (signed int)_y >= v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16792 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16793 if ( (signed int)_y <= v5 + v3[2] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16794 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16795 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16796 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16797 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16798 v3 += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16799 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16800 if ( (signed int)v3 >= (signed int)&off_4E2A12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16801 return (char)_y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16802 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16803 switch ( v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16804 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16805 case 0:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16806 case 1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16807 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16808 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16809 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16810 case 5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16811 case 6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16812 LOBYTE(_y) = 4 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16813 v6 = aAttributeNames[v2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16814 v7 = pAttributeDescriptions[v2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16815 goto LABEL_46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16816 case 7:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16817 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[108]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16818 v7 = pHealthPointsAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16819 v24 = pGlobalTXT_LocalizationStrings[108];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16820 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16821 case 8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16822 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[212]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16823 v7 = pSpellPointsAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16824 v24 = pGlobalTXT_LocalizationStrings[212];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16825 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16826 case 9:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16827 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[12]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16828 v7 = pArmourClassAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16829 v24 = pGlobalTXT_LocalizationStrings[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16830 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16831 case 10:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16832 v24 = pGlobalTXT_LocalizationStrings[47];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16833 strcpy(pTmpBuf2, pPlayerConditionAttributeDescription);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16834 v7 = pTmpBuf2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16835 v20 = pTmpBuf2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16836 strcat(pTmpBuf2, "\n");
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
16837
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
16838 extern unsigned int pConditionImportancyTable[18];
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
16839 v23 = (int *)pConditionImportancyTable;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16840 _y = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16841 v21 = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16842 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16843 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16844 if ( _y->pConditions[*v23] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16845 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16846 strcat(pTmpBuf2, " \n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16847 v8 = *v23;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16848 v9 = pParty->uTimePlayed - v21->pConditions[*v23];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16849 a2.x = LODWORD(pParty->uTimePlayed) - LODWORD(v21->pConditions[*v23]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16850 a2.y = HIDWORD(v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16851 v19 = (signed __int64)((double)*(signed __int64 *)&a2 * 0.234375) / 60 / 60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16852 v22 = (unsigned int)v19 / 0x18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16853 v10 = aCharacterConditionNames[v8];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16854 v19 %= 24i64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16855 v11 = GetConditionDrawColor(v8);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
16856 sprintf(pTmpBuf, &byte_4E2DE8, v11, v10);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16857 strcat(pTmpBuf2, pTmpBuf);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16858 if ( v19 && v19 <= 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16859 v12 = pGlobalTXT_LocalizationStrings[109];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16860 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16861 v12 = pGlobalTXT_LocalizationStrings[110];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16862 if ( !v22 || (v13 = pGlobalTXT_LocalizationStrings[56], v22 > 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16863 v13 = pGlobalTXT_LocalizationStrings[57];
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
16864 sprintf(pTmpBuf, "%lu %s, %lu %s", v22, v13, v19, v12);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16865 strcat(pTmpBuf2, pTmpBuf);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16866 v7 = v20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16867 _y = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16868 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16869 ++v23;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16870 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16871 while ( (signed int)v23 < (signed int)&unk_4EDF40 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16872 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16873 case 11:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16874 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[172]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16875 v7 = pFastSpellAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16876 v24 = pGlobalTXT_LocalizationStrings[172];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16877 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16878 case 12:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16879 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[5]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16880 v7 = pPlayerAgeAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16881 v24 = pGlobalTXT_LocalizationStrings[5];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16882 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16883 case 13:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16884 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[131]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16885 v7 = pPlayerLevelAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16886 v24 = pGlobalTXT_LocalizationStrings[131];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16887 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16888 case 14:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16889 v14 = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16890 v24 = pGlobalTXT_LocalizationStrings[83];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16891 v15 = v14->uLevel;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16892 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16893 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16894 if ( (signed __int64)v14->uExperience < (unsigned int)sub_4B46F8(v15) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16895 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16896 ++v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16897 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16898 while ( v15 <= 10000 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16899 pTmpBuf[0] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16900 pTmpBuf2[0] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16901 if ( v15 > v14->uLevel )
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
16902 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[147], v15);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16903 v16 = sub_4B46F8(v15) - LODWORD(v14->uExperience);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
16904 sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[538], v16, v15 + 1);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16905 strcat(pTmpBuf, "\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16906 strcat(pTmpBuf, pTmpBuf2);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
16907 LOBYTE(_y) = sprintf(pTmpBuf2, "%s\n \n%s", pPlayerExperienceAttributeDescription, pTmpBuf);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16908 v7 = pTmpBuf2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16909 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16910 case 15:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16911 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[587]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16912 v7 = pAttackBonusAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16913 v24 = pGlobalTXT_LocalizationStrings[587];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16914 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16915 case 16:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16916 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[588]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16917 v7 = pAttackDamageAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16918 v24 = pGlobalTXT_LocalizationStrings[588];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16919 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16920 case 17:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16921 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[589]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16922 v7 = pMissleBonusAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16923 v24 = pGlobalTXT_LocalizationStrings[589];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16924 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16925 case 18:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16926 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[590]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16927 v7 = pMissleDamageAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16928 v24 = pGlobalTXT_LocalizationStrings[590];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16929 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16930 case 19:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16931 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[87]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16932 v7 = pFireResistanceAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16933 v24 = pGlobalTXT_LocalizationStrings[87];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16934 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16935 case 20:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16936 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[6]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16937 v7 = pAirResistanceAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16938 v24 = pGlobalTXT_LocalizationStrings[6];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16939 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16940 case 21:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16941 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[240]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16942 v7 = pWaterResistanceAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16943 v24 = pGlobalTXT_LocalizationStrings[240];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16944 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16945 case 22:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16946 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[70]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16947 v7 = pEarthResistanceAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16948 v24 = pGlobalTXT_LocalizationStrings[70];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16949 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16950 case 23:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16951 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[142]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16952 v7 = pMindResistanceAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16953 v24 = pGlobalTXT_LocalizationStrings[142];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16954 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16955 case 24:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16956 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[29]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16957 v7 = pBodyResistanceAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16958 v24 = pGlobalTXT_LocalizationStrings[29];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16959 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16960 case 25:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16961 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[207]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16962 v7 = pSkillPointsAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16963 v24 = pGlobalTXT_LocalizationStrings[207];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16964 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16965 case 26:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16966 _y = (Player *)(4 * pPlayers[uActiveCharacter]->uClass);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16967 v6 = *(char **)((char *)_y->pConditions + (int)pClassNames);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16968 v7 = *(char **)((char *)_y->pConditions + (int)pClassDescriptions);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16969 LABEL_46:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16970 v24 = v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16971 LABEL_47:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16972 if ( v24 && v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16973 LOBYTE(_y) = sub_4179BC_draw_tooltip(v24, v7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16974 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16975 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16976 return (char)_y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16977 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16978 return (char)_y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16979 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16980
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16981 //----- (00418511) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16982 char __fastcall CharacterUI_StatsTab_Draw(unsigned int uPlayerID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16983 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16984 Player *pPlayer; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16985 unsigned int v2; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16986 unsigned int v3; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16987 unsigned int v4; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16988 int v5; // ST20_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16989 int v6; // ST1C_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16990 int v7; // ebp@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16991 int v8; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16992 unsigned int v9; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16993 int v10; // ST34_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16994 int v11; // ST20_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16995 int v12; // ST1C_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16996 int v13; // ebp@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16997 int v14; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16998 unsigned int v15; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16999 int v16; // ST34_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17000 int v17; // ST20_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17001 int v18; // ST1C_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17002 int v19; // ebp@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17003 int v20; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17004 unsigned int v21; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17005 int v22; // ST34_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17006 int v23; // ST20_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17007 int v24; // ST1C_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17008 int v25; // ebp@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17009 int v26; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17010 unsigned int v27; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17011 int v28; // ST34_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17012 int v29; // ST20_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17013 int v30; // ST1C_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17014 int v31; // ebp@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17015 int v32; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17016 unsigned int v33; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17017 int v34; // ST34_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17018 int v35; // ST20_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17019 int v36; // ST1C_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17020 int v37; // ebp@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17021 int v38; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17022 unsigned int v39; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17023 int v40; // ST34_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17024 int v41; // ST20_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17025 int v42; // ST1C_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17026 int v43; // ebp@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17027 int v44; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17028 unsigned int v45; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17029 int v46; // ebp@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17030 signed int v47; // ST20_4@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17031 int v48; // ST1C_4@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17032 signed int v49; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17033 unsigned int v50; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17034 int v51; // ST20_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17035 int v52; // ST1C_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17036 int v53; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17037 unsigned int v54; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17038 int v55; // ST34_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17039 int v56; // ST20_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17040 int v57; // ST1C_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17041 int v58; // ebp@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17042 int v59; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17043 unsigned int v60; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17044 unsigned int v61; // ebp@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17045 unsigned int v62; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17046 char *v63; // ST20_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17047 signed int v64; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17048 unsigned int v65; // ebp@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17049 unsigned __int8 v66; // al@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17050 char *v67; // eax@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17051 unsigned int v68; // ST20_4@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17052 unsigned int v69; // ST1C_4@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17053 signed int v70; // ebp@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17054 signed int v71; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17055 unsigned int v72; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17056 int v73; // ST20_4@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17057 int v74; // ST1C_4@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17058 int v75; // ebp@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17059 int v76; // eax@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17060 unsigned int v77; // eax@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17061 char *v78; // ecx@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17062 int v79; // ST20_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17063 char *v80; // ST40_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17064 unsigned int v81; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17065 int v82; // ST34_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17066 int v83; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17067 int v84; // ST34_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17068 char *v85; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17069 int v86; // ST34_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17070 int v87; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17071 int v88; // ST34_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17072 char *v89; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17073 int v90; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17074 int v91; // ST20_4@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17075 unsigned int v92; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17076 int v93; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17077 int v94; // ST20_4@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17078 unsigned int v95; // eax@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17079 int v96; // eax@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17080 int v97; // ST20_4@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17081 unsigned int v98; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17082 int v99; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17083 int v100; // ST20_4@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17084 unsigned int v101; // eax@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17085 int v102; // eax@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17086 int v103; // ST20_4@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17087 unsigned int v104; // eax@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17088 char *v105; // ST20_4@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17089 unsigned int v106; // eax@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17090 int v107; // eax@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17091 int v108; // ST20_4@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17092 unsigned int v109; // eax@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17093 char *v110; // ST20_4@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17094 unsigned int v111; // eax@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17095 int uY; // [sp+10h] [bp-10h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17096 int uYa; // [sp+10h] [bp-10h]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17097 int uYb; // [sp+10h] [bp-10h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17098 int uYc; // [sp+10h] [bp-10h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17099 int uYd; // [sp+10h] [bp-10h]@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17100 int uYe; // [sp+10h] [bp-10h]@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17101 int uYf; // [sp+10h] [bp-10h]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17102 int uYg; // [sp+10h] [bp-10h]@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17103 int uYh; // [sp+10h] [bp-10h]@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17104 const char *a2; // [sp+14h] [bp-Ch]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17105 const char *a2a; // [sp+14h] [bp-Ch]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17106 const char *a2b; // [sp+14h] [bp-Ch]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17107 const char *a2c; // [sp+14h] [bp-Ch]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17108 const char *a2d; // [sp+14h] [bp-Ch]@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17109 const char *a2e; // [sp+14h] [bp-Ch]@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17110 const char *a2f; // [sp+14h] [bp-Ch]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17111 const char *a2g; // [sp+14h] [bp-Ch]@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17112 const char *a2h; // [sp+14h] [bp-Ch]@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17113 int v131; // [sp+18h] [bp-8h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17114 int v132; // [sp+18h] [bp-8h]@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17115 int v133; // [sp+18h] [bp-8h]@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17116 int v134; // [sp+18h] [bp-8h]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17117 int v135; // [sp+18h] [bp-8h]@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17118 int v136; // [sp+18h] [bp-8h]@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17119 int v137; // [sp+1Ch] [bp-4h]@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17120 int v138; // [sp+1Ch] [bp-4h]@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17121
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17122 pPlayer = (Player *)&stru_AA1058[3].pSounds[6972 * uPlayerID + 40552];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17123 v2 = pIcons_LOD->LoadTexture("fr_stats", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17124 pRenderer->DrawTextureIndexed(8u, 8u, (Texture *)(v2 != -1 ? (int)&pIcons_LOD->pTextures[v2] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17125 v3 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17126 sprintf(pTmpBuf, format_4E2DC8, v3);
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17127 sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[429], pPlayer->pName, pClassNames[pPlayer->uClass]);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17128 strcat(pTmpBuf, pTmpBuf2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17129 if ( pPlayer->uSkillPoints )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17130 v4 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17131 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17132 v4 = 0xFFFFu;
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17133 sprintf(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
17134 strcat(pTmpBuf, pTmpBuf2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17135 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 18, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17136 v5 = pPlayer->GetBaseStrength();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17137 v6 = pPlayer->GetActualMight();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17138 v7 = pPlayer->GetBaseStrength();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17139 v8 = pPlayer->GetActualMight();
82
f9a33f75bae3 Qick Record
Nomad
parents: 67
diff changeset
17140 v9 = UI_GetHealthManaStringColor(v8, v7);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17141 sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[144], v9, v6, v5);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17142 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 53, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17143 v10 = LOBYTE(pFontArrus->uFontHeight) + 51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17144 v11 = pPlayer->GetBaseIntelligence();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17145 v12 = pPlayer->GetActualIntelligence();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17146 v13 = pPlayer->GetBaseIntelligence();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17147 v14 = pPlayer->GetActualIntelligence();
82
f9a33f75bae3 Qick Record
Nomad
parents: 67
diff changeset
17148 v15 = UI_GetHealthManaStringColor(v14, v13);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17149 sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[116], v15, v12, v11);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17150 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17151 v16 = LOBYTE(pFontArrus->uFontHeight) + v10 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17152 v17 = pPlayer->GetBaseWillpower();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17153 v18 = pPlayer->GetActualWillpower();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17154 v19 = pPlayer->GetBaseWillpower();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17155 v20 = pPlayer->GetActualWillpower();
82
f9a33f75bae3 Qick Record
Nomad
parents: 67
diff changeset
17156 v21 = UI_GetHealthManaStringColor(v20, v19);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17157 sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[163], v21, v18, v17);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17158 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v16, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17159 v22 = LOBYTE(pFontArrus->uFontHeight) + v16 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17160 v23 = pPlayer->GetBaseEndurance();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17161 v24 = pPlayer->GetActualEndurance();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17162 v25 = pPlayer->GetBaseEndurance();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17163 v26 = pPlayer->GetActualEndurance();
82
f9a33f75bae3 Qick Record
Nomad
parents: 67
diff changeset
17164 v27 = UI_GetHealthManaStringColor(v26, v25);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17165 sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[75], v27, v24, v23);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17166 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v22, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17167 v28 = LOBYTE(pFontArrus->uFontHeight) + v22 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17168 v29 = pPlayer->GetBaseAccuracy();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17169 v30 = pPlayer->GetActualAccuracy();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17170 v31 = pPlayer->GetBaseAccuracy();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17171 v32 = pPlayer->GetActualAccuracy();
82
f9a33f75bae3 Qick Record
Nomad
parents: 67
diff changeset
17172 v33 = UI_GetHealthManaStringColor(v32, v31);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17173 sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[1], v33, v30, v29);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17174 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v28, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17175 v34 = LOBYTE(pFontArrus->uFontHeight) + v28 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17176 v35 = pPlayer->GetBaseSpeed();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17177 v36 = pPlayer->GetActualSpeed();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17178 v37 = pPlayer->GetBaseSpeed();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17179 v38 = pPlayer->GetActualSpeed();
82
f9a33f75bae3 Qick Record
Nomad
parents: 67
diff changeset
17180 v39 = UI_GetHealthManaStringColor(v38, v37);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17181 sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[211], v39, v36, v35);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17182 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v34, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17183 v40 = LOBYTE(pFontArrus->uFontHeight) + v34 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17184 v41 = pPlayer->GetBaseLuck();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17185 v42 = pPlayer->GetActualLuck();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17186 v43 = pPlayer->GetBaseLuck();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17187 v44 = pPlayer->GetActualLuck();
82
f9a33f75bae3 Qick Record
Nomad
parents: 67
diff changeset
17188 v45 = UI_GetHealthManaStringColor(v44, v43);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17189 sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[136], v45, v42, v41);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17190 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v40, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17191 a2 = "%s";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17192 v46 = v40 + 2 * LOBYTE(pFontArrus->uFontHeight) + 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17193 if ( pPlayer->GetMaxHealth() >= 1000 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17194 a2 = (const char *)&unk_4E2EB8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17195 v47 = pPlayer->GetMaxHealth();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17196 v48 = pPlayer->sHealth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17197 v49 = pPlayer->GetMaxHealth();
82
f9a33f75bae3 Qick Record
Nomad
parents: 67
diff changeset
17198 v50 = UI_GetHealthManaStringColor(pPlayer->sHealth, v49);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17199 sprintf(pTmpBuf, a2, pGlobalTXT_LocalizationStrings[108], v50, v48, v47);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17200 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v46, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17201 a2a = "%s";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17202 uY = LOBYTE(pFontArrus->uFontHeight) + v46 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17203 if ( pPlayer->GetMaxMana() >= 1000 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17204 a2a = (const char *)&unk_4E2EB8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17205 v51 = pPlayer->GetMaxMana();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17206 v52 = pPlayer->sMana;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17207 v53 = pPlayer->GetMaxMana();
82
f9a33f75bae3 Qick Record
Nomad
parents: 67
diff changeset
17208 v54 = UI_GetHealthManaStringColor(pPlayer->sMana, v53);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17209 sprintf(pTmpBuf, a2a, pGlobalTXT_LocalizationStrings[212], v54, v52, v51);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17210 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, uY, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17211 v55 = LOBYTE(pFontArrus->uFontHeight) + uY - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17212 v56 = pPlayer->GetBaseAC();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17213 v57 = pPlayer->GetActualAC();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17214 v58 = pPlayer->GetBaseAC();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17215 v59 = pPlayer->GetActualAC();
82
f9a33f75bae3 Qick Record
Nomad
parents: 67
diff changeset
17216 v60 = UI_GetHealthManaStringColor(v59, v58);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17217 sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[12], v60, v57, v56);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17218 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v55, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17219 v61 = v55 + 2 * LOBYTE(pFontArrus->uFontHeight) - 2;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
17220 v62 = pPlayer->GetMajorConditionIdx();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17221 v63 = aCharacterConditionNames[v62];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17222 v64 = GetConditionDrawColor(v62);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17223 sprintf(pTmpBuf, "%s: ", pGlobalTXT_LocalizationStrings[47], v64, v63);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17224 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x1Au, v61, 0, pTmpBuf, 226, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17225 v65 = LOBYTE(pFontArrus->uFontHeight) + v61 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17226 v66 = pPlayer->uQuickSpell;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17227 if ( v66 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17228 v67 = pSpellStats->pInfos[v66].pShortName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17229 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17230 v67 = pGlobalTXT_LocalizationStrings[153];
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17231 sprintf(pTmpBuf, "%s: %s", pGlobalTXT_LocalizationStrings[172], v67);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17232 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x1Au, v65, 0, pTmpBuf, 226, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17233 v68 = pPlayer->GetBaseAge();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17234 v69 = pPlayer->GetActualAge();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17235 v70 = pPlayer->GetBaseAge();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17236 v71 = pPlayer->GetActualAge();
82
f9a33f75bae3 Qick Record
Nomad
parents: 67
diff changeset
17237 v72 = UI_GetHealthManaStringColor(v71, v70);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17238 sprintf(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[5], v72, v69, v68);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17239 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, 50, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17240 a2b = "%s";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17241 uYa = LOBYTE(pFontArrus->uFontHeight) + 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17242 if ( pPlayer->GetBaseLevel() > 99 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17243 a2b = format_4E2E68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17244 v73 = pPlayer->GetBaseLevel();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17245 v74 = pPlayer->GetActualLevel();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17246 v75 = pPlayer->GetBaseLevel();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17247 v76 = pPlayer->GetActualLevel();
82
f9a33f75bae3 Qick Record
Nomad
parents: 67
diff changeset
17248 v77 = UI_GetHealthManaStringColor(v76, v75);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17249 sprintf(pTmpBuf, a2b, pGlobalTXT_LocalizationStrings[131], v77, v74, v73);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17250 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYa, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17251 uYb = uYa + LOBYTE(pFontArrus->uFontHeight) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17252 if ( (signed __int64)pPlayer->uExperience <= 9999999 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17253 v78 = pGlobalTXT_LocalizationStrings[83];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17254 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17255 v78 = pGlobalTXT_LocalizationStrings[17];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17256 v79 = LODWORD(pPlayer->uExperience);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17257 v80 = v78;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17258 v81 = pPlayer->GetExperienceDisplayColor();
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17259 sprintf(pTmpBuf, "%s\r180", v80, v81, v79);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17260 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYb, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17261 v82 = uYb + 2 * LOBYTE(pFontArrus->uFontHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17262 v83 = pPlayer->GetActualAttack(0);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17263 sprintf(pTmpBuf, "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[18], v83);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17264 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v82, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17265 v84 = v82 + LOBYTE(pFontArrus->uFontHeight) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17266 v85 = pPlayer->GetMeleeDamageString();
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17267 sprintf(pTmpBuf, "%s\t100 %s\n", pGlobalTXT_LocalizationStrings[53], v85);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17268 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v84, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17269 v86 = v84 + LOBYTE(pFontArrus->uFontHeight) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17270 v87 = pPlayer->GetRangedAttack();
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17271 sprintf(pTmpBuf, "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[203], v87);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17272 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v86, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17273 v88 = v86 + LOBYTE(pFontArrus->uFontHeight) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17274 v89 = pPlayer->GetRangedDamageString();
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17275 sprintf(pTmpBuf, "%s\t100 %s\n\n", pGlobalTXT_LocalizationStrings[53], v89);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17276 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v88, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17277 a2c = format_4E2E10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17278 uYc = v88 + 2 * LOBYTE(pFontArrus->uFontHeight) - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17279 v131 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17280 v90 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17281 if ( v131 > 99 || v90 > 99 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17282 a2c = format_4E2E68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17283 v91 = v90;
82
f9a33f75bae3 Qick Record
Nomad
parents: 67
diff changeset
17284 v92 = UI_GetHealthManaStringColor(v131, v90);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17285 sprintf(pTmpBuf, a2c, pGlobalTXT_LocalizationStrings[87], v92, v131, v91);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17286 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYc, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17287 a2d = format_4E2E10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17288 uYd = uYc + LOBYTE(pFontArrus->uFontHeight) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17289 v132 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_AIR);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17290 v93 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_AIR);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17291 if ( v132 > 99 || v93 > 99 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17292 a2d = format_4E2E68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17293 v94 = v93;
82
f9a33f75bae3 Qick Record
Nomad
parents: 67
diff changeset
17294 v95 = UI_GetHealthManaStringColor(v132, v93);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17295 sprintf(pTmpBuf, a2d, pGlobalTXT_LocalizationStrings[6], v95, v132, v94);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17296 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYd, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17297 a2e = format_4E2E10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17298 uYe = uYd + LOBYTE(pFontArrus->uFontHeight) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17299 v133 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_WATER);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17300 v96 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_WATER);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17301 if ( v133 > 99 || v96 > 99 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17302 a2e = format_4E2E68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17303 v97 = v96;
82
f9a33f75bae3 Qick Record
Nomad
parents: 67
diff changeset
17304 v98 = UI_GetHealthManaStringColor(v133, v96);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17305 sprintf(pTmpBuf, a2e, pGlobalTXT_LocalizationStrings[240], v98, v133, v97);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17306 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYe, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17307 a2f = format_4E2E10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17308 uYf = uYe + LOBYTE(pFontArrus->uFontHeight) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17309 v134 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17310 v99 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17311 if ( v134 > 99 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17312 a2f = format_4E2E68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17313 v100 = v99;
82
f9a33f75bae3 Qick Record
Nomad
parents: 67
diff changeset
17314 v101 = UI_GetHealthManaStringColor(v134, v99);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17315 sprintf(pTmpBuf, a2f, pGlobalTXT_LocalizationStrings[70], v101, v134, v100);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17316 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYf, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17317 a2g = format_4E2E10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17318 uYg = uYf + LOBYTE(pFontArrus->uFontHeight) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17319 v135 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17320 v102 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17321 v137 = v102;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17322 if ( v135 > 99 || v102 > 99 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17323 a2g = format_4E2E68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17324 v103 = v102;
82
f9a33f75bae3 Qick Record
Nomad
parents: 67
diff changeset
17325 v104 = UI_GetHealthManaStringColor(v135, v102);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17326 sprintf(pTmpBuf, a2g, pGlobalTXT_LocalizationStrings[142], v104, v135, v103);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17327 if ( pPlayer->uClass == 35 && v137 == 200 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17328 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17329 v105 = pGlobalTXT_LocalizationStrings[625];
82
f9a33f75bae3 Qick Record
Nomad
parents: 67
diff changeset
17330 v106 = UI_GetHealthManaStringColor(v135, 200);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17331 sprintf(pTmpBuf, format_4E2E00, pGlobalTXT_LocalizationStrings[142], v106, v105);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17332 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17333 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYg, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17334 a2h = format_4E2E10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17335 uYh = uYg + LOBYTE(pFontArrus->uFontHeight) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17336 v136 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17337 v107 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17338 v138 = v107;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17339 if ( v136 > 99 || v107 > 99 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17340 a2h = format_4E2E68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17341 v108 = v107;
82
f9a33f75bae3 Qick Record
Nomad
parents: 67
diff changeset
17342 v109 = UI_GetHealthManaStringColor(v136, v107);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17343 sprintf(pTmpBuf, a2h, pGlobalTXT_LocalizationStrings[29], v109, v136, v108);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17344 if ( pPlayer->uClass == 35 && v138 == 200 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17345 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17346 v110 = pGlobalTXT_LocalizationStrings[625];
82
f9a33f75bae3 Qick Record
Nomad
parents: 67
diff changeset
17347 v111 = UI_GetHealthManaStringColor(v136, 200);
96
51a5b0dc3f30 3.11.12
Ritor1
parents: 84
diff changeset
17348 sprintf(pTmpBuf, format_4E2E00, pGlobalTXT_LocalizationStrings[29], v111, v110);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17349 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17350 return pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYh, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17351 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17352
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17353 //----- (00419100) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17354 int __cdecl sub_419100()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17355 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17356 Player *v0; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17357 int v1; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17358 unsigned __int8 *v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17359 int v3; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17360 int result; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17361 int v5; // esi@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17362 unsigned __int8 v6; // zf@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17363 unsigned __int8 v7; // sf@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17364 int v8; // edx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17365 int v9; // ecx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17366 unsigned __int8 v10; // of@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17367 stru179 *v11; // edi@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17368 int v12; // edx@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17369 int v13; // [sp+Ch] [bp-8h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17370 signed int v14; // [sp+Ch] [bp-8h]@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17371 int i; // [sp+10h] [bp-4h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17372
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17373 v0 = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17374 memset(&pStru179, 0, 0xFA0u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17375 memset(pTmpBuf2, 0, 0x7D0u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17376 v1 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17377 dword_506544 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17378 dword_506548 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17379 dword_506520 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17380 dword_50651C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17381 dword_506528 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17382 v2 = (unsigned __int8 *)v0->field_152;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17383 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17384 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17385 v13 = dword_723E80_award_related[2 * v1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17386 if ( (unsigned __int16)_449B57_test_bit(v2, v1) && v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17387 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17388 v3 = dword_506520++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17389 pStru179->field_0[v3] = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17390 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17391 ++v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17392 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17393 while ( v1 < 105 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17394 result = dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17395 v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17396 v6 = dword_506520 == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17397 v7 = dword_506520 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17398 dword_506524 = dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17399 dword_506520 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17400 if ( !(v7 | v6) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17401 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17402 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17403 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17404 v8 = rand() % 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17405 result = dword_506524;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17406 v9 = dword_506524 + v5++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17407 v10 = __OFSUB__(v5, dword_506524);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17408 v7 = v5 - dword_506524 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17409 pStru179->field_0[v9] = v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17410 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17411 while ( v7 ^ v10 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17412 if ( result > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17413 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17414 v14 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17415 v11 = pStru179;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17416 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17417 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17418 for ( i = v14; i < result; ++i )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17419 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17420 v12 = pStru179->field_0[i];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17421 if ( dword_723E84[2 * v12] < dword_723E84[2 * v11->field_0[0]] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17422 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17423 pStru179->field_0[i] = v11->field_0[0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17424 v11->field_0[0] = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17425 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17426 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17427 ++v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17428 v11 = (stru179 *)((char *)v11 + 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17429 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17430 while ( v14 - 1 < result );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17431 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17432 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17433 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17434 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17435
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17436
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17437 //----- (00419220) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17438 void __cdecl sub_419220()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17439 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17440 GUIButton *i; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17441
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17442 if ( !dword_507CBC )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17443 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17444 dword_507CBC = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17445 for ( i = pGUIWindow_CurrentMenu->pControlsHead; i; i = i->pNext )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17446 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17447 if ( i->uControlID == 120 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17448 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17449 dword_50698C = i->uX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17450 dword_506988 = i->uY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17451 dword_506984 = i->uZ;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17452 dword_506980 = i->uW;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17453 i->uW = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17454 i->uZ = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17455 i->uY = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17456 i->uX = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17457 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17458 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17459 ptr_507B9C = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17460 0x1B6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17461 0x2Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17462 (uTextureID_ar_up_up != -1 ? pIcons_LOD->pTextures[uTextureID_ar_up_up].uTextureWidth : 24),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17463 (uTextureID_ar_up_up != -1 ? pIcons_LOD->pTextures[uTextureID_ar_up_up].uTextureHeight : 26),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17464 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17465 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17466 0xA9u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17467 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17468 0,
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
17469 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17470 (Texture *)(uTextureID_ar_up_up != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ar_up_up] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17471 uTextureID_ar_up_dn != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ar_up_dn] : 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17472 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17473 ptr_507BA0 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17474 0x1B6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17475 0x124u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17476 (uTextureID_ar_dn_up != -1 ? pIcons_LOD->pTextures[uTextureID_ar_dn_up].uTextureWidth : 24),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17477 (uTextureID_ar_dn_up != -1 ? pIcons_LOD->pTextures[uTextureID_ar_dn_up].uTextureHeight : 26),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17478 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17479 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17480 0xAAu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17481 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17482 0,
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
17483 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17484 (Texture *)(uTextureID_ar_dn_up != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ar_dn_up] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17485 uTextureID_ar_dn_dn != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ar_dn_dn] : 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17486 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17487 ptr_507BA4 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17488 0x1B8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17489 0x3Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17490 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17491 0xE8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17492 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17493 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17494 0xC0u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17495 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17496 0,
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
17497 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17498 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17499 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17500 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17501
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17502
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17503
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17504 //----- (00419379) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17505 void __cdecl sub_419379()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17506 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17507 GUIButton *i; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17508
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17509 if ( dword_507CBC )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17510 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17511 dword_507CBC = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17512 GUIButton::_41D0D8(ptr_507BA4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17513 GUIButton::_41D0D8(ptr_507B9C);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17514 GUIButton::_41D0D8(ptr_507BA0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17515 ptr_507BA0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17516 ptr_507B9C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17517 for ( i = pGUIWindow_CurrentMenu->pControlsHead; i; i = i->pNext )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17518 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17519 if ( i->uControlID == 120 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17520 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17521 i->uX = dword_50698C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17522 i->uY = dword_506988;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17523 i->uZ = dword_506984;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17524 i->uW = dword_506980;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17525 pGUIWindow_CurrentMenu->_41D08F(1, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17526 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17527 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17528 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17529 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17530
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17531
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17532 //----- (00419401) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17533 void __cdecl sub_419401()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17534 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17535 unsigned int v0; // ecx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17536 GUIButton *i; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17537 GUIFont *v2; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17538 unsigned int v3; // esi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17539 int v4; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17540 unsigned int v5; // esi@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17541 int v6; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17542 unsigned int v7; // esi@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17543 int v8; // eax@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17544 unsigned int v9; // esi@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17545 int v10; // eax@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17546 int a2; // [sp+10h] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17547 int v12; // [sp+14h] [bp-10h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17548 int v13; // [sp+14h] [bp-10h]@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17549 unsigned int *v14; // [sp+18h] [bp-Ch]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17550 unsigned int *v15; // [sp+18h] [bp-Ch]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17551 unsigned int *v16; // [sp+18h] [bp-Ch]@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17552 unsigned int *v17; // [sp+18h] [bp-Ch]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17553 char *v18; // [sp+1Ch] [bp-8h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17554 int a5; // [sp+20h] [bp-4h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17555
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17556 a2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17557 if ( dword_507CC0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17558 sub_4196A0();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17559 v0 = uActiveCharacter;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17560 dword_507CC0 = uActiveCharacter;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17561 for ( i = pGUIWindow_CurrentMenu->pControlsHead; i; i = i->pNext )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17562 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17563 if ( i->uControlID == 120 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17564 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17565 dword_50698C = i->uX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17566 dword_506988 = i->uY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17567 dword_506984 = i->uZ;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17568 dword_506980 = i->uW;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17569 i->uW = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17570 i->uZ = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17571 i->uY = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17572 i->uX = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17573 v0 = uActiveCharacter;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17574 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17575 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17576 v12 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17577 a5 = pGUIWindow_CurrentMenu->uNumControls;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17578 v18 = &stru_AA1058[3].pSounds[6972 * v0 + 40552];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17579 v2 = pFontLucida;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17580 v14 = (unsigned int *)dword_4E2A2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17581 v3 = 2 * LOBYTE(pFontLucida->uFontHeight) + 13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17582 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17583 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17584 if ( v18[2 * *v14 + 264] & 0x3F )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17585 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17586 v4 = LOBYTE(v2->uFontHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17587 v3 = v3 + v4 - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17588 ++a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17589 ++v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17590 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17591 0x18u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17592 v3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17593 0xCCu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17594 v4 - 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17595 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17596 *v14 | 0x8000,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17597 0x79u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17598 *v14,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17599 0,
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
17600 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17601 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17602 v2 = pFontLucida;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17603 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17604 ++v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17605 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17606 while ( (signed int)v14 < (signed int)dword_4E2A50 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17607 if ( !v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17608 v3 = v3 + LOBYTE(v2->uFontHeight) - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17609 v15 = (unsigned int *)_4E2A80_skills;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17610 v5 = v3 + 2 * LOBYTE(v2->uFontHeight) - 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17611 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17612 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17613 if ( v18[2 * *v15 + 264] & 0x3F && a2 < 15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17614 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17615 v6 = LOBYTE(v2->uFontHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17616 v5 = v5 + v6 - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17617 ++a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17618 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17619 0x18u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17620 v5,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17621 0xCCu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17622 v6 - 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17623 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17624 *v15 | 0x8000,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17625 0x79u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17626 *v15,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17627 0,
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
17628 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17629 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17630 v2 = pFontLucida;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17631 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17632 ++v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17633 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17634 while ( (signed int)v15 < (signed int)pAwardsTextColors );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17635 v13 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17636 v16 = (unsigned int *)dword_4E2A18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17637 v7 = 2 * LOBYTE(v2->uFontHeight) + 13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17638 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17639 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17640 if ( v18[2 * *v16 + 264] & 0x3F )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17641 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17642 v8 = LOBYTE(v2->uFontHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17643 v7 = v7 + v8 - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17644 ++a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17645 ++v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17646 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17647 0xF6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17648 v7,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17649 0xCCu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17650 v8 - 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17651 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17652 *v16 | 0x8000,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17653 0x79u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17654 *v16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17655 0,
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
17656 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17657 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17658 v2 = pFontLucida;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17659 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17660 ++v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17661 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17662 while ( (signed int)v16 < (signed int)dword_4E2A2C );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17663 if ( !v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17664 v7 = v7 + LOBYTE(v2->uFontHeight) - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17665 v17 = (unsigned int *)dword_4E2A50;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17666 v9 = v7 + 2 * LOBYTE(v2->uFontHeight) - 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17667 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17668 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17669 if ( v18[2 * *v17 + 264] & 0x3F )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17670 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17671 v10 = LOBYTE(v2->uFontHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17672 v9 = v9 + v10 - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17673 ++a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17674 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17675 0xF6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17676 v9,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17677 0xCCu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17678 v10 - 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17679 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17680 *v17 | 0x8000,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17681 0x79u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17682 *v17,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17683 0,
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
17684 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17685 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17686 v2 = pFontLucida;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17687 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17688 ++v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17689 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17690 while ( (signed int)v17 < (signed int)_4E2A80_skills );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17691 if ( a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17692 pGUIWindow_CurrentMenu->_41D08F(a2, 1, 0, a5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17693 }