annotate mm7_5.cpp @ 67:476145dc3441

Слияние
author Ritor1
date Fri, 26 Oct 2012 23:22:41 +0600
parents 5ec98919c8fd 30ec77bbd018
children f9a33f75bae3
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 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2158 sprintfex(a1, "data\\lloyd%d%d.pcx", _506348_current_lloyd_playerid + 1, uMessageParam + 1);
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;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2232 UpdateActors();
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:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2328 sprintfex(
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:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2343 sprintfex(pTmpBuf, "%s", pKeyActionMap->pPressedKeysBuffer);
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 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2383 sprintfex(Str2, "No map found for %s", pMapStats->pInfos[v71].pName);
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 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2708 sprintfex(pTmpBuf, v161, v178);
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"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5162 sprintfex(pTmpBuf, v47, pPlayerName, pMonsterName, v50);
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"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5211 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[175], pPlayer->pName, uDamageAmount, pMonster);
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"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5234 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[635], pPlayer->pName, pMonster);
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"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5254 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[636], pPlayer->pName, pMonster);
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 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5576 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[637], v45 + 168);
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);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6354 if ( sub_43ED6F_get_some_race_sex_relation(1u) )
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
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6511 if ( a2 <= 500 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6512 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6513 v5 = *((char *)&pBloodsplatContainer->std__vector_pBloodsplats[62].field_20 + a2 + 2) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6514 LABEL_21:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6515 if ( v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6516 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6517 result = 516;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6518 if ( a2 < 66 || a2 > 78 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6519 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6520 if ( a2 == 516 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6521 goto LABEL_79;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6522 if ( a2 != 504 && a2 != 505 && a2 != 533 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6523 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6524 if ( (a2 < 100 || a2 > 104) && a2 != 524 && a2 != 535 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6525 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6526 if ( a2 >= 115 && a2 <= 119 || a2 == 512 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6527 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6528 if ( a2 == 512 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6529 a2 = 312;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6530 goto LABEL_87;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6531 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6532 if ( (a2 < 89 || a2 > 99) && a2 != 521 && a2 != 522 && a2 != 523 && a2 != 532 && a2 != 544 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6533 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6534 result = 525;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6535 if ( (a2 < 105 || a2 > 109) && a2 != 525 && a2 != 530 && a2 != 547 && a2 != 548 && a2 != 550 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6536 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6537 switch ( a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6538 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6539 case 525:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6540 a2 = 325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6541 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6542 case 530:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6543 a2 = 330;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6544 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6545 case 547:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6546 a2 = 347;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6547 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6548 case 548:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6549 a2 = 348;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6550 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6551 case 550:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6552 a2 = 350;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6553 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6554 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6555 v8 = a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6556 v7 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6557 if ( !a4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6558 goto LABEL_88;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6559 LABEL_91:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6560 v6 = "item%3.3dv%da1";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6561 return sprintfex(a1, v6, v7, v8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6562 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6563 if ( a2 == 521 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6564 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6565 a2 = 239;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6566 goto LABEL_87;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6567 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6568 if ( a2 == 522 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6569 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6570 a2 = 240;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6571 goto LABEL_87;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6572 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6573 if ( a2 == 523 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6574 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6575 a2 = 241;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6576 goto LABEL_87;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6577 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6578 if ( a2 != 532 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6579 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6580 if ( a2 == 544 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6581 a2 = 344;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6582 goto LABEL_87;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6583 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6584 v9 = 93;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6585 goto LABEL_70;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6586 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6587 if ( a2 == 524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6588 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6589 a2 = 324;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6590 goto LABEL_87;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6591 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6592 if ( a2 == 535 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6593 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6594 v9 = 104;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6595 LABEL_70:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6596 a2 = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6597 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6598 LABEL_87:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6599 v8 = a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6600 v7 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6601 LABEL_88:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6602 v6 = "item%3.3dv%d";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6603 return sprintfex(a1, v6, v7, v8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6604 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6605 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6606 if ( a2 != 516 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6607 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6608 switch ( a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6609 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6610 case 504:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6611 a2 = 235;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6612 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6613 case 505:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6614 a2 = 236;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6615 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6616 case 533:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6617 a2 = 73;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6618 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6619 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6620 LABEL_86:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6621 if ( a4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6622 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6623 if ( a4 != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6624 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6625 if ( a4 != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6626 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6627 v8 = a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6628 v7 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6629 v6 = "item%3.3dv%da2";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6630 return sprintfex(a1, v6, v7, v8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6631 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6632 v8 = a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6633 v7 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6634 goto LABEL_91;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6635 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6636 goto LABEL_87;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6637 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6638 LABEL_79:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6639 a2 = 234;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6640 goto LABEL_86;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6641 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6642 result = a2 - 504;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6643 switch ( a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6644 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6645 case 516:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6646 v5 = byte_5111F6[2] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6647 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6648 case 505:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6649 v5 = byte_5111F6[1] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6650 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6651 case 504:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6652 v5 = byte_5111F6[0] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6653 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6654 case 533:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6655 v5 = byte_5111F6[16] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6656 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6657 case 512:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6658 v5 = byte_5111F6[3] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6659 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6660 case 521:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6661 v5 = byte_5111F6[4] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6662 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6663 case 522:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6664 v5 = byte_5111F6[5] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6665 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6666 case 523:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6667 v5 = byte_5111F6[6] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6668 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6669 case 532:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6670 v5 = byte_5111F6[7] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6671 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6672 case 544:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6673 v5 = byte_5111F6[8] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6674 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6675 case 524:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6676 v5 = byte_5111F6[9] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6677 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6678 case 535:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6679 v5 = byte_5111F6[10] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6680 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6681 case 525:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6682 v5 = byte_5111F6[11] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6683 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6684 case 530:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6685 v5 = byte_5111F6[12] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6686 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6687 case 547:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6688 v5 = byte_5111F6[13] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6689 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6690 case 548:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6691 v5 = byte_5111F6[14] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6692 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6693 case 550:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6694 v5 = byte_5111F6[15] == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6695 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6696 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6697 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6698 }
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
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6702 //----- (0043CC7C) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6703 void __fastcall CharacterUI_DrawPaperdoll(unsigned int uPlayerID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6704 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6705 Player **ppPlayer; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6706 Player *pPlayer; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6707 enum CHARACTER_RACE v3; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6708 signed int v4; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6709 int v5; // edi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6710 unsigned int v6; // ecx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6711 int v7; // ecx@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6712 unsigned int v8; // eax@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6713 int v9; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6714 int v10; // edx@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6715 int v11; // ecx@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6716 int v12; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6717 unsigned int v13; // edi@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6718 unsigned int v14; // ebx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6719 int v15; // ecx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6720 Texture *v16; // ebp@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6721 double v17; // st7@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6722 int v18; // edi@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6723 char *v19; // eax@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6724 Texture *v20; // edi@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6725 unsigned int v21; // eax@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6726 int v22; // edi@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6727 int v23; // eax@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6728 int v24; // ebx@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6729 int v25; // eax@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6730 LODFile_IconsBitmaps *v26; // ecx@42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6731 Texture *v27; // edi@51
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6732 double v28; // st7@51
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6733 char v29; // zf@54
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6734 char *v30; // eax@54
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6735 unsigned int v31; // eax@59
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6736 int v32; // edx@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6737 int v33; // eax@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6738 int v34; // eax@74
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6739 int v35; // ebx@74
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6740 unsigned int v36; // ecx@74
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6741 int v37; // eax@74
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6742 LODFile_IconsBitmaps *v38; // ecx@78
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6743 Texture *v39; // edi@85
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6744 double v40; // st7@87
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6745 int v41; // edi@88
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6746 Texture *v42; // edi@89
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6747 unsigned int v43; // eax@93
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6748 int v44; // edx@94
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6749 int v45; // eax@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6750 int v46; // eax@106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6751 int v47; // ecx@106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6752 int v48; // ebx@106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6753 int v49; // eax@106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6754 LODFile_IconsBitmaps *v50; // ecx@110
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6755 Texture *v51; // edi@117
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6756 double v52; // st7@119
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6757 int v53; // edi@120
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6758 Texture *v54; // edi@121
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6759 char *v55; // eax@122
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6760 unsigned int v56; // eax@127
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6761 int v57; // edi@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6762 int v58; // ecx@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6763 int v59; // ebx@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6764 int v60; // ecx@132
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6765 int v61; // eax@134
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6766 int v62; // ecx@136
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6767 Texture *v63; // edi@145
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6768 double v64; // st7@147
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6769 int v65; // edi@148
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6770 char *v66; // eax@148
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6771 Texture *v67; // edi@149
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6772 Player *v68; // ebx@155
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6773 unsigned int v69; // edx@155
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6774 int v70; // edx@156
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6775 unsigned int v71; // eax@160
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6776 int v72; // edi@161
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6777 int v73; // edx@163
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6778 int v74; // ecx@168
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6779 unsigned int v75; // ebx@170
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6780 int v76; // ecx@172
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6781 Texture *v77; // edi@181
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6782 double v78; // st7@183
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6783 int v79; // edi@184
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6784 char *v80; // eax@184
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6785 Texture *v81; // edi@185
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6786 unsigned int v82; // eax@192
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6787 int v83; // eax@193
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6788 int v84; // eax@197
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6789 int v85; // eax@197
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6790 int v86; // ecx@197
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6791 int v87; // eax@197
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6792 int v88; // eax@198
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6793 int v89; // eax@199
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6794 int v90; // edi@201
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6795 int v91; // edi@213
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6796 int v92; // ebx@213
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6797 int v93; // edi@214
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6798 int v94; // ebx@214
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6799 int v95; // eax@214
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6800 char *v96; // edi@226
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6801 double v97; // st7@228
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6802 int v98; // edi@229
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6803 char *v99; // eax@229
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6804 Render *v100; // ecx@229
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6805 Texture *v101; // edi@230
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6806 int v102; // edi@236
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6807 int v103; // eax@237
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6808 int v104; // ecx@237
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6809 int v105; // edx@237
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6810 int v106; // edx@238
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6811 int v107; // edx@239
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6812 int v108; // edx@240
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6813 int v109; // edi@250
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6814 char *v110; // edx@250
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6815 unsigned int v111; // eax@259
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6816 int v112; // eax@260
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6817 int v113; // eax@260
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6818 int v114; // eax@265
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6819 int v115; // eax@274
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6820 int v116; // ebx@274
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6821 unsigned int v117; // edi@274
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6822 double v118; // st7@286
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6823 int v119; // edi@287
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6824 char *v120; // eax@287
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6825 Texture *v121; // edi@288
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6826 unsigned int v122; // edi@295
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6827 int v123; // ebx@297
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6828 int v124; // edi@298
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6829 int v125; // ecx@303
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6830 int v126; // eax@312
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6831 unsigned int v127; // ebx@314
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6832 int v128; // ecx@316
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6833 Texture *v129; // edi@325
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6834 double v130; // st7@327
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6835 int v131; // edi@328
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6836 char *v132; // eax@328
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6837 Texture *v133; // edi@329
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6838 unsigned int v134; // eax@335
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6839 int v135; // eax@336
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6840 int v136; // edx@336
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6841 int v137; // eax@336
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6842 unsigned int v138; // ebx@339
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6843 int v139; // ecx@339
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6844 Texture *v140; // edi@348
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6845 double v141; // st7@350
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6846 int v142; // edi@351
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6847 char *v143; // eax@351
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6848 Texture *v144; // edi@352
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6849 unsigned int v145; // eax@358
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6850 int v146; // eax@359
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6851 int v147; // ecx@359
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6852 int v148; // eax@359
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6853 int v149; // edx@359
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6854 int v150; // ebx@362
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6855 int v151; // ecx@363
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6856 int v152; // ecx@364
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6857 unsigned int v153; // eax@370
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6858 unsigned int v154; // edi@370
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6859 int v155; // eax@370
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6860 LODFile_IconsBitmaps *v156; // ecx@374
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6861 Texture *v157; // ebp@381
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6862 double v158; // st7@383
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6863 Texture *v159; // edi@385
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6864 char *v160; // eax@386
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6865 unsigned int v161; // eax@393
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6866 int v162; // eax@394
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6867 unsigned int v163; // [sp-Ch] [bp-58h]@230
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6868 unsigned int v164; // [sp-Ch] [bp-58h]@233
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6869 signed int v165; // [sp-Ch] [bp-58h]@235
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6870 char *v166; // [sp-8h] [bp-54h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6871 const char *v167; // [sp-8h] [bp-54h]@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6872 const char *v168; // [sp-8h] [bp-54h]@43
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6873 const char *v169; // [sp-8h] [bp-54h]@79
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6874 const char *v170; // [sp-8h] [bp-54h]@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6875 const char *v171; // [sp-8h] [bp-54h]@141
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6876 const char *v172; // [sp-8h] [bp-54h]@177
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6877 const char *v173; // [sp-8h] [bp-54h]@222
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6878 int v174; // [sp-8h] [bp-54h]@228
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6879 unsigned int v175; // [sp-8h] [bp-54h]@230
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6880 unsigned int v176; // [sp-8h] [bp-54h]@233
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6881 signed int v177; // [sp-8h] [bp-54h]@235
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6882 const char *v178; // [sp-8h] [bp-54h]@242
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6883 const char *v179; // [sp-8h] [bp-54h]@280
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6884 const char *v180; // [sp-8h] [bp-54h]@321
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6885 char *v181; // [sp-8h] [bp-54h]@337
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6886 const char *v182; // [sp-8h] [bp-54h]@344
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6887 const char *v183; // [sp-8h] [bp-54h]@375
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6888 signed int v184; // [sp-4h] [bp-50h]@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6889 signed int v185; // [sp-4h] [bp-50h]@99
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6890 signed int v186; // [sp-4h] [bp-50h]@202
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6891 int v187; // [sp-4h] [bp-50h]@228
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6892 Texture *v188; // [sp-4h] [bp-50h]@230
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6893 Texture *v189; // [sp-4h] [bp-50h]@233
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6894 Texture *v190; // [sp-4h] [bp-50h]@235
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6895 signed int v191; // [sp-4h] [bp-50h]@266
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6896 signed int v192; // [sp-4h] [bp-50h]@304
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6897 unsigned int a3; // [sp+10h] [bp-3Ch]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6898 int a3a; // [sp+10h] [bp-3Ch]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6899 int a3b; // [sp+10h] [bp-3Ch]@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6900 unsigned int a3c; // [sp+10h] [bp-3Ch]@74
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6901 unsigned int a3d; // [sp+10h] [bp-3Ch]@106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6902 int a3e; // [sp+10h] [bp-3Ch]@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6903 int a3f; // [sp+10h] [bp-3Ch]@168
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6904 unsigned int a3g; // [sp+10h] [bp-3Ch]@216
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6905 unsigned int a3h; // [sp+10h] [bp-3Ch]@274
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6906 int a3i; // [sp+10h] [bp-3Ch]@312
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6907 int a3j; // [sp+10h] [bp-3Ch]@336
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6908 int a3k; // [sp+10h] [bp-3Ch]@362
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6909 signed int a2; // [sp+14h] [bp-38h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6910 unsigned int a2a; // [sp+14h] [bp-38h]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6911 Texture *a2b; // [sp+14h] [bp-38h]@49
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6912 int a2c; // [sp+14h] [bp-38h]@74
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6913 int a2d; // [sp+14h] [bp-38h]@106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6914 int a2e; // [sp+14h] [bp-38h]@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6915 int a2f; // [sp+14h] [bp-38h]@168
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6916 int a2g; // [sp+14h] [bp-38h]@214
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6917 int a2h; // [sp+14h] [bp-38h]@274
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6918 Texture *a2i; // [sp+14h] [bp-38h]@284
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6919 int a2j; // [sp+14h] [bp-38h]@312
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6920 int a2k; // [sp+14h] [bp-38h]@336
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6921 Player *v217; // [sp+18h] [bp-34h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6922 int v218; // [sp+1Ch] [bp-30h]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6923 int v219; // [sp+1Ch] [bp-30h]@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6924 int v220; // [sp+1Ch] [bp-30h]@94
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6925 int v221; // [sp+1Ch] [bp-30h]@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6926 int v222; // [sp+1Ch] [bp-30h]@161
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6927 int v223; // [sp+1Ch] [bp-30h]@213
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6928 char v224; // [sp+1Ch] [bp-30h]@237
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6929 int v225; // [sp+1Ch] [bp-30h]@260
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6930 int v226; // [sp+1Ch] [bp-30h]@298
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6931 int v227; // [sp+1Ch] [bp-30h]@336
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6932 int v228; // [sp+1Ch] [bp-30h]@359
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6933 int v229; // [sp+20h] [bp-2Ch]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6934 int v230; // [sp+20h] [bp-2Ch]@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6935 int v231; // [sp+20h] [bp-2Ch]@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6936 int v232; // [sp+20h] [bp-2Ch]@94
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6937 int v233; // [sp+20h] [bp-2Ch]@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6938 int v234; // [sp+20h] [bp-2Ch]@161
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6939 int v235; // [sp+20h] [bp-2Ch]@197
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6940 int v236; // [sp+20h] [bp-2Ch]@260
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6941 int v237; // [sp+20h] [bp-2Ch]@298
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6942 int v238; // [sp+20h] [bp-2Ch]@336
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6943 int v239; // [sp+24h] [bp-28h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6944 int v240; // [sp+28h] [bp-24h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6945 unsigned int v241; // [sp+2Ch] [bp-20h]@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6946 int v242; // [sp+2Ch] [bp-20h]@197
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6947 unsigned int v243; // [sp+2Ch] [bp-20h]@370
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6948 int v244; // [sp+34h] [bp-18h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6949 signed int v245; // [sp+34h] [bp-18h]@361
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6950 unsigned int uPlayerID_; // [sp+38h] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6951 int uPlayerID_a; // [sp+38h] [bp-14h]@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6952 signed int v248; // [sp+40h] [bp-Ch]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6953 int v249; // [sp+40h] [bp-Ch]@358
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6954 signed int v250; // [sp+44h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6955
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6956 ppPlayer = &pPlayers[uPlayerID];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6957 pPlayer = *ppPlayer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6958 uPlayerID_ = uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6959 v217 = *ppPlayer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6960 pIcons_LOD->LoadTexture("sptext01", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6961 v3 = pPlayer->GetRace();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6962 v4 = pPlayer->GetSexByVoice();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6963 v250 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6964 if ( v3 && v3 != 1 && v3 != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6965 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6966 v248 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6967 v5 = (v4 != 0) + 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6968 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6969 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6970 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6971 v248 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6972 v5 = v4 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6973 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6974 v239 = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6975 v244 = (*ppPlayer)->uFace;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6976 pRenderer->ResetClip();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6977 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6978 0x1D3u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6979 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6980 (Texture *)(uTextureID_BACKDOLL != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BACKDOLL] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6981 if ( !IsPlayerWearingWatersuit[uPlayerID_] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6982 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6983 v21 = pPlayer->pEquipment.uBow;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6984 if ( !v21 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6985 goto LABEL_59;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6986 v230 = pPlayer->pEquipment.uBow;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
6987 v22 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v21 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6988 v23 = *(int *)v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6989 v24 = papredoll_4E4C28 + array_4E4C30[v239].equip_x - pItemsTable->pItems[v23].uEquipX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6990 a3b = paperdoll_4E4C2C + array_4E4C30[v239].equip_y - pItemsTable->pItems[v23].uEquipY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6991 v241 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v23].pIconName, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6992 v25 = *(int *)(v22 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6993 if ( !(*(int *)(v22 + 20) & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6994 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6995 if ( v25 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6996 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6997 v27 = (Texture *)(v241 != -1 ? (int)&pIcons_LOD->pTextures[v241] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6998 pRenderer->_4A6776(v24, a3b, v27);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6999 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7000 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7001 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7002 v29 = (v25 & 1) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7003 v30 = (char *)&pIcons_LOD->pTextures[v241];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7004 if ( v29 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7005 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7006 v27 = (Texture *)(v241 != -1 ? (int)v30 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7007 pRenderer->DrawTransparentGreenShade(v24, a3b, (Texture *)(v241 != -1 ? (int)v30 : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7008 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7009 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7010 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7011 v27 = (Texture *)(v241 != -1 ? (int)v30 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7012 pRenderer->DrawTextureTransparent(v24, a3b, (Texture *)(v241 != -1 ? (int)v30 : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7013 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7014 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7015 LABEL_57:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7016 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7017 pRenderer->_4A612A(v24, a3b, v27, v230);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7018 LABEL_59:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7019 v31 = v217->pEquipment.uCloak;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7020 if ( !v31 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7021 goto LABEL_93;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7022 v231 = v217->pEquipment.uCloak;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7023 v32 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v31 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7024 v219 = v32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7025 if ( *(int *)v32 != 525 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7026 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7027 switch ( *(int *)v32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7028 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7029 case 0x212:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7030 v184 = 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7031 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7032 case 0x223:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7033 v184 = 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7034 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7035 case 0x224:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7036 v184 = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7037 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7038 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7039 if ( *(int *)v32 != 550 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7040 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7041 v33 = *(int *)v32 - 105;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7042 LABEL_72:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7043 if ( v33 < 0 || v33 >= 10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7044 goto LABEL_93;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7045 LABEL_74:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7046 v34 = v33 + 10 * v239;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7047 v35 = paperdoll_array_511828[0][v34];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7048 a2c = papredoll_4E4C28 + paperdoll_array_4E5570[0][v34][0];// TODO indexing
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7049 v36 = paperdoll_4E4C2C + paperdoll_array_4E5570[0][v34][1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7050 v37 = *(int *)(v32 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7051 a3c = v36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7052 if ( !(v37 & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7053 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7054 v41 = v35 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7055 if ( v37 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7056 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7057 v42 = (Texture *)(v41 != 0 ? (int)&pIcons_LOD->pTextures[v35] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7058 pRenderer->_4A6776(a2c, v36, v42);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7059 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7060 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7061 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7062 v42 = (Texture *)(v41 != 0 ? (int)&pIcons_LOD->pTextures[v35] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7063 pRenderer->DrawTextureTransparent(a2c, v36, v42);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7064 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7065 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7066 pRenderer->_4A612A(a2c, a3c, v42, v231);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7067 LABEL_93:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7068 v240 = 4 * uPlayerID_ - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7069 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7070 papredoll_4E4C28,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7071 paperdoll_4E4C2C,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7072 (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
7073 v43 = v217->pEquipment.uBody;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7074 if ( !v43 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7075 goto LABEL_127;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7076 v232 = v217->pEquipment.uBody;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7077 v44 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v43 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7078 v220 = v44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7079 if ( *(int *)v44 != 504 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7080 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7081 if ( *(int *)v44 == 505 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7082 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7083 v185 = 14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7084 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7085 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7086 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7087 if ( *(int *)v44 == 516 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7088 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7089 v185 = 13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7090 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7091 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7092 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7093 if ( *(int *)v44 != 533 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7094 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7095 v45 = *(int *)v44 - 66;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7096 LABEL_104:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7097 if ( v45 < 0 || v45 >= 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7098 goto LABEL_127;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7099 LABEL_106:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7100 v46 = 17 * v239 + v45;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7101 a2d = papredoll_4E4C28 + paperdoll_array_4E4E30[0][v46][0];// TODO indexing
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7102 v47 = paperdoll_4E4C2C + paperdoll_array_4E4E30[0][v46][1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7103 v48 = paperdoll_array_511290[0][v46][0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7104 v49 = *(int *)(v44 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7105 a3d = v47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7106 if ( !(v49 & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7107 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7108 v53 = v48 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7109 if ( v49 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7110 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7111 v54 = (Texture *)(v53 != 0 ? (int)&pIcons_LOD->pTextures[v48] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7112 pRenderer->_4A6776(a2d, v47, v54);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7113 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7114 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7115 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7116 v29 = (v49 & 1) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7117 v55 = (char *)&pIcons_LOD->pTextures[v48];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7118 if ( v29 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7119 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7120 v54 = (Texture *)(v53 != 0 ? (int)v55 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7121 pRenderer->DrawTransparentGreenShade(a2d, v47, v54);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7122 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7123 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7124 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7125 v54 = (Texture *)(v53 != 0 ? (int)v55 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7126 pRenderer->DrawTextureTransparent(a2d, v47, v54);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7127 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7128 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7129 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7130 pRenderer->_4A612A(a2d, a3d, v54, v232);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7131 LABEL_127:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7132 v56 = v217->pEquipment.field_20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7133 if ( !v56 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7134 goto LABEL_155;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7135 v233 = v217->pEquipment.field_20;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7136 v57 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v56 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7137 v221 = v57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7138 v58 = *(int *)v57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7139 if ( *(int *)v57 == 529 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7140 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7141 a3e = paperdoll_4E4C2C + paredoll_array_4E54B8[v239][1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7142 a2e = papredoll_4E4C28 + paredoll_array_4E54B8[v239][0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7143 v59 = papredoll_flying_feet[v244];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7144 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7145 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7146 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7147 if ( v58 == 512 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7148 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7149 a3e = paperdoll_4E4C2C + paredoll_array_4E54B8[v239][3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7150 a2e = papredoll_4E4C28 + paredoll_array_4E54B8[v239][2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7151 v59 = dword_511638[v239][5];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7152 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7153 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7154 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7155 v60 = v58 - 115;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7156 if ( v60 < 0 || v60 >= 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7157 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7158 a2e = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7159 a3e = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7160 v59 = dword_511638[v239][0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7161 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7162 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7163 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7164 v61 = v60 + 7 * v239;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7165 a3e = paperdoll_4E4C2C + dword_4E5490[0][v61][1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7166 a2e = papredoll_4E4C28 + dword_4E5490[0][v61][0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7167 v59 = dword_511638[0][v60 + 6 * v239];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7168 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7169 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7170 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7171 v62 = *(int *)(v57 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7172 if ( !(*(int *)(v57 + 20) & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7173 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7174 v65 = v59 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7175 v66 = (char *)&pIcons_LOD->pTextures[v59];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7176 if ( v62 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7177 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7178 v67 = (Texture *)(v65 != 0 ? (int)v66 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7179 pRenderer->_4A6776(a2e, a3e, v67);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7180 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7181 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7182 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7183 if ( v62 & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7184 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7185 v67 = (Texture *)(v65 != 0 ? (int)v66 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7186 pRenderer->DrawTextureTransparent(a2e, a3e, v67);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7187 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7188 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7189 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7190 v67 = (Texture *)(v65 != 0 ? (int)v66 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7191 pRenderer->DrawTransparentGreenShade(a2e, a3e, v67);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7192 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7193 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7194 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7195 pRenderer->_4A612A(a2e, a3e, v67, v233);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7196 LABEL_155:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7197 v68 = v217;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7198 v69 = v217->pEquipment.uMainHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7199 uPlayerID_a = 2 * v239;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7200 if ( !v69
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7201 || (v70 = *(int *)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v69 + 5],
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7202 pItemsTable->pItems[v70].uEquipType != 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7203 && (pItemsTable->pItems[v70].uSkillType != 4 || v217->pEquipment.uOffHand) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7204 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7205 papredoll_4E4C28 + dword_4E5AE0[2 * v239],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7206 paperdoll_4E4C2C + dword_4E5AE0[2 * v239 + 1],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7207 (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
7208 v71 = v217->pEquipment.uBelt;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7209 if ( v71 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7210 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7211 v234 = v217->pEquipment.uBelt;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7212 v72 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v71 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7213 v222 = v72;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7214 if ( *(int *)v72 == 524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7215 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7216 v73 = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7217 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7218 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7219 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7220 if ( *(int *)v72 == 535 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7221 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7222 v73 = 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7223 goto LABEL_168;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7224 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7225 v73 = *(int *)v72 - 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7226 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7227 if ( v73 >= 0 && v73 < 7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7228 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7229 LABEL_168:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7230 v74 = 7 * v239 + v73;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7231 a2f = papredoll_4E4C28 + dword_4E57F0[0][v74][0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7232 a3f = paperdoll_4E4C2C + dword_4E57F0[0][v74][1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7233 if ( v248 != 1 || v73 == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7234 v75 = stru_511718.texids[v74];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7235 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7236 v75 = stru_511718.texids[v73 + 7 * (v239 - 2)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7237 v76 = *(int *)&v217->field_1F5[36 * v71 + 15];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7238 if ( !(*(int *)&v217->field_1F5[36 * v71 + 15] & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7239 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7240 v79 = v75 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7241 v80 = (char *)&pIcons_LOD->pTextures[v75];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7242 if ( v76 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7243 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7244 v81 = (Texture *)(v79 != 0 ? (int)v80 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7245 pRenderer->_4A6776(a2f, a3f, v81);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7246 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7247 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7248 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7249 if ( v76 & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7250 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7251 v81 = (Texture *)(v79 != 0 ? (int)v80 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7252 pRenderer->DrawTextureTransparent(a2f, a3f, v81);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7253 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7254 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7255 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7256 v81 = (Texture *)(v79 != 0 ? (int)v80 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7257 pRenderer->DrawTransparentGreenShade(a2f, a3f, v81);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7258 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7259 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7260 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7261 pRenderer->_4A612A(a2f, a3f, v81, v234);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7262 goto LABEL_191;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7263 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7264 if ( (*(int *)&v217->field_1F5[36 * v71 + 15] & 0xF0) != 16 )
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) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7267 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7268 v172 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7269 goto LABEL_181;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7270 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7271 if ( (*(int *)&v217->field_1F5[36 * v71 + 15] & 0xF0) == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7272 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7273 v172 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7274 goto LABEL_181;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7275 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7276 if ( (*(int *)&v217->field_1F5[36 * v71 + 15] & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7277 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7278 v172 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7279 LABEL_181:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7280 v77 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v172, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7281 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7282 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7283 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7284 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7285 *(char *)(v222 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7286 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7287 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7288 v78 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7289 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7290 a2f,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7291 a3f,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7292 (Texture *)(v75 != -1 ? (int)&pIcons_LOD->pTextures[v75] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7293 v77,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7294 (signed __int64)v78,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7295 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7296 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7297 LABEL_191:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7298 v68 = v217;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7299 goto LABEL_192;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7300 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7301 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7302 v172 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7303 goto LABEL_181;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7304 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7305 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7306 LABEL_192:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7307 v82 = v68->pEquipment.uMainHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7308 if ( v82 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7309 {
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7310 v83 = *(int *)&v68->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v82 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7311 if ( pItemsTable->pItems[v83].uEquipType == 1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7312 || pItemsTable->pItems[v83].uSkillType == 4 && !v68->pEquipment.uOffHand )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7313 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7314 papredoll_4E4C28 + pPaperdollLeftHand[uPlayerID_a],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7315 paperdoll_4E4C2C + pPaperdollLeftHand[uPlayerID_a + 1],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7316 (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
7317 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7318 v84 = v68->pEquipment.uBody;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7319 v235 = v84;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7320 v85 = (int)((char *)v68 + 36 * v84);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7321 v242 = v85;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7322 v86 = *(int *)(v85 + 496);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7323 v87 = *(int *)(v85 + 496) - 504;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7324 if ( v87 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7325 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7326 v88 = v87 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7327 if ( v88 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7328 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7329 v89 = v88 - 11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7330 if ( v89 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7331 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7332 if ( v89 != 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7333 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7334 v90 = v86 - 66;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7335 LABEL_207:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7336 if ( v90 < 0 || v90 > 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7337 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7338 LABEL_259:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7339 v111 = v68->pEquipment.uCloak;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7340 if ( !v111 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7341 goto LABEL_293;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7342 v236 = v68->pEquipment.uCloak;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7343 v112 = (int)&v68->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v111 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7344 v225 = v112;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7345 v113 = *(int *)v112;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7346 if ( v113 != 525 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7347 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7348 switch ( v113 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7349 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7350 case 530:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7351 v191 = 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7352 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7353 case 547:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7354 v191 = 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7355 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7356 case 548:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7357 v191 = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7358 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7359 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7360 if ( v113 != 550 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7361 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7362 v114 = v113 - 105;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7363 LABEL_272:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7364 if ( v114 < 0 || v114 >= 10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7365 goto LABEL_293;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7366 LABEL_274:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7367 v115 = v114 + 10 * v239;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7368 v116 = dword_511788[v115];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7369 v115 *= 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7370 v117 = papredoll_4E4C28 + *(int *)((char *)&dword_4E56B0 + v115);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7371 a2h = papredoll_4E4C28 + *(int *)((char *)&dword_4E56B0 + v115);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7372 a3h = paperdoll_4E4C2C + *(int *)((char *)&dword_4E56B4 + v115);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7373 if ( v116 == pIcons_LOD->FindTextureByName("pending") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7374 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7375 LABEL_292:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7376 v68 = v217;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7377 LABEL_293:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7378 if ( v244 == 12 || v244 == 13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7379 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7380 v122 = papredoll_dbrds[v244];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7381 if ( v122 != pIcons_LOD->FindTextureByName("Pending") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7382 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7383 papredoll_4E4C28 + dword_4E5AD0[2 * v244 - 24],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7384 paperdoll_4E4C2C + dword_4E5AD4[2 * v244 - 24],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7385 (Texture *)(v122 != -1 ? (int)&pIcons_LOD->pTextures[v122] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7386 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7387 v123 = v68->pEquipment.uHelm;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7388 if ( !v123 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7389 goto LABEL_335;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7390 v237 = v123;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7391 v124 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v123 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7392 v226 = v124;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7393 if ( *(int *)v124 != 521 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7394 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7395 switch ( *(int *)v124 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7396 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7397 case 0x20A:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7398 v192 = 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7399 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7400 case 0x20B:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7401 v192 = 13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7402 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7403 case 0x214:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7404 v192 = 14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7405 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7406 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7407 if ( *(int *)v124 != 544 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7408 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7409 v125 = *(int *)v124 - 89;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7410 LABEL_310:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7411 if ( v125 < 0 || v125 >= 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7412 goto LABEL_335;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7413 goto LABEL_312;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7414 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7415 v192 = 15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7416 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7417 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7418 v125 = v192;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7419 LABEL_312:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7420 v126 = 2 * (v125 + 16 * v239);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7421 a2j = papredoll_4E4C28 + dword_4E58D0[v126];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7422 a3i = paperdoll_4E4C2C + dword_4E58D4[v126];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7423 if ( v248 != 1 || *(int *)v124 != 92 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7424 v127 = stru_511698.texids[v125 + 16 * v250];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7425 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7426 v127 = papredoll_dbrds[11];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7427 v128 = *(int *)(v124 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7428 if ( *(int *)(v124 + 20) & 0xF0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7429 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7430 if ( (*(int *)(v124 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7431 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7432 if ( (*(int *)(v124 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7433 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7434 v180 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7435 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7436 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7437 if ( (*(int *)(v124 + 20) & 0xF0) == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7438 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7439 v180 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7440 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7441 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7442 if ( (*(int *)(v124 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7443 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7444 v180 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7445 LABEL_325:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7446 v129 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v180, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7447 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7448 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7449 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7450 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7451 *(char *)(v226 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7452 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7453 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7454 v130 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7455 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7456 a2j,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7457 a3i,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7458 (Texture *)(v127 != -1 ? (int)&pIcons_LOD->pTextures[v127] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7459 v129,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7460 (signed __int64)v130,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7461 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7462 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7463 goto LABEL_335;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7464 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7465 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7466 v180 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7467 goto LABEL_325;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7468 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7469 v131 = v127 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7470 v132 = (char *)&pIcons_LOD->pTextures[v127];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7471 if ( v128 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7472 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7473 v133 = (Texture *)(v131 != 0 ? (int)v132 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7474 pRenderer->_4A6776(a2j, a3i, v133);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7475 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7476 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7477 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7478 if ( v128 & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7479 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7480 v133 = (Texture *)(v131 != 0 ? (int)v132 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7481 pRenderer->DrawTextureTransparent(a2j, a3i, v133);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7482 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7483 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7484 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7485 v133 = (Texture *)(v131 != 0 ? (int)v132 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7486 pRenderer->DrawTransparentGreenShade(a2j, a3i, v133);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7487 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7488 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7489 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7490 pRenderer->_4A612A(a2j, a3i, v133, v237);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7491 LABEL_335:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7492 v134 = v217->pEquipment.uMainHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7493 if ( !v134 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7494 goto LABEL_358;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7495 v238 = v217->pEquipment.uMainHand;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7496 v135 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v134 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7497 v227 = v135;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7498 v136 = *(int *)v135;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7499 v137 = *(int *)v135;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7500 a2k = papredoll_4E4C28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7501 + array_4E4C30[v239].field_8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7502 - pItemsTable->pItems[v137].uEquipX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7503 a3j = paperdoll_4E4C2C
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7504 + array_4E4C30[v239].field_C
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7505 - pItemsTable->pItems[v137].uEquipY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7506 if ( v136 == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7507 v181 = "item64v1";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7508 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7509 v181 = pItemsTable->pItems[v137].pIconName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7510 v138 = pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7511 v139 = *(int *)(v227 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7512 if ( !(*(int *)(v227 + 20) & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7513 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7514 v142 = v138 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7515 v143 = (char *)&pIcons_LOD->pTextures[v138];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7516 if ( v139 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7517 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7518 v144 = (Texture *)(v142 != 0 ? (int)v143 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7519 pRenderer->_4A6776(a2k, a3j, v144);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7520 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7521 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7522 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7523 if ( v139 & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7524 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7525 v144 = (Texture *)(v142 != 0 ? (int)v143 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7526 pRenderer->DrawTextureTransparent(a2k, a3j, v144);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7527 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7528 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7529 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7530 v144 = (Texture *)(v142 != 0 ? (int)v143 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7531 pRenderer->DrawTransparentGreenShade(a2k, a3j, v144);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7532 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7533 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7534 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7535 pRenderer->_4A612A(a2k, a3j, v144, v238);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7536 LABEL_358:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7537 v145 = v217->pEquipment.uOffHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7538 v249 = v217->pEquipment.uOffHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7539 if ( !v145 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7540 goto LABEL_393;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
7541 v146 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v145 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7542 v228 = v146;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7543 v147 = *(int *)v146;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7544 v148 = *(int *)v146;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7545 v149 = pItemsTable->pItems[v148].uSkillType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7546 if ( v149 != 2 && v149 != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7547 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7548 v245 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7549 LABEL_362:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7550 v150 = papredoll_4E4C28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7551 + array_4E4C30[v239].field_0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7552 - pItemsTable->pItems[v148].uEquipX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7553 a3k = paperdoll_4E4C2C
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7554 + LODWORD(array_4E4C30[v239].field_4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7555 - pItemsTable->pItems[v148].uEquipY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7556 goto LABEL_370;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7557 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7558 v151 = v147 - 400;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7559 v245 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7560 if ( v151 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7561 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7562 v152 = v151 - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7563 if ( v152 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7564 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7565 if ( v152 != 12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7566 goto LABEL_362;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7567 v150 = 595;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7568 a3k = 33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7569 LABEL_370:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7570 v153 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v148].pIconName, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7571 v154 = v153;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7572 v243 = v153;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7573 v155 = *(int *)(v228 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7574 if ( !(*(int *)(v228 + 20) & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7575 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7576 if ( v155 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7577 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7578 v159 = (Texture *)(v243 != -1 ? (int)&pIcons_LOD->pTextures[v243] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7579 pRenderer->_4A6776(v150, a3k, v159);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7580 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7581 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7582 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7583 v29 = (v155 & 1) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7584 v160 = (char *)&pIcons_LOD->pTextures[v243];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7585 if ( v29 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7586 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7587 v159 = (Texture *)(v243 != -1 ? (int)v160 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7588 pRenderer->DrawTransparentGreenShade(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7589 v150,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7590 a3k,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7591 (Texture *)(v243 != -1 ? (int)v160 : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7592 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7593 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7594 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7595 v159 = (Texture *)(v243 != -1 ? (int)v160 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7596 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7597 v150,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7598 a3k,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7599 (Texture *)(v243 != -1 ? (int)v160 : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7600 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7601 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7602 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7603 pRenderer->_4A612A(v150, a3k, v159, v249);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7604 goto LABEL_391;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7605 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7606 if ( (*(int *)(v228 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7607 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7608 if ( (*(int *)(v228 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7609 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7610 v183 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7611 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7612 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7613 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7614 if ( (*(int *)(v228 + 20) & 0xF0) != 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7615 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7616 v156 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7617 if ( (*(int *)(v228 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7618 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7619 v183 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7620 LABEL_381:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7621 v157 = &pIcons_LOD->pTextures[v156->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7622 v183,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7623 TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7624 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7625 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7626 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7627 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7628 *(char *)(v228 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7629 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7630 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7631 v158 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7632 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7633 v150,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7634 a3k,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7635 (Texture *)(v154 != -1 ? (int)&pIcons_LOD->pTextures[v154] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7636 v157,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7637 (signed __int64)v158,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7638 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7639 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7640 LABEL_391:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7641 if ( v245 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7642 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7643 papredoll_4E4C28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7644 + pPaperdollLeftEmptyHand[uPlayerID_a],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7645 paperdoll_4E4C2C
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7646 + pPaperdollLeftEmptyHand[uPlayerID_a + 1],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7647 (Texture *)(*(unsigned int *)((char *)papredoll_dlhs
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7648 + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlhs + v240)] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7649 goto LABEL_393;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7650 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7651 LABEL_380:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7652 v183 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7653 goto LABEL_381;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7654 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7655 v183 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7656 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7657 v156 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7658 goto LABEL_381;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7659 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7660 v156 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7661 goto LABEL_380;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7662 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7663 a3k = 28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7664 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7665 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7666 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7667 a3k = 86;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7668 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7669 v150 = 596;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7670 goto LABEL_370;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7671 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7672 if ( (*(int *)(v227 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7673 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7674 if ( (*(int *)(v227 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7675 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7676 v182 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7677 goto LABEL_348;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7678 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7679 if ( (*(int *)(v227 + 20) & 0xF0) == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7680 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7681 v182 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7682 goto LABEL_348;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7683 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7684 if ( (*(int *)(v227 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7685 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7686 v182 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7687 LABEL_348:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7688 v140 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v182, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7689 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7690 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7691 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7692 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7693 *(char *)(v227 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7694 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7695 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7696 v141 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7697 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7698 a2k,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7699 a3j,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7700 (Texture *)(v138 != -1 ? (int)&pIcons_LOD->pTextures[v138] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7701 v140,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7702 (signed __int64)v141,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7703 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7704 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7705 goto LABEL_358;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7706 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7707 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7708 v182 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7709 goto LABEL_348;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7710 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7711 v125 = 11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7712 goto LABEL_310;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7713 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7714 if ( !(*(int *)(v225 + 20) & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7715 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7716 v119 = v116 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7717 v120 = (char *)&pIcons_LOD->pTextures[v116];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7718 if ( *(int *)(v225 + 20) & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7719 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7720 v121 = (Texture *)(v119 != 0 ? (int)v120 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7721 pRenderer->_4A6776(a2h, a3h, v121);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7722 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7723 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7724 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7725 v121 = (Texture *)(v119 != 0 ? (int)v120 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7726 pRenderer->DrawTextureTransparent(a2h, a3h, v121);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7727 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7728 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7729 pRenderer->_4A612A(a2h, a3h, v121, v236);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7730 goto LABEL_292;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7731 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7732 if ( (*(int *)(v225 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7733 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7734 if ( (*(int *)(v225 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7735 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7736 v179 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7737 goto LABEL_284;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7738 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7739 if ( (*(int *)(v225 + 20) & 0xF0) == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7740 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7741 v179 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7742 goto LABEL_284;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7743 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7744 if ( (*(int *)(v225 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7745 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7746 v179 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7747 LABEL_284:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7748 a2i = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v179, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7749 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7750 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7751 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7752 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7753 *(char *)(v225 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7754 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7755 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7756 v118 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7757 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7758 v117,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7759 a3h,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7760 (Texture *)(v116 != -1 ? (int)&pIcons_LOD->pTextures[v116] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7761 a2i,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7762 (signed __int64)v118,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7763 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7764 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7765 goto LABEL_292;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7766 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7767 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7768 v179 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7769 goto LABEL_284;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7770 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7771 v191 = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7772 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7773 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7774 v114 = v191;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7775 goto LABEL_274;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7776 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7777 v114 = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7778 goto LABEL_272;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7779 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7780 LABEL_209:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7781 if ( v68->pEquipment.uMainHand
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7782 && (v68->GetEquippedItemEquipType(1u) == 1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7783 || v68->GetEquippedItemSkillType(EQUIP_TWO_HANDED) == 4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7784 && !v68->pEquipment.uOffHand) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7785 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7786 v91 = 17 * v239 + v90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7787 v92 = v91;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7788 v223 = paperdoll_array_511290[0][v91][2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7789 if ( v223 == pIcons_LOD->FindTextureByName("pending") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7790 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7791 v93 = 2 * v91;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7792 v94 = paperdoll_array_511290[0][v92][1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7793 a2g = papredoll_4E4C28 + dword_4E5050[v93];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7794 v95 = dword_4E5050[v93 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7795 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7796 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7797 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7798 v94 = v223;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7799 a2g = papredoll_4E4C28 + dword_4E5270[2 * v91];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7800 v95 = dword_4E5270[2 * v91 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7801 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7802 a3g = paperdoll_4E4C2C + v95;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7803 if ( v94 == pIcons_LOD->FindTextureByName("pending") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7804 goto LABEL_258;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7805 if ( *(int *)(v242 + 516) & 0xF0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7806 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7807 if ( (*(int *)(v242 + 516) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7808 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7809 if ( (*(int *)(v242 + 516) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7810 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7811 v173 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7812 goto LABEL_226;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7813 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7814 if ( (*(int *)(v242 + 516) & 0xF0) == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7815 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7816 v173 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7817 goto LABEL_226;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7818 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7819 if ( (*(int *)(v242 + 516) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7820 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7821 v173 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7822 LABEL_226:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7823 v96 = (char *)&pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v173, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7824 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7825 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7826 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7827 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7828 *(char *)(v242 + 516) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7829 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7830 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7831 v187 = 255;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7832 v174 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7833 v97 = (double)GetTickCount();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7834 LABEL_249:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7835 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7836 a2g,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7837 a3g,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7838 (Texture *)(v94 != -1 ? (int)&pIcons_LOD->pTextures[v94] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7839 (Texture *)v96,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7840 (signed __int64)(v97 * 0.1),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7841 v174,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7842 v187);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7843 goto LABEL_258;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7844 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7845 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7846 v173 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7847 goto LABEL_226;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7848 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7849 v98 = v94 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7850 v99 = (char *)&pIcons_LOD->pTextures[v94];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7851 v100 = pRenderer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7852 if ( *(int *)(v242 + 516) & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7853 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7854 v101 = (Texture *)(v98 != 0 ? (int)v99 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7855 v188 = v101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7856 v175 = a3g;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7857 v163 = a2g;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7858 LABEL_231:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7859 v100->_4A6776(v163, v175, v188);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7860 goto LABEL_256;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7861 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7862 if ( *(char *)(v242 + 516) & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7863 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7864 v101 = (Texture *)(v98 != 0 ? (int)v99 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7865 v189 = v101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7866 v176 = a3g;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7867 v164 = a2g;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7868 LABEL_234:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7869 pRenderer->DrawTextureTransparent(v164, v176, v189);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7870 goto LABEL_256;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7871 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7872 v101 = (Texture *)(v98 != 0 ? (int)v99 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7873 v190 = v101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7874 v177 = a3g;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7875 v165 = a2g;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7876 goto LABEL_255;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7877 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7878 v102 = 17 * v239 + v90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7879 v94 = paperdoll_array_511290[0][v102][1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7880 if ( v94 == pIcons_LOD->FindTextureByName("pending") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7881 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7882 LABEL_258:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7883 v68 = v217;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7884 goto LABEL_259;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7885 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7886 v103 = papredoll_4E4C28 + dword_4E5050[2 * v102];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7887 v104 = paperdoll_4E4C2C + dword_4E5050[2 * v102 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7888 v224 = *(int *)(v242 + 516);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7889 v105 = *(int *)(v242 + 516) & 0xF0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7890 a2g = papredoll_4E4C28 + dword_4E5050[2 * v102];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7891 a3g = paperdoll_4E4C2C + dword_4E5050[2 * v102 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7892 if ( !v105 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7893 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7894 v109 = v94 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7895 v110 = (char *)&pIcons_LOD->pTextures[v94];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7896 if ( v224 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7897 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7898 v101 = (Texture *)(v109 != 0 ? (int)v110 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7899 v188 = v101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7900 v175 = v104;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7901 v163 = v103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7902 v100 = pRenderer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7903 goto LABEL_231;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7904 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7905 if ( v224 & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7906 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7907 v101 = (Texture *)(v109 != 0 ? (int)v110 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7908 v189 = v101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7909 v176 = v104;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7910 v164 = v103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7911 v100 = pRenderer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7912 goto LABEL_234;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7913 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7914 v101 = (Texture *)(v109 != 0 ? (int)v110 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7915 v190 = v101;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7916 v177 = v104;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7917 v165 = v103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7918 v100 = pRenderer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7919 LABEL_255:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7920 pRenderer->DrawTransparentGreenShade(v165, v177, v190);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7921 LABEL_256:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7922 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7923 pRenderer->_4A612A(a2g, a3g, v101, v235);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7924 goto LABEL_258;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7925 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7926 v106 = v105 - 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7927 if ( v106 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7928 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7929 v107 = v106 - 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7930 if ( !v107 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7931 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7932 v178 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7933 goto LABEL_246;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7934 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7935 v108 = v107 - 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7936 if ( !v108 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7937 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7938 v178 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7939 goto LABEL_246;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7940 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7941 if ( v108 == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7942 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7943 v178 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7944 LABEL_246:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7945 v96 = (char *)&pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v178, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7946 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7947 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7948 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7949 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7950 *(char *)(v242 + 516) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7951 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7952 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7953 v187 = 255;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7954 v174 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7955 v97 = (double)GetTickCount();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7956 goto LABEL_249;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7957 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7958 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7959 v178 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7960 goto LABEL_246;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7961 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7962 v186 = 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7963 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7964 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7965 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7966 v186 = 13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7967 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7968 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7969 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7970 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7971 v186 = 14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7972 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7973 v90 = v186;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7974 goto LABEL_209;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7975 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7976 v90 = 15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7977 goto LABEL_207;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7978 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7979 if ( (*(int *)(v57 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7980 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7981 if ( (*(int *)(v57 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7982 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7983 v171 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7984 goto LABEL_145;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7985 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7986 if ( (*(int *)(v57 + 20) & 0xF0) == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7987 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7988 v171 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7989 goto LABEL_145;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7990 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7991 if ( (*(int *)(v57 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7992 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7993 v171 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7994 LABEL_145:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7995 v63 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v171, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7996 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7997 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7998 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7999 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8000 *(char *)(v221 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8001 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8002 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8003 v64 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8004 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8005 a2e,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8006 a3e,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8007 (Texture *)(v59 != -1 ? (int)&pIcons_LOD->pTextures[v59] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8008 v63,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8009 (signed __int64)v64,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8010 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8011 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8012 goto LABEL_155;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8013 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8014 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8015 v171 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8016 goto LABEL_145;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8017 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8018 if ( (*(int *)(v44 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8019 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8020 if ( (*(int *)(v44 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8021 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8022 v170 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8023 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8024 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8025 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8026 if ( (*(int *)(v44 + 20) & 0xF0) != 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8027 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8028 v50 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8029 if ( (*(int *)(v44 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8030 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8031 v170 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8032 LABEL_117:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8033 v51 = &pIcons_LOD->pTextures[v50->LoadTexture(v170, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8034 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8035 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8036 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8037 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8038 *(char *)(v220 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8039 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8040 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8041 v52 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8042 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8043 a2d,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8044 a3d,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8045 (Texture *)(v48 != -1 ? (int)&pIcons_LOD->pTextures[v48] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8046 v51,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8047 (signed __int64)v52,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8048 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8049 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8050 goto LABEL_127;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8051 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8052 LABEL_116:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8053 v170 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8054 goto LABEL_117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8055 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8056 v170 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8057 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8058 v50 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8059 goto LABEL_117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8060 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8061 v50 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8062 goto LABEL_116;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8063 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8064 v185 = 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8065 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8066 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8067 v45 = v185;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8068 goto LABEL_106;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8069 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8070 v45 = 15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8071 goto LABEL_104;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8072 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8073 if ( (*(int *)(v32 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8074 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8075 if ( (*(int *)(v32 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8076 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8077 v169 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8078 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8079 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8080 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8081 if ( (*(int *)(v32 + 20) & 0xF0) != 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8082 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8083 v38 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8084 if ( (*(int *)(v32 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8085 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8086 v169 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8087 LABEL_85:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8088 v39 = &pIcons_LOD->pTextures[v38->LoadTexture(v169, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8089 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8090 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8091 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8092 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8093 *(char *)(v219 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8094 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8095 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8096 v40 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8097 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8098 a2c,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8099 a3c,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8100 (Texture *)(v35 != -1 ? (int)&pIcons_LOD->pTextures[v35] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8101 v39,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8102 (signed __int64)v40,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8103 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8104 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8105 goto LABEL_93;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8106 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8107 LABEL_84:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8108 v169 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8109 goto LABEL_85;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8110 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8111 v169 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8112 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8113 v38 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8114 goto LABEL_85;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8115 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8116 v38 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8117 goto LABEL_84;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8118 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8119 v184 = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8120 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8121 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8122 v33 = v184;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8123 goto LABEL_74;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8124 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8125 v33 = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8126 goto LABEL_72;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8127 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8128 if ( (*(int *)(v22 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8129 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8130 if ( (*(int *)(v22 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8131 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8132 v168 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8133 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8134 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8135 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8136 if ( (*(int *)(v22 + 20) & 0xF0) != 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8137 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8138 v26 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8139 if ( (*(int *)(v22 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8140 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8141 v168 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8142 LABEL_49:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8143 a2b = &pIcons_LOD->pTextures[v26->LoadTexture(v168, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8144 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8145 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8146 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8147 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8148 *(char *)(v22 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8149 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8150 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8151 v27 = (Texture *)(v241 != -1 ? (int)&pIcons_LOD->pTextures[v241] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8152 v28 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8153 pRenderer->_4A63E6(v24, a3b, v27, a2b, (signed __int64)v28, 0, 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8154 goto LABEL_57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8155 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8156 LABEL_48:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8157 v168 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8158 goto LABEL_49;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8159 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8160 v168 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8161 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8162 v26 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8163 goto LABEL_49;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8164 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8165 v26 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8166 goto LABEL_48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8167 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8168 a3 = paperdoll_4E4C2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8169 a2 = papredoll_4E4C28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8170 v240 = 4 * uPlayerID_ - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8171 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8172 papredoll_4E4C28,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8173 paperdoll_4E4C2C,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8174 (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
8175 //(Texture *)(*(unsigned int *)((char *)papredoll_dbods + v240) != -1 ? 72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8176 // * *(unsigned int *)((char *)papredoll_dbods
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8177 // + v240)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8178 // + 7145548 : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8179 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8180 pRenderer->_4A612A(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8181 a2,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8182 a3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8183 //(Texture *)(*(unsigned int *)((char *)papredoll_dbods + v240) != -1 ? 72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8184 // * *(unsigned int *)((char *)papredoll_dbods
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8185 // + v240)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8186 // + 7145548 : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8187 (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
8188 pPlayer->pEquipment.uBody);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8189 uPlayerID_a = 2 * v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8190 v6 = pPlayer->pEquipment.uMainHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8191 if ( !v6
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8192 || (v7 = *(int *)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v6 + 5], pItemsTable->pItems[v7].uEquipType != 1)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8193 && (pItemsTable->pItems[v7].uSkillType != 4 || pPlayer->pEquipment.uOffHand) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8194 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8195 papredoll_4E4C28 + dword_4E5AE0[2 * v5],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8196 paperdoll_4E4C2C + dword_4E5AE0[2 * v5 + 1],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8197 (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
8198 //(Texture *)(*(unsigned int *)((char *)papredoll_dlads + v240) != -1 ? 72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8199 // * *(unsigned int *)((char *)papredoll_dlads
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8200 // + v240)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8201 // + 7145548 : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8202 v8 = pPlayer->pEquipment.uMainHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8203 if ( v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8204 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8205 v229 = pPlayer->pEquipment.uMainHand;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8206 v9 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v8 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8207 v10 = v5 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8208 v218 = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8209 v11 = *(int *)v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8210 v12 = *(int *)v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8211 v13 = papredoll_4E4C28 + array_4E4C30[v5].field_8 - pItemsTable->pItems[v12].uEquipX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8212 a2a = v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8213 a3a = paperdoll_4E4C2C + *(int *)((char *)&array_4E4C30[0].field_C + v10) - pItemsTable->pItems[v12].uEquipY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8214 if ( v11 == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8215 v166 = "item64v1";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8216 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8217 v166 = pItemsTable->pItems[v12].pIconName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8218 v14 = pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8219 v15 = *(int *)(v218 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8220 if ( *(int *)(v218 + 20) & 0xF0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8221 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8222 if ( (*(int *)(v218 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8223 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8224 if ( (*(int *)(v218 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8225 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8226 v167 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8227 goto LABEL_27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8228 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8229 if ( (*(int *)(v218 + 20) & 0xF0) == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8230 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8231 v167 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8232 goto LABEL_27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8233 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8234 if ( (*(int *)(v218 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8235 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8236 v167 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8237 LABEL_27:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8238 //v16 = (Texture *)(72 * pIcons_LOD->LoadTexture(v167, TEXTURE_16BIT_PALETTE) + 7145548);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8239 v16 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(v167, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8240
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8241 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8242 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8243 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8244 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8245 *(char *)(v218 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8246 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8247 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8248 v17 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8249 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8250 v13,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8251 a3a,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8252 (Texture *)(v14 != -1 ? (int)&pIcons_LOD->pTextures[v14] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8253 v16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8254 (signed __int64)v17,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8255 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8256 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8257 goto LABEL_393;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8258 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8259 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8260 v167 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8261 goto LABEL_27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8262 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8263 v18 = v14 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8264 v19 = (char *)&pIcons_LOD->pTextures[v14];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8265 if ( v15 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8266 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8267 v20 = (Texture *)(v18 != 0 ? (int)v19 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8268 pRenderer->_4A6776(a2a, a3a, v20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8269 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8270 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8271 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8272 if ( v15 & 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8273 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8274 v20 = (Texture *)(v18 != 0 ? (int)v19 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8275 pRenderer->DrawTextureTransparent(a2a, a3a, v20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8276 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8277 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8278 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8279 v20 = (Texture *)(v18 != 0 ? (int)v19 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8280 pRenderer->DrawTransparentGreenShade(a2a, a3a, v20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8281 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8282 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8283 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8284 pRenderer->_4A612A(a2a, a3a, v20, v229);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8285 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8286 LABEL_393:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8287 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8288 papredoll_4E4C28 + pPaperdollRightHand[uPlayerID_a],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8289 paperdoll_4E4C2C + pPaperdollRightHand[uPlayerID_a + 1],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8290 (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
8291 //(Texture *)(*(unsigned int *)((char *)papredoll_drhs + v240) != -1 ? 72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8292 // * *(unsigned int *)((char *)papredoll_drhs + v240)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8293 // + 7145548 : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8294 v161 = v217->pEquipment.uMainHand;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8295 if ( v161 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8296 {
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8297 v162 = *(int *)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v161 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8298 if ( pItemsTable->pItems[v162].uEquipType == 1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8299 || pItemsTable->pItems[v162].uSkillType == 4 && !v217->pEquipment.uOffHand )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8300 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8301 papredoll_4E4C28 + pPaperdollLeftHand[uPlayerID_a],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8302 paperdoll_4E4C2C + pPaperdollLeftHand[uPlayerID_a + 1],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8303 (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
8304 //(Texture *)(*(unsigned int *)((char *)papredoll_dlhus + v240) != -1 ? 72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8305 // * *(unsigned int *)((char *)papredoll_dlhus
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8306 // + v240)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8307 // + 7145548 : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8308 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8309 if ( !bRingsShownInCharScreen )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8310 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8311 0x25Bu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8312 0x12Bu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8313 (Texture *)(uTextureID_MAGNIF_B != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_MAGNIF_B] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8314 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8315 0x1D4u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8316 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8317 (Texture *)(uTextureID_507B04 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507B04] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8318 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8319
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8320
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8321 //----- (0043E825) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8322 void __fastcall CharacterUI_DrawPaperdollWithRingOverlay(unsigned int uPlayerID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8323 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8324 unsigned int v1; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8325 Player *pPlayer; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8326 int v3; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8327 int v4; // edi@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8328 unsigned int v5; // ebx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8329 int v6; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8330 LODFile_IconsBitmaps *v7; // ecx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8331 double v8; // st7@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8332 int v9; // edi@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8333 Texture *v10; // edi@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8334 unsigned __int8 v11; // zf@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8335 Texture *v12; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8336 char v13; // sf@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8337 unsigned __int8 v14; // of@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8338 unsigned int v15; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8339 unsigned int v16; // ebx@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8340 int v17; // eax@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8341 LODFile_IconsBitmaps *v18; // ecx@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8342 double v19; // st7@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8343 int v20; // edi@40
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8344 int v21; // eax@41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8345 signed int v22; // ebx@41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8346 Texture *v23; // edi@41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8347 int v24; // eax@42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8348 char *v25; // eax@42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8349 unsigned int v26; // eax@46
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8350 int v27; // edi@47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8351 unsigned int v28; // ebx@47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8352 int v29; // eax@47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8353 LODFile_IconsBitmaps *v30; // ecx@51
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8354 Texture *v31; // esi@58
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8355 double v32; // st7@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8356 int v33; // esi@61
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8357 int v34; // esi@62
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8358 Texture *v35; // eax@63
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8359 const char *v36; // [sp-8h] [bp-38h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8360 const char *v37; // [sp-8h] [bp-38h]@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8361 const char *v38; // [sp-8h] [bp-38h]@52
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8362 int v39; // [sp+10h] [bp-20h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8363 Texture *v40; // [sp+10h] [bp-20h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8364 int v41; // [sp+10h] [bp-20h]@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8365 Texture *v42; // [sp+10h] [bp-20h]@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8366 int v43; // [sp+10h] [bp-20h]@47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8367 unsigned int a3; // [sp+14h] [bp-1Ch]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8368 unsigned int a2; // [sp+18h] [bp-18h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8369 int v46; // [sp+1Ch] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8370 Player *v47; // [sp+20h] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8371 int v48; // [sp+24h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8372 int v49; // [sp+24h] [bp-Ch]@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8373
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8374 v1 = uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8375 pPlayer = pPlayers[uPlayerID];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8376 v47 = pPlayers[uPlayerID];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8377 pIcons_LOD->LoadTexture("sptext01", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8378 CharacterUI_DrawPaperdoll(v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8379 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8380 0x1D9u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8381 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8382 (Texture *)(uTextureID_BACKHAND != -1 ? &pIcons_LOD->pTextures[uTextureID_BACKHAND] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8383 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8384 0x1D4u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8385 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8386 (Texture *)(uTextureID_507B04 != -1 ? &pIcons_LOD->pTextures[uTextureID_507B04] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8387 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8388 ptr_507694->uX,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8389 ptr_507694->uY,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8390 (Texture *)(uTextureID_5118C8 != -1 ? &pIcons_LOD->pTextures[uTextureID_5118C8] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8391 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8392 v46 = (int)&pPlayer->pEquipment.field_28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8393 v48 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8394 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8395 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8396 if ( !*(int *)v46 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8397 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8398 v39 = *(int *)v46;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8399 v4 = (int)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * *(int *)v46 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8400 a3 = *(int *)((char *)dword_4E5C34 + v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8401 a2 = *(int *)((char *)dword_4E5C1C + v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8402 v5 = pIcons_LOD->LoadTexture(pItemsTable->pItems[*(int *)v4].pIconName, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8403 v6 = *(int *)(v4 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8404 if ( *(int *)(v4 + 20) & 0xF0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8405 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8406 if ( (*(int *)(v4 + 20) & 0xF0) != 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8407 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8408 if ( (*(int *)(v4 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8409 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8410 v36 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8411 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8412 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8413 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8414 if ( (*(int *)(v4 + 20) & 0xF0) != 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8415 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8416 v7 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8417 if ( (*(int *)(v4 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8418 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8419 v36 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8420 LABEL_14:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8421 v40 = &pIcons_LOD->pTextures[v7->LoadTexture(v36, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8422 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8423 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8424 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8425 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8426 *(char *)(v4 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8427 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8428 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8429 v8 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8430 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8431 a2,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8432 a3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8433 (Texture *)(v5 != -1 ? (int)&pIcons_LOD->pTextures[v5] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8434 v40,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8435 (signed __int64)v8,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8436 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8437 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8438 goto LABEL_23;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8439 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8440 LABEL_13:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8441 v36 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8442 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8443 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8444 v36 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8445 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8446 v7 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8447 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8448 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8449 v7 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8450 goto LABEL_13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8451 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8452 v9 = v5 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8453 if ( v6 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8454 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8455 v10 = (Texture *)(v9 != 0 ? (int)&pIcons_LOD->pTextures[v5] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8456 pRenderer->_4A6776(a2, a3, v10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8457 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8458 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8459 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8460 v11 = (v6 & 1) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8461 v12 = &pIcons_LOD->pTextures[v5];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8462 if ( v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8463 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8464 v10 = (Texture *)(v9 != 0 ? (int)v12 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8465 pRenderer->DrawTransparentGreenShade(a2, a3, v10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8466 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8467 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8468 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8469 v10 = (Texture *)(v9 != 0 ? (int)v12 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8470 pRenderer->DrawTextureTransparent(a2, a3, v10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8471 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8472 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8473 pRenderer->_4A601E(a2, a3, v10, v39);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8474 LABEL_23:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8475 pPlayer = v47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8476 LABEL_24:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8477 v46 += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8478 v3 = v48 + 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8479 v14 = __OFSUB__(v48 + 4, 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8480 v11 = v48 == 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8481 v13 = v48 - 16 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8482 v48 += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8483 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8484 while ( (unsigned __int8)(v13 ^ v14) | v11 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8485 v15 = pPlayer->pEquipment.field_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8486 if ( !v15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8487 goto LABEL_46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8488 v41 = pPlayer->pEquipment.field_24;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8489 v49 = (int)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v15 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8490 v16 = pIcons_LOD->LoadTexture(pItemsTable->pItems[*(int *)v49].pIconName, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8491 v17 = *(int *)(v49 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8492 if ( !(*(int *)(v49 + 20) & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8493 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8494 v20 = v16 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8495 if ( v17 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8496 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8497 v21 = 9 * v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8498 v22 = 493;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8499 v23 = (Texture *)(v20 != 0 ? (int)&pIcons_LOD->pTextures[8 * v21 / 0x48u] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8500 pRenderer->_4A6776(0x1EDu, 0x5Bu, v23);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8501 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8502 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8503 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8504 v11 = (v17 & 1) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8505 v24 = 9 * v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8506 v22 = 493;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8507 v25 = (char *)&pIcons_LOD->pTextures[8 * v24 / 0x48u];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8508 if ( v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8509 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8510 v23 = (Texture *)(v20 != 0 ? (int)v25 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8511 pRenderer->DrawTransparentGreenShade(493, 91, v23);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8512 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8513 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8514 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8515 v23 = (Texture *)(v20 != 0 ? (int)v25 : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8516 pRenderer->DrawTextureTransparent(0x1EDu, 0x5Bu, v23);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8517 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8518 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8519 pRenderer->_4A601E(v22, 91, v23, v41);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8520 pPlayer = v47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8521 goto LABEL_46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8522 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8523 if ( (*(int *)(v49 + 20) & 0xF0) == 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8524 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8525 v18 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8526 goto LABEL_36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8527 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8528 if ( (*(int *)(v49 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8529 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8530 v37 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8531 goto LABEL_34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8532 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8533 if ( (*(int *)(v49 + 20) & 0xF0) == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8534 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8535 v37 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8536 LABEL_34:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8537 v18 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8538 goto LABEL_37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8539 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8540 v18 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8541 if ( (*(int *)(v49 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8542 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8543 v37 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8544 goto LABEL_37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8545 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8546 LABEL_36:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8547 v37 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8548 LABEL_37:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8549 v42 = &pIcons_LOD->pTextures[v18->LoadTexture(v37, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8550 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8551 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8552 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8553 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8554 *(char *)(v49 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8555 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8556 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8557 v19 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8558 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8559 0x1EDu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8560 0x5Bu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8561 (Texture *)(v16 != -1 ? (int)&pIcons_LOD->pTextures[v16] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8562 v42,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8563 (signed __int64)v19,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8564 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8565 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8566 LABEL_46:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8567 v26 = pPlayer->pEquipment.field_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8568 if ( !v26 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8569 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8570 v43 = pPlayer->pEquipment.field_1C;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8571 v27 = (int)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v26 + 5];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8572 v28 = pIcons_LOD->LoadTexture(pItemsTable->pItems[*(int *)v27].pIconName, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8573 v29 = *(int *)(v27 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8574 if ( !(*(int *)(v27 + 20) & 0xF0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8575 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8576 v33 = v28 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8577 if ( v29 & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8578 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8579 v34 = v33 != 0 ? (int)&pIcons_LOD->pTextures[v28] : 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8580 pRenderer->_4A6776(0x24Au, 0x58u, (Texture *)v34);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8581 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8582 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8583 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8584 v11 = (v29 & 1) == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8585 v35 = &pIcons_LOD->pTextures[v28];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8586 if ( v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8587 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8588 v34 = v33 != 0 ? (int)v35 : 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8589 pRenderer->DrawTransparentGreenShade(586, 88, (Texture *)v34);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8590 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8591 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8592 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8593 v34 = v33 != 0 ? (int)v35 : 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8594 pRenderer->DrawTextureTransparent(0x24Au, 0x58u, (Texture *)v34);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8595 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8596 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8597 pRenderer->_4A601E(586, 88, (Texture *)v34, v43);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8598 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8599 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8600 if ( (*(int *)(v27 + 20) & 0xF0) == 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8601 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8602 v30 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8603 goto LABEL_57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8604 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8605 if ( (*(int *)(v27 + 20) & 0xF0) == 32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8606 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8607 v38 = "sp28a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8608 goto LABEL_55;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8609 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8610 if ( (*(int *)(v27 + 20) & 0xF0) == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8611 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8612 v38 = "sp30a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8613 LABEL_55:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8614 v30 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8615 goto LABEL_58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8616 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8617 v30 = pIcons_LOD;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8618 if ( (*(int *)(v27 + 20) & 0xF0) == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8619 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8620 v38 = "sp91a";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8621 goto LABEL_58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8622 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8623 LABEL_57:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8624 v38 = "sptext01";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8625 LABEL_58:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8626 v31 = &pIcons_LOD->pTextures[v30->LoadTexture(v38, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8627 dword_50C9A8 -= pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8628 if ( dword_50C9A8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8629 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8630 dword_50C9A8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8631 *(char *)(v27 + 20) &= 0xFu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8632 ptr_50C9A4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8633 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8634 v32 = (double)GetTickCount() * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8635 pRenderer->_4A63E6(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8636 0x24Au,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8637 0x58u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8638 (Texture *)(v28 != -1 ? (int)&pIcons_LOD->pTextures[v28] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8639 v31,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8640 (signed __int64)v32,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8641 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8642 255);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8643 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8644
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8645
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8646 //----- (0043ED6F) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8647 bool __thiscall sub_43ED6F_get_some_race_sex_relation(unsigned int a1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8648 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8649 unsigned int v1; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8650 Player **v2; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8651 Player *v3; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8652 enum CHARACTER_RACE v4; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8653 bool result; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8654 char v6; // zf@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8655
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8656 v1 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8657 v2 = &pPlayers[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8658 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8659 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8660 v3 = *v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8661 v4 = v3->GetRace();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8662 result = v3->GetSexByVoice();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8663 if ( v4 && v4 != CHARACTER_RACE_ELF && v4 != CHARACTER_RACE_GOBLIN )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8664 v6 = v1 == 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8665 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8666 v6 = v1 == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8667 if ( v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8668 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8669 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8670 if ( (signed int)v2 >= (signed int)&qword_A750D8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8671 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8672 LOBYTE(result) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8673 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8674 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8675 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8676 LOBYTE(result) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8677 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8678 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8679 // A750D8: using guessed type __int64 qword_A750D8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8680
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8681 //----- (0043EDB9) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8682 bool __thiscall sub_43EDB9_get_some_race_sex_relation_2(unsigned int _this)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8683 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8684 unsigned int v1; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8685 Player **v2; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8686 Player *v3; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8687 enum CHARACTER_RACE v4; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8688 bool result; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8689 char v6; // zf@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8690
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8691 v1 = _this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8692 v2 = &pPlayers[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8693 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8694 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8695 v3 = *v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8696 v4 = v3->GetRace();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8697 result = v3->GetSexByVoice();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8698 if ( !v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8699 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8700 if ( v4 == 1 || v4 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8701 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8702 if ( !result && v1 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8703 goto LABEL_15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8704 v6 = v1 == 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8705 LABEL_11:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8706 if ( v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8707 goto LABEL_15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8708 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8709 if ( (signed int)v2 >= (signed int)&qword_A750D8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8710 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8711 LOBYTE(result) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8712 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8713 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8714 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8715 if ( result || v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8716 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8717 v6 = v1 == 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8718 goto LABEL_11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8719 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8720 LABEL_15:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8721 LOBYTE(result) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8722 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8723 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8724 // A750D8: using guessed type __int64 qword_A750D8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8725
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8726 //----- (0043EE15) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8727 bool __fastcall sub_43EE15_player_has_item(unsigned int uItemID, Player *pPlayer, char a3)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8728 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8729 bool result; // eax@0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8730 signed int v4; // edi@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8731 int *v5; // esi@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8732 signed int v6; // edi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8733 bool *v7; // esi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8734
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8735 if ( !a3 || pParty->pPickedItem.uItemID != uItemID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8736 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8737 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8738 v5 = pPlayer->pInventoryIndices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8739 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8740 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8741 if ( *v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8742 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8743 result = 9 * *v5;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8744 if ( *(int *)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * *v5 + 5] == uItemID )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8745 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8746 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8747 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8748 ++v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8749 if ( v4 >= 126 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8750 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8751 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8752 v7 = (bool *)&pPlayer->pEquipment;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8753 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8754 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8755 result = *v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8756 if ( *v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8757 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8758 result *= 9;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8759 if ( *(int *)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[4 * result + 5] == uItemID )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8760 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8761 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8762 ++v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8763 ++v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8764 if ( v6 >= 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8765 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8766 LOBYTE(result) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8767 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8768 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8769 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8770 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8771 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8772 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8773 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8774 LOBYTE(result) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8775 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8776 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8777
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8778 //----- (0043EE77) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8779 bool __fastcall sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(signed int a1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8780 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8781 bool result; // eax@0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8782 Player *v2; // edx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8783 int v3; // ecx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8784 Player **pPlayers; // esi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8785 unsigned int v5; // ecx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8786 Player *v6; // edx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8787
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8788 if ( a1 < 1 || a1 > 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8789 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8790 if ( !a1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8791 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8792 pPlayers = &::pPlayers[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8793 v5 = 604;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8794 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8795 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8796 result = sub_43EE15_player_has_item(v5, *pPlayers, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8797 if ( !result )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8798 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8799 result = v6->pEquipment.uBody;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8800 if ( !result )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8801 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8802 result *= 9;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8803 if ( *(int *)&v6->spellbook.pDarkSpellbook.bIsSpellAvailable[4 * result + 5] != v5 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8804 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8805 ++pPlayers;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8806 if ( (signed int)pPlayers >= (signed int)&qword_A750D8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8807 goto LABEL_13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8808 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8809 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8810 goto LABEL_6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8811 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8812 result = sub_43EE15_player_has_item(604u, ::pPlayers[a1], 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8813 if ( !result
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8814 || (result = v2->pEquipment.uBody) == 0
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
8815 || (result *= 9, *(int *)&v2->spellbook.pDarkSpellbook.bIsSpellAvailable[4 * result + 5] != v3) )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8816 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8817 LABEL_6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8818 LOBYTE(result) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8819 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8820 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8821 LABEL_13:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8822 LOBYTE(result) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8823 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8824 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8825 // A750D8: using guessed type __int64 qword_A750D8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8826
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8827 //----- (0043EF2B) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8828 void __fastcall WetsuitOn(unsigned int uPlayerID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8829 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8830 unsigned int v1; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8831 Player **v2; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8832 enum CHARACTER_RACE v3; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8833 signed int v4; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8834 int v5; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8835 unsigned __int8 v6; // al@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8836 char pContainer[20]; // [sp+4h] [bp-1Ch]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8837 unsigned int v8; // [sp+18h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8838 int v9; // [sp+1Ch] [bp-4h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8839
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8840 v1 = uPlayerID - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8841 v8 = uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8842 if ( ((uPlayerID - 1) & 0x80000000u) == 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8843 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8844 v2 = &pPlayers[uPlayerID];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8845 v3 = (*v2)->GetRace();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8846 v4 = (*v2)->GetSexByVoice();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8847 if ( v3 && v3 != 1 && v3 != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8848 v5 = (v4 != 0) + 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8849 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8850 v5 = (v4 != 0) + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8851 v9 = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8852 wsprintfA(pContainer, "pc23v%dBod", v5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8853 papredoll_dbods[v1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8854 wsprintfA(pContainer, "pc23v%dlad", v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8855 papredoll_dlads[v1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8856 wsprintfA(pContainer, "pc23v%dlau", v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8857 papredoll_dlaus[v1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8858 wsprintfA(pContainer, "pc23v%drh", v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8859 papredoll_drhs[v1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8860 wsprintfA(pContainer, "pc23v%dlh", v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8861 papredoll_dlhs[v1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8862 wsprintfA(pContainer, "pc23v%dlhu", v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8863 papredoll_dlhus[v1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8864 v6 = pPlayers[v1 + 1]->uFace;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8865 if ( v6 == 12 || v6 == 13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8866 papredoll_dbrds[pPlayers[v8]->uFace] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8867 papredoll_flying_feet[pPlayers[v8]->uFace] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8868 IsPlayerWearingWatersuit[v8] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8869 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8870 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8871
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8872 //----- (0043F0BD) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8873 unsigned int __fastcall WetsuitOff(unsigned int uPlayerID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8874 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8875 unsigned int result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8876 Player **v2; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8877 unsigned int v3; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8878 int v4; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8879 char v5; // al@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8880 char pContainer[20]; // [sp+0h] [bp-18h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8881 unsigned int v7; // [sp+14h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8882
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8883 result = uPlayerID - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8884 v7 = uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8885 if ( ((uPlayerID - 1) & 0x80000000u) == 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8886 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8887 v2 = &pPlayers[uPlayerID];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8888 v3 = uPlayerID - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8889 papredoll_dbods[v3] = pIcons_LOD->LoadTexture(dbod_texnames_by_face[(*v2)->uFace], TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8890 papredoll_dlads[v3] = pIcons_LOD->LoadTexture(dlad_texnames_by_face[(*v2)->uFace], TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8891 papredoll_dlaus[v3] = pIcons_LOD->LoadTexture(dlau_texnames_by_face[(*v2)->uFace], TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8892 papredoll_drhs[v3] = pIcons_LOD->LoadTexture(drh_texnames_by_face[(*v2)->uFace], TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8893 papredoll_dlhs[v3] = pIcons_LOD->LoadTexture(dlh_texnames_by_face[(*v2)->uFace], TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8894 papredoll_dlhus[v3] = pIcons_LOD->LoadTexture(dlhu_texnames_by_face[(*v2)->uFace], TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8895 v4 = (int)&(*v2)->uFace;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8896 v5 = *(char *)v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8897 if ( *(char *)v4 == 12 || v5 == 13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8898 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8899 wsprintfA(pContainer, "pc%02dbrd", v5 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8900 v4 = (int)&(*v2)->uFace;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8901 papredoll_dbrds[*(char *)v4] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8902 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8903 wsprintfA(pContainer, "item281pc%02d", *(char *)v4 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8904 papredoll_flying_feet[(*v2)->uFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8905 result = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8906 IsPlayerWearingWatersuit[v7] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8907 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8908 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8909 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8910
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8911
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8912 //----- (0043F333) --------------------------------------------------------
50
fde5c5acb66e BLV render
Nomad
parents: 46
diff changeset
8913 void stru170::MakeVisibleSectorList()
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8914 {
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8915 int v6; // ebx@3
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8916
50
fde5c5acb66e BLV render
Nomad
parents: 46
diff changeset
8917 uNumVisibleNotEmptySectors = 0;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8918 for (uint i = 0; i < std__vector_000FA8; ++i)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8919 {
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8920 v6 = 0;
50
fde5c5acb66e BLV render
Nomad
parents: 46
diff changeset
8921 if (!uNumVisibleNotEmptySectors)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8922 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8923 LABEL_7:
50
fde5c5acb66e BLV render
Nomad
parents: 46
diff changeset
8924 pVisibleSectorIDs_toDrawDecorsActorsEtcFrom[uNumVisibleNotEmptySectors++] = field_FA8[i].uSectorID;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8925 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8926 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8927 {
50
fde5c5acb66e BLV render
Nomad
parents: 46
diff changeset
8928 while (pVisibleSectorIDs_toDrawDecorsActorsEtcFrom[v6] != field_FA8[i].uSectorID )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8929 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8930 ++v6;
50
fde5c5acb66e BLV render
Nomad
parents: 46
diff changeset
8931 if ( v6 >= uNumVisibleNotEmptySectors)
fde5c5acb66e BLV render
Nomad
parents: 46
diff changeset
8932 {
fde5c5acb66e BLV render
Nomad
parents: 46
diff changeset
8933 pVisibleSectorIDs_toDrawDecorsActorsEtcFrom[uNumVisibleNotEmptySectors++] = field_FA8[i].uSectorID;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8934 continue;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8935 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8936 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8937 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8938 }
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8939 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8940
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8941
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8942 //----- (0043F515) --------------------------------------------------------
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8943 void MessWithBillboards_BLV()
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8944 {
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8945 for (uint i = 0; i < uNumBillboardsToDraw; ++i)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8946 {
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8947 auto p = pBillboardRenderList + i;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8948
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8949 if (p->field_1E & 2 || uCurrentlyLoadedLevelType == LEVEL_Indoor && !p->uIndoorSectorID)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8950 p->uPaletteSubindex = 0;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8951 else
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8952 p->uPaletteSubindex = _43F55F_get_billboard_light_level(p, -1);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8953 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8954 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8955
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8956 //----- (0043F55F) --------------------------------------------------------
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8957 int __fastcall _43F55F_get_billboard_light_level(RenderBillboard *a1, int uBaseLightLevel)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8958 {
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8959 signed int v3; // ecx@2
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8960
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8961 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8962 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8963 v3 = pIndoor->pSectors[a1->uIndoorSectorID].uMinAmbientLightLevel;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8964 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8965 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8966 {
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8967 if ( uBaseLightLevel == -1 )
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8968 v3 = a1->uPaletteSubindex;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8969 else
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8970 v3 = uBaseLightLevel;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8971 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8972 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
8973 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8974
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8975 //----- (0043F5C8) --------------------------------------------------------
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
8976 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
8977 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8978 int v5; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8979 signed int v6; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8980 int v8; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8981 int v9; // ebx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8982 unsigned int v10; // ecx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8983 unsigned int v11; // edx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8984 unsigned int v12; // edx@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8985 signed int v13; // ecx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8986 BLVLightMM7 *v16; // esi@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8987 int v17; // ebx@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8988 int v18; // eax@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8989 int v19; // ebx@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8990 unsigned int v20; // ecx@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8991 int v21; // edx@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8992 unsigned int v22; // edx@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8993 unsigned int v23; // edx@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8994 signed int v24; // ecx@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8995 int v26; // ebx@35
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8996 int v27; // eax@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8997 int v28; // ebx@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8998 unsigned int v29; // ecx@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8999 int v30; // edx@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9000 unsigned int v31; // edx@41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9001 unsigned int v32; // edx@43
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9002 signed int v33; // ecx@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9003 int v37; // [sp+Ch] [bp-18h]@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9004 int v38; // [sp+10h] [bp-14h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9005 int v39; // [sp+10h] [bp-14h]@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9006 int v40; // [sp+10h] [bp-14h]@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9007 int v42; // [sp+14h] [bp-10h]@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9008 unsigned int v43; // [sp+18h] [bp-Ch]@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9009 unsigned int v44; // [sp+18h] [bp-Ch]@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9010 unsigned int v45; // [sp+18h] [bp-Ch]@44
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9011
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9012 v6 = uBaseLightLevel;
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
9013 for (uint i = 0; i < pMobileLightsStack->uNumLightsActive; ++i)
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
9014 {
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
9015 auto p = pMobileLightsStack->pLights + i;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9016
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9017 auto distX = abs(p->vPosition.x - x);
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9018 if ( distX <= p->uRadius)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9019 {
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9020 auto distY = abs(p->vPosition.y - y);
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9021 if ( distY <= p->uRadius)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9022 {
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9023 auto distZ = abs(p->vPosition.z - z);
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9024 if ( distZ <= p->uRadius)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9025 {
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9026 v8 = distX;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9027 v9 = distY;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9028 v10 = distZ;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9029 if (distX < distY)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9030 {
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9031 v8 = distY;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9032 v9 = distX;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9033 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9034 if ( v8 < distZ )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9035 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9036 v11 = v8;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9037 v8 = distZ;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9038 v10 = v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9039 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9040 if ( v9 < (signed int)v10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9041 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9042 v12 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9043 v10 = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9044 v9 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9045 }
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9046 v43 = ((unsigned int)(11 * v9) / 32) + (v10 / 4) + v8;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9047 v13 = p->uRadius;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9048 if ( (signed int)v43 < v13 )
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9049 v6 += ((unsigned __int64)(30i64 * (signed int)(v43 << 16) / v13) >> 16) - 30;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9050 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9051 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9052 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9053 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9054
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9055 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9056 {
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9057 auto pSector = pIndoor->pSectors + uSectorID;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9058
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9059 for (uint i = 0; i < pSector->uNumLights; ++i)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9060 {
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
9061 v16 = pIndoor->pLights + pSector->pLights[i];
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
9062 if (~v16->uAtributes & 8)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9063 {
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9064 v17 = abs(v16->vPosition.x - x);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9065 if ( v17 <= v16->uRadius )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9066 {
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9067 v42 = abs(v16->vPosition.y - y);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9068 if ( v42 <= v16->uRadius )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9069 {
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9070 v39 = abs(v16->vPosition.z - z);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9071 if ( v39 <= v16->uRadius )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9072 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9073 v18 = v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9074 v19 = v42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9075 v20 = v39;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9076 if ( v18 < v42 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9077 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9078 v21 = v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9079 v18 = v42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9080 v19 = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9081 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9082 if ( v18 < v39 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9083 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9084 v22 = v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9085 v18 = v39;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9086 v20 = v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9087 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9088 if ( v19 < (signed int)v20 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9089 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9090 v23 = v20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9091 v20 = v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9092 v19 = v23;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9093 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9094 v44 = ((unsigned int)(11 * v19) >> 5) + (v20 >> 2) + v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9095 v24 = v16->uRadius;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9096 if ( (signed int)v44 < v24 )
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9097 v6 += ((unsigned __int64)(30i64 * (signed int)(v44 << 16) / v24) >> 16) - 30;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9098 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9099 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9100 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9101 }
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9102 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9103 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9104
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
9105 for (uint i = 0; i < pStationaryLightsStack->uNumLightsActive; ++i)
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
9106 {
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
9107 auto p = pStationaryLightsStack->pLights + i;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9108 v26 = abs(p->vPosition.x - x);
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9109 if ( v26 <= p->uRadius)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9110 {
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9111 v40 = abs(p->vPosition.y - y);
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9112 if ( v40 <= p->uRadius)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9113 {
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9114 v37 = abs(p->vPosition.z - z);
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9115 if ( v37 <= p->uRadius)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9116 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9117 v27 = v26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9118 v28 = v40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9119 v29 = v37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9120 if ( v27 < v40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9121 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9122 v30 = v27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9123 v27 = v40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9124 v28 = v30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9125 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9126 if ( v27 < v37 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9127 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9128 v31 = v27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9129 v27 = v37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9130 v29 = v31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9131 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9132 if ( v28 < (signed int)v29 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9133 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9134 v32 = v29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9135 v29 = v28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9136 v28 = v32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9137 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9138 v45 = ((unsigned int)(11 * v28) >> 5) + (v29 >> 2) + v27;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9139 v33 = p->uRadius;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9140 if ( (signed int)v45 < v33 )
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9141 v6 += ((unsigned __int64)(30i64 * (signed int)(v45 << 16) / v33) >> 16) - 30;
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9142 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9143 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9144 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9145 }
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9146
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9147 if ( v6 <= 31 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9148 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9149 if ( v6 < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9150 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9151 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9152 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9153 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9154 v6 = 31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9155 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9156 return v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9157 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9158
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9159 //----- (00406051) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9160 __int16 stru262_TurnBased::StartTurn()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9161 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9162 stru262_TurnBased *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9163 int v2; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9164 int v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9165 char *v4; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9166 int v5; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9167 int v6; // eax@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9168 char *v7; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9169 TurnBased_QueueElem *v8; // edi@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9170 unsigned int v9; // edx@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9171 char *v10; // eax@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9172 int v11; // eax@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9173 int v12; // ebx@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9174 char *v13; // edi@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9175 int v15; // [sp+Ch] [bp-10h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9176 TurnBased_QueueElem *v16; // [sp+10h] [bp-Ch]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9177 int v17; // [sp+14h] [bp-8h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9178 int v18; // [sp+14h] [bp-8h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9179 signed int v19; // [sp+18h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9180 int v20; // [sp+18h] [bp-4h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9181
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9182 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9183 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9184 v19 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9185 v3 = v1->uActorQueueSize;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9186 v1->field_1C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9187 v4 = (char *)&v1->pQueue[v3].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9188 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9189 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9190 v17 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9191 if ( v1->uActorQueueSize <= v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9192 goto LABEL_11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9193 v16 = v1->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9194 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9195 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9196 v5 = v16->uPackedID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9197 if ( (v16->uPackedID & 7) == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9198 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9199 LABEL_8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9200 ++v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9201 ++v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9202 if ( v17 >= v1->uActorQueueSize )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9203 goto LABEL_11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9204 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9205 v15 = v5 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9206 if ( !pPlayers[(v5 >> 3) + 1]->CanAct() || v19 != v15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9207 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9208 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9209 goto LABEL_8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9210 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9211 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9212 LABEL_11:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9213 if ( v17 == v1->uActorQueueSize )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9214 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9215 *(int *)v4 = 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9216 v6 = 8 * v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9217 LOBYTE(v6) = 8 * v19 | 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9218 *((int *)v4 + 2) = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9219 *((int *)v4 - 1) = v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9220 *((int *)v4 + 1) = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9221 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9222 v4 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9223 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9224 ++v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9225 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9226 while ( v19 < 4 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9227 v1->uActorQueueSize = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9228 v20 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9229 if ( ai_arrays_size > v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9230 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9231 v7 = (char *)&v1->pQueue[v3].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9232 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9233 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9234 v18 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9235 if ( v1->uActorQueueSize > v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9236 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9237 v8 = v1->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9238 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9239 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9240 if ( (v8->uPackedID & 7) == 3 && ai_array_4F7DB0_actor_ids[v20] == v8->uPackedID >> 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9241 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9242 ++v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9243 ++v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9244 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9245 while ( v18 < v1->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9246 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9247 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9248 if ( v18 == v1->uActorQueueSize )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9249 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9250 v9 = ai_array_4F7DB0_actor_ids[v20];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9251 *(int *)v7 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9252 *((int *)v7 + 2) = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9253 *((int *)v7 - 1) = 8 * v9 | 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9254 *((int *)v7 + 1) = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9255 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9256 v7 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9257 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9258 ++v20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9259 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9260 while ( v20 < ai_arrays_size );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9261 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9262 ++v1->field_0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9263 v1->uActorQueueSize = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9264 v1->field_10 = 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9265 if ( v3 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9266 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9267 v10 = (char *)&v1->pQueue[0].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9268 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9269 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9270 if ( *(int *)v10 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9271 *(int *)v10 = 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9272 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9273 v10 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9274 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9275 while ( v2 < v1->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9276 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9277 LOWORD(v11) = v1->_4063A1();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9278 v12 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9279 if ( v1->uActorQueueSize > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9280 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9281 v13 = (char *)&v1->pQueue[0].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9282 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9283 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9284 v11 = *((int *)v13 - 1) & 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9285 if ( (char)v11 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9286 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9287 if ( *(int *)v13 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9288 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9289 LOWORD(v11) = v1->_40680F(v12++);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9290 v13 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9291 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9292 while ( v12 < v1->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9293 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9294 return v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9295 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9296 // 4F75D8: using guessed type int ai_arrays_size;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9297
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9298 //----- (004061CA) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9299 void stru262_TurnBased::NextTurn()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9300 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9301 stru262_TurnBased *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9302 TurnBased_QueueElem *v2; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9303 int v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9304 int v4; // edi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9305 Actor *v5; // eax@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9306 int v6; // ecx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9307 signed int v7; // ebx@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9308 int v8; // ebp@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9309 TurnBased_QueueElem *v9; // edi@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9310 int v10; // ecx@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9311 unsigned __int16 v11; // ax@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9312 signed int v12; // edx@35
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9313 signed int v13; // [sp+10h] [bp-4h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9314
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9315 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9316 _404544();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9317 v2 = v1->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9318 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9319 if ( (v1->pQueue[0].uPackedID & 7) == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9320 uActiveCharacter = (v1->pQueue[0].uPackedID >> 3) + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9321 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9322 uActiveCharacter = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9323 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9324 if ( v1->field_1C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9325 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9326 pTurnEngine->field_18 |= 2u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9327 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9328 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9329 pTurnEngine->field_18 &= 0xFFFFFFFDu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9330 if ( v1->pQueue[0].field_4 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9331 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9332 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9333 v13 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9334 if ( v1->uActorQueueSize <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9335 goto LABEL_27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9336 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9337 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9338 if ( (v2->uPackedID & 7) != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9339 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9340 v5 = &pActors[v2->uPackedID >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9341 LOWORD(v6) = v5->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9342 if ( (short)v6 == 4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9343 || (short)v6 == 8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9344 || (short)v6 == 2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9345 || (short)v6 == 3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9346 || (short)v6 == 12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9347 || (short)v6 == 13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9348 || (short)v6 == 18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9349 || (short)v6 == 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9350 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9351 v7 = v5->uCurrentActionLength;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9352 v5->uCurrentActionTime += pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9353 if ( (signed int)v5->uCurrentActionTime < v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9354 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9355 v13 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9356 LABEL_19:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9357 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9358 goto LABEL_20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9359 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9360 v6 = (signed __int16)v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9361 if ( (signed __int16)v6 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9362 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9363 v3 = 0;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
9364 v5->uAIState = Dead;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9365 v5->uCurrentActionTime = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9366 v5->uCurrentActionLength = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9367 v5->UpdateAnimation();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9368 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9369 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9370 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9371 if ( v6 != 8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9372 goto LABEL_19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9373 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9374 Actor::_403F58(v2->uPackedID >> 3, dword_4F6E08[v2->uPackedID >> 3], 32, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9375 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9376 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9377 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9378 LABEL_20:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9379 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9380 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9381 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9382 while ( v4 < v1->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9383 if ( v13 != v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9384 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9385 v1->field_18 |= 1u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9386 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9387 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9388 LABEL_27:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9389 v1->field_18 &= 0xFFFFFFFEu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9390 v8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9391 if ( v1->uActorQueueSize > v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9392 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9393 v9 = v1->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9394 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9395 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9396 if ( (v9->uPackedID & 7) != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9397 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9398 v10 = v9->uPackedID >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9399 v11 = pActors[v10].uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9400 if ( v11 != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9401 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9402 if ( v11 != 4 && v11 != 11 && v11 != 19 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9403 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9404 if ( v11 != 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9405 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9406 v12 = dword_4F6E08[v10];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9407 v9->uActionLength = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9408 Actor::_403F58(v10, v12, 32, (AIDirection *)v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9409 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9410 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9411 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9412 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9413 ++v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9414 ++v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9415 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9416 while ( v8 < v1->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9417 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9418 v1->field_4 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9419 pParty->uTimePlayed += __PAIR__(v3, 213);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9420 _494035_timed_effects__water_walking_damage__etc();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9421 v1->uActionPointsLeft = 130;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9422 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9423
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9424 //----- (004063A1) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9425 int stru262_TurnBased::_4063A1()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9426 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9427 stru262_TurnBased *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9428 int v2; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9429 signed int result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9430 int v4; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9431 int v5; // edx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9432 int v6; // edi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9433 int v7; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9434 Actor *v8; // ecx@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9435 unsigned __int16 v9; // dx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9436 int v10; // edi@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9437 int v11; // edx@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9438 char v12; // zf@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9439
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9440 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9441 _404544();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9442 v2 = (int)&v1->pQueue[0].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9443 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9444 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9445 v4 = v1->pQueue[0].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9446 if ( v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9447 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9448 if ( (v1->pQueue[0].uPackedID & 7) == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9449 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9450 v5 = v1->uActorQueueSize;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9451 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9452 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9453 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9454 if ( v5 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9455 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9456 v7 = (int)&v1->pQueue[0].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9457 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9458 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9459 --*(int *)v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9460 v5 = v1->uActorQueueSize;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9461 ++v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9462 v7 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9463 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9464 while ( v6 < v5 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9465 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9466 --v1->field_10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9467 if ( v1->field_10 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9468 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9469 if ( !*(int *)v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9470 goto LABEL_9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9471 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9472 LABEL_24:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9473 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9474 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9475 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9476 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9477 v8 = &pActors[v1->pQueue[0].uPackedID >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9478 if ( v4 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9479 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9480 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9481 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9482 v9 = v8->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9483 if ( v9 == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9484 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9485 if ( v9 == 4 || v9 == 19 || v9 == 11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9486 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9487 v10 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9488 if ( v1->uActorQueueSize > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9489 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9490 v11 = (int)&v1->pQueue[0].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9491 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9492 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9493 v12 = (*(int *)v11)-- == 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9494 if ( v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9495 *(int *)(v11 + 4) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9496 ++v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9497 v11 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9498 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9499 while ( v10 < v1->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9500 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9501 --v1->field_10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9502 if ( v1->field_10 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9503 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9504 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9505 while ( *(int *)v2 > 0 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9506 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9507 LABEL_9:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9508 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9509 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9510 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9511 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9512 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9513
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9514 //----- (00406457) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9515 int stru262_TurnBased::_406457(int a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9516 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9517 stru262_TurnBased *v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9518 signed int v3; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9519 signed int v4; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9520 char *v5; // edx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9521 signed int v6; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9522 int result; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9523 int v8; // edx@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9524 int v9; // ecx@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9525 char v10; // zf@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9526
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9527 v2 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9528 v3 = *(&this->field_0 + 4 * (a2 + 2));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9529 if ( (*((char *)&this->field_0 + 16 * (a2 + 2)) & 7) == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9530 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9531 v4 = v3 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9532 v5 = (char *)&pParty->pTurnBasedPlayerRecoveryTimes[v3 >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9533 v6 = *(int *)v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9534 if ( *(int *)v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9535 *(int *)v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9536 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9537 v6 = pPlayers[v4 + 1]->GetAttackRecoveryTime(0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9538 if ( v6 < 30 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9539 v6 = 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9540 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9541 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9542 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9543 v6 = pMonsterStats->pInfos[pActors[v3 >> 3].pMonsterInfo.uID].uRecoveryTime;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9544 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9545 v2->pQueue[a2].field_4 = v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9546 v2->_404544();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9547 if ( (v2->pQueue[0].uPackedID & 7) == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9548 uActiveCharacter = (v2->pQueue[0].uPackedID >> 3) + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9549 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9550 uActiveCharacter = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9551 result = (int)&v2->pQueue[0].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9552 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9553 while ( *(int *)result > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9554 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9555 if ( v2->field_10 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9556 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9557 v8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9558 if ( v2->uActorQueueSize > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9559 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9560 v9 = (int)&v2->pQueue[0].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9561 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9562 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9563 v10 = (*(int *)v9)-- == 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9564 if ( v10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9565 *(int *)(v9 + 4) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9566 ++v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9567 v9 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9568 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9569 while ( v8 < v2->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9570 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9571 --v2->field_10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9572 if ( v2->field_10 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9573 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9574 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9575 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9576 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9577
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9578 //----- (0040652A) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9579 void stru262_TurnBased::_40652A()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9580 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9581 char *v1; // edx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9582 Actor *v2; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9583 unsigned __int16 v3; // si@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9584 unsigned int v4; // esi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9585 int v5; // [sp+Ch] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9586
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9587 v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9588 if ( this->uActorQueueSize > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9589 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9590 v1 = (char *)&this->pQueue[0].field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9591 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9592 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9593 if ( !*(int *)v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9594 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9595 if ( (*(v1 - 4) & 7) == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9596 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9597 v2 = &pActors[*((int *)v1 - 1) >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9598 v3 = v2->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9599 if ( !v3 || v3 == 9 || v3 == 7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9600 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9601 v4 = pMonsterStats->pInfos[v2->pMonsterInfo.uID].uRecoveryTime;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9602 *(int *)v1 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9603 if ( (signed __int64)v2->pActorBuffs[7].uExpireTime > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9604 *(int *)v1 = 2 * v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9605 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9606 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9607 ++v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9608 v1 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9609 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9610 while ( v5 < this->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9611 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9612 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9613
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9614 //----- (004065B0) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9615 __int16 stru262_TurnBased::_4065B0()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9616 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9617 stru262_TurnBased *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9618 signed int v2; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9619 int v3; // ebx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9620 int v4; // edi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9621 unsigned int v5; // edi@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9622
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9623 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9624 LOWORD(v2) = _404544();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9625 if ( v1->pQueue[0].field_4 <= 0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9626 || ((_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
9627 viewparams->bRedrawGameUI = 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9628 v1->pQueue[0].field_4 <= 0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9629 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9630 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9631 if ( v1->uActorQueueSize > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9632 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9633 v4 = (int)v1->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9634 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9635 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9636 v2 = *(int *)v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9637 if ( (*(char *)v4 & 7) == 4 || *(int *)(v4 + 4) > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9638 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9639 if ( *(int *)(v4 + 8) <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9640 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9641 LOWORD(v2) = v2 & 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9642 if ( (char)v2 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9643 LOWORD(v2) = v1->_40680F(v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9644 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9645 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9646 v4 += 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9647 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9648 while ( v3 < v1->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9649 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9650 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9651 v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9652 if ( v1->uActorQueueSize > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9653 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9654 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9655 LOWORD(v2) = v1->_406648(v5++);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9656 while ( (signed int)v5 < v1->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9657 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9658 return v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9659 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9660
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9661 //----- (00406648) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9662 __int16 stru262_TurnBased::_406648(unsigned int a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9663 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9664 TurnBased_QueueElem *v1; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9665 int v3; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9666 unsigned int v4; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9667 Actor *v5; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9668 signed int v6; // edi@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9669 int v7; // ecx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9670 int v8; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9671 int v9; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9672 int v10; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9673 int v11; // eax@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9674 int v12; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9675 int v13; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9676 int v14; // eax@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9677 unsigned int v15; // ecx@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9678 unsigned int v16; // edx@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9679 int v17; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9680 int v18; // eax@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9681 char v19; // al@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9682 unsigned int v21; // [sp-8h] [bp-50h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9683 int v22; // [sp-8h] [bp-50h]@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9684 AIDirection *v23; // [sp-4h] [bp-4Ch]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9685 unsigned int v24; // [sp-4h] [bp-4Ch]@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9686 char v25; // [sp-4h] [bp-4Ch]@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9687 AIDirection a3; // [sp+Ch] [bp-3Ch]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9688 AIDirection a4; // [sp+28h] [bp-20h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9689 TurnBased_QueueElem *v28; // [sp+44h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9690 unsigned int a2a; // [sp+50h] [bp+8h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9691
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9692 v1 = (TurnBased_QueueElem *)((char *)this + 16 * (a2 + 2));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9693 v28 = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9694 v3 = v1->uPackedID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9695 if ( (v1->uPackedID & 7) != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9696 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9697 v4 = v3 >> 3; // turn based only stuff
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9698 a2a = dword_4F6E08[v3 >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9699 memcpy(&a3, Actor::GetDirectionInfo(v1->uPackedID, dword_4F6E08[v3 >> 3], &a3, 0), sizeof(a3));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9700 memcpy(&a4, &a3, sizeof(a4));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9701 v5 = &pActors[v3 >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9702 LOWORD(v3) = v5->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9703 if ( (short)v3 != Dead )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9704 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9705 if ( (short)v3 != Disabled )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9706 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9707 if ( (short)v3 != Removed )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9708 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9709 v6 = v5->uCurrentActionLength;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9710 v5->uCurrentActionTime += pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9711 if ( (signed int)v5->uCurrentActionTime >= v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9712 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9713 v7 = (signed __int16)v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9714 v8 = (signed __int16)v3 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9715 if ( !v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9716 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9717 v19 = stru_50C198.special_ability_use_check(&pActors[v4], v4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9718 stru_50FE08.Add(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9719 v28->uPackedID,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9720 5120,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9721 v5->vPosition.x,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9722 v5->vPosition.y,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9723 v5->vPosition.z + ((signed int)v5->uActorHeight >> 1),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9724 v19,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9725 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9726 goto LABEL_25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9727 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9728 v9 = v8 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9729 if ( v9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9730 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9731 v10 = v9 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9732 if ( !v10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9733 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9734 v11 = v10 - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9735 if ( !v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9736 goto LABEL_25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9737 v12 = v11 - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9738 if ( v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9739 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9740 v13 = v12 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9741 if ( v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9742 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9743 if ( v13 != Dead )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9744 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9745 if ( v7 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9746 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9747 v14 = rand();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9748 v15 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9749 v23 = &a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9750 v16 = a2a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9751 if ( !(v14 % 2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9752 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9753 LOWORD(v3) = Actor::_402F87(v4, a2a, &a4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9754 return v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9755 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9756 v21 = 64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9757 LABEL_26:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9758 LOWORD(v3) = Actor::_403EB6(v15, v16, v21, v23);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9759 return v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9760 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9761 LABEL_21:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9762 v5->uCurrentActionTime = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9763 v5->uCurrentActionLength = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9764 v5->uAIState = Dead;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9765 return pActors[v4].UpdateAnimation();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9766 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9767 v24 = v5->pMonsterInfo.uSpellSkillAndMastery2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9768 v22 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9769 v17 = v5->pMonsterInfo.uSpell2ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9770 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9771 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9772 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9773 v24 = v5->pMonsterInfo.uSpellSkillAndMastery1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9774 v22 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9775 v17 = v5->pMonsterInfo.uSpell1ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9776 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9777 Actor::_404AC7(v4, &a4, v17, v22, v24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9778 LABEL_25:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9779 v16 = a2a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9780 v23 = &a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9781 v21 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9782 v15 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9783 goto LABEL_26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9784 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9785 v18 = v5->pMonsterInfo.uMissleAttack2Type;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9786 v25 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9787 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9788 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9789 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9790 v18 = v5->pMonsterInfo.uMissleAttack1Type;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9791 v25 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9792 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9793 Actor::_404874(v4, &a4, v18, v25);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9794 goto LABEL_25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9795 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9796 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9797 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9798 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9799 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9800 return v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9801 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9802 // 50FE08: using guessed type stru298 stru_50FE08;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9803
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9804 //----- (0040680F) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9805 __int16 stru262_TurnBased::_40680F(int a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9806 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9807 TurnBased_QueueElem *v2; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9808 TurnBased_QueueElem *v3; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9809 TurnBased_QueueElem *v4; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9810 Actor *v5; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9811 unsigned int *v6; // esi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9812 AIDirection *v7; // esi@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9813 int v8; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9814 unsigned int v9; // ecx@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9815 signed int v10; // eax@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9816 unsigned __int8 v11; // sf@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9817 unsigned __int8 v12; // of@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9818 int v13; // esi@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9819 bool v14; // eax@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9820 unsigned __int8 v15; // cl@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9821 AIDirection a3; // [sp+Ch] [bp-44h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9822 AIDirection v18; // [sp+28h] [bp-28h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9823 int a2a; // [sp+44h] [bp-Ch]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9824 unsigned int v20; // [sp+48h] [bp-8h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9825 TurnBased_QueueElem *v21; // [sp+4Ch] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9826 signed int v22; // [sp+58h] [bp+8h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9827
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9828 v2 = (TurnBased_QueueElem *)((char *)this + 16 * (a2 + 2));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9829 v21 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9830 v2->uActionLength = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9831 v3 = (TurnBased_QueueElem *)v2->uPackedID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9832 if ( (unsigned __int8)v3 & 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9833 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9834 v3 = (TurnBased_QueueElem *)((signed int)v3 >> 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9835 v4 = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9836 a2a = (int)v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9837 v5 = &pActors[(int)v3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9838 LOWORD(v3) = v5->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9839 if ( (short)v3 != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9840 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9841 if ( (short)v3 != 4 && (short)v3 != 11 && (short)v3 != 19 && (short)v3 != 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9842 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9843 v6 = (unsigned int *)&dword_4F6E08[(int)v4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9844 Actor::_401221((unsigned int)v4, &dword_4F6E08[(int)v4], 1u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9845 if ( v5->pMonsterInfo.uHostilityType && !*v6 )
29
e62134245ab0 On BLV loading.
Nomad
parents: 27
diff changeset
9846 v5->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Friendly;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9847 v22 = *v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9848 v7 = Actor::GetDirectionInfo(8 * (int)v4 | 3, *v6, &a3, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9849 v8 = v5->uActorRadius;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9850 memcpy(&a3, v7, sizeof(a3));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9851 memcpy(&v18, &a3, sizeof(v18));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9852 v9 = a3.uDistance - v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9853 v20 = a3.uDistance - v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9854 if ( ((a3.uDistance - v8) & 0x80000000u) != 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9855 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9856 v9 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9857 v20 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9858 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9859 if ( (v22 & 7) == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9860 v10 = (unsigned __int8)*(&byte_5C8D1A[89
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9861 * (pMonsterStats->pInfos[pActors[v22 >> 3].pMonsterInfo.uID].uID - 1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9862 / 3]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9863 + (v5->pMonsterInfo.uID - 1) / 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9864 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9865 v10 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9866 if ( v10 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9867 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9868 if ( (double)(signed int)v20 < 307.2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9869 goto LABEL_25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9870 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9871 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9872 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9873 if ( v10 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9874 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9875 v12 = __OFSUB__(v9, 1024);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9876 v11 = ((v9 - 1024) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9877 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9878 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9879 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9880 if ( v10 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9881 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9882 v12 = __OFSUB__(v9, 2560);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9883 v11 = ((v9 - 2560) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9884 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9885 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9886 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9887 if ( v10 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9888 goto LABEL_26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9889 v12 = __OFSUB__(v9, 5120);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9890 v11 = ((v9 - 5120) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9891 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9892 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9893 if ( v11 ^ v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9894 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9895 LABEL_25:
29
e62134245ab0 On BLV loading.
Nomad
parents: 27
diff changeset
9896 v5->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Long;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9897 goto LABEL_26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9898 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9899 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9900 LABEL_26:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9901 if ( v5->pMonsterInfo.uHostilityType != 4 || !v22 || (signed int)v9 >= 5120 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9902 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9903 v13 = a2a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9904 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9905 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9906 v13 = a2a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9907 v14 = stru_50C198.special_ability_use_check(v5, a2a);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9908 if ( v14 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9909 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9910 if ( v5->pMonsterInfo.uMissleAttack2Type )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9911 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9912 Actor::_40368B(v13, v22, &v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9913 goto LABEL_43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9914 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9915 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9916 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9917 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9918 if ( v14 > 1 && v14 <= 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9919 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9920 if ( v14 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9921 v15 = v5->pMonsterInfo.uSpell1ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9922 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9923 v15 = v5->pMonsterInfo.uSpell2ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9924 if ( v15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9925 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9926 if ( v14 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9927 Actor::_403854(v13, v22, &v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9928 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9929 Actor::_403A60(v13, v22, &v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9930 goto LABEL_43;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9931 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9932 goto LABEL_44;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9933 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9934 if ( v5->pMonsterInfo.uMissleAttack1Type )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9935 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9936 Actor::_403476(v13, v22, &v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9937 LABEL_43:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9938 v3 = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9939 v21->field_C = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9940 LABEL_48:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9941 v3->uActionLength = v5->uCurrentActionLength;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9942 return (signed __int16)v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9943 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9944 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9945 LABEL_44:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9946 if ( (double)(signed int)v20 < 307.2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9947 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9948 Actor::_403C6C(v13, v22, &v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9949 v3 = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9950 v21->field_C = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9951 goto LABEL_48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9952 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9953 LABEL_47:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9954 Actor::_403EB6(v13, v22, 0x40u, &v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9955 v3 = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9956 v21->field_C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9957 goto LABEL_48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9958 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9959 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9960 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9961 return (signed __int16)v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9962 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9963
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9964 //----- (00406A63) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9965 void stru262_TurnBased::_406A63()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9966 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9967 stru262_TurnBased *v1; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9968 int v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9969 unsigned __int8 v3; // zf@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9970 unsigned __int8 v4; // sf@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9971 signed int v5; // ecx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9972 AIDirection a3; // [sp+8h] [bp-44h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9973 AIDirection v7; // [sp+24h] [bp-28h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9974 unsigned int v8; // [sp+40h] [bp-Ch]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9975 signed int a2; // [sp+44h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9976 TurnBased_QueueElem *v10; // [sp+48h] [bp-4h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9977
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9978 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9979 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9980 this->field_8 = 64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9981 dword_50C994 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9982 uActiveCharacter = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9983 v3 = this->uActorQueueSize == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9984 v4 = this->uActorQueueSize < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9985 a2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9986 if ( !(v4 | v3) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9987 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9988 v10 = this->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9989 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9990 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9991 v5 = v10->uPackedID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9992 if ( (v10->uPackedID & 7) == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9993 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9994 v8 = dword_4F6E08[v5 >> 3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9995 memcpy(&v7, Actor::GetDirectionInfo(v5, v8, &a3, v2), sizeof(v7));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9996 if ( !v1->_406D10(a2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9997 Actor::_403EB6(v10->uPackedID >> 3, v8, 0x20u, &v7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9998 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9999 ++a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10000 ++v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10001 if ( a2 >= v1->uActorQueueSize )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10002 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10003 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10004 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10005 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10006 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10007 // 50C994: using guessed type int dword_50C994;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10008
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10009 //----- (00406AFE) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10010 void stru262_TurnBased::_406AFE()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10011 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10012 stru262_TurnBased *v1; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10013 TurnBased_QueueElem *v2; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10014 int v3; // esi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10015 int v4; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10016 AIDirection a3; // [sp+4h] [bp-48h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10017 AIDirection v6; // [sp+20h] [bp-2Ch]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10018 stru262_TurnBased *v7; // [sp+3Ch] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10019 unsigned int v8; // [sp+40h] [bp-Ch]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10020 unsigned int v9; // [sp+44h] [bp-8h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10021 int v10; // [sp+48h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10022
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10023 v10 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10024 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10025 v7 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10026 if ( this->uActorQueueSize > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10027 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10028 v2 = this->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10029 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10030 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10031 if ( (v2->uPackedID & 7) == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10032 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10033 v3 = v2->uPackedID >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10034 v8 = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10035 if ( pActors[v3].CanAct() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10036 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10037 v4 = v2->uPackedID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10038 v9 = dword_4F6E08[v3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10039 memcpy(&v6, Actor::GetDirectionInfo(v4, v9, &a3, 0), sizeof(v6));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10040 Actor::_403EB6(v8, v9, 0x20u, &v6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10041 v2->field_C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10042 v2->uActionLength = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10043 v1 = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10044 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10045 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10046 ++v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10047 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10048 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10049 while ( v10 < v1->uActorQueueSize );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10050 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10051 v1->field_4 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10052 v1->field_8 = 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10053 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10054
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10055 //----- (00406B9F) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10056 int stru262_TurnBased::_406B9F()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10057 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10058 signed int result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10059 unsigned __int8 v2; // zf@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10060 unsigned __int8 v3; // sf@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10061 int v4; // esi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10062 unsigned int v5; // esi@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10063 Actor *v6; // ebx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10064 unsigned __int16 v7; // cx@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10065 AIDirection a3; // [sp+0h] [bp-50h]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10066 AIDirection v9; // [sp+1Ch] [bp-34h]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10067 signed int a1; // [sp+38h] [bp-18h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10068 stru262_TurnBased *thisa; // [sp+3Ch] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10069 unsigned int v12; // [sp+40h] [bp-10h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10070 unsigned int v13; // [sp+44h] [bp-Ch]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10071 TurnBased_QueueElem *v14; // [sp+48h] [bp-8h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10072 signed int a2; // [sp+4Ch] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10073
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10074 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10075 thisa = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10076 v2 = this->uActorQueueSize == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10077 v3 = this->uActorQueueSize < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10078 a2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10079 if ( !(v3 | v2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10080 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10081 v14 = this->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10082 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10083 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10084 v4 = v14->uPackedID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10085 a1 = v14->uPackedID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10086 if ( (a1 & 7) != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10087 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10088 v5 = v4 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10089 v12 = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10090 v6 = &pActors[v5];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10091 if ( SHIDWORD(v6->pActorBuffs[5].uExpireTime) < result
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10092 || SHIDWORD(v6->pActorBuffs[5].uExpireTime) <= result && LODWORD(v6->pActorBuffs[5].uExpireTime) <= result )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10093 v13 = result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10094 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10095 v13 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10096 if ( SHIDWORD(v6->pActorBuffs[6].uExpireTime) >= result
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10097 && (SHIDWORD(v6->pActorBuffs[6].uExpireTime) > result || LODWORD(v6->pActorBuffs[6].uExpireTime) > result) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10098 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10099 if ( !(v13 | result | v6->uAIState == 5 | v6->uAIState == 11 | v6->uAIState == 19) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10100 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10101 v13 = dword_4F6E08[v5];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10102 memcpy(&v9, Actor::GetDirectionInfo(a1, v13, &a3, 0), sizeof(v9));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10103 v7 = v6->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10104 if ( v7 == 6 || v7 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10105 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10106 if ( (double)(signed int)v9.uDistance < 307.2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10107 goto LABEL_26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10108 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10109 v6->uCurrentActionTime += pEventTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10110 if ( (signed int)v6->uCurrentActionTime > v6->uCurrentActionLength )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10111 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10112 if ( v7 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10113 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10114 v6->uCurrentActionTime = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10115 v6->uCurrentActionLength = 0;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
10116 v6->uAIState = Dead;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10117 v6->UpdateAnimation();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10118 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10119 if ( !thisa->_406D10(a2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10120 LABEL_26:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10121 Actor::_403EB6(v12, v13, 0x20u, &v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10122 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10123 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10124 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10125 ++a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10126 result = (signed int)thisa;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10127 ++v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10128 if ( a2 >= thisa->uActorQueueSize )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10129 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10130 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10131 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10132 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10133 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10134 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10135
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10136 //----- (00406D10) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10137 bool stru262_TurnBased::_406D10(signed int a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10138 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10139 int v2; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10140 int v3; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10141 Actor *v4; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10142 unsigned __int16 v5; // dx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10143 int *v6; // esi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10144 TurnBased_QueueElem *v7; // edi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10145 int v8; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10146 AIDirection *v9; // esi@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10147 int v10; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10148 unsigned int v11; // ecx@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10149 unsigned __int8 v12; // al@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10150 unsigned __int8 v13; // sf@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10151 unsigned __int8 v14; // of@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10152 unsigned int v15; // edx@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10153 unsigned int v16; // ecx@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10154 TurnBased_QueueElem *v17; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10155 double v18; // st7@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10156 double v19; // st6@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10157 int v21; // [sp-8h] [bp-5Ch]@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10158 int v22; // [sp-8h] [bp-5Ch]@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10159 AIDirection *v23; // [sp-4h] [bp-58h]@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10160 int v24; // [sp-4h] [bp-58h]@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10161 AIDirection a3; // [sp+Ch] [bp-48h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10162 AIDirection pDir; // [sp+28h] [bp-2Ch]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10163 int v27; // [sp+44h] [bp-10h]@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10164 unsigned int v28; // [sp+48h] [bp-Ch]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10165 TurnBased_QueueElem *v29; // [sp+4Ch] [bp-8h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10166 unsigned int uActorID; // [sp+50h] [bp-4h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10167 unsigned int a2a; // [sp+5Ch] [bp+8h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10168
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10169 v2 = *(&this->field_0 + 4 * (a2 + 2));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10170 if ( (v2 & 7) == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10171 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10172 v3 = v2 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10173 uActorID = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10174 v4 = &pActors[v3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10175 v5 = v4->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10176 if ( v5 == 5 || v5 == 4 || v5 == 11 || v5 == 19 || v5 == 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10177 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10178 v6 = &dword_4F6E08[v3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10179 v7 = &pTurnEngine->pQueue[a2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10180 v8 = *v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10181 v29 = &pTurnEngine->pQueue[a2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10182 a2a = v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10183 Actor::_401221(v3, &dword_4F6E08[v3], 1u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10184 if ( v4->pMonsterInfo.uHostilityType && !*v6 )
29
e62134245ab0 On BLV loading.
Nomad
parents: 27
diff changeset
10185 v4->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Friendly;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10186 v9 = Actor::GetDirectionInfo(v7->uPackedID, a2a, &a3, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10187 v10 = v4->uActorRadius;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10188 memcpy(&a3, v9, sizeof(a3));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10189 memcpy(&pDir, &a3, sizeof(pDir));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10190 v11 = a3.uDistance - v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10191 v28 = a3.uDistance - v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10192 if ( ((a3.uDistance - v10) & 0x80000000u) != 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10193 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10194 v11 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10195 v28 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10196 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10197 v12 = v4->pMonsterInfo.uHostilityType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10198 if ( v12 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10199 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10200 if ( (double)(signed int)v28 >= 307.2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10201 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10202 LABEL_20:
29
e62134245ab0 On BLV loading.
Nomad
parents: 27
diff changeset
10203 v4->pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Long;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10204 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10205 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10206 if ( v12 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10207 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10208 v14 = __OFSUB__(v11, 1024);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10209 v13 = ((v11 - 1024) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10210 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10211 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10212 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10213 if ( v12 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10214 goto LABEL_21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10215 v14 = __OFSUB__(v11, 2560);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10216 v13 = ((v11 - 2560) & 0x80000000u) != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10217 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10218 if ( v13 ^ v14 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10219 goto LABEL_20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10220 LABEL_21:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10221 if ( (signed __int64)v4->pActorBuffs[4].uExpireTime > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10222 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10223 v15 = a2a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10224 if ( (signed int)v11 < 10240 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10225 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10226 v23 = &pDir;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10227 v16 = uActorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10228 v21 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10229 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10230 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10231 v24 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10232 v22 = 1024;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10233 goto LABEL_58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10234 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10235 if ( v4->pMonsterInfo.uHostilityType != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10236 goto LABEL_46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10237 if ( !(v4->uAttributes & 0x020000) || v4->pMonsterInfo.uAIType == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10238 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10239 if ( v4->pMonsterInfo.uAIType == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10240 goto LABEL_36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10241 if ( v4->pMonsterInfo.uAIType == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10242 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10243 v27 = v4->sCurrentHP;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10244 v18 = (double)v27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10245 v19 = (double)(signed int)v4->pMonsterInfo.uHP * 0.2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10246 goto LABEL_34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10247 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10248 if ( v4->pMonsterInfo.uAIType == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10249 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10250 v27 = v4->sCurrentHP;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10251 v18 = (double)v27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10252 v19 = (double)(signed int)v4->pMonsterInfo.uHP * 0.1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10253 LABEL_34:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10254 if ( v19 > v18 && (signed int)v11 < 10240 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10255 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10256 LABEL_36:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10257 v16 = uActorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10258 v15 = a2a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10259 v23 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10260 v21 = 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10261 if ( v4->pMonsterInfo.uMovementType == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10262 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10263 Actor::_403EB6(uActorID, a2a, 0x20u, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10264 goto LABEL_25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10265 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10266 LABEL_24:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10267 Actor::_402968(v16, v15, v21, v23);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10268 LABEL_25:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10269 v17 = v29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10270 v29->field_C = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10271 LABEL_60:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10272 v17->uActionLength = v4->uCurrentActionLength;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10273 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10274 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10275 goto LABEL_39;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10276 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10277 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10278 LABEL_39:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10279 if ( (double)(signed int)v28 < 307.2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10280 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10281 if ( (signed int)v11 < 5120 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10282 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10283 if ( v4->pMonsterInfo.uMissleAttack1Type && (signed int)v11 < 1024 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10284 Actor::_402AD7(uActorID, a2a, uActorID, 32, &pDir);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10285 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10286 Actor::_40281C(uActorID, a2a, 32, &pDir, 307);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10287 goto LABEL_59;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10288 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10289 LABEL_46:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10290 if ( !v4->pMonsterInfo.uMovementType )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10291 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10292 v24 = 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10293 v22 = 1024;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10294 goto LABEL_57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10295 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10296 if ( v4->pMonsterInfo.uMovementType == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10297 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10298 v24 = 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10299 v22 = 2560;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10300 goto LABEL_57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10301 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10302 if ( v4->pMonsterInfo.uMovementType == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10303 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10304 v24 = 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10305 v22 = 5120;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10306 LABEL_57:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10307 v15 = a2a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10308 LABEL_58:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10309 Actor::_4032B2(uActorID, v15, v22, v24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10310 LABEL_59:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10311 v17 = v29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10312 v29->field_C = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10313 goto LABEL_60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10314 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10315 if ( v4->pMonsterInfo.uMovementType == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10316 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10317 Actor::_4032B2(uActorID, a2a, 10240, 32);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10318 goto LABEL_53;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10319 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10320 if ( v4->pMonsterInfo.uMovementType == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10321 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10322 Actor::_403EB6(uActorID, a2a, 0x20u, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10323 LABEL_53:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10324 v17 = v29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10325 v29->field_C = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10326 goto LABEL_60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10327 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10328 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10329 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10330
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10331 //----- (00406FA8) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10332 void stru262_TurnBased::_406FA8()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10333 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10334 unsigned __int8 v1; // zf@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10335 unsigned __int8 v2; // sf@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10336 TurnBased_QueueElem *v3; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10337 int v4; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10338 Actor *v5; // ebx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10339 unsigned __int16 v6; // cx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10340 unsigned int *v7; // edx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10341 unsigned int v8; // esi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10342 unsigned __int8 v9; // of@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10343 AIDirection a3; // [sp+Ch] [bp-6Ch]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10344 AIDirection v11; // [sp+28h] [bp-50h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10345 AIDirection a4; // [sp+44h] [bp-34h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10346 stru262_TurnBased *v13; // [sp+60h] [bp-18h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10347 TurnBased_QueueElem *v14; // [sp+64h] [bp-14h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10348 int uActorID; // [sp+68h] [bp-10h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10349 unsigned int a2; // [sp+6Ch] [bp-Ch]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10350 int v17; // [sp+70h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10351 unsigned int v18; // [sp+74h] [bp-4h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10352
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10353 v17 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10354 v1 = this->uActorQueueSize == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10355 v2 = this->uActorQueueSize < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10356 v13 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10357 if ( !(v2 | v1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10358 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10359 v3 = this->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10360 v18 = (char *)&pTurnEngine - (char *)this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10361 v14 = this->pQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10362 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10363 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10364 if ( (v3->uPackedID & 7) != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10365 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10366 v4 = v3->uPackedID >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10367 uActorID = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10368 v5 = &pActors[v4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10369 v6 = v5->uAIState;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10370 if ( v6 != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10371 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10372 if ( v6 != 11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10373 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10374 if ( v6 != 19 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10375 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10376 if ( v6 != 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10377 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10378 v7 = (unsigned int *)&dword_4F6E08[v4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10379 a2 = *v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10380 v8 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10381 Actor::_401221(v4, (int *)v7, 1u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10382 memcpy(&v11, Actor::GetDirectionInfo(*(int *)((char *)&v3->uPackedID + v18), v8, &a3, 0), sizeof(v11));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10383 memcpy(&a4, &v11, sizeof(a4));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10384 v5->uCurrentActionTime += pMiscTimer->uTimeElapsed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10385 if ( (signed int)v5->uCurrentActionTime >= v5->uCurrentActionLength )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10386 {
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
10387 if (v5->uAIState == Dying)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10388 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10389 v5->uCurrentActionTime = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10390 v5->uCurrentActionLength = 0;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
10391 v5->uAIState = Dead;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10392 v5->UpdateAnimation();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10393 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10394 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10395 if ( rand() % 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10396 Actor::_403EB6(uActorID, a2, 0x40u, &a4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10397 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10398 Actor::_402F87(uActorID, a2, &a4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10399 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10400 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10401 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10402 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10403 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10404 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10405 ++v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10406 v3 = v14 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10407 v9 = __OFSUB__(v17, v13->uActorQueueSize);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10408 v2 = v17 - v13->uActorQueueSize < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10409 ++v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10410 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10411 while ( v2 ^ v9 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10412 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10413 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10414
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10415 //----- (004070EF) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10416 bool __fastcall sub_4070EF_prolly_collide_objects(unsigned int uObjID, unsigned int uObj2ID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10417 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10418 signed int v2; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10419 unsigned int v3; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10420 signed int v4; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10421 int v5; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10422 signed int v6; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10423 int v7; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10424 float v8; // ST24_4@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10425 double v9; // ST18_8@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10426 signed int v10; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10427 int v11; // ecx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10428 signed int v12; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10429 int v13; // esi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10430 int v14; // esi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10431 int v15; // esi@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10432 signed int v16; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10433 int v17; // edi@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10434 int v18; // esi@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10435 int v19; // eax@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10436 float v20; // ST24_4@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10437 double v21; // ST18_8@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10438 signed int v22; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10439 int v23; // ebx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10440 signed int v24; // ecx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10441 int v25; // eax@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10442 int v26; // eax@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10443 BLVSector *v27; // edx@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10444 int v28; // ecx@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10445 BLVFace *v29; // ebx@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10446 Vec3_short_ *v30; // esi@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10447 int v31; // eax@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10448 int v32; // ST50_4@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10449 int v33; // ST54_4@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10450 int v34; // eax@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10451 char v35; // zf@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10452 int v36; // edi@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10453 int v37; // eax@45
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10454 signed int v38; // esi@45
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10455 int v39; // ST4C_4@49
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10456 signed __int64 v40; // qtt@50
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10457 __int16 v42; // bx@58
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10458 int v43; // [sp-8h] [bp-70h]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10459 int v44; // [sp-4h] [bp-6Ch]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10460 int v45; // [sp+Ch] [bp-5Ch]@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10461 __int16 v46; // [sp+10h] [bp-58h]@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10462 int v47; // [sp+18h] [bp-50h]@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10463 int v48; // [sp+1Ch] [bp-4Ch]@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10464 int v49; // [sp+20h] [bp-48h]@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10465 int v50; // [sp+24h] [bp-44h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10466 signed int v51; // [sp+24h] [bp-44h]@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10467 signed int v52; // [sp+28h] [bp-40h]@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10468 signed int v53; // [sp+2Ch] [bp-3Ch]@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10469 signed int v54; // [sp+30h] [bp-38h]@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10470 signed int v55; // [sp+34h] [bp-34h]@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10471 signed int v56; // [sp+38h] [bp-30h]@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10472 signed int v57; // [sp+3Ch] [bp-2Ch]@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10473 int v58; // [sp+44h] [bp-24h]@50
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10474 int v59; // [sp+48h] [bp-20h]@44
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10475 int v60; // [sp+50h] [bp-18h]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10476 signed int v61; // [sp+50h] [bp-18h]@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10477 int v62; // [sp+54h] [bp-14h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10478 int v63; // [sp+58h] [bp-10h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10479 int v64; // [sp+5Ch] [bp-Ch]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10480 int v65; // [sp+60h] [bp-8h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10481 int v66; // [sp+64h] [bp-4h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10482
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10483 v2 = (signed int)uObjID >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10484 v3 = (uObjID & 7) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10485 v4 = uObj2ID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10486 if ( v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10487 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10488 v5 = v3 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10489 if ( v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10490 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10491 if ( v5 != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10492 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10493 v6 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10494 v63 = pLevelDecorations[v6].vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10495 v64 = pLevelDecorations[v6].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10496 v65 = pLevelDecorations[v6].vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10497 v7 = pIndoor->GetSector(v63, v64, v65);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10498 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10499 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10500 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10501 v63 = pActors[v2].vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10502 v64 = pActors[v2].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10503 v8 = (double)pActors[v2].uActorHeight * 0.69999999;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10504 v9 = v8 + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10505 v65 = LODWORD(v9) + pActors[v2].vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10506 v7 = pActors[v2].uSectorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10507 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10508 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10509 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10510 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10511 v10 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10512 v63 = pLayingItems[v10].vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10513 v64 = pLayingItems[v10].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10514 v11 = pLayingItems[v10].vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10515 v7 = pLayingItems[v10].uSectorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10516 v65 = v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10517 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10518 v66 = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10519 v12 = v4 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10520 v13 = (v4 & 7) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10521 if ( v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10522 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10523 v14 = v13 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10524 if ( v14 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10525 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10526 v15 = v14 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10527 if ( v15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10528 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10529 if ( v15 != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10530 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10531 v16 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10532 v17 = pLevelDecorations[v16].vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10533 v18 = pLevelDecorations[v16].vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10534 v44 = pLevelDecorations[v16].vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10535 v60 = pLevelDecorations[v16].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10536 v43 = pLevelDecorations[v16].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10537 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10538 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10539 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10540 v18 = pParty->vPosition.x;
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
10541 v17 = pParty->sEyelevel + pParty->vPosition.z;
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
10542 v60 = pParty->vPosition.y;
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
10543 v44 = pParty->sEyelevel + pParty->vPosition.z;
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
10544 v43 = pParty->vPosition.y;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10545 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10546 v19 = pIndoor->GetSector(v18, v43, v44);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10547 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10548 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10549 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10550 v60 = pActors[v12].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10551 v18 = pActors[v12].vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10552 v20 = (double)pActors[v12].uActorHeight * 0.69999999;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10553 v21 = v20 + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10554 v17 = LODWORD(v21) + pActors[v12].vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10555 v19 = pActors[v12].uSectorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10556 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10557 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10558 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10559 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10560 v22 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10561 v18 = pLayingItems[v22].vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10562 v17 = pLayingItems[v22].vPosition.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10563 v60 = pLayingItems[v22].vPosition.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10564 v19 = pLayingItems[v22].uSectorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10565 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10566 v62 = v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10567 v23 = v18 - v63;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10568 v50 = v17 - v65;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10569 v24 = sub_452A9E(v23 * v23 + (v60 - v64) * (v60 - v64) + v50 * v50);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10570 if ( v24 > 5120 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10571 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10572 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10573 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10574 v25 = 65536;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10575 if ( v24 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10576 v25 = 65536 / v24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10577 v49 = v23 * v25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10578 v47 = v50 * v25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10579 v48 = (v60 - v64) * v25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10580 v56 = v63;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10581 if ( v63 < v18 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10582 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10583 v55 = v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10584 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10585 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10586 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10587 v56 = v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10588 v55 = v63;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10589 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10590 v54 = v64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10591 if ( v64 < v60 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10592 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10593 v53 = v60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10594 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10595 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10596 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10597 v54 = v60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10598 v53 = v64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10599 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10600 v52 = v65;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10601 if ( v65 < v17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10602 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10603 v51 = v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10604 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10605 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10606 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10607 v52 = v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10608 v51 = v65;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10609 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10610 v57 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10611 v26 = v66;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10612 while ( 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10613 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10614 if ( v26 == v62 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10615 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10616 if ( v57 >= 30 || (v27 = pIndoor->pSectors, v28 = v66, v61 = 0, pIndoor->pSectors[v66].uNumPortals <= 0) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10617 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10618 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10619 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10620 v29 = &pIndoor->pFaces[v27[v28].pPortals[v61]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10621 v30 = &pIndoor->pVertices[*v29->pVertexIDs];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10622 v45 = *(int *)&v30->x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10623 v46 = v30->z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10624 v31 = v29->pFacePlane_old.vNormal.z * (v46 - v65)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10625 + v29->pFacePlane_old.vNormal.y * (SHIWORD(v45) - v64)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10626 + v29->pFacePlane_old.vNormal.x * ((signed __int16)v45 - v63);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10627 if ( v66 != v29->uSectorID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10628 v31 = -v31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10629 if ( v31 >= 0 && (signed __int16)v45 != v63 && SHIWORD(v45) != v64 && v46 != v65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10630 || v56 > v29->pBounding.x2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10631 || v55 < v29->pBounding.x1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10632 || v54 > v29->pBounding.y2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10633 || v53 < v29->pBounding.y1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10634 || v52 > v29->pBounding.z2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10635 || v51 < v29->pBounding.z1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10636 goto LABEL_54;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10637 v32 = (unsigned __int64)(v49 * (signed __int64)v29->pFacePlane_old.vNormal.x) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10638 v33 = (unsigned __int64)(v47 * (signed __int64)v29->pFacePlane_old.vNormal.z) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10639 v34 = (unsigned __int64)(v48 * (signed __int64)v29->pFacePlane_old.vNormal.y) >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10640 v35 = v32 + v33 + v34 == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10641 v36 = v32 + v33 + v34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10642 v59 = v32 + v33 + v34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10643 if ( v35 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10644 goto LABEL_53;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10645 v37 = v65 * v29->pFacePlane_old.vNormal.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10646 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
10647 if ( v36 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10648 break;
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_49;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10651 LABEL_53:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10652 v27 = pIndoor->pSectors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10653 LABEL_54:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10654 ++v61;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10655 if ( v61 >= v27[v28].uNumPortals )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10656 goto LABEL_55;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10657 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10658 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
10659 goto LABEL_53;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10660 LABEL_49:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10661 v39 = abs(-(v29->pFacePlane_old.dist
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10662 + v37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10663 + v63 * v29->pFacePlane_old.vNormal.x
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10664 + v64 * v29->pFacePlane_old.vNormal.y)) >> 14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10665 if ( v39 > abs(v36)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10666 || (LODWORD(v40) = v38 << 16, HIDWORD(v40) = v38 >> 16, v58 = v40 / v59, (signed int)(v40 / v59) < 0)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10667 || !sub_4075DB(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10668 v63 + ((signed int)(((unsigned __int64)(v58 * (signed __int64)v49) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10669 v64 + ((signed int)(((unsigned __int64)(v58 * (signed __int64)v48) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10670 v65 + ((signed int)(((unsigned __int64)(v58 * (signed __int64)v47) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10671 v29) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10672 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10673 v28 = v66;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10674 goto LABEL_53;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10675 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10676 if ( v29->uSectorID == v66 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10677 v42 = v29->uBackSectorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10678 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10679 v42 = v29->uSectorID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10680 v26 = v42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10681 if ( v42 != v66 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10682 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10683 ++v57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10684 v66 = v42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10685 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10686 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10687 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10688 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10689 LABEL_55:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10690 if ( v66 != v62 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10691 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10692 return 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10693 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10694
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10695 //----- (004075DB) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10696 bool __fastcall sub_4075DB(int a1, int a2, int a3, BLVFace *a4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10697 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10698 BLVFace *v4; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10699 unsigned int v5; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10700 signed int v6; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10701 char v7; // zf@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10702 int v8; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10703 Vec3_short_ *v9; // ecx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10704 int v10; // edx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10705 signed int v11; // esi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10706 Vec3_short_ *v12; // ecx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10707 int v13; // edx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10708 signed int v14; // esi@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10709 Vec3_short_ *v15; // ecx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10710 int v16; // edx@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10711 int v17; // eax@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10712 bool v18; // esi@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10713 int v19; // ecx@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10714 int v20; // ecx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10715 int v21; // edx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10716 int v22; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10717 signed int v23; // ebx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10718 int v24; // esi@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10719 signed int v25; // eax@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10720 signed __int64 v26; // qtt@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10721 bool result; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10722 int v28; // [sp+8h] [bp-14h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10723 int v29; // [sp+10h] [bp-Ch]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10724 signed int a3a; // [sp+24h] [bp+8h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10725 int a4a; // [sp+28h] [bp+Ch]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10726
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10727 v4 = a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10728 v5 = a4->uAttributes;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10729 if ( v5 & 0x100 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10730 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10731 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10732 v7 = a4->uNumVertices == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10733 a4a = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10734 v8 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10735 if ( !v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10736 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10737 v9 = pIndoor->pVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10738 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10739 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10740 dword_4F5D98_xs[v6] = v9[v4->pVertexIDs[v6]].x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10741 v10 = v4->pVertexIDs[v6++];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10742 dword_4F5CC4_ys[v6] = v9[v10].y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10743 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10744 while ( v6 < v4->uNumVertices );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10745 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10746 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10747 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10748 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10749 v8 = a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10750 if ( v5 & 0x200 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10751 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10752 v11 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10753 v7 = a4->uNumVertices == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10754 a4a = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10755 if ( !v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10756 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10757 v12 = pIndoor->pVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10758 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10759 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10760 dword_4F5D98_xs[v11] = v12[v4->pVertexIDs[v11]].x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10761 v13 = v4->pVertexIDs[v11++];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10762 dword_4F5CC4_ys[v11] = v12[v13].z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10763 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10764 while ( v11 < v4->uNumVertices );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10765 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10766 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10767 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10768 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10769 v14 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10770 v7 = a4->uNumVertices == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10771 a4a = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10772 if ( !v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10773 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10774 v15 = pIndoor->pVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10775 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10776 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10777 dword_4F5D98_xs[v14] = v15[v4->pVertexIDs[v14]].y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10778 v16 = v4->pVertexIDs[v14++];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10779 dword_4F5CC4_ys[v14] = v15[v16].z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10780 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10781 while ( v14 < v4->uNumVertices );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10782 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10783 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10784 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10785 v17 = v4->uNumVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10786 a3a = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10787 dword_4F5D98_xs[v17] = dword_4F5D98_xs[0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10788 dword_4F5CC4_ys[v17 + 1] = dword_4F5CC4_ys[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10789 v28 = v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10790 v18 = dword_4F5CC4_ys[1] >= v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10791 v19 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10792 v29 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10793 if ( v17 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10794 goto LABEL_29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10795 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10796 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10797 if ( a3a >= 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10798 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10799 v20 = v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10800 v21 = dword_4F5CC4_ys[v20 + 2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10801 if ( v18 ^ v21 >= v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10802 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10803 v22 = dword_4F5D98_xs[v20 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10804 if ( v22 >= a4a )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10805 v23 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10806 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10807 v23 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10808 v24 = v23 | dword_4F5D98_xs[v20] < a4a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10809 if ( v24 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10810 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10811 if ( !v24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10812 || (v25 = v22 - dword_4F5D98_xs[v20],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10813 LODWORD(v26) = v25 << 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10814 HIDWORD(v26) = v25 >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10815 dword_4F5D98_xs[v20]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10816 + ((signed int)(((unsigned __int64)(v26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10817 / (v21 - dword_4F5CC4_ys[v20 + 1])
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10818 * ((v8 - dword_4F5CC4_ys[v20 + 1]) << 16)) >> 16)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10819 + 32768) >> 16) >= a4a) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10820 ++a3a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10821 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10822 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10823 v18 = v21 >= v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10824 v19 = v29++ + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10825 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10826 while ( v29 < v28 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10827 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10828 if ( a3a != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10829 LABEL_29:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10830 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10831 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10832 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10833
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10834 //----- (004077F1) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10835 bool __fastcall sub_4077F1(int a1, int a2, int a3, ODMFace *a4, BSPVertexBuffer *a5)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10836 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10837 ODMFace *v5; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10838 unsigned int v6; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10839 signed int v7; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10840 char v8; // zf@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10841 unsigned __int16 *v9; // edx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10842 int v10; // ecx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10843 unsigned __int16 *v11; // edx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10844 int v12; // ecx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10845 int v13; // edx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10846 int v14; // ecx@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10847 int v15; // esi@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10848 bool v16; // edi@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10849 int v17; // ecx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10850 int v18; // edx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10851 int v19; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10852 signed int v20; // ebx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10853 int v21; // edi@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10854 signed int v22; // eax@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10855 signed __int64 v23; // qtt@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10856 bool result; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10857 int v25; // [sp+14h] [bp-8h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10858 int a4a; // [sp+28h] [bp+Ch]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10859 signed int a5a; // [sp+2Ch] [bp+10h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10860
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10861 v5 = a4;
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
10862 v6 = a4->uAttributes;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10863 v7 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10864 if ( v6 & 0x100 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10865 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10866 v8 = a4->uNumVertices == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10867 a4a = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10868 a3 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10869 if ( !v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10870 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10871 v9 = v5->pVertexIDs;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10872 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10873 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10874 ++v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10875 dword_4F5BF4_xs[v7] = a5->pVertices[*v9].x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10876 v10 = *v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10877 ++v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10878 dword_4F5B24_ys[v7] = a5->pVertices[v10].y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10879 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10880 while ( v7 < v5->uNumVertices );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10881 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10882 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10883 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10884 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10885 if ( v6 & 0x200 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10886 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10887 v8 = a4->uNumVertices == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10888 a4a = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10889 if ( !v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10890 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10891 v11 = v5->pVertexIDs;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10892 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10893 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10894 ++v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10895 dword_4F5BF4_xs[v7] = a5->pVertices[*v11].x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10896 v12 = *v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10897 ++v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10898 dword_4F5B24_ys[v7] = a5->pVertices[v12].z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10899 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10900 while ( v7 < v5->uNumVertices );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10901 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10902 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10903 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10904 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10905 v8 = a4->uNumVertices == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10906 a4a = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10907 if ( !v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10908 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10909 v13 = (int)v5->pVertexIDs;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10910 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10911 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10912 ++v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10913 dword_4F5BF4_xs[v7] = a5->pVertices[*(short *)v13].y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10914 v14 = *(short *)v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10915 v13 += 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10916 dword_4F5B24_ys[v7] = a5->pVertices[v14].z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10917 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10918 while ( v7 < v5->uNumVertices );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10919 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10920 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10921 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10922 v15 = v5->uNumVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10923 a5a = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10924 dword_4F5BF4_xs[v15 + 1] = dword_4F5BF4_xs[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10925 dword_4F5B24_ys[v15 + 1] = dword_4F5B24_ys[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10926 v25 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10927 v16 = dword_4F5B24_ys[1] >= a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10928 if ( v15 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10929 goto LABEL_29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10930 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10931 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10932 if ( a5a >= 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10933 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10934 v17 = v25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10935 v18 = dword_4F5B24_ys[v25 + 2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10936 if ( v16 ^ v18 >= a3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10937 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10938 v19 = dword_4F5BF4_xs[v17 + 2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10939 if ( v19 >= a4a )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10940 v20 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10941 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10942 v20 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10943 v21 = v20 | dword_4F5BF4_xs[v17 + 1] < a4a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10944 if ( v21 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10945 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10946 if ( !v21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10947 || (v22 = v19 - dword_4F5BF4_xs[v17 + 1],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10948 LODWORD(v23) = v22 << 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10949 HIDWORD(v23) = v22 >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10950 dword_4F5BF4_xs[v17 + 1]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10951 + ((signed int)(((unsigned __int64)(v23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10952 / (v18 - dword_4F5B24_ys[v17 + 1])
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10953 * ((a3 - dword_4F5B24_ys[v17 + 1]) << 16)) >> 16)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10954 + 32768) >> 16) >= a4a) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10955 ++a5a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10956 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10957 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10958 ++v25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10959 v16 = v18 >= a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10960 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10961 while ( v25 < v15 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10962 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10963 if ( a5a != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10964 LABEL_29:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10965 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10966 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10967 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10968
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10969 //----- (00407A1C) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10970 bool __fastcall sub_407A1C(int x, int z, int y, Vec3_int_ v)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10971 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10972 unsigned int v4; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10973 Vec3_int_ v5; // ST08_12@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10974 int v6; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10975 int v7; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10976 int v8; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10977 signed int v9; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10978 int v10; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10979 int v11; // ecx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10980 int v12; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10981 int v13; // ebx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10982 int v14; // edx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10983 char *v15; // edi@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10984 ODMFace *v16; // esi@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10985 int v17; // ST34_4@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10986 int v18; // ST38_4@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10987 int v19; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10988 char v20; // zf@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10989 int v21; // ebx@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10990 int v22; // eax@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10991 signed int v23; // edi@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10992 int v24; // ST34_4@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10993 signed __int64 v25; // qtt@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10994 int v26; // eax@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10995 Vec3_int_ v27; // ST08_12@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10996 Vec3_int_ v28; // ST08_12@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10997 int v29; // edi@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10998 int v30; // ebx@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10999 int v31; // esi@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11000 signed int v32; // ecx@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11001 int v33; // eax@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11002 int v34; // ecx@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11003 int v35; // eax@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11004 int v36; // ebx@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11005 int v37; // edx@41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11006 char *v38; // edi@51
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11007 ODMFace *v39; // esi@54
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11008 int v40; // ebx@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11009 int v41; // eax@61
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11010 signed int v42; // edi@61
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11011 signed __int64 v43; // qtt@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11012 int v44; // eax@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11013 Vec3_int_ v45; // ST08_12@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11014 int v46; // edi@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11015 int v47; // ebx@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11016 int v48; // esi@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11017 signed int v49; // ecx@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11018 int v50; // eax@73
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11019 int v51; // edx@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11020 int v52; // ecx@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11021 int v53; // eax@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11022 int v54; // ebx@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11023 int v55; // edi@77
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11024 int v56; // ecx@77
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11025 int v57; // eax@81
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11026 int v58; // esi@81
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11027 int v59; // eax@90
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11028 BLVSector *v60; // edx@90
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11029 int v61; // ecx@90
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11030 BLVFace *v62; // esi@91
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11031 int v63; // ST34_4@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11032 int v64; // ST30_4@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11033 int v65; // eax@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11034 int v66; // ebx@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11035 int v67; // eax@99
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11036 signed int v68; // edi@99
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11037 int v69; // ST2C_4@103
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11038 signed __int64 v70; // qtt@104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11039 int v71; // eax@104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11040 Vec3_int_ v72; // ST08_12@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11041 Vec3_int_ v73; // ST08_12@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11042 int v74; // edi@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11043 int v75; // ebx@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11044 int v76; // esi@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11045 signed int v77; // ecx@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11046 int v78; // eax@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11047 int v79; // edx@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11048 int v80; // ecx@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11049 int v81; // eax@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11050 int v82; // ebx@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11051 int v83; // edi@115
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11052 int v84; // ecx@115
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11053 int v85; // eax@119
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11054 int v86; // esi@119
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11055 int v87; // ecx@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11056 BLVSector *v88; // eax@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11057 int v89; // ecx@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11058 BLVFace *v90; // esi@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11059 int v91; // ebx@136
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11060 int v92; // eax@137
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11061 signed int v93; // edi@137
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11062 signed __int64 v94; // qtt@142
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11063 int v95; // eax@142
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11064 Vec3_int_ v97; // [sp-18h] [bp-94h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11065 int v98; // [sp-Ch] [bp-88h]@88
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11066 int v99; // [sp-Ch] [bp-88h]@126
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11067 int v100; // [sp-8h] [bp-84h]@88
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11068 int v101; // [sp-8h] [bp-84h]@126
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11069 int v102; // [sp-4h] [bp-80h]@88
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11070 int v103; // [sp-4h] [bp-80h]@126
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11071 int v104; // [sp+Ch] [bp-70h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11072 int v105; // [sp+Ch] [bp-70h]@48
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11073 int v106; // [sp+10h] [bp-6Ch]@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11074 int v107; // [sp+10h] [bp-6Ch]@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11075 int v108; // [sp+10h] [bp-6Ch]@104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11076 int v109; // [sp+18h] [bp-64h]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11077 int v110; // [sp+18h] [bp-64h]@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11078 int i; // [sp+18h] [bp-64h]@90
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11079 int v112; // [sp+18h] [bp-64h]@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11080 signed int v113; // [sp+20h] [bp-5Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11081 signed int v114; // [sp+24h] [bp-58h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11082 unsigned __int64 a4; // [sp+28h] [bp-54h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11083 unsigned int a4_8; // [sp+30h] [bp-4Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11084 int v117; // [sp+34h] [bp-48h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11085 int v118; // [sp+34h] [bp-48h]@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11086 int v119; // [sp+34h] [bp-48h]@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11087 int v120; // [sp+34h] [bp-48h]@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11088 int v121; // [sp+38h] [bp-44h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11089 int v122; // [sp+38h] [bp-44h]@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11090 int v123; // [sp+38h] [bp-44h]@76
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11091 int v124; // [sp+38h] [bp-44h]@114
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11092 int v125; // [sp+3Ch] [bp-40h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11093 int v126; // [sp+3Ch] [bp-40h]@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11094 int v127; // [sp+3Ch] [bp-40h]@77
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11095 int v128; // [sp+3Ch] [bp-40h]@115
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11096 int v129; // [sp+40h] [bp-3Ch]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11097 int v130; // [sp+40h] [bp-3Ch]@46
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11098 int v131; // [sp+40h] [bp-3Ch]@78
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11099 int v132; // [sp+40h] [bp-3Ch]@116
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11100 int v133; // [sp+44h] [bp-38h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11101 int v134; // [sp+44h] [bp-38h]@45
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11102 int v135; // [sp+44h] [bp-38h]@81
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11103 int v136; // [sp+44h] [bp-38h]@119
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11104 int v137; // [sp+48h] [bp-34h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11105 int v138; // [sp+48h] [bp-34h]@42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11106 int v139; // [sp+48h] [bp-34h]@82
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11107 int v140; // [sp+48h] [bp-34h]@120
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11108 int v141; // [sp+4Ch] [bp-30h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11109 int v142; // [sp+4Ch] [bp-30h]@41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11110 int v143; // [sp+4Ch] [bp-30h]@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11111 int v144; // [sp+4Ch] [bp-30h]@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11112 int v145; // [sp+50h] [bp-2Ch]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11113 int v146; // [sp+50h] [bp-2Ch]@40
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11114 int v147; // [sp+50h] [bp-2Ch]@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11115 int v148; // [sp+50h] [bp-2Ch]@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11116 int v149; // [sp+54h] [bp-28h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11117 int v150; // [sp+54h] [bp-28h]@39
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11118 int v151; // [sp+54h] [bp-28h]@75
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11119 int v152; // [sp+54h] [bp-28h]@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11120 int sDepth; // [sp+58h] [bp-24h]@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11121 int sDeptha; // [sp+58h] [bp-24h]@52
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11122 int sDepthb; // [sp+58h] [bp-24h]@90
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11123 char *a5; // [sp+5Ch] [bp-20h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11124 char *a5a; // [sp+5Ch] [bp-20h]@51
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11125 signed int a5b; // [sp+5Ch] [bp-20h]@83
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11126 signed int a5c; // [sp+5Ch] [bp-20h]@121
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11127 signed int v160; // [sp+60h] [bp-1Ch]@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11128 signed int v161; // [sp+60h] [bp-1Ch]@47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11129 int v162; // [sp+60h] [bp-1Ch]@128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11130 int v163; // [sp+64h] [bp-18h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11131 int outx; // [sp+68h] [bp-14h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11132 int outy; // [sp+6Ch] [bp-10h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11133 int outz; // [sp+70h] [bp-Ch]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11134 Vec3_int_ pOut; // [sp+74h] [bp-8h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11135 int ya; // [sp+84h] [bp+8h]@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11136 int yb; // [sp+84h] [bp+8h]@136
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11137 int ve; // [sp+88h] [bp+Ch]@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11138 int va; // [sp+88h] [bp+Ch]@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11139 int vb; // [sp+88h] [bp+Ch]@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11140 int vf; // [sp+88h] [bp+Ch]@136
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11141 int vc; // [sp+88h] [bp+Ch]@136
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11142 int vd; // [sp+88h] [bp+Ch]@142
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11143 int v_4; // [sp+8Ch] [bp+10h]@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11144 int v_4a; // [sp+8Ch] [bp+10h]@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11145 int v_4b; // [sp+8Ch] [bp+10h]@136
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11146 int v_4c; // [sp+8Ch] [bp+10h]@141
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11147 int v_8; // [sp+90h] [bp+14h]@53
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11148
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11149 a4 = __PAIR__(z, x);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11150 v4 = stru_5C6E00->Atan2(v.x - x, v.y - z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11151 v114 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11152 v97.z = y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11153 v113 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11154 a4_8 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11155 *(_QWORD *)&v97.x = a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11156 if ( uCurrentlyLoadedLevelType != LEVEL_Outdoor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11157 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11158 Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v97, &pOut.x, &pOut.y, &outz);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11159 v45.z = v.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11160 *(_QWORD *)&v45.x = *(_QWORD *)&v;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11161 Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v45, &outx, &outy, &v163);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11162 v46 = outy - pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11163 v47 = v163 - outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11164 v48 = outx - pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11165 v49 = sub_452A9E(v48 * v48 + v46 * v46 + v47 * v47);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11166 v50 = 65536;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11167 if ( v49 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11168 v50 = 65536 / v49;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11169 v51 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11170 v143 = v48 * v50;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11171 v52 = v46 * v50;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11172 v53 = v47 * v50;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11173 v54 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11174 v147 = v52;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11175 v151 = v53;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11176 v119 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11177 if ( pOut.x < outx )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11178 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11179 v123 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11180 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11181 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11182 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11183 v119 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11184 v123 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11185 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11186 v55 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11187 v56 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11188 v127 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11189 if ( pOut.y < outy )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11190 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11191 v131 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11192 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11193 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11194 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11195 v127 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11196 v131 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11197 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11198 v57 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11199 v58 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11200 v135 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11201 if ( outz < v163 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11202 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11203 v139 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11204 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11205 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11206 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11207 v135 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11208 v139 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11209 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11210 a5b = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11211 while ( !v114 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11212 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11213 if ( a5b )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11214 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11215 v102 = v58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11216 v100 = v55;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11217 v98 = v54;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11218 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11219 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11220 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11221 v102 = v57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11222 v100 = v56;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11223 v98 = v51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11224 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11225 v59 = pIndoor->GetSector(v98, v100, v102);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11226 v60 = pIndoor->pSectors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11227 v61 = 116 * v59;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11228 sDepthb = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11229 for ( i = 116 * v59;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11230 sDepthb < *(__int16 *)((char *)&pIndoor->pSectors->field_C + v61)
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
11231 + 2 * *(__int16 *)((char *)&pIndoor->pSectors->uNumFloors + v61);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11232 ++sDepthb )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11233 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11234 v62 = &pIndoor->pFaces[(*(unsigned __int16 **)((char *)&v60->pWalls + v61))[sDepthb]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11235 if ( v62->uAttributes & 1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11236 || v119 > v62->pBounding.x2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11237 || v123 < v62->pBounding.x1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11238 || v127 > v62->pBounding.y2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11239 || v131 < v62->pBounding.y1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11240 || v135 > v62->pBounding.z2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11241 || v139 < v62->pBounding.z1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11242 || (v63 = (unsigned __int64)(v143 * (signed __int64)v62->pFacePlane_old.vNormal.x) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11243 v64 = (unsigned __int64)(v151 * (signed __int64)v62->pFacePlane_old.vNormal.z) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11244 v65 = (unsigned __int64)(v147 * (signed __int64)v62->pFacePlane_old.vNormal.y) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11245 v20 = v63 + v64 + v65 == 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11246 v66 = v63 + v64 + v65,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11247 v107 = v63 + v64 + v65,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11248 v20) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11249 goto LABEL_107;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11250 v67 = outz * v62->pFacePlane_old.vNormal.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11251 v68 = -(v62->pFacePlane_old.dist
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11252 + v67
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11253 + pOut.y * v62->pFacePlane_old.vNormal.y
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11254 + pOut.x * v62->pFacePlane_old.vNormal.x);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11255 if ( v66 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11256 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11257 if ( v62->pFacePlane_old.dist
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11258 + v67
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11259 + pOut.y * v62->pFacePlane_old.vNormal.y
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11260 + pOut.x * v62->pFacePlane_old.vNormal.x < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11261 goto LABEL_107;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11262 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11263 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11264 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11265 if ( v62->pFacePlane_old.dist
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11266 + v67
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11267 + pOut.y * v62->pFacePlane_old.vNormal.y
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11268 + pOut.x * v62->pFacePlane_old.vNormal.x > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11269 goto LABEL_107;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11270 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11271 v69 = abs(-(v62->pFacePlane_old.dist
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11272 + v67
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11273 + pOut.y * v62->pFacePlane_old.vNormal.y
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11274 + pOut.x * v62->pFacePlane_old.vNormal.x)) >> 14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11275 if ( v69 <= abs(v66) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11276 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11277 LODWORD(v70) = v68 << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11278 HIDWORD(v70) = v68 >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11279 v71 = v70 / v107;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11280 v108 = v70 / v107;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11281 if ( v71 >= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11282 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11283 if ( sub_4075DB(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11284 pOut.x + ((signed int)(((unsigned __int64)(v108 * (signed __int64)v143) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11285 pOut.y + ((signed int)(((unsigned __int64)(v108 * (signed __int64)v147) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11286 outz + ((signed int)(((unsigned __int64)(v108 * (signed __int64)v151) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11287 v62) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11288 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11289 v114 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11290 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11291 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11292 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11293 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11294 v61 = i;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11295 LABEL_107:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11296 v60 = pIndoor->pSectors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11297 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11298 ++a5b;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11299 if ( a5b >= 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11300 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11301 v57 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11302 v56 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11303 v51 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11304 v58 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11305 v55 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11306 v54 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11307 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11308 v72.z = y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11309 *(_QWORD *)&v72.x = a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11310 Vec3_int_::Rotate(32, a4_8 - stru_5C6E00->uIntegerHalfPi, 0, v72, &pOut.x, &pOut.y, &outz);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11311 v73.z = v.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11312 *(_QWORD *)&v73.x = *(_QWORD *)&v;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11313 Vec3_int_::Rotate(32, a4_8 - stru_5C6E00->uIntegerHalfPi, 0, v73, &outx, &outy, &v163);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11314 v74 = outy - pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11315 v75 = v163 - outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11316 v76 = outx - pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11317 v77 = sub_452A9E(v76 * v76 + v74 * v74 + v75 * v75);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11318 v78 = 65536;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11319 if ( v77 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11320 v78 = 65536 / v77;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11321 v79 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11322 v144 = v76 * v78;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11323 v80 = v74 * v78;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11324 v81 = v75 * v78;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11325 v82 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11326 v148 = v80;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11327 v152 = v81;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11328 v120 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11329 if ( pOut.x < outx )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11330 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11331 v124 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11332 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11333 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11334 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11335 v120 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11336 v124 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11337 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11338 v83 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11339 v84 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11340 v128 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11341 if ( pOut.y < outy )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11342 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11343 v132 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11344 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11345 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11346 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11347 v128 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11348 v132 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11349 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11350 v85 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11351 v86 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11352 v136 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11353 if ( outz < v163 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11354 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11355 v140 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11356 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11357 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11358 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11359 v136 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11360 v140 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11361 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11362 a5c = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11363 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11364 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11365 if ( v113 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11366 return !v114 || !v113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11367 if ( a5c )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11368 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11369 v103 = v86;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11370 v101 = v83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11371 v99 = v82;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11372 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11373 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11374 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11375 v103 = v85;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11376 v101 = v84;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11377 v99 = v79;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11378 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11379 v87 = pIndoor->GetSector(v99, v101, v103);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11380 v88 = pIndoor->pSectors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11381 v89 = 116 * v87;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11382 v162 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11383 v112 = v89;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11384 if ( *(__int16 *)((char *)&pIndoor->pSectors->field_C + v89)
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
11385 + 2 * *(__int16 *)((char *)&pIndoor->pSectors->uNumFloors + v89) > 0 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11386 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11387 LABEL_148:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11388 ++a5c;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11389 if ( a5c >= 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11390 return !v114 || !v113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11391 v85 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11392 v84 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11393 v79 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11394 v86 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11395 v83 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11396 v82 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11397 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11398 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11399 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11400 v90 = &pIndoor->pFaces[(*(unsigned __int16 **)((char *)&v88->pWalls + v89))[v162]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11401 if ( v90->uAttributes & 1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11402 || v120 > v90->pBounding.x2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11403 || v124 < v90->pBounding.x1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11404 || v128 > v90->pBounding.y2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11405 || v132 < v90->pBounding.y1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11406 || v136 > v90->pBounding.z2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11407 || v140 < v90->pBounding.z1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11408 || (yb = (unsigned __int64)(v144 * (signed __int64)v90->pFacePlane_old.vNormal.x) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11409 v_4b = (unsigned __int64)(v148 * (signed __int64)v90->pFacePlane_old.vNormal.y) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11410 vf = (unsigned __int64)(v152 * (signed __int64)v90->pFacePlane_old.vNormal.z) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11411 v20 = yb + vf + v_4b == 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11412 v91 = yb + vf + v_4b,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11413 vc = yb + vf + v_4b,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11414 v20) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11415 goto LABEL_145;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11416 v92 = outz * v90->pFacePlane_old.vNormal.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11417 v93 = -(v90->pFacePlane_old.dist
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11418 + v92
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11419 + pOut.y * v90->pFacePlane_old.vNormal.y
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11420 + pOut.x * v90->pFacePlane_old.vNormal.x);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11421 if ( v91 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11422 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11423 if ( v90->pFacePlane_old.dist
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11424 + v92
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11425 + pOut.y * v90->pFacePlane_old.vNormal.y
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11426 + pOut.x * v90->pFacePlane_old.vNormal.x < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11427 goto LABEL_145;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11428 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11429 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11430 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11431 if ( v90->pFacePlane_old.dist
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11432 + v92
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11433 + pOut.y * v90->pFacePlane_old.vNormal.y
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11434 + pOut.x * v90->pFacePlane_old.vNormal.x > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11435 goto LABEL_145;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11436 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11437 v_4c = abs(-(v90->pFacePlane_old.dist
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11438 + v92
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11439 + pOut.y * v90->pFacePlane_old.vNormal.y
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11440 + pOut.x * v90->pFacePlane_old.vNormal.x)) >> 14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11441 if ( v_4c <= abs(v91) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11442 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11443 LODWORD(v94) = v93 << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11444 HIDWORD(v94) = v93 >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11445 v95 = v94 / vc;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11446 vd = v94 / vc;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11447 if ( v95 >= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11448 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11449 if ( sub_4075DB(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11450 pOut.x + ((signed int)(((unsigned __int64)(vd * (signed __int64)v144) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11451 pOut.y + ((signed int)(((unsigned __int64)(vd * (signed __int64)v148) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11452 outz + ((signed int)(((unsigned __int64)(vd * (signed __int64)v152) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11453 v90) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11454 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11455 v113 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11456 goto LABEL_148;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11457 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11458 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11459 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11460 v89 = v112;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11461 LABEL_145:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11462 v88 = pIndoor->pSectors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11463 ++v162;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11464 if ( v162 >= *(__int16 *)((char *)&pIndoor->pSectors->field_C + v89)
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
11465 + 2 * *(__int16 *)((char *)&pIndoor->pSectors->uNumFloors + v89) )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11466 goto LABEL_148;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11467 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11468 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11469 Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v97, &pOut.x, &pOut.y, &outz);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11470 v5.z = v.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11471 *(_QWORD *)&v5.x = *(_QWORD *)&v;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11472 Vec3_int_::Rotate(32, stru_5C6E00->uIntegerHalfPi + v4, 0, v5, &outx, &outy, &v163);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11473 v6 = outy - pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11474 v7 = v163 - outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11475 v8 = outx - pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11476 v9 = sub_452A9E(v8 * v8 + v6 * v6 + v7 * v7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11477 v10 = 65536;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11478 if ( v9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11479 v10 = 65536 / v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11480 v125 = v8 * v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11481 v11 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11482 v12 = v7 * v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11483 v13 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11484 v117 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11485 v121 = v6 * v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11486 v149 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11487 if ( pOut.x < outx )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11488 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11489 v145 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11490 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11491 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11492 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11493 v149 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11494 v145 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11495 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11496 v14 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11497 v141 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11498 if ( pOut.y < outy )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11499 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11500 v137 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11501 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11502 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11503 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11504 v141 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11505 v137 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11506 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11507 v133 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11508 if ( outz < v163 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11509 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11510 v129 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11511 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11512 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11513 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11514 v133 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11515 v129 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11516 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11517 v160 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11518 if ( (signed int)pOutdoor->uNumBModels > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11519 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11520 v104 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11521 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11522 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11523 v15 = (char *)&pOutdoor->pBModels[v104].pVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11524 a5 = (char *)&pOutdoor->pBModels[v104].pVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11525 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
11526 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11527 sDepth = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11528 if ( *((int *)v15 + 2) > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11529 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11530 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11531 LABEL_36:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11532 ++v160;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11533 ++v104;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11534 if ( v160 >= (signed int)pOutdoor->uNumBModels )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11535 goto LABEL_37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11536 v14 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11537 v13 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11538 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11539 v106 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11540 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11541 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11542 v16 = (ODMFace *)(v106 + *((int *)a5 + 4));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11543 if ( v149 > v16->pBoundingBox.x2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11544 || v145 < v16->pBoundingBox.x1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11545 || v141 > v16->pBoundingBox.y2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11546 || v137 < v16->pBoundingBox.y1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11547 || v133 > v16->pBoundingBox.z2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11548 || v129 < v16->pBoundingBox.z1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11549 || (v17 = (unsigned __int64)(v125 * (signed __int64)v16->pFacePlane.vNormal.x) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11550 v18 = (unsigned __int64)(v121 * (signed __int64)v16->pFacePlane.vNormal.y) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11551 v19 = (unsigned __int64)(v117 * (signed __int64)v16->pFacePlane.vNormal.z) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11552 v20 = v17 + v18 + v19 == 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11553 v21 = v17 + v18 + v19,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11554 v109 = v17 + v18 + v19,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11555 v20) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11556 goto LABEL_33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11557 v22 = pOut.y * v16->pFacePlane.vNormal.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11558 v23 = -(v16->pFacePlane.dist + v22 + outz * v16->pFacePlane.vNormal.z + pOut.x * v16->pFacePlane.vNormal.x);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11559 if ( v21 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11560 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11561 if ( v16->pFacePlane.dist + v22 + outz * v16->pFacePlane.vNormal.z + pOut.x * v16->pFacePlane.vNormal.x < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11562 goto LABEL_33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11563 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11564 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11565 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11566 if ( v16->pFacePlane.dist + v22 + outz * v16->pFacePlane.vNormal.z + pOut.x * v16->pFacePlane.vNormal.x > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11567 goto LABEL_33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11568 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11569 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
11570 if ( v24 <= abs(v21) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11571 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11572 LODWORD(v25) = v23 << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11573 HIDWORD(v25) = v23 >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11574 v26 = v25 / v109;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11575 v110 = v25 / v109;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11576 if ( v26 >= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11577 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11578 if ( sub_4077F1(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11579 pOut.x + ((signed int)(((unsigned __int64)(v110 * (signed __int64)v125) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11580 pOut.y + ((signed int)(((unsigned __int64)(v110 * (signed __int64)v121) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11581 outz + ((signed int)(((unsigned __int64)(v110 * (signed __int64)v117) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11582 v16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11583 (BSPVertexBuffer *)a5) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11584 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11585 v114 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11586 goto LABEL_36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11587 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11588 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11589 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11590 LABEL_33:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11591 ++sDepth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11592 v106 += 308;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11593 if ( sDepth >= *((int *)a5 + 2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11594 goto LABEL_36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11595 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11596 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11597 LABEL_37:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11598 v27.z = y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11599 *(_QWORD *)&v27.x = a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11600 Vec3_int_::Rotate(32, a4_8 - stru_5C6E00->uIntegerHalfPi, 0, v27, &pOut.x, &pOut.y, &outz);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11601 v28.z = v.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11602 *(_QWORD *)&v28.x = *(_QWORD *)&v;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11603 Vec3_int_::Rotate(32, a4_8 - stru_5C6E00->uIntegerHalfPi, 0, v28, &outx, &outy, &v163);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11604 v29 = outy - pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11605 v30 = v163 - outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11606 v31 = outx - pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11607 v32 = sub_452A9E(v31 * v31 + v29 * v29 + v30 * v30);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11608 v33 = 65536;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11609 if ( v32 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11610 v33 = 65536 / v32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11611 v126 = v31 * v33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11612 v34 = v33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11613 v35 = v30 * v33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11614 v36 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11615 v118 = v35;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11616 v122 = v29 * v34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11617 v150 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11618 if ( pOut.x < outx )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11619 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11620 v146 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11621 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11622 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11623 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11624 v150 = outx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11625 v146 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11626 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11627 v37 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11628 v142 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11629 if ( pOut.y < outy )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11630 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11631 v138 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11632 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11633 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11634 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11635 v142 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11636 v138 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11637 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11638 v134 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11639 if ( outz < v163 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11640 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11641 v130 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11642 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11643 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11644 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11645 v134 = v163;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11646 v130 = outz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11647 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11648 v161 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11649 if ( (signed int)pOutdoor->uNumBModels > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11650 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11651 v105 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11652 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11653 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11654 v38 = (char *)&pOutdoor->pBModels[v105].pVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11655 a5a = (char *)&pOutdoor->pBModels[v105].pVertices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11656 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
11657 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11658 sDeptha = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11659 if ( *((int *)v38 + 2) > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11660 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11661 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11662 LABEL_71:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11663 ++v161;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11664 ++v105;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11665 if ( v161 >= (signed int)pOutdoor->uNumBModels )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11666 return !v114 || !v113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11667 v37 = outy;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11668 v36 = pOut.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11669 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11670 v_8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11671 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11672 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11673 v39 = (ODMFace *)(v_8 + *((int *)a5a + 4));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11674 if ( v150 > v39->pBoundingBox.x2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11675 || v146 < v39->pBoundingBox.x1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11676 || v142 > v39->pBoundingBox.y2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11677 || v138 < v39->pBoundingBox.y1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11678 || v134 > v39->pBoundingBox.z2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11679 || v130 < v39->pBoundingBox.z1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11680 || (ya = (unsigned __int64)(v126 * (signed __int64)v39->pFacePlane.vNormal.x) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11681 ve = (unsigned __int64)(v122 * (signed __int64)v39->pFacePlane.vNormal.y) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11682 v_4 = (unsigned __int64)(v118 * (signed __int64)v39->pFacePlane.vNormal.z) >> 16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11683 v20 = ya + ve + v_4 == 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11684 v40 = ya + ve + v_4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11685 va = ya + ve + v_4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11686 v20) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11687 goto LABEL_68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11688 v41 = pOut.y * v39->pFacePlane.vNormal.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11689 v42 = -(v39->pFacePlane.dist + v41 + outz * v39->pFacePlane.vNormal.z + pOut.x * v39->pFacePlane.vNormal.x);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11690 if ( v40 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11691 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11692 if ( v39->pFacePlane.dist + v41 + outz * v39->pFacePlane.vNormal.z + pOut.x * v39->pFacePlane.vNormal.x < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11693 goto LABEL_68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11694 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11695 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11696 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11697 if ( v39->pFacePlane.dist + v41 + outz * v39->pFacePlane.vNormal.z + pOut.x * v39->pFacePlane.vNormal.x > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11698 goto LABEL_68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11699 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11700 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
11701 if ( v_4a <= abs(v40) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11702 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11703 LODWORD(v43) = v42 << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11704 HIDWORD(v43) = v42 >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11705 v44 = v43 / va;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11706 vb = v43 / va;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11707 if ( v44 >= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11708 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11709 if ( sub_4077F1(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11710 pOut.x + ((signed int)(((unsigned __int64)(vb * (signed __int64)v126) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11711 pOut.y + ((signed int)(((unsigned __int64)(vb * (signed __int64)v122) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11712 outz + ((signed int)(((unsigned __int64)(vb * (signed __int64)v118) >> 16) + 32768) >> 16),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11713 v39,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11714 (BSPVertexBuffer *)a5a) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11715 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11716 v113 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11717 goto LABEL_71;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11718 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11719 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11720 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11721 LABEL_68:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11722 ++sDeptha;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11723 v_8 += 308;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11724 if ( sDeptha >= *((int *)a5a + 2) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11725 goto LABEL_71;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11726 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11727 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11728 return !v114 || !v113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11729 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11730
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11731
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11732 //----- (00408768) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11733 char __cdecl UpdateActors()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11734 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11735 unsigned int v0; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11736 __int16 v1; // ax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11737 char *v2; // esi@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11738 char v3; // zf@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11739 signed int v5; // [sp+Ch] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11740 signed int v6; // [sp+10h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11741 signed int v7; // [sp+14h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11742 signed int v8; // [sp+18h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11743
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11744 v0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11745 v8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11746 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11747 v7 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11748 v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11749 if ( !_strcmpi(pCurrentMapName, "d25.blv") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11750 v8 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11751 if ( !_strcmpi(pCurrentMapName, "d26.blv") )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11752 v6 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11753 if ( (unsigned __int16)_449B57_test_bit(pParty->_award_bits, 99) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11754 v7 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11755 v1 = _449B57_test_bit(pParty->_award_bits, 100);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11756 if ( v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11757 v5 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11758 if ( (signed int)uNumActors > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11759 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11760 v2 = (char *)&pActors[0].vPosition;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11761 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11762 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11763 if ( ((Actor *)(v2 - 142))->CanAct() || *((short *)v2 + 17) == 19 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11764 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11765 v3 = *((short *)v2 + 17) == 19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11766 *(short *)v2 = *((short *)v2 + 10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11767 *((short *)v2 + 1) = *((short *)v2 + 11);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11768 *((short *)v2 + 2) = *((short *)v2 + 12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11769 *((short *)v2 - 51) = *((short *)v2 - 17);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11770 if ( !v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11771 Actor::_403EB6(v0, dword_4F6E08[v0], *(int *)(v2 - 18), 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11772 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11773 *(v2 - 81) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11774 LOBYTE(v1) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11775 if ( !v8 || v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11776 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11777 if ( !v6 || v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11778 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11779 LOBYTE(v1) = ((Actor *)(v2 - 142))->_438B9B();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11780 if ( (char)v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11781 *(v2 - 104) &= 0xF7u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11782 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11783 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11784 *(v2 - 104) &= 0x7Fu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11785 if ( *(v2 - 104) & 0x40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11786 LOBYTE(v1) = Actor::_4031C1_update_job(v0, pParty->uCurrentHour, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11787 ++v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11788 v2 += 836;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11789 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11790 while ( (signed int)v0 < (signed int)uNumActors );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11791 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11792 return v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11793 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11794
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11795 //----- (00408896) --------------------------------------------------------
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
11796 void UpdateLayingItems()
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11797 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11798 unsigned int v0; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11799 char *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11800 char *result; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11801
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11802 v0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11803 v1 = (char *)&pLayingItems[0].uObjectDescID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11804 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11805 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11806 if ( *(short *)v1 && (v1[24] & 8 || pObjectList->pObjects[*(short *)v1].uFlags & 0x10) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11807 LayingItem::_42F933(v0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11808 v1 += 112;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11809 ++v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11810 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11811 while ( (signed int)v1 < (signed int)((char *)&pObjectList->uNumObjects + 2) );
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
11812
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
11813 for (uint i = 0; i < 100; ++i)
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
11814 array_5118E8.pElements[i].field_C_time_left = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11815 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11816
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11817 //----- (004088E9) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11818 signed int __fastcall sub_4088E9(int a1, int a2, int a3, int a4, int a5, int a6)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11819 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11820 int v6; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11821 int v7; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11822 int v8; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11823 signed int result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11824 int v10; // [sp+Ch] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11825 int v11; // [sp+18h] [bp+8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11826
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11827 v6 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11828 v10 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11829 v7 = a3 - a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11830 v11 = abs(a3 - a1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11831 v8 = abs(a4 - v10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11832 result = sub_452A9E(v11 * v11 + v8 * v8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11833 if ( result )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11834 result = abs((v7 * (v10 - a6) - (a4 - v10) * (v6 - a5)) / result);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11835 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11836 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11837
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11838
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11839 //----- (00408A27) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11840 unsigned int __thiscall SearchAliveActors(unsigned int *pTotalActors)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11841 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11842 unsigned int *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11843 int v2; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11844 unsigned int v3; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11845 signed int v4; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11846 Actor *v5; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11847 unsigned int v6; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11848 int v8; // [sp+Ch] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11849
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11850 v1 = pTotalActors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11851 v2 = GetAlertStatus();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11852 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11853 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11854 *v1 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11855 v8 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11856 if ( (signed int)uNumActors > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11857 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11858 v5 = pActors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11859 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11860 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11861 v6 = v5->uAttributes;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11862 if ( (v6 & 0x100000) == v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11863 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11864 ++*v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11865 if ( v5->IsAlive() == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11866 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11867 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11868 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11869 ++v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11870 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11871 while ( v4 < (signed int)uNumActors );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11872 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11873 return v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11874 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11875
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11876 //----- (00408A7E) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11877 unsigned int __fastcall SearchActorByMonsterID(unsigned int *pTotalActors, int uMonsterID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11878 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11879 unsigned int *v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11880 signed int v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11881 char *v4; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11882 int v5; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11883 int v7; // [sp+8h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11884 int v8; // [sp+Ch] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11885 unsigned int v9; // [sp+10h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11886
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11887 v7 = uMonsterID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11888 v2 = pTotalActors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11889 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11890 v8 = GetAlertStatus();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11891 *v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11892 v9 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11893 if ( (signed int)uNumActors > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11894 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11895 v4 = (char *)&pActors[0].pMonsterInfo.uID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11896 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11897 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11898 v5 = *((int *)v4 - 15); // actor::attributes
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11899 if ( (v5 & 0x100000) == v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11900 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11901 if ( *(short *)v4 - 1 == v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11902 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11903 ++*v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11904 if ( ((Actor *)(v4 - 96))->IsAlive() == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11905 ++v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11906 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11907 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11908 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11909 v4 += 836;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11910 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11911 while ( v3 < (signed int)uNumActors );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11912 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11913 return v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11914 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11915
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11916 //----- (00408AE7) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11917 unsigned int __fastcall SearchActorByGroup(unsigned int *pTotalActors, unsigned int uGroup)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11918 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11919 unsigned int *v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11920 signed int v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11921 char *v4; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11922 int v5; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11923 unsigned int v7; // [sp+8h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11924 int v8; // [sp+Ch] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11925 unsigned int v9; // [sp+10h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11926
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11927 v7 = uGroup;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11928 v2 = pTotalActors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11929 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11930 v8 = GetAlertStatus();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11931 *v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11932 v9 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11933 if ( (signed int)uNumActors > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11934 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11935 v4 = (char *)&pActors[0].uGroup;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11936 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11937 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11938 v5 = *((int *)v4 - 168);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11939 if ( (v5 & 0x100000) == v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11940 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11941 if ( *(int *)v4 == v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11942 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11943 ++*v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11944 if ( ((Actor *)(v4 - 708))->IsAlive() == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11945 ++v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11946 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11947 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11948 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11949 v4 += 836;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11950 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11951 while ( v3 < (signed int)uNumActors );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11952 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11953 return v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11954 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11955
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11956 //----- (00408B54) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11957 unsigned int __fastcall SearchActorByID(unsigned int *pTotalActors, unsigned int a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11958 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11959 unsigned int v2; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11960 unsigned int *v3; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11961 int v4; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11962 unsigned int v5; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11963 unsigned int v6; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11964
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11965 v2 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11966 v3 = pTotalActors;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11967 v4 = GetAlertStatus();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11968 v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11969 *v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11970 v6 = pActors[v2].uAttributes;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11971 if ( (v6 & 0x100000) == v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11972 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11973 *v3 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11974 if ( pActors[v2].IsAlive() == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11975 v5 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11976 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11977 return v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11978 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11979
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11980
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11981 //----- (00409BE8) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11982 void __cdecl sub_409BE8()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11983 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11984 void *v0; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11985 stru348 *v1; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11986 int v2; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11987 int v3; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11988
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11989 v0 = ptr_507BC0->ptr_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11990 dword_4E1874 = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11991 v1 = &stru_4E1890[(int)((char *)v0 - 108)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11992 amuint_4E1860 = v1->field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11993 amuint_4E1864 = v1->field_6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11994 amuint_4E1868 = v1->field_8 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11995 amuint_4E186C = v1->field_A - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11996 amuint_4E1870 = v1->field_C - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11997 amuint_505884 = v1->field_E;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11998 amuint_505888 = v1->field_10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11999 amuint_50588C = v1->field_12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12000 dword_4E1878 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12001 dword_4E187C = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12002 dword_4E1880 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12003 dword_4E1884 = v1->field_0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12004 v2 = v1->field_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12005 v3 = v1->field_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12006 dword_4E1888 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12007 dword_4DF3A4 = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12008 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12009 // 4DF3A4: using guessed type int dword_4DF3A4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12010 // 4E1860: using guessed type int amuint_4E1860;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12011 // 4E1864: using guessed type int amuint_4E1864;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12012 // 4E1868: using guessed type int amuint_4E1868;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12013 // 4E186C: using guessed type int amuint_4E186C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12014 // 4E1870: using guessed type int amuint_4E1870;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12015 // 4E1874: using guessed type int dword_4E1874;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12016 // 4E1878: using guessed type int dword_4E1878;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12017 // 4E187C: using guessed type int dword_4E187C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12018 // 4E1880: using guessed type int dword_4E1880;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12019 // 4E1884: using guessed type int dword_4E1884;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12020 // 4E1888: using guessed type int dword_4E1888;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12021 // 505884: using guessed type int amuint_505884;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12022 // 505888: using guessed type int amuint_505888;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12023 // 50588C: using guessed type int amuint_50588C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12024
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12025
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12026
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12027
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12028
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12029
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12030
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12031 //----- (0040D75D) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12032 char __fastcall pGUIWindow0_draws_text(int a1, const char *pText, int *pXY)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12033 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12034 const char *v3; // ST0C_4@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12035 __int64 v4; // qax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12036
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12037 v3 = pText;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12038 v4 = LOBYTE(pFontComic->uFontHeight) - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12039 return pGUIWindow0->DrawText(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12040 pFontComic,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12041 *pXY,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12042 pXY[1] - (((signed int)v4 - HIDWORD(v4)) >> 1) + 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12043 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12044 v3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12045 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12046 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12047 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12048 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12049
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12050
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12051
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12052 //----- (0040DB27) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12053 void __fastcall DrawRect(Vec4_int_ *pXYZW, unsigned __int16 uColor, char bSolidFill)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12054 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12055 Vec4_int_ *v3; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12056 unsigned __int16 v4; // bp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12057 unsigned int i; // ebx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12058
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12059 v3 = pXYZW;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12060 v4 = uColor;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12061 pRenderer->BeginScene();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12062 pRenderer->Clip_v2(0, 0, 639u, 479u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12063 if ( bSolidFill )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12064 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12065 for ( i = v3->y; (signed int)i <= v3->w; ++i )
52
0f4ed4f0f472 BLV minimap: 1/3
Nomad
parents: 51
diff changeset
12066 pRenderer->Line2D(v3->x, i, v3->z, i, v4);
0f4ed4f0f472 BLV minimap: 1/3
Nomad
parents: 51
diff changeset
12067 }
0f4ed4f0f472 BLV minimap: 1/3
Nomad
parents: 51
diff changeset
12068 else
0f4ed4f0f472 BLV minimap: 1/3
Nomad
parents: 51
diff changeset
12069 {
0f4ed4f0f472 BLV minimap: 1/3
Nomad
parents: 51
diff changeset
12070 pRenderer->Line2D(v3->x, v3->y, v3->z, v3->y, v4);
0f4ed4f0f472 BLV minimap: 1/3
Nomad
parents: 51
diff changeset
12071 pRenderer->Line2D(v3->z, v3->y, v3->z, v3->w, v4);
0f4ed4f0f472 BLV minimap: 1/3
Nomad
parents: 51
diff changeset
12072 pRenderer->Line2D(v3->z, v3->w, v3->x, v3->w, v4);
0f4ed4f0f472 BLV minimap: 1/3
Nomad
parents: 51
diff changeset
12073 pRenderer->Line2D(v3->x, v3->w, v3->x, v3->y, v4);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12074 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12075 pRenderer->EndScene();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12076 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12077
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12078
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12079
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12080
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12081 //----- (0040DDB1) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12082 int __fastcall rand_interval(int a, int b)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12083 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12084 return a + rand() % (b - a + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12085 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12086
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12087 //----- (0040DEB4) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12088 char *__fastcall inv_strcat(const char *Source, char *Dest)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12089 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12090 return strcat(Dest, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12091 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12092
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12093 //----- (0040DEBE) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12094 char *__fastcall inv_strcpy(const char *Source, char *Dest)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12095 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12096 return strcpy(Dest, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12097 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12098
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12099 //----- (0040DEC8) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12100 void __fastcall intToString(int val, char *pOut)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12101 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12102 sprintfex(pOut, "%d", val);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12103 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12104
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12105 //----- (0040DEDB) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12106 unsigned int __stdcall R8G8B8_to_TargetFormat(int uColor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12107 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12108 return GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat((unsigned __int8)uColor, BYTE1(uColor), BYTE2(uColor));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12109 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12110
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12111 //----- (0040DEF3) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12112 unsigned int __fastcall GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(unsigned __int16 r, unsigned __int16 g, unsigned __int16 b)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12113 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12114 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
12115 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12116
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12117 //----- (0040DF3D) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12118 void __cdecl CallRenderPresent()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12119 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12120 pRenderer->Present();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12121 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12122
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12123
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12124 //----- (0040DFA7) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12125 int __stdcall retzero_sub_40DFA7(int a1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12126 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12127 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12128 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12129 // 40DFA7: using guessed type int __stdcall retzero_sub_40DFA7(int);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12130
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12131 //----- (0040DFD1) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12132 void stru272::_40DFD1()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12133 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12134 stru272 *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12135 stru272_stru0 *v2; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12136
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12137 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12138 v2 = (stru272_stru0 *)malloc(0x5Cu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12139 v1->ptr_0 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12140 v2->field_0 = 0x67707274u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12141 v1->ptr_0->field_8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12142 v1->ptr_0->field_30 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12143 v1->ptr_0->field_58 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12144 v1->ptr_0->field_59 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12145 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12146
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12147 //----- (0040DFFE) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12148 int stru272_stru0::_40DFFE()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12149 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12150 signed int result; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12151
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12152 if ( this->field_0 == 0x67707274 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12153 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12154 this->field_0 = 0x78787878u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12155 free(this);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12156 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12157 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12158 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12159 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12160 result = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12161 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12162 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12163 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12164
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12165 //----- (0040E01A) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12166 int stru272_stru0::_40E01A(int a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12167 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12168 signed int result; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12169
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12170 auto a1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12171 if ( a1->field_0 == 0x67707274 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12172 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12173 a1->field_4 = *(int *)(a2 + 32);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12174 a1->field_C = *(int *)a2 << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12175 a1->field_10 = *(int *)(a2 + 4) << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12176 a1->field_14 = *(int *)(a2 + 8) << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12177 a1->field_18 = *(int *)(a2 + 12) << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12178 a1->field_1C = *(int *)(a2 + 16);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12179 a1->field_20 = *(int *)(a2 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12180 a1->field_24 = *(int *)(a2 + 24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12181 a1->field_28 = *(float *)(a2 + 28) * 65536.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12182 LODWORD(a1->field_2C) = *(int *)(a2 + 36);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12183 a1->field_34 = (signed __int64)(*(float *)(a2 + 40) * 65536.0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12184 a1->field_38 = (signed __int64)(*(float *)(a2 + 44) * 65536.0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12185 a1->field_3C = *(int *)(a2 + 48);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12186 a1->field_40 = *(int *)(a2 + 52);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12187 a1->field_54 = *(int *)(a2 + 56);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12188 a1->field_59 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12189 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12190 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12191 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12192 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12193 result = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12194 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12195 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12196 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12197
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12198 //----- (0040E0F5) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12199 int stru272_stru0::_40E0F5(char a2, char a3)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12200 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12201 signed int result; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12202 int v4; // edx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12203 int v5; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12204
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12205 auto a1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12206 if ( a1->field_0 == 0x67707274 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12207 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12208 if ( a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12209 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12210 a1->field_8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12211 a1->field_30 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12212 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12213 if ( a1->field_59 && a3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12214 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12215 v4 = a1->field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12216 v5 = a1->field_54;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12217 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12218 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12219 *(int *)v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12220 v5 += 28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12221 --v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12222 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12223 while ( v4 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12224 a1->field_58 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12225 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12226 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12227 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12228 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12229 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12230 result = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12231 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12232 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12233 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12234
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12235 //----- (0040E133) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12236 int stru272_stru0::_40E133()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12237 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12238 stru272_stru0 *v1; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12239 int v3; // ST18_4@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12240 double v4; // st7@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12241 double v5; // st6@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12242 char v6; // bl@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12243 int v7; // esi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12244 int v8; // ecx@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12245 signed int v9; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12246 int v10; // ecx@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12247 signed int v11; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12248 signed int v12; // edx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12249 signed int v13; // edx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12250 int v14; // [sp+8h] [bp-10h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12251 int v15; // [sp+Ch] [bp-Ch]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12252 float v16; // [sp+14h] [bp-4h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12253
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12254 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12255 if ( this->field_0 != 0x67707274 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12256 return 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12257 v3 = this->field_8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12258 v16 = this->field_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12259 v4 = (double)v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12260 if ( v3 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12261 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12262 v5 = v16 + this->field_2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12263 v16 = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12264 if ( v5 > v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12265 v16 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12266 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12267 if ( v16 >= 1.0 || this->field_58 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12268 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12269 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12270 v7 = this->field_54;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12271 v14 = (signed __int64)this->field_28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12272 v15 = this->field_4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12273 while ( *(int *)v7 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12274 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12275 if ( v16 >= 1.0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12276 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12277 *(int *)v7 = v1->field_3C + rand() % (v1->field_40 - v1->field_3C + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12278 *(int *)(v7 + 20) = (rand() % 17 - 8) << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12279 *(int *)(v7 + 24) = (rand() % 17 - 8) << 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12280 v12 = v1->field_C + rand() % (v1->field_14 - 1 - v1->field_C + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12281 *(int *)(v7 + 12) = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12282 *(int *)(v7 + 4) = v12 >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12283 v16 = v16 - 1.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12284 v13 = v1->field_10 + rand() % (v1->field_18 - 1 - v1->field_10 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12285 *(int *)(v7 + 16) = v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12286 *(int *)(v7 + 8) = v13 >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12287 --v1->field_8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12288 goto LABEL_13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12289 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12290 LABEL_14:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12291 v7 += 28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12292 --v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12293 if ( !v15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12294 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12295 v1->field_58 = v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12296 v1->field_30 = v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12297 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12298 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12299 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12300 v8 = *(int *)(v7 + 20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12301 --*(int *)v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12302 v9 = v8 + *(int *)(v7 + 12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12303 v10 = v14 + *(int *)(v7 + 24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12304 *(int *)(v7 + 12) = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12305 *(int *)(v7 + 4) = v9 >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12306 v11 = v10 + *(int *)(v7 + 16);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12307 *(int *)(v7 + 24) = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12308 *(int *)(v7 + 16) = v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12309 *(int *)(v7 + 8) = v11 >> 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12310 LABEL_13:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12311 v6 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12312 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12313 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12314 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12315 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12316
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12317 //----- (0040E2A7) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12318 int stru272_stru0::_40E2A7()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12319 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12320 int result; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12321
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12322 if ( this->field_0 == 0x67707274 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12323 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12324 if ( this->field_8 <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12325 result = this->field_58 != 0 ? 2 : 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12326 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12327 result = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12328 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12329 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12330 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12331 result = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12332 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12333 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12334 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12335
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12336
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12337
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12338
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12339
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12340
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12341
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12342 //----- (0040F82D) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12343 void __fastcall ZBuffer_Fill(int *pZBuffer, int uTextureId, int iZValue)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12344 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12345 ZBuffer_DoFill(pZBuffer, (Texture *)(uTextureId != -1 ? 72 * uTextureId + 0x6D084C : 0), iZValue);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12346 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12347
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12348 //----- (0040F845) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12349 __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
12350 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12351 int v7; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12352 int v8; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12353 int v9; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12354 int v10; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12355
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12356 v7 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12357 v8 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12358 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12359 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12360 v9 = a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12361 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12362 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12363 v10 = *(char *)v8++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12364 if ( (char)v10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12365 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12366 if ( (char)v10 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12367 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12368 LOWORD(v10) = *(short *)(a5 + 2 * v10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12369 *(short *)v7 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12370 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12371 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12372 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12373 LOWORD(v10) = a6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12374 *(short *)v7 = a6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12375 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12376 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12377 v7 += 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12378 --v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12379 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12380 while ( v9 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12381 v7 = a7 + v7 - a3 - a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12382 --a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12383 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12384 while ( a4 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12385 return v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12386 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12387
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12388 //----- (0040F89C) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12389 void __fastcall ZBuffer_DoFill(int *pZBuffer, Texture *pTex, int uZValue)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12390 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12391 void *v3; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12392 void *v4; // esi@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12393 int *v5; // edi@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12394 int v6; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12395 int v7; // ecx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12396 Texture *v8; // [sp+Ch] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12397 int *v9; // [sp+10h] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12398 int v10; // [sp+14h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12399 int v11; // [sp+18h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12400 void *v12; // [sp+1Ch] [bp-4h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12401
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12402 v10 = pTex->uTextureWidth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12403 v8 = pTex;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12404 v9 = pZBuffer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12405 v11 = pTex->uTextureHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12406 if ( pIcons_LOD->dword_011BA4 && pTex->uDecompressedSize )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12407 v3 = pTex->UnzipPalette();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12408 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12409 v3 = pTex->pLevelOfDetail0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12410 v12 = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12411 v4 = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12412 v5 = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12413 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12414 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12415 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12416 v7 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12417 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12418 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12419 LOBYTE(v6) = *(char *)v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12420 v4 = (char *)v4 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12421 if ( v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12422 *v5 = uZValue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12423 ++v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12424 --v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12425 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12426 while ( v7 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12427 v5 += 640 - v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12428 --v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12429 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12430 while ( v11 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12431 if ( pIcons_LOD->dword_011BA4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12432 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12433 if ( v8->uDecompressedSize )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12434 free(v12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12435 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12436 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12437
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12438
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12439 //----- (0040F92A) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12440 void __fastcall sub_40F92A(int *pZBuffer, Texture *a2, int a3)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12441 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12442 Texture *v3; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12443 void *v4; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12444 int *v5; // edi@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12445 int v6; // ecx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12446 int *v7; // [sp+Ch] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12447 int v8; // [sp+10h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12448 int v9; // [sp+18h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12449
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12450 v3 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12451 v7 = pZBuffer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12452 v8 = a2->uTextureWidth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12453 v9 = a2->uTextureHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12454 if ( pIcons_LOD->dword_011BA4 && a2->uDecompressedSize )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12455 v4 = a2->UnzipPalette();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12456 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12457 v4 = a2->pLevelOfDetail0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12458 v5 = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12459 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12460 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12461 v6 = v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12462 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12463 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12464 *v5 = a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12465 ++v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12466 --v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12467 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12468 while ( v6 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12469 v5 += 640 - v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12470 --v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12471 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12472 while ( v9 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12473 if ( pIcons_LOD->dword_011BA4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12474 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12475 if ( v3->uDecompressedSize )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12476 free(v4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12477 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12478 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12479
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12480
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12481
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12482
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12483
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12484
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12485
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12486
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12487
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12488
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12489
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12490
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12491
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12492
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12493 //----- (00410AF5) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12494 void __cdecl SetMoonPhaseNames()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12495 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12496 aMoonPhaseNames[0] = pGlobalTXT_LocalizationStrings[150];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12497 aMoonPhaseNames[1] = pGlobalTXT_LocalizationStrings[171];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12498 aMoonPhaseNames[2] = pGlobalTXT_LocalizationStrings[102];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12499 aMoonPhaseNames[3] = pGlobalTXT_LocalizationStrings[169];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12500 aMoonPhaseNames[4] = pGlobalTXT_LocalizationStrings[92];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12501 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12502
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12503 //----- (00410B28) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12504 void __thiscall DrawSpellDescriptionPopup(void *_this)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12505 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12506 Player *v1; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12507 SpellInfo *v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12508 unsigned int v3; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12509 int v4; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12510 LONG v5; // ecx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12511 int v6; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12512 char *v7; // ST44_4@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12513 unsigned __int16 v8; // ax@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12514 GUIWindow a1; // [sp+Ch] [bp-68h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12515 void *v10; // [sp+60h] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12516 POINT a2; // [sp+64h] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12517 int v12; // [sp+6Ch] [bp-8h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12518 int v13; // [sp+70h] [bp-4h]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12519
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12520 v1 = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12521 v10 = _this;
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
12522 v2 = &pSpellStats->pInfos[(signed int)((char *)_this + 11 * v1->pNumSpellBookPage) + 1];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12523 if ( pMouse->GetCursorPos(&a2)->y <= 250 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12524 v3 = pMouse->GetCursorPos(&a2)->y + 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12525 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12526 v3 = 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12527 a1.uFrameY = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12528 a1.uFrameWidth = 328;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12529 a1.uFrameHeight = 68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12530 a1.uFrameX = 90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12531 a1.uFrameZ = 417;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12532 a1.uFrameW = v3 + 67;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
12533 a1.Hint = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12534 a2.y = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[431]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12535 v13 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[433]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12536 v12 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[432]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12537 v4 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[96]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12538 v5 = a2.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12539 if ( v13 > a2.y )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12540 v5 = v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12541 if ( v12 > v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12542 v5 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12543 if ( v4 > v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12544 v5 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12545 sprintfex(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12546 pTmpBuf2,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12547 "%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
12548 v2->pDescription,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12549 pGlobalTXT_LocalizationStrings[431],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12550 v5 + 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12551 v5 + 10,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12552 v2->pBasicSkillDesc,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12553 pGlobalTXT_LocalizationStrings[433],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12554 v5 + 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12555 v5 + 10,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12556 v2->pExpertSkillDesc,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12557 pGlobalTXT_LocalizationStrings[432],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12558 v5 + 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12559 v5 + 10,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12560 v2->pMasterSkillDesc,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12561 pGlobalTXT_LocalizationStrings[96],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12562 v5 + 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12563 v5 + 10,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12564 v2->pGrandmasterSkillDesc);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12565 v6 = pFontSmallnum->CalcTextHeight(pTmpBuf2, &a1, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12566 a1.uFrameHeight += v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12567 if ( (signed int)a1.uFrameHeight < 150 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12568 a1.uFrameHeight = 150;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12569 a1.uFrameWidth = 460;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
12570 a1.DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12571 a1.uFrameWidth -= 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12572 a1.uFrameHeight -= 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12573 v7 = v2->pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12574 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12575 a1.uFrameW = a1.uFrameHeight + a1.uFrameY - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12576 v8 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12577 a1.DrawText2(pFontArrus, 0x78u, 0xCu, v8, v7, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12578 a1.DrawText(pFontSmallnum, 120, 44, 0, pTmpBuf2, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12579 a1.uFrameWidth = 108;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12580 a1.uFrameZ = a1.uFrameX + 107;
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
12581 a1.DrawText2(pFontComic, 0xCu, 0x4Bu, 0, pSkillNames[v1->pNumSpellBookPage + 12], 3u);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12582 sprintfex(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12583 pTmpBuf,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12584 "%s\n%d",
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12585 pGlobalTXT_LocalizationStrings[522],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12586 *(&pSpellDatas[0].field_14
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
12587 + ((unsigned int)LOBYTE(v1->pActiveSkills[v1->pNumSpellBookPage + 12]) >> 6)
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
12588 + 10 * (int)((char *)v10 + 11 * v1->pNumSpellBookPage)));
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12589 a1.DrawText2(pFontComic, 0xCu, a1.uFrameHeight - LOBYTE(pFontComic->uFontHeight) - 16, 0, pTmpBuf, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12590 dword_507B00_spell_info_to_draw_in_popup = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12591 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12592 // 507B00: using guessed type int dword_507B00_spell_info_to_draw_in_popup;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12593
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12594 //----- (00410D99) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12595 signed int __fastcall sub_410D99_get_map_index(int a1)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12596 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12597 int v1; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12598 signed int v2; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12599 const char **v3; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12600 char *v4; // ebx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12601
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12602 v1 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12603 v2 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12604 if ( _strcmpi(pMapStats->pInfos[1].pFilename, (const char *)&pGames_LOD->pSubIndices[a1]) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12605 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12606 v3 = (const char **)&pMapStats->pInfos[1].pFilename;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12607 v4 = (char *)&pMapStats->pInfos[1].pFilename;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12608 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12609 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12610 if ( !*(int *)v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12611 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12612 v3 += 17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12613 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12614 v4 = (char *)v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12615 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12616 while ( _strcmpi(*v3, (const char *)&pGames_LOD->pSubIndices[v1]) );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12617 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12618 return v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12619 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12620
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12621 //----- (00410DEC) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12622 unsigned int __cdecl DrawLloydBeaconsScreen()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12623 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12624 Player *v0; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12625 char *v1; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12626 unsigned __int16 v2; // ax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12627 unsigned int result; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12628 unsigned int v4; // esi@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12629 unsigned int v5; // ecx@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12630 char v6; // zf@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12631 LloydBeacon *v7; // esi@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12632 int v8; // eax@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12633 unsigned __int64 v9; // kr08_8@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12634 unsigned int v10; // esi@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12635 unsigned int v11; // eax@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12636 char *v12; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12637 char *v13; // ecx@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12638 int v14; // eax@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12639 unsigned int v15; // [sp-10h] [bp-98h]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12640 unsigned __int16 v16; // [sp-Ch] [bp-94h]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12641 int v17; // [sp-8h] [bp-90h]@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12642 char *v18; // [sp-8h] [bp-90h]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12643 Texture *v19; // [sp-4h] [bp-8Ch]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12644 char *v20; // [sp-4h] [bp-8Ch]@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12645 unsigned int v21; // [sp-4h] [bp-8Ch]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12646 GUIWindow v22; // [sp+Ch] [bp-7Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12647 unsigned int v23; // [sp+64h] [bp-24h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12648 __int64 v24; // [sp+68h] [bp-20h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12649 unsigned int v25; // [sp+70h] [bp-18h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12650 char *Str; // [sp+74h] [bp-14h]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12651 int v27; // [sp+78h] [bp-10h]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12652 LloydBeacon *v28; // [sp+7Ch] [bp-Ch]@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12653 RGBTexture *v29; // [sp+80h] [bp-8h]@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12654 int uNumMaxBeacons; // [sp+84h] [bp-4h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12655
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12656 v0 = &pParty->pPlayers[_506348_current_lloyd_playerid];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12657 pRenderer->DrawTextureIndexed(8u, 8u, pTexture_LloydBeacons[(unsigned __int8)bRecallingBeacon]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12658 v1 = pGlobalTXT_LocalizationStrings[523]; // Recall Beacon
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12659 v22.uFrameX = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12660 v22.uFrameY = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12661 v22.uFrameWidth = 428;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12662 v22.uFrameHeight = 344;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12663 v22.uFrameZ = 435;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12664 v22.uFrameW = 351;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12665 if ( !bRecallingBeacon )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12666 v1 = pGlobalTXT_LocalizationStrings[375]; // Set Beacon
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12667 sprintfex(pTmpBuf, "%s", v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12668 v22.DrawText2(pBook2Font, 0, 22u, 0, pTmpBuf, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12669 if ( bRecallingBeacon )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12670 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12671 pRenderer->DrawTextureTransparent(pBtn_Book_1->uX, pBtn_Book_1->uY, pTex_tab_an_6b__zoom_on);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12672 v19 = pTex_tab_an_6a__zoom_off;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12673 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12674 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12675 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12676 pRenderer->DrawTextureTransparent(pBtn_Book_1->uX, pBtn_Book_1->uY, pTex_tab_an_6a__zoom_off);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12677 v19 = pTex_tab_an_6b__zoom_on;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12678 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12679 pRenderer->DrawTextureTransparent(pBtn_Book_2->uX, pBtn_Book_2->uY, v19);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12680 v2 = v0->pActiveSkills[14];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12681 uNumMaxBeacons = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12682 if ( HIBYTE(v2) & 1 || (v2 & 0x80u) != 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12683 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12684 uNumMaxBeacons = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12685 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12686 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12687 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12688 if ( v2 & 0x40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12689 uNumMaxBeacons = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12690 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12691 result = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12692 v27 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12693 if ( uNumMaxBeacons > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12694 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12695 v29 = pSavegameThumbnails;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12696 v28 = v0->pInstalledBeacons;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12697 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12698 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12699 v22.uFrameWidth = 92;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12700 v4 = result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12701 v22.uFrameHeight = 68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12702 v5 = pLloydsBeaconsPreviewXs[result];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12703 v22.uFrameY = pLloydsBeaconsPreviewYs[result];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12704 v25 = v22.uFrameY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12705 v22.uFrameX = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12706 v22.uFrameW = v22.uFrameY + 67;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12707 v6 = v29->pPixels == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12708 v22.uFrameZ = v5 + 91;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12709 if ( !v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12710 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12711 if ( !bRecallingBeacon )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12712 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12713 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12714 pLloydsBeacons_SomeXs[v4],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12715 pLloydsBeacons_SomeYs[v4],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12716 pTexture_CurrentBook);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12717 v21 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12718 v18 = pGlobalTXT_LocalizationStrings[19];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12719 v16 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12720 v14 = pSpellFont->CalcTextHeight(pGlobalTXT_LocalizationStrings[19], &v22, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12721 v15 = (signed int)v22.uFrameHeight / 2 - v14 / 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12722 goto LABEL_28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12723 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12724 LABEL_29:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12725 ++v29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12726 ++v28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12727 result = v27++ + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12728 if ( v27 >= uNumMaxBeacons )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12729 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12730 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12731 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12732 pLloydsBeacons_SomeXs[v4],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12733 pLloydsBeacons_SomeYs[v4],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12734 pTexture_CurrentBook);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12735 pRenderer->DrawTextureRGB(pLloydsBeaconsPreviewXs[v4], pLloydsBeaconsPreviewYs[v4], v29);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12736 v7 = v28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12737 Str = pMapStats->pInfos[sub_410D99_get_map_index(HIWORD(v28->field_18))].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12738 v8 = pSpellFont->CalcTextHeight(Str, &v22, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12739 v22.uFrameY += -6 - v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12740 v22.DrawText2(pSpellFont, 0, 0, 1u, Str, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12741 v9 = v7->uBeaconTime - pParty->uTimePlayed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12742 LODWORD(v24) = LODWORD(v7->uBeaconTime) - LODWORD(pParty->uTimePlayed);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12743 HIDWORD(v24) = HIDWORD(v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12744 v23 = (unsigned __int64)((signed __int64)((double)v24 * 0.234375) / 60 / 60) >> 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12745 v10 = (signed __int64)((double)v24 * 0.234375) / 60 / 60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12746 v11 = v10 / 0x18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12747 if ( (unsigned int)((signed __int64)((double)v24 * 0.234375) / 60 / 60) / 0x18 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12748 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12749 v13 = pGlobalTXT_LocalizationStrings[57]; // Days
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12750 if ( v11 > 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12751 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12752 LABEL_24:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12753 v20 = v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12754 v17 = v11 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12755 LABEL_25:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12756 sprintfex(pTmpBuf, "%lu %s", v17, v20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12757 v21 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12758 v18 = pTmpBuf;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12759 v16 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12760 v22.uFrameY = v25 + v22.uFrameHeight + 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12761 v15 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12762 LABEL_28:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12763 v22.DrawText2(pSpellFont, 0, v15, v16, v18, v21);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12764 goto LABEL_29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12765 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12766 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12767 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12768 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12769 if ( (signed __int64)(__PAIR__(v23, v10) + 1) <= 23 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12770 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12771 if ( (v23 & 0x80000000u) != 0 || (signed int)v23 <= 0 && v10 <= 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12772 v12 = pGlobalTXT_LocalizationStrings[109];// Hour
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12773 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12774 v12 = pGlobalTXT_LocalizationStrings[110];// Hours
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12775 v20 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12776 v17 = v10 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12777 goto LABEL_25;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12778 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12779 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12780 v13 = pGlobalTXT_LocalizationStrings[56]; // Day
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12781 goto LABEL_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12782 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12783 LABEL_30:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12784 if ( byte_506360 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12785 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12786 result = pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12787 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12788 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12789 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)181;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12790 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12791 result = 3 * pMessageQueue_50CBD0->uNumMessages + 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12792 *(&pMessageQueue_50CBD0->uNumMessages + result) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12793 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12794 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12795 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12796 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12797 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12798
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12799
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12800 //----- (00411150) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12801 char *__cdecl DrawTownPortalScreen()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12802 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12803 signed int v0; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12804 __int16 v1; // dx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12805 POINT *v2; // edi@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12806 int v3; // edi@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12807 __int16 v4; // dx@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12808 GUIWindow v6; // [sp+Ch] [bp-64h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12809 POINT v7; // [sp+60h] [bp-10h]@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12810 POINT a2; // [sp+68h] [bp-8h]@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12811
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12812 pRenderer->ClearZBuffer(0, 479);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12813 pRenderer->DrawTextureTransparent(8u, 8u, pTexture_CurrentBook);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12814 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12815 0x1D7u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12816 0x1BDu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12817 (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12818 v6.uFrameX = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12819 v6.uFrameY = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12820 v6.uFrameWidth = 460;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12821 v6.uFrameHeight = 344;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12822 v6.uFrameZ = 467;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12823 v6.uFrameW = 351;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12824 v0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12825 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12826 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12827 if ( !v0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12828 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12829 v1 = 206;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12830 LABEL_14:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12831 if ( !(unsigned __int16)_449B57_test_bit(pParty->_award_bits, v1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12832 goto LABEL_16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12833 goto LABEL_15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12834 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12835 if ( v0 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12836 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12837 v1 = 208;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12838 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12839 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12840 if ( v0 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12841 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12842 v1 = 207;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12843 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12844 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12845 if ( v0 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12846 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12847 v1 = 211;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12848 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12849 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12850 if ( v0 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12851 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12852 v1 = 209;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12853 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12854 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12855 if ( v0 == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12856 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12857 v1 = 210;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12858 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12859 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12860 LABEL_15:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12861 pRenderer->_4A612A(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12862 pTownPortalBook_xs[v0],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12863 pTownPortalBook_ys[v0],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12864 *(&pTexture_TownPortalHarmn + v0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12865 v0 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12866 LABEL_16:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12867 ++v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12868 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12869 while ( v0 < 6 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12870 v2 = pMouse->GetCursorPos(&a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12871 v3 = pRenderer->pActiveZBuffer[v2->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v7)->y]] & 0xFFFF;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12872 if ( !v3 ) // Town Portal
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12873 return v6.DrawText2(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12874 if ( v3 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12875 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12876 v4 = 206;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12877 LABEL_30:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12878 if ( (unsigned __int16)_449B57_test_bit(pParty->_award_bits, v4) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12879 goto LABEL_31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12880 return v6.DrawText2(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12881 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12882 if ( v3 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12883 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12884 v4 = 208;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12885 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12886 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12887 if ( v3 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12888 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12889 v4 = 207;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12890 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12891 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12892 if ( v3 == 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12893 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12894 v4 = 211;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12895 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12896 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12897 if ( v3 == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12898 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12899 v4 = 209;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12900 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12901 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12902 if ( v3 == 6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12903 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12904 v4 = 210;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12905 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12906 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12907 LABEL_31:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12908 pRenderer->DrawTextureIndexed(word_4E1D3A[v3], pTownPortalBook_xs[v3 + 5], *(&pTex_tab_an_6b__zoom_on + v3));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12909 return v6.DrawText2(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12910 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12911 // 4E1D3A: using guessed type __int16 word_4E1D3A[];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12912
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12913 //----- (00411300) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12914 Texture *__fastcall LoadSpellbook(unsigned int uID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12915 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12916 unsigned int v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12917 Player *pPlayer; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12918 char v3; // al@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12919 int v4; // edi@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12920 Texture *result; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12921 char *v6; // edi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12922 unsigned int v7; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12923 unsigned __int8 v8; // sf@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12924 unsigned __int8 v9; // of@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12925 char pContainer[20]; // [sp+Ch] [bp-1Ch]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12926 Texture *v11; // [sp+20h] [bp-8h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12927 int v12; // [sp+24h] [bp-4h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12928
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12929 byte_506550 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12930 v1 = uID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12931 pPlayer = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12932 v3 = pPlayer->uQuickSpell;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12933 if ( v3 && (unsigned __int8)v3 / 11 == v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12934 dword_50654C = (unsigned __int8)v3 - 11 * v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12935 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12936 dword_50654C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12937 v4 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12938 v12 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12939 v11 = (Texture *)&pPlayer->field_152[11 * v1 + 63];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12940 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12941 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12942 result = v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12943 if ( v11->pName[v4] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12944 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12945 v6 = &byte_4E2430[12 * v1] + v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12946 sprintfex(pContainer, "SB%sS%02d", spellbook_texture_filename_suffices[v1], (unsigned __int8)*v6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12947 v7 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12948 dword_506408[v12] = 72 * v7 + 7145548;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12949 sprintfex(pContainer, "SB%sC%02d", spellbook_texture_filename_suffices[v1], (unsigned __int8)*v6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12950 result = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12951 dword_5063D8[v12] = result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12952 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12953 v4 = v12 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12954 v9 = __OFSUB__(v12 + 1, 12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12955 v8 = v12++ - 11 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12956 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12957 while ( v8 ^ v9 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12958 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12959 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12960 // 4E1D18: using guessed type char *spellbook_texture_filename_suffices[8];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12961 // 506408: using guessed type int dword_506408[];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12962 // 50654C: using guessed type int dword_50654C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12963 // 506550: using guessed type char byte_506550;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12964
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12965 //----- (0041140B) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12966 GUIWindow *__cdecl sub_41140B()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12967 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12968 signed int v0; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12969 GUIButton *v1; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12970 GUIButton *v2; // esi@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12971 GUIWindow *result; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12972
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12973 v0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12974 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12975 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12976 dword_506404[v0]->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12977 dword_506434[v0]->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12978 --v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12979 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12980 while ( v0 >= -11 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12981 pIcons_LOD->_40F9C5();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12982 v1 = pGUIWindow_CurrentMenu->pControlsHead;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12983 if ( v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12984 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12985 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12986 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12987 v2 = v1->pNext;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12988 pAllocator->FreeChunk(v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12989 v1 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12990 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12991 while ( v2 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12992 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12993 pGUIWindow_CurrentMenu->pControlsHead = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12994 pGUIWindow_CurrentMenu->pControlsTail = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12995 result = pGUIWindow_CurrentMenu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12996 pGUIWindow_CurrentMenu->uNumControls = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12997 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12998 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12999
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13000 //----- (00411473) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13001 void __cdecl sub_411473()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13002 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13003 char *v0; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13004 Texture **v1; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13005 Texture *v2; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13006 Texture *v3; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13007
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13008 pTexture_pagemask->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13009 pTexture_506448->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13010 pTexture_50643C->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13011 v0 = &pTextures_tabs[0][0].pName[4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13012 v1 = pTextures_5064A0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13013 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13014 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13015 (*v1)->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13016 v2 = (Texture *)*((int *)v0 - 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13017 *v1 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13018 v2->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13019 v3 = *(Texture **)v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13020 *((int *)v0 - 1) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13021 v3->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13022 *(int *)v0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13023 ++v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13024 v0 += 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13025 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13026 while ( (signed int)v1 < (signed int)&pTextures_5064A0[9] );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13027 pAudioPlayer->PlaySound((SoundID)231, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13028 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13029 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13030
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13031
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13032 //----- (00411597) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13033 void __cdecl OnCloseSpellook()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13034 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13035 pAllocator->FreeChunk(pSpellFont);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13036 pSpellFont = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13037 pAllocator->FreeChunk(pBookFont);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13038 pBookFont = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13039 pAllocator->FreeChunk(pBook2Font);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13040 pBook2Font = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13041 pAllocator->FreeChunk(pAutonoteFont);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13042 pAutonoteFont = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13043 pTexture_mapbordr->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13044 pAudioPlayer->PlaySound((SoundID)231, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13045 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13046 dword_506364 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13047 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13048 // 506364: using guessed type int dword_506364;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13049
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13050
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13051
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13052
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13053
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13054
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13055
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13056 //----- (00412AF9) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13057 void __cdecl sub_412AF9()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13058 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13059 int v0; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13060
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13061 v0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13062 if ( uActiveCharacter )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13063 v0 = *((char *)&pParty->pPartyBuffs[5].uExpireTime + 6972 * uActiveCharacter + 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13064 pRenderer->DrawTextureIndexed(8u, 8u, pTextures_5064A0[v0]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13065 pRenderer->DrawTextureIndexed(0x1DCu, 0x1C2u, pTexture_50643C);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13066 pRenderer->DrawTextureIndexed(0x231u, 0x1C2u, pTexture_506448);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13067 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13068
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13069 //----- (00412B58) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13070 void __cdecl sub_412B58()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13071 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13072 Player *v0; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13073 int v1; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13074 unsigned int v2; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13075 Texture *v3; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13076 int v4; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13077 Texture *v5; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13078 Texture *v6; // edx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13079 int v7; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13080 int v8; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13081 POINT *v9; // esi@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13082 int v10; // eax@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13083 Texture *v11; // edx@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13084 int v12; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13085 signed int v13; // ecx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13086 unsigned int v14; // esi@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13087 unsigned int v15; // edi@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13088 Texture *v16; // eax@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13089 unsigned int v17; // [sp-Ch] [bp-2Ch]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13090 unsigned int v18; // [sp-Ch] [bp-2Ch]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13091 unsigned int v19; // [sp-8h] [bp-28h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13092 unsigned int v20; // [sp-8h] [bp-28h]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13093 Texture *v21; // [sp-4h] [bp-24h]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13094 signed int v22; // [sp-4h] [bp-24h]@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13095 int v23[2]; // [sp+10h] [bp-10h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13096 POINT a2; // [sp+18h] [bp-8h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13097
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13098 sub_412AF9();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13099 v0 = pPlayers[uActiveCharacter];
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
13100 v1 = 11 * v0->pNumSpellBookPage;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13101 v2 = pIcons_LOD->FindTextureByName("Pending");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13102 v3 = (Texture *)(v2 != -1 ? (int)&pIcons_LOD->pTextures[v2] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13103 pRenderer->ClearZBuffer(0, 479);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13104 v4 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13105 if ( __OFSUB__(v1, v1 + 11) ^ 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13106 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13107 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13108 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13109 if ( *(&v0->field_152[v1 + 63] + v4) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13110 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13111 v5 = (Texture *)dword_506408[v4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13112 if ( v5 != v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13113 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13114 if ( dword_50654C == v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13115 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13116 v6 = dword_5063D8[v4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13117 v23[0] = (int)dword_5063D8[v4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13118 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13119 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13120 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13121 v23[0] = dword_506408[v4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13122 v6 = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13123 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13124 if ( v6->pLevelOfDetail0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13125 {
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
13126 v7 = 2 * (12 * v0->pNumSpellBookPage + (unsigned __int8)*(&byte_4E2430[12 * v0->pNumSpellBookPage + v4]));
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13127 v19 = pViewport->uViewportY + dword_4E20D0[v7 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13128 v17 = pViewport->uViewportX + dword_4E20D0[v7];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13129 if ( BYTE1(v6->pBits) & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13130 pRenderer->DrawTextureTransparent(v17, v19, v6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13131 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13132 pRenderer->DrawTextureIndexed(v17, v19, v6);
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
13133 v8 = 2 * (12 * v0->pNumSpellBookPage + (unsigned __int8)*(&byte_4E2430[12 * v0->pNumSpellBookPage] + v4));
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13134 pRenderer->_4A612A(dword_4E20D0[v8], dword_4E20D0[v8 + 1], (Texture *)v23[0], v4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13135 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13136 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13137 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13138 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13139 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13140 while ( v4 + v1 - 1 < v1 + 11 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13141 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13142 v9 = pMouse->GetCursorPos(&a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13143 v10 = pRenderer->pActiveZBuffer[v9->x + pSRZBufferLineOffsets[pMouse->GetCursorPos((POINT *)v23)->y]] & 0xFFFF;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13144 if ( v10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13145 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13146 v11 = dword_5063D8[v10];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13147 if ( v11->pLevelOfDetail0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13148 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13149 v21 = dword_5063D8[v10];
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
13150 v12 = 2 * (12 * v0->pNumSpellBookPage + (unsigned __int8)*(&byte_4E2430[12 * v0->pNumSpellBookPage] + v10));
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13151 v20 = pViewport->uViewportY + dword_4E20D0[v12 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13152 v18 = pViewport->uViewportX + dword_4E20D0[v12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13153 if ( BYTE1(v11->pBits) & 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13154 pRenderer->DrawTextureTransparent(v18, v20, v21);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13155 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13156 pRenderer->DrawTextureIndexed(v18, v20, v21);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13157 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13158 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13159 v13 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13160 a2.x = (LONG)&v0->pActiveSkills[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13161 v14 = (unsigned int)&v0->pActiveSkills[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13162 v15 = (unsigned int)&v0->pActiveSkills[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13163 v23[0] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13164 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13165 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13166 if ( *(short *)a2.x )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13167 {
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
13168 if ( v0->pNumSpellBookPage == v13 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13169 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13170 v16 = *(Texture **)&pTextures_tabs[0][0].pName[8 * v13 + 4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13171 switch ( v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13172 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13173 case 0:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13174 v14 = 406;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13175 v22 = 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13176 goto LABEL_27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13177 case 1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13178 v14 = 406;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13179 goto LABEL_38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13180 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13181 v14 = 406;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13182 v22 = 84;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13183 goto LABEL_27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13184 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13185 v14 = 406;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13186 goto LABEL_26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13187 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13188 v14 = 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13189 goto LABEL_29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13190 case 5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13191 v15 = 196;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13192 goto LABEL_34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13193 case 6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13194 v15 = 234;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13195 goto LABEL_34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13196 case 7:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13197 v15 = 272;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13198 goto LABEL_34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13199 case 8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13200 v15 = 309;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13201 LABEL_34:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13202 v14 = 405;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13203 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13204 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13205 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13206 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13207 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13208 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13209 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13210 v16 = *(Texture **)&pTextures_tabs[0][0].pName[8 * v13];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13211 switch ( v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13212 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13213 case 0:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13214 v14 = 415;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13215 v22 = 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13216 goto LABEL_27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13217 case 1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13218 v14 = 415;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13219 LABEL_38:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13220 v22 = 46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13221 goto LABEL_27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13222 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13223 v14 = 415;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13224 v22 = 83;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13225 goto LABEL_27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13226 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13227 v14 = 415;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13228 LABEL_26:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13229 v22 = 121;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13230 LABEL_27:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13231 v15 = v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13232 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13233 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13234 v14 = 415;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13235 LABEL_29:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13236 v15 = 158;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13237 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13238 case 5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13239 v15 = 196;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13240 goto LABEL_46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13241 case 6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13242 v15 = 234;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13243 goto LABEL_46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13244 case 7:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13245 v15 = 271;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13246 goto LABEL_46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13247 case 8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13248 v15 = 307;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13249 LABEL_46:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13250 v14 = 416;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13251 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13252 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13253 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13254 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13255 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13256 pRenderer->DrawTextureTransparent(v14, v15, v16);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13257 v13 = v23[0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13258 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13259 a2.x += 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13260 ++v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13261 v23[0] = v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13262 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13263 while ( v13 < 9 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13264 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13265 // 506408: using guessed type int dword_506408[];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13266 // 50654C: using guessed type int dword_50654C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13267
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13268 //----- (00412E85) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13269 char __cdecl sub_412E85()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13270 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13271 unsigned int v0; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13272 unsigned int v1; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13273 int v2; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13274 const char *v3; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13275 signed int v4; // ecx@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13276 int v5; // ecx@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13277 int v6; // eax@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13278 int v7; // esi@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13279 char *v8; // eax@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13280 int v9; // eax@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13281 unsigned int v11; // [sp-8h] [bp-64h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13282 unsigned int v12; // [sp-8h] [bp-64h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13283 Texture *v13; // [sp-4h] [bp-60h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13284 Texture *v14; // [sp-4h] [bp-60h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13285 GUIWindow a1; // [sp+8h] [bp-54h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13286
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13287 pRenderer->DrawTextureIndexed(pViewport->uViewportX, pViewport->uViewportY, pTextures_5064A0[11]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13288 if ( dword_506548 || !dword_506528 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13289 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13290 v13 = pTex_tab_an_6a__zoom_off;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13291 v11 = pViewport->uViewportY + 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13292 v0 = pViewport->uViewportX + 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13293 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13294 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13295 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13296 v13 = pTex_tab_an_6b__zoom_on;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13297 v11 = pViewport->uViewportY + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13298 v0 = pViewport->uViewportX + 398;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13299 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13300 pRenderer->DrawTextureTransparent(v0, v11, v13);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13301 if ( dword_506544 || dword_506528 + dword_506520 >= dword_506524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13302 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13303 v14 = pTex_tab_an_7a__zoot_off;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13304 v12 = pViewport->uViewportY + 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13305 v1 = pViewport->uViewportX + 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13306 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13307 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13308 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13309 v14 = pTex_tab_an_7b__zoot_on;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13310 v12 = pViewport->uViewportY + 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13311 v1 = pViewport->uViewportX + 398;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13312 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13313 pRenderer->DrawTextureTransparent(v1, v12, v14);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13314 if ( !byte_5C6D50[dword_506528] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13315 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13316 v2 = pStru179->field_0[dword_506528];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13317 a1.uFrameWidth = 460;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13318 a1.uFrameX = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13319 a1.uFrameY = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13320 a1.uFrameHeight = 344;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13321 v3 = (const char *)pStorylineText->field_4[3 * v2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13322 a1.uFrameZ = 467;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13323 a1.uFrameW = 351;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13324 if ( v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13325 a1.DrawText2(pBook2Font, 0, 0x16u, 0, v3, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13326 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13327 a1.uFrameX = 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13328 a1.uFrameY = 70;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13329 a1.uFrameWidth = 360;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13330 a1.uFrameHeight = 264;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13331 v4 = LOBYTE(pAutonoteFont->uFontHeight) - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13332 a1.uFrameZ = 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13333 a1.uFrameHeight = v4 * 264 / v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13334 a1.uFrameW = a1.uFrameHeight + 69;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13335 if ( dword_506544 && dword_506528 + dword_506520 < dword_506524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13336 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13337 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13338 v5 = dword_50651C++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13339 dword_506528 += dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13340 byte_506130[v5] = dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13341 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13342 if ( dword_506548 && dword_50651C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13343 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13344 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13345 --dword_50651C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13346 dword_506528 -= (unsigned __int8)byte_506130[dword_50651C];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13347 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13348 if ( !dword_506520 || dword_506528 < 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13349 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13350 dword_506528 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13351 dword_50651C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13352 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13353 dword_506544 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13354 v6 = pStru179->field_0[dword_506528];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13355 dword_506548 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13356 dword_506520 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13357 v7 = *(&pStorylineText->field_0 + 3 * v6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13358 v8 = sub_495461(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13359 *((char **)&pStorylineText->field_0 + 3 * v6),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13360 uActiveCharacter - 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13361 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13362 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13363 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13364 (__int64 *)&pParty->field_3C.field_440[2 * v6 + 42]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13365 if ( v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13366 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13367 v9 = pAutonoteFont->_44C6C2(v8, &a1, 1u, (unsigned __int8)byte_5C6D50[dword_506528]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13368 LOBYTE(v8) = a1.DrawText(pAutonoteFont, 1, 0, 0, (const char *)v9, 0, a1.uFrameY + a1.uFrameHeight, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13369 ++dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13370 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13371 return (char)v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13372 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13373
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13374
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13375 //----- (00413126) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13376 void __cdecl DrawSpellbook_Quests()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13377 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13378 unsigned int v0; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13379 unsigned int v1; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13380 int v2; // ecx@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13381 int v3; // ebx@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13382 int v4; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13383 const char *v5; // edi@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13384 int v6; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13385 unsigned int v7; // edi@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13386 unsigned int v8; // [sp-8h] [bp-68h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13387 unsigned int v9; // [sp-8h] [bp-68h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13388 Texture *v10; // [sp-4h] [bp-64h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13389 Texture *v11; // [sp-4h] [bp-64h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13390 GUIWindow a1; // [sp+Ch] [bp-54h]@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13391
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13392 pRenderer->DrawTextureIndexed(pViewport->uViewportX, pViewport->uViewportY, pTexture_CurrentBook);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13393 if ( dword_506548 || !dword_506528 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13394 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13395 v10 = pTex_tab_an_6a__zoom_off;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13396 v8 = pViewport->uViewportY + 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13397 v0 = pViewport->uViewportX + 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13398 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13399 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13400 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13401 v10 = pTex_tab_an_6b__zoom_on;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13402 v8 = pViewport->uViewportY + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13403 v0 = pViewport->uViewportX + 398;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13404 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13405 pRenderer->DrawTextureTransparent(v0, v8, v10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13406 if ( dword_506544 || dword_506528 + dword_506520 >= dword_506524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13407 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13408 v11 = pTex_tab_an_7a__zoot_off;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13409 v9 = pViewport->uViewportY + 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13410 v1 = pViewport->uViewportX + 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13411 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13412 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13413 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13414 v11 = pTex_tab_an_7b__zoot_on;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13415 v9 = pViewport->uViewportY + 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13416 v1 = pViewport->uViewportX + 398;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13417 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13418 pRenderer->DrawTextureTransparent(v1, v9, v11);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13419 a1.uFrameWidth = 460;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13420 a1.uFrameHeight = 344;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13421 a1.uFrameX = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13422 a1.uFrameY = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13423 a1.uFrameZ = 467;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13424 a1.uFrameW = 351;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13425 a1.DrawText2(pBook2Font, 0, 0x16u, 0, pGlobalTXT_LocalizationStrings[174], 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13426 a1.uFrameX = 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13427 a1.uFrameY = 70;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13428 a1.uFrameWidth = 360;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13429 a1.uFrameHeight = 264;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13430 a1.uFrameZ = 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13431 a1.uFrameW = 333;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13432 if ( dword_506544 && dword_506528 + dword_506520 < dword_506524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13433 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13434 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13435 v2 = dword_50651C++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13436 dword_506528 += dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13437 byte_506130[v2] = dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13438 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13439 if ( dword_506548 && dword_50651C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13440 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13441 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13442 --dword_50651C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13443 dword_506528 -= (unsigned __int8)byte_506130[dword_50651C];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13444 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13445 if ( !dword_506520 || (v3 = dword_506528, dword_506528 < 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13446 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13447 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13448 dword_50651C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13449 dword_506528 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13450 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13451 dword_506544 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13452 dword_506548 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13453 dword_506520 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13454 while ( v3 < dword_506524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13455 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13456 v4 = pStru179->field_0[v3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13457 ++dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13458 v5 = (&dword_722F10)[4 * v4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13459 a1.DrawText(pAutonoteFont, 1, 0, 0, (&dword_722F10)[4 * v4], 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13460 v6 = pAutonoteFont->CalcTextHeight(v5, &a1, 1, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13461 v7 = a1.uFrameY + v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13462 if ( (signed int)(a1.uFrameY + v6) > (signed int)a1.uFrameHeight )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13463 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13464 pRenderer->DrawTextureTransparent(0x64u, v7 + 12, pTextures_5064A0[10]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13465 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13466 a1.uFrameY = v7 + 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13467 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13468 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13469
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13470
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13471 //----- (0041338E) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13472 void __cdecl DrawSpellbook_Autonotes()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13473 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13474 unsigned int v0; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13475 unsigned int v1; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13476 signed int v2; // ebp@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13477 unsigned int v3; // eax@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13478 unsigned int v4; // eax@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13479 unsigned int v5; // eax@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13480 unsigned int v6; // eax@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13481 unsigned int v7; // eax@42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13482 signed int v8; // ebp@47
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13483 int v9; // eax@52
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13484 int v10; // eax@56
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13485 int v11; // edx@57
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13486 int v12; // ebp@64
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13487 int v13; // eax@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13488 const char *v14; // edi@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13489 int v15; // eax@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13490 unsigned int v16; // edi@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13491 unsigned int v17; // [sp-8h] [bp-70h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13492 unsigned int v18; // [sp-8h] [bp-70h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13493 unsigned int v19; // [sp-8h] [bp-70h]@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13494 unsigned int v20; // [sp-8h] [bp-70h]@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13495 unsigned int v21; // [sp-8h] [bp-70h]@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13496 unsigned int v22; // [sp-8h] [bp-70h]@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13497 unsigned int v23; // [sp-8h] [bp-70h]@42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13498 Texture *v24; // [sp-4h] [bp-6Ch]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13499 Texture *v25; // [sp-4h] [bp-6Ch]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13500 Texture *v26; // [sp-4h] [bp-6Ch]@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13501 Texture *v27; // [sp-4h] [bp-6Ch]@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13502 Texture *v28; // [sp-4h] [bp-6Ch]@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13503 Texture *v29; // [sp-4h] [bp-6Ch]@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13504 Texture *v30; // [sp-4h] [bp-6Ch]@42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13505 signed __int16 v31; // [sp+10h] [bp-58h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13506 char *v32; // [sp+10h] [bp-58h]@49
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13507 GUIWindow a1; // [sp+14h] [bp-54h]@46
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13508
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13509 v31 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13510 pRenderer->DrawTextureIndexed(pViewport->uViewportX, pViewport->uViewportY, pTexture_AutonotesBook);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13511 if ( dword_506548 || !dword_506528 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13512 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13513 v24 = pTex_tab_an_6a__zoom_off;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13514 v17 = pViewport->uViewportY + 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13515 v0 = pViewport->uViewportX + 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13516 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13517 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13518 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13519 v24 = pTex_tab_an_6b__zoom_on;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13520 v17 = pViewport->uViewportY + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13521 v0 = pViewport->uViewportX + 398;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13522 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13523 pRenderer->DrawTextureTransparent(v0, v17, v24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13524 if ( dword_506544 || dword_506528 + dword_506520 >= dword_506524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13525 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13526 v25 = pTex_tab_an_7a__zoot_off;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13527 v18 = pViewport->uViewportY + 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13528 v1 = pViewport->uViewportX + 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13529 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13530 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13531 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13532 v25 = pTex_tab_an_7b__zoot_on;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13533 v18 = pViewport->uViewportY + 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13534 v1 = pViewport->uViewportX + 398;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13535 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13536 pRenderer->DrawTextureTransparent(v1, v18, v25);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13537 if ( !dword_506540 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13538 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13539 if ( dword_506568 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13540 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13541 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13542 pViewport->uViewportX + 408,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13543 pViewport->uViewportY + 113,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13544 pTexture_506390);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13545 v2 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13546 goto LABEL_16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13547 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13548 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13549 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13550 if ( !dword_506568 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13551 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13552 LABEL_14:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13553 v2 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13554 goto LABEL_15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13555 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13556 v2 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13557 v31 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13558 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13559 LABEL_15:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13560 dword_506568 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13561 pRenderer->DrawTextureTransparent(pViewport->uViewportX + 398, pViewport->uViewportY + 113, pTexture_506394);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13562 LABEL_16:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13563 if ( dword_50653C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13564 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13565 if ( dword_506568 != v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13566 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13567 v31 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13568 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13569 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13570 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13571 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13572 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13573 if ( dword_506568 != v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13574 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13575 v26 = pTexture_506388;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13576 v19 = pViewport->uViewportY + 150;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13577 v3 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13578 goto LABEL_22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13579 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13580 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13581 v26 = pTexture_50638C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13582 dword_506568 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13583 v19 = pViewport->uViewportY + 150;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13584 v3 = pViewport->uViewportX + 399;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13585 LABEL_22:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13586 pRenderer->DrawTextureTransparent(v3, v19, v26);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13587 if ( dword_506538 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13588 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13589 if ( dword_506568 != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13590 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13591 v31 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13592 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13593 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13594 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13595 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13596 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13597 if ( dword_506568 != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13598 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13599 v27 = pTexture_506380;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13600 v20 = pViewport->uViewportY + 188;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13601 v4 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13602 goto LABEL_28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13603 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13604 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13605 v27 = pTexture_506384;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13606 dword_506568 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13607 v20 = pViewport->uViewportY + 188;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13608 v4 = pViewport->uViewportX + 397;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13609 LABEL_28:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13610 pRenderer->DrawTextureTransparent(v4, v20, v27);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13611 if ( dword_506534 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13612 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13613 if ( dword_506568 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13614 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13615 v31 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13616 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13617 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13618 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13619 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13620 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13621 if ( dword_506568 != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13622 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13623 v28 = pTexture_506378;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13624 v21 = pViewport->uViewportY + 226;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13625 v5 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13626 goto LABEL_34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13627 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13628 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13629 v28 = pTexture_50637C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13630 dword_506568 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13631 v21 = pViewport->uViewportY + 226;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13632 v5 = pViewport->uViewportX + 397;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13633 LABEL_34:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13634 pRenderer->DrawTextureTransparent(v5, v21, v28);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13635 if ( dword_506530 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13636 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13637 if ( dword_506568 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13638 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13639 v31 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13640 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13641 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13642 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13643 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13644 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13645 if ( dword_506568 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13646 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13647 v29 = pTexture_506370;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13648 v22 = pViewport->uViewportY + 263;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13649 v6 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13650 goto LABEL_40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13651 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13652 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13653 v29 = pTexture_506374;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13654 dword_506568 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13655 v22 = pViewport->uViewportY + 264;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13656 v6 = pViewport->uViewportX + 397;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13657 LABEL_40:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13658 pRenderer->DrawTextureTransparent(v6, v22, v29);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13659 if ( dword_50652C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13660 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13661 if ( dword_506568 != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13662 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13663 v31 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13664 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13665 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13666 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13667 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13668 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13669 if ( dword_506568 != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13670 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13671 v30 = pTexture_506368;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13672 v23 = pViewport->uViewportY + 302;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13673 v7 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13674 goto LABEL_46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13675 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13676 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13677 v30 = pTexture_50636C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13678 dword_506568 = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13679 v23 = pViewport->uViewportY + 302;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13680 v7 = pViewport->uViewportX + 397;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13681 LABEL_46:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13682 pRenderer->DrawTextureTransparent(v7, v23, v30);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13683 a1.uFrameWidth = 460;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13684 a1.uFrameHeight = 344;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13685 a1.uFrameX = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13686 a1.uFrameY = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13687 a1.uFrameZ = 467;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13688 a1.uFrameW = 467;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13689 a1.DrawText2(pBook2Font, 0, 0x16u, 0, pGlobalTXT_LocalizationStrings[154], 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13690 a1.uFrameX = 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13691 a1.uFrameY = 70;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13692 a1.uFrameWidth = 360;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13693 a1.uFrameHeight = 264;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13694 a1.uFrameZ = 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13695 a1.uFrameW = 333;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13696 if ( v31 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13697 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13698 dword_506524 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13699 dword_506528 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13700 dword_50651C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13701 dword_506520 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13702 v8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13703 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13704 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13705 if ( dword_72371C[2 * v8] == dword_506568 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13706 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13707 v32 = (&dword_723718_autonote_related)[8 * (signed __int16)v8];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13708 if ( (short)v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13709 {
26
93bf1d5f6a6d Game loading.
Nomad
parents: 23
diff changeset
13710 if ( (unsigned __int16)_449B57_test_bit(pParty->_autonote_bits, v8) && v32 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13711 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13712 v9 = dword_506520++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13713 pStru179->field_0[v9] = (signed __int16)v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13714 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13715 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13716 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13717 ++v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13718 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13719 while ( v8 < 196 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13720 dword_506524 = dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13721 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13722 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13723 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13724 if ( dword_506544 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13725 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13726 v10 = dword_506520 + dword_506528;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13727 if ( dword_506520 + dword_506528 < dword_506524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13728 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13729 v11 = dword_50651C++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13730 byte_506130[v11] = dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13731 dword_506528 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13732 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13733 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13734 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13735 if ( dword_506548 && dword_50651C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13736 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13737 --dword_50651C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13738 dword_506528 -= (unsigned __int8)byte_506130[dword_50651C];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13739 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13740 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13741 if ( !dword_506520 || dword_506528 < 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13742 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13743 dword_506528 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13744 dword_50651C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13745 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13746 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13747 v12 = dword_506528;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13748 dword_50652C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13749 dword_506544 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13750 dword_506548 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13751 dword_506520 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13752 dword_506530 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13753 dword_506534 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13754 dword_506538 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13755 dword_50653C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13756 dword_506540 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13757 while ( v12 < dword_506524 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13758 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13759 v13 = pStru179->field_0[v12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13760 ++dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13761 v14 = (&dword_723718_autonote_related)[8 * v13];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13762 a1.DrawText(pAutonoteFont, 1, 0, 0, (&dword_723718_autonote_related)[8 * v13], 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13763 v15 = pAutonoteFont->CalcTextHeight(v14, &a1, 1, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13764 v16 = a1.uFrameY + v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13765 if ( (signed int)(a1.uFrameY + v15) > (signed int)a1.uFrameHeight )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13766 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13767 pRenderer->DrawTextureTransparent(0x64u, v16 + 12, pTextures_5064A0[10]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13768 ++v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13769 a1.uFrameY = v16 + 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13770 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13771 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13772
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13773
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13774 //----- (00413980) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13775 char *__cdecl DrawSpellbook_Map()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13776 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13777 unsigned int v0; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13778 unsigned int v1; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13779 unsigned int v2; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13780 unsigned int v3; // eax@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13781 unsigned int v4; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13782 unsigned int v5; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13783 int v6; // eax@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13784 unsigned int v7; // eax@35
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13785 unsigned int v9; // [sp-8h] [bp-E0h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13786 unsigned int v10; // [sp-8h] [bp-E0h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13787 unsigned int v11; // [sp-8h] [bp-E0h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13788 unsigned int v12; // [sp-8h] [bp-E0h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13789 unsigned int v13; // [sp-8h] [bp-E0h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13790 unsigned int v14; // [sp-8h] [bp-E0h]@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13791 Texture *v15; // [sp-4h] [bp-DCh]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13792 Texture *v16; // [sp-4h] [bp-DCh]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13793 Texture *v17; // [sp-4h] [bp-DCh]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13794 Texture *v18; // [sp-4h] [bp-DCh]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13795 Texture *v19; // [sp-4h] [bp-DCh]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13796 Texture *v20; // [sp-4h] [bp-DCh]@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13797 char Str[120]; // [sp+Ch] [bp-CCh]@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13798 GUIWindow v22; // [sp+84h] [bp-54h]@35
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13799
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13800 pRenderer->DrawTextureIndexed(pViewport->uViewportX, pViewport->uViewportY, pTextures_5064A0[12]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13801 if ( dword_506548 || viewparams->field_2C / 128 >= 12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13802 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13803 v15 = pTex_tab_an_6a__zoom_off;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13804 v9 = pViewport->uViewportY + 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13805 v0 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13806 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13807 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13808 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13809 v15 = pTex_tab_an_6b__zoom_on;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13810 v9 = pViewport->uViewportY + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13811 v0 = pViewport->uViewportX + 398;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13812 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13813 pRenderer->DrawTextureTransparent(v0, v9, v15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13814 if ( dword_506544 || viewparams->field_2C / 128 <= 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13815 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13816 v16 = pTex_tab_an_7a__zoot_off;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13817 v10 = pViewport->uViewportY + 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13818 v1 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13819 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13820 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13821 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13822 v16 = pTex_tab_an_7b__zoot_on;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13823 v10 = pViewport->uViewportY + 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13824 v1 = pViewport->uViewportX + 398;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13825 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13826 pRenderer->DrawTextureTransparent(v1, v10, v16);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13827 if ( dword_506540 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13828 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13829 v17 = pTexture_506390;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13830 v11 = pViewport->uViewportY + 113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13831 v2 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13832 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13833 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13834 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13835 v17 = pTexture_506394;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13836 v11 = pViewport->uViewportY + 113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13837 v2 = pViewport->uViewportX + 398;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13838 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13839 pRenderer->DrawTextureTransparent(v2, v11, v17);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13840 if ( dword_50653C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13841 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13842 v18 = pTexture_506388;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13843 v12 = pViewport->uViewportX + 150;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13844 v3 = pViewport->uViewportY + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13845 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13846 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13847 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13848 v18 = pTexture_50638C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13849 v12 = pViewport->uViewportX + 150;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13850 v3 = pViewport->uViewportY + 399;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13851 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13852 pRenderer->DrawTextureTransparent(v3, v12, v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13853 if ( dword_506538 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13854 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13855 v19 = pTexture_506380;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13856 v13 = pViewport->uViewportY + 188;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13857 v4 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13858 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13859 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13860 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13861 v19 = pTexture_506384;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13862 v13 = pViewport->uViewportY + 188;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13863 v4 = pViewport->uViewportX + 397;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13864 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13865 pRenderer->DrawTextureTransparent(v4, v13, v19);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13866 if ( dword_506534 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13867 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13868 v20 = pTexture_506378;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13869 v14 = pViewport->uViewportY + 226;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13870 v5 = pViewport->uViewportX + 408;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13871 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13872 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13873 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13874 v20 = pTexture_50637C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13875 v14 = pViewport->uViewportY + 226;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13876 v5 = pViewport->uViewportX + 397;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13877 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13878 pRenderer->DrawTextureTransparent(v5, v14, v20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13879 if ( dword_506544 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13880 viewparams->_443291();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13881 if ( dword_506548 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13882 viewparams->_443249();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13883 if ( dword_506540 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13884 viewparams->_443219();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13885 if ( dword_50653C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13886 viewparams->_443231();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13887 if ( dword_506538 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13888 viewparams->_44323D();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13889 v6 = dword_506534;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13890 if ( dword_506534 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13891 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13892 viewparams->_443225();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13893 v6 = dword_506534;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13894 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13895 if ( dword_506548 | dword_506544 | dword_506540 | dword_50653C | dword_506538 | v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13896 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13897 dword_506548 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13898 dword_506544 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13899 dword_506534 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13900 dword_506538 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13901 dword_50653C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13902 dword_506540 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13903 DrawSpellbook_Map_sub(0x61u, 0x31u, 0x169u, 313, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13904 pRenderer->DrawTextureTransparent(0x4Bu, 0x16u, pTexture_mapbordr);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13905 v22.uFrameWidth = 460;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13906 v22.uFrameHeight = 344;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13907 v22.uFrameX = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13908 v22.uFrameY = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13909 v22.uFrameZ = 467;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13910 v22.uFrameW = 467;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13911 v7 = pMapStats->GetMapInfo(pCurrentMapName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13912 if ( v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13913 v22.DrawText2(pBook2Font, 0xFFFFFFF2u, 0xCu, 0, pMapStats->pInfos[v7].pName, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13914 v22.uFrameX = 0;
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
13915 sprintfex(Str, pGlobalTXT_LocalizationStrings[659], pParty->vPosition.x, pParty->vPosition.y);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13916 return v22.DrawText2(pFontComic, 0, 0x140u, 0, Str, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13917 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13918
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13919
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13920 //----- (00413CC6) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13921 void __thiscall DrawSpellbook(unsigned int uBook)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13922 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13923 unsigned int v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13924
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13925 v1 = uBook;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13926 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13927 471u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13928 445u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13929 (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13930 switch ( v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13931 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13932 case 0xB1u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13933 DrawLloydBeaconsScreen();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13934 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13935 case 0xC3u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13936 DrawTownPortalScreen();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13937 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13938 case 0xC8u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13939 DrawSpellbook_Quests();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13940 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13941 case 0xC9u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13942 DrawSpellbook_Autonotes();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13943 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13944 case 0xCAu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13945 DrawSpellbook_Map();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13946 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13947 case 0xCBu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13948 DrawSpellbook_Calendar();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13949 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13950 case 0xE0u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13951 sub_412E85();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13952 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13953 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13954 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13955
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13956 //----- (00413D3C) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13957 char *__cdecl GetDayPart()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13958 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13959 if ( pParty->uCurrentHour > 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13960 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13961 if ( pParty->uCurrentHour == 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13962 return pGlobalTXT_LocalizationStrings[55];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13963 if ( pParty->uCurrentHour == 20 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13964 return pGlobalTXT_LocalizationStrings[566];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13965 if ( pParty->uCurrentHour <= 0x14 || pParty->uCurrentHour > 0x17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13966 return pGlobalTXT_LocalizationStrings[56];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13967 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13968 return pGlobalTXT_LocalizationStrings[567];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13969 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13970
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13971 //----- (00413D6F) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13972 char __cdecl DrawSpellbook_Calendar()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13973 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13974 unsigned int v0; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13975 char *v1; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13976 int v2; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13977 char *v3; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13978 GUIWindow a1; // [sp+Ch] [bp-60h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13979 unsigned int v6; // [sp+60h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13980 int v7; // [sp+64h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13981 int a5; // [sp+68h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13982
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13983 v0 = pParty->uCurrentHour;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13984 v6 = pMapStats->GetMapInfo(pCurrentMapName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13985 a5 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0x4Bu, 0x4Bu, 0x4Bu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13986 pRenderer->DrawTextureIndexed(pViewport->uViewportX, pViewport->uViewportY, pTextures_5064A0[13]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13987 v7 = (unsigned __int8)pDayMoonPhase[pParty->uDaysPlayed];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13988 if ( (signed int)v0 <= 12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13989 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13990 if ( !v0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13991 v0 = 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13992 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13993 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13994 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13995 v0 -= 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13996 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13997 a1.uFrameX = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13998 a1.uFrameY = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13999 a1.uFrameWidth = 460;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14000 a1.uFrameHeight = 344;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14001 a1.uFrameZ = 467;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14002 a1.uFrameW = 467;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14003 a1.DrawText2(pBook2Font, 0, 0x16u, 0, pGlobalTXT_LocalizationStrings[186], 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14004 v1 = GetDayPart();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14005 sprintfex(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14006 pTmpBuf,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14007 "%s\t100:\t110%d:%02d %s - %s",
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14008 pGlobalTXT_LocalizationStrings[526],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14009 v0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14010 pParty->uCurrentMinute,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14011 aAMPMNames[v2],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14012 v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14013 a1.DrawText(pBookFont, 70, 55, a5, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14014 sprintfex(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14015 pTmpBuf,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14016 "%s\t100:\t110%d - %s",
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14017 pGlobalTXT_LocalizationStrings[56],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14018 pParty->uDaysPlayed + 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14019 aDayNames[pParty->uDaysPlayed % 7]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14020 a1.DrawText(pBookFont, 70, 2 * LOBYTE(pBookFont->uFontHeight) + 49, a5, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14021 sprintfex(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14022 pTmpBuf,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14023 "%s\t100:\t110%d - %s",
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14024 pGlobalTXT_LocalizationStrings[146],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14025 pParty->uCurrentMonth + 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14026 aMonthNames[pParty->uCurrentMonth]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14027 a1.DrawText(pBookFont, 70, 4 * LOBYTE(pBookFont->uFontHeight) + 43, a5, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14028 sprintfex(pTmpBuf, "%s\t100:\t110%d", pGlobalTXT_LocalizationStrings[245], pParty->uCurrentYear);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14029 a1.DrawText(pBookFont, 70, 6 * LOBYTE(pBookFont->uFontHeight) + 37, a5, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14030 sprintfex(pTmpBuf, "%s\t100:\t110%s", pGlobalTXT_LocalizationStrings[530], aMoonPhaseNames[v7]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14031 a1.DrawText(pBookFont, 70, 8 * LOBYTE(pBookFont->uFontHeight) + 31, a5, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14032 if ( v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14033 v3 = pMapStats->pInfos[v6].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14034 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14035 v3 = "Unknown";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14036 sprintfex(pTmpBuf, "%s\t100:\t110%s", pGlobalTXT_LocalizationStrings[531], v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14037 return a1.DrawText(pBookFont, 70, 10 * LOBYTE(pBookFont->uFontHeight) + 25, a5, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14038 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14039
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14040 //----- (00413FF1) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14041 void __cdecl SetMonthNames()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14042 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14043 aMonthNames[0] = pGlobalTXT_LocalizationStrings[415];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14044 aMonthNames[1] = pGlobalTXT_LocalizationStrings[416];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14045 aMonthNames[2] = pGlobalTXT_LocalizationStrings[417];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14046 aMonthNames[3] = pGlobalTXT_LocalizationStrings[418];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14047 aMonthNames[4] = pGlobalTXT_LocalizationStrings[419];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14048 aMonthNames[5] = pGlobalTXT_LocalizationStrings[420];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14049 aMonthNames[6] = pGlobalTXT_LocalizationStrings[421];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14050 aMonthNames[7] = pGlobalTXT_LocalizationStrings[422];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14051 aMonthNames[8] = pGlobalTXT_LocalizationStrings[423];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14052 aMonthNames[9] = pGlobalTXT_LocalizationStrings[424];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14053 aMonthNames[10] = pGlobalTXT_LocalizationStrings[425];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14054 aMonthNames[11] = pGlobalTXT_LocalizationStrings[426];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14055 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14056
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14057 //----- (0041406F) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14058 void __cdecl SetDayNames()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14059 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14060 aDayNames[0] = pGlobalTXT_LocalizationStrings[145];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14061 aDayNames[1] = pGlobalTXT_LocalizationStrings[230];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14062 aDayNames[2] = pGlobalTXT_LocalizationStrings[243];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14063 aDayNames[3] = pGlobalTXT_LocalizationStrings[227];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14064 aDayNames[4] = pGlobalTXT_LocalizationStrings[91];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14065 aDayNames[5] = pGlobalTXT_LocalizationStrings[188];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14066 aDayNames[6] = pGlobalTXT_LocalizationStrings[222];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14067 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14068
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14069 //----- (004140BB) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14070 void __cdecl SetSpellSchoolNames()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14071 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14072 aSpellSchoolNames[0] = pGlobalTXT_LocalizationStrings[87];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14073 aSpellSchoolNames[1] = pGlobalTXT_LocalizationStrings[6];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14074 aSpellSchoolNames[2] = pGlobalTXT_LocalizationStrings[240];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14075 aSpellSchoolNames[3] = pGlobalTXT_LocalizationStrings[70];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14076 aSpellSchoolNames[4] = pGlobalTXT_LocalizationStrings[214];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14077 aSpellSchoolNames[5] = pGlobalTXT_LocalizationStrings[142];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14078 aSpellSchoolNames[6] = pGlobalTXT_LocalizationStrings[29];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14079 aSpellSchoolNames[7] = pGlobalTXT_LocalizationStrings[133];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14080 aSpellSchoolNames[8] = pGlobalTXT_LocalizationStrings[54];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14081 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14082
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14083 //----- (0041411B) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14084 void __cdecl SetAttributeNames()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14085 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14086 aAttributeNames[0] = pGlobalTXT_LocalizationStrings[144];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14087 aAttributeNames[1] = pGlobalTXT_LocalizationStrings[116];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14088 aAttributeNames[2] = pGlobalTXT_LocalizationStrings[163];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14089 aAttributeNames[3] = pGlobalTXT_LocalizationStrings[75];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14090 aAttributeNames[4] = pGlobalTXT_LocalizationStrings[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14091 aAttributeNames[5] = pGlobalTXT_LocalizationStrings[211];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14092 aAttributeNames[6] = pGlobalTXT_LocalizationStrings[136];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14093 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14094
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14095 //----- (00414162) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14096 void __cdecl uGameUIFontMain_initialize()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14097 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14098 uGameUIFontMain = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xAu, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14099 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14100
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14101 //----- (00414174) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14102 void __cdecl uGameUIFontShadow_initialize()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14103 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14104 uGameUIFontShadow = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE6u, 214u, 193u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14105 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14107
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14108
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14109
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14110
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14111 //----- (004141CA) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14112 GUIWindow *__fastcall ModalWindow(const char *pStr, int a4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14113 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14114 const char *v2; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14115 int v3; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14116 GUIWindow *result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14117
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14118 v2 = pStr;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14119 v3 = a4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14120 pEventTimer->Pause();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14121 dword_506F0C[0] = pCurrentScreen;
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
14122 result = GUIWindow::Create(0, 0, 640, 480, WINDOW_FinalWindow, v3, (int)v2);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14123 ptr_507BDC = result;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14124 pCurrentScreen = 22;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14125 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14126 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14127 // 4E28F8: using guessed type int pCurrentScreen;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14128
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14129 //----- (0041420D) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14130 void __cdecl sub_41420D_press_esc()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14131 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14132 GUIWindow v0; // [sp+4h] [bp-54h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14133
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14134 sprintfex(pTmpBuf2, "%s\n \n%s", ptr_507BDC->Hint, pGlobalTXT_LocalizationStrings[61]);// Press Escape
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14135 v0.Hint = pTmpBuf2;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14136 v0.uFrameWidth = 400;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14137 v0.uFrameHeight = 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14138 v0.uFrameX = 120;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14139 v0.uFrameY = 140;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14140 v0.uFrameZ = 519;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14141 v0.uFrameW = 239;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14142 v0.DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14143 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14144
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14145 //----- (0041426F) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14146 void __cdecl sub_41426F()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14147 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14148 GUIWindow *v0; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14149
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14150 v0 = ptr_507BDC;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14151 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14152 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14153 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)(int)ptr_507BDC->ptr_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14154 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14155 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14156 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14157 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14158 v0->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14159 ptr_507BDC = 0;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14160 pCurrentScreen = dword_506F0C[0];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14161 pEventTimer->Resume();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14162 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14163 // 4E28F8: using guessed type int pCurrentScreen;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14164
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14165 //----- (004142D3) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14166 char __cdecl GameMenuUI_DrawKeyBindings()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14167 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14168 unsigned int v0; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14169 int v1; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14170 unsigned int v2; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14171 GUIWindow *v3; // edx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14172 signed int v4; // ecx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14173 signed int v5; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14174 const char *v6; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14175 unsigned int v7; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14176 const char *v8; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14177 unsigned int v9; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14178 const char *v10; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14179 unsigned int v11; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14180 const char *v12; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14181 unsigned int v13; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14182 const char *v14; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14183 unsigned int v15; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14184 const char *v16; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14185 unsigned int v17; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14186 const char *v18; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14187 unsigned int v19; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14188 const char *v20; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14189 unsigned int v21; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14190 signed int v22; // ebp@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14191 const char *v23; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14192 unsigned int v24; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14193 const char *v25; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14194 unsigned int v26; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14195 const char *v27; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14196 unsigned int v28; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14197 const char *v29; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14198 unsigned int v30; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14199 const char *v31; // ST0C_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14200 unsigned int v32; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14201 const char *v33; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14202 unsigned int v34; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14203 const char *v35; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14204 unsigned int v36; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14205 const char *v37; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14206 unsigned int v38; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14207 const char *v39; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14208 unsigned int v40; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14209 const char *v41; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14210 unsigned int v42; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14211 const char *v43; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14212 unsigned int v44; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14213 const char *v45; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14214 unsigned int v46; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14215 const char *v47; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14216 unsigned int v48; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14217 const char *v49; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14218 unsigned int v50; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14219 const char *v51; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14220 unsigned int v52; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14221 const char *v53; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14222 unsigned int v54; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14223 const char *v55; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14224 unsigned int v56; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14225 const char *v57; // ST0C_4@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14226 unsigned int v58; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14227 unsigned int v59; // eax@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14228 int v61; // [sp-14h] [bp-28h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14229 const char *v62; // [sp-10h] [bp-24h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14230 int v63; // [sp-Ch] [bp-20h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14231 int v64; // [sp-8h] [bp-1Ch]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14232 unsigned int v65; // [sp-4h] [bp-18h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14233 unsigned int a5; // [sp+10h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14234
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14235 v0 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14236 a5 = v0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14237 if ( byte_4E28FC )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14238 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14239 v1 = dword_507C0C + 15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14240 dword_507C0C = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14241 if ( v1 == 255 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14242 byte_4E28FC = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14243 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14244 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14245 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14246 v1 = dword_507C0C - 15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14247 dword_507C0C = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14248 if ( v1 == 15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14249 byte_4E28FC = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14250 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14251 v2 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(v1, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14252 v3 = pGUIWindow_CurrentMenu;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14253 dword_507C08 = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14254 if ( pGUIWindow_CurrentMenu->field_40 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14255 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14256 pPrevVirtualCidesMapping[dword_506E68] = pKeyActionMap->pPressedKeysBuffer[0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14257 memset(word_506E6C, 0, 0x1Cu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14258 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14259 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14260 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14261 v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14262 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14263 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14264 if ( v4 != v5 && pPrevVirtualCidesMapping[v4] == pPrevVirtualCidesMapping[v5] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14265 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14266 *((char *)word_506E6C + v4) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14267 *((char *)word_506E6C + v5) = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14268 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14269 ++v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14270 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14271 while ( v5 < 28 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14272 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14273 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14274 while ( v4 < 28 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14275 dword_506E68 = -1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14276 v3->field_40 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14277 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14278 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14279 8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14280 8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14281 (Texture *)(uTextureID_507BF4 != -1 ? &pIcons_LOD->pTextures[uTextureID_507BF4] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14282 if ( dword_506F08 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14283 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14284 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14285 0x13u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14286 0x12Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14287 (Texture *)(uTextureID_507C00 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C00] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14288 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, v0, ascii_4E2D5C, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14289 v6 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[0]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14290 v7 = sub_414D24(0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14291 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 142, v7, v6, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14292 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, v0, ascii_4E2D50, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14293 v8 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[1]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14294 v9 = sub_414D24(1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14295 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 163, v9, v8, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14296 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, v0, ascii_4E2D48, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14297 v10 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[2]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14298 v11 = sub_414D24(2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14299 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 184, v11, v10, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14300 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, v0, ascii_4E2D40, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14301 v12 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[3]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14302 v13 = sub_414D24(3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14303 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 205, v13, v12, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14304 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, v0, ascii_4E2D38, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14305 v14 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[4]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14306 v15 = sub_414D24(4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14307 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 226, v15, v14, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14308 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, v0, ascii_4E2D30, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14309 v16 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[5]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14310 v17 = sub_414D24(5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14311 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 247, v17, v16, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14312 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, v0, ascii_4E2D28, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14313 v18 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[6]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14314 v19 = sub_414D24(6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14315 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 268, v19, v18, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14316 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, v0, ascii_4E2D1C, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14317 v20 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[7]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14318 v21 = sub_414D24(7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14319 v22 = 350;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14320 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 142, v21, v20, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14321 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, a5, ascii_4E2D14, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14322 v23 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[8]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14323 v24 = sub_414D24(8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14324 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 163, v24, v23, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14325 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, a5, ascii_4E2D0C, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14326 v25 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[9]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14327 v26 = sub_414D24(9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14328 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 184, v26, v25, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14329 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, a5, ascii_4E2D04, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14330 v27 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[10]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14331 v28 = sub_414D24(10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14332 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 205, v28, v27, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14333 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, a5, ascii_4E2CFC, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14334 v29 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[11]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14335 v30 = sub_414D24(11);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14336 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 226, v30, v29, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14337 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, a5, ascii_4E2CF0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14338 v31 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[12]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14339 v32 = sub_414D24(12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14340 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 247, v32, v31, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14341 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, a5, ascii_4E2CE8, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14342 v65 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14343 v64 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14344 v63 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14345 v62 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[13]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14346 v61 = 13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14347 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14348 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14349 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14350 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14351 0x7Fu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14352 0x12Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14353 (Texture *)(uTextureID_507C04 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C04] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14354 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 142, v0, ascii_4E2CDC, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14355 v33 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[14]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14356 v34 = sub_414D24(14);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14357 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 142, v34, v33, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14358 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 163, v0, ascii_4E2CD4, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14359 v35 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[15]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14360 v36 = sub_414D24(15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14361 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 163, v36, v35, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14362 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 184, v0, ascii_4E2CC8, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14363 v37 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[16]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14364 v38 = sub_414D24(16);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14365 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 184, v38, v37, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14366 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 205, v0, ascii_4E2CBC, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14367 v39 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[17]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14368 v40 = sub_414D24(17);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14369 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 205, v40, v39, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14370 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 226, v0, ascii_4E2CB0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14371 v41 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[18]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14372 v42 = sub_414D24(18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14373 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 226, v42, v41, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14374 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 247, v0, ascii_4E2CA4, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14375 v43 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[19]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14376 v44 = sub_414D24(19);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14377 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 247, v44, v43, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14378 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 23, 268, v0, ascii_4E2C9C, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14379 v45 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[20]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14380 v46 = sub_414D24(20);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14381 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 127, 268, v46, v45, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14382 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 142, v0, ascii_4E2C90, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14383 v47 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[21]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14384 v48 = sub_414D24(21);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14385 v22 = 350;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14386 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 142, v48, v47, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14387 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 163, a5, ascii_4E2C84, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14388 v49 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[22]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14389 v50 = sub_414D24(22);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14390 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 163, v50, v49, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14391 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 184, a5, ascii_4E2C7C, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14392 v51 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[23]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14393 v52 = sub_414D24(23);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14394 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 184, v52, v51, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14395 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 205, a5, ascii_4E2C70, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14396 v53 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[24]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14397 v54 = sub_414D24(24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14398 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 205, v54, v53, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14399 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 226, a5, ascii_4E2C68, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14400 v55 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[25]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14401 v56 = sub_414D24(25);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14402 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 226, v56, v55, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14403 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 247, a5, ascii_4E2C5C, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14404 v57 = pKeyActionMap->GetVKeyDisplayName(pPrevVirtualCidesMapping[26]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14405 v58 = sub_414D24(26);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14406 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 350, 247, v58, v57, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14407 pGUIWindow_CurrentMenu->DrawText(pFontLucida, 247, 268, a5, ascii_4E2C54, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14408 v65 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14409 v64 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14410 v63 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14411 v62 = pKeyActionMap->GetVKeyDisplayName(pWindowList_at_506F50_minus1_indexing[0]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14412 v61 = 27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14413 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14414 v59 = sub_414D24(v61);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14415 return pGUIWindow_CurrentMenu->DrawText(pFontLucida, v22, 268, v59, v62, v63, v64, v65);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14416 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14417
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14418
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14419 //----- (00414D24) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14420 unsigned int __thiscall sub_414D24(int _this)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14421 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14422 int v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14423 unsigned int v2; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14424 unsigned int v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14425 unsigned int result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14426
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14427 v1 = _this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14428 v2 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE1u, 0xCDu, 0x23u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14429 v3 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFu, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14430 result = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14431 if ( dword_506E68 == v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14432 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14433 if ( GetTickCount() % 0x3E8 <= 0x1F4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14434 result = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14435 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14436 result = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14437 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14438 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14439 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14440 if ( *((char *)word_506E6C + v1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14441 result = dword_507C08;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14442 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14443 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14444 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14445 // 506E68: using guessed type int dword_506E68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14446 // 506E6C: using guessed type __int16 word_506E6C[18];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14447 // 507C08: using guessed type int dword_507C08;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14448
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14449 //----- (00414D9A) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14450 void __cdecl GameMenuUI_DrawVideoOptions()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14451 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14452 const char *v0; // ST0C_4@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14453 unsigned __int16 v1; // ax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14454 int v2; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14455 GUIWindow v3; // [sp+8h] [bp-54h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14456
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14457 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14458 8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14459 8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14460 (Texture *)(uTextureID_507C10 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C10] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14461 if ( !pRenderer->bWindowMode && GammaController::IsGammaSupported() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14462 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14463 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14464 17 * uGammaPos + 42,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14465 162u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14466 (Texture *)(pTextureIDs_GammaPositions[uGammaPos] != -1 ? &pIcons_LOD->pTextures[pTextureIDs_GammaPositions[uGammaPos]] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14467 pRenderer->DrawTextureRGB(0x112u, 0xA9u, &stru_506E40);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14468 v3.uFrameX = 22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14469 v0 = pGlobalTXT_LocalizationStrings[226];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14470 v3.uFrameY = 190;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14471 v3.uFrameWidth = 211;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14472 v3.uFrameHeight = 79;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14473 v3.uFrameZ = 232;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14474 v3.uFrameW = 268;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14475 v1 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14476 v3.DrawText2(pFontSmallnum, 0, 0, v1, v0, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14477 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14478 if ( !pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14479 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14480 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14481 0x14u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14482 0x119u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14483 (Texture *)(uTextureID_507C50 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C50] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14484 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14485 0x14u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14486 0x12Fu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14487 (Texture *)(uTextureID_507C54 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C54] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14488 v2 = uTextureID_507C58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14489 goto LABEL_12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14490 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14491 if ( pGame->uFlags2 & 0x20 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14492 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14493 0x14u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14494 0x119u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14495 (Texture *)(uTextureID_507C14 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C14] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14496 if ( pRenderer->bUseColoredLights )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14497 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14498 0x14u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14499 0x12Fu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14500 (Texture *)(uTextureID_507C18 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C18] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14501 if ( pRenderer->bTinting )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14502 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14503 v2 = uTextureID_507C1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14504 LABEL_12:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14505 pRenderer->DrawTextureIndexed(0x14u, 0x145u, (Texture *)(v2 != -1 ? &pIcons_LOD->pTextures[v2] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14506 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14507 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14508
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14509
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14510
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14511 //----- (00414F82) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14512 void __cdecl sub_414F82_DrawGameOptions()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14513 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14514 signed int v0; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14515
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14516 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14517 8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14518 8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14519 (Texture *)(uTextureID_507944 != -1 ? &pIcons_LOD->pTextures[uTextureID_507944] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14520 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14521 8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14522 0x84u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14523 (Texture *)(uTextureID_507C60 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C60] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14524 v0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14525 if ( uTurnSpeed == 128 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14526 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14527 v0 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14528 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14529 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14530 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14531 if ( uTurnSpeed == 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14532 v0 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14533 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14534 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14535 dword_4E2910[v0],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14536 0x10Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14537 (Texture *)(uTextureID_507C64[v0] != -1 ? &pIcons_LOD->pTextures[uTextureID_507C64[v0]] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14538 if ( bWalkSound )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14539 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14540 0x14u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14541 0x12Fu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14542 (Texture *)(uTextureID_507CB4 != -1 ? &pIcons_LOD->pTextures[uTextureID_507CB4] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14543 if ( bShowDamage )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14544 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14545 0x80u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14546 0x12Fu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14547 (Texture *)(uTextureID_507CB8 != -1 ? &pIcons_LOD->pTextures[uTextureID_507CB8] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14548 if ( bFlipOnExit )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14549 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14550 0x80u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14551 0x145u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14552 (Texture *)(uTextureID_507C84 != -1 ? &pIcons_LOD->pTextures[uTextureID_507C84] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14553 if ( bAlwaysRun )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14554 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14555 0x14u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14556 0x145u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14557 (Texture *)(uTextureID_507CB0 != -1 ? &pIcons_LOD->pTextures[uTextureID_507CB0] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14558 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14559 17 * (char)uSoundVolumeMultiplier + 265,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14560 0xA2u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14561 (Texture *)(pTextureIDs_SoundLevels[(char)uSoundVolumeMultiplier] != -1 ? &pIcons_LOD->pTextures[pTextureIDs_SoundLevels[(char)uSoundVolumeMultiplier]] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14562 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14563 17 * (char)uMusicVolimeMultiplier + 265,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14564 0xD8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14565 (Texture *)(pTextureIDs_SoundLevels[(char)uMusicVolimeMultiplier] != -1 ? &pIcons_LOD->pTextures[pTextureIDs_SoundLevels[(char)uMusicVolimeMultiplier]] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14566 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14567 17 * (char)uVoicesVolumeMultiplier + 265,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14568 0x10Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14569 (Texture *)(pTextureIDs_SoundLevels[(char)uVoicesVolumeMultiplier] != -1 ? &pIcons_LOD->pTextures[pTextureIDs_SoundLevels[(char)uVoicesVolumeMultiplier]] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14570 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14571
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14572
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14573
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14574
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14575 //----- (004151D9) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14576 void __fastcall DrawPopupWindow(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14577 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14578 unsigned int v4; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14579 Texture *v5; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14580 signed int uTileWidth; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14581 int v7; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14582 int v8; // ecx@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14583 unsigned int v9; // ebx@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14584 int v10; // [sp+10h] [bp-28h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14585 signed int uTileHeight; // [sp+18h] [bp-20h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14586 int v12; // [sp+1Ch] [bp-1Ch]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14587 int v13; // [sp+20h] [bp-18h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14588 int a5; // [sp+24h] [bp-14h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14589 unsigned int a5a; // [sp+24h] [bp-14h]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14590 unsigned int a4; // [sp+28h] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14591 int uNumXTiles; // [sp+2Ch] [bp-Ch]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14592 unsigned int uNumXTilesa; // [sp+2Ch] [bp-Ch]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14593 unsigned int uNumXTilesb; // [sp+2Ch] [bp-Ch]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14594 unsigned int a2a; // [sp+30h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14595 unsigned int v21; // [sp+34h] [bp-4h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14596 unsigned int v22; // [sp+34h] [bp-4h]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14597
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14598 v4 = uY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14599 a2a = uX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14600 a4 = uX + uWidth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14601 pRenderer->Clip(uX, v4, uX + uWidth, v4 + uHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14602 v5 = (Texture *)(uTextureID_Parchment != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Parchment] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14603 uTileWidth = (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureWidth : 24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14604 v13 = (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureWidth : 24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14605 uTileHeight = (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureHeight : 26);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14606 if ( (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureWidth : 24)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14607 && (uTextureID_Parchment != -1 ? pIcons_LOD->pTextures[uTextureID_Parchment].uTextureHeight : 26) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14608 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14609 uNumXTiles = (signed int)uWidth / uTileWidth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14610 if ( (signed int)uWidth % uTileWidth )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14611 ++uNumXTiles;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14612 a5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14613 v21 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14614 v7 = uNumXTiles + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14615 v10 = uNumXTiles + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14616 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14617 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14618 uNumXTilesa = a2a - v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14619 if ( v7 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14620 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14621 v12 = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14622 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14623 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14624 uNumXTilesa += v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14625 pRenderer->DrawTextureIndexed(uNumXTilesa, v21, v5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14626 --v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14627 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14628 while ( v12 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14629 v7 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14630 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14631 v21 += uTileHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14632 v8 = a5++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14633 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14634 while ( v8 < (signed int)uHeight / uTileHeight );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14635 a5a = v4 + uHeight - 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14636 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14637 a2a,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14638 v4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14639 (Texture *)(uTextureID_5076AC != -1 ? &pIcons_LOD->pTextures[uTextureID_5076AC] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14640 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14641 a2a,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14642 a5a,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14643 (Texture *)(uTextureID_5076B4 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076B4] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14644 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14645 a4 - 32,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14646 v4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14647 (Texture *)(uTextureID_5076A8 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076A8] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14648 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14649 a4 - 32,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14650 a5a,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14651 (Texture *)(uTextureID_5076B0 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_5076B0] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14652 uNumXTilesb = a2a + 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14653 v22 = v4 + uHeight - 10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14654 if ( (signed int)uWidth > 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14655 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14656 pRenderer->Clip(a2a + 32, v4, a4 - 32, v4 + uHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14657 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14658 uNumXTilesb,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14659 v4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14660 (Texture *)(uTextureID_507698 != -1 ? &pIcons_LOD->pTextures[uTextureID_507698] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14661 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14662 uNumXTilesb,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14663 v22,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14664 (Texture *)(uTextureID_5076A4 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076A4] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14665 if ( (signed int)uWidth > 512 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14666 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14667 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14668 a2a + 544,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14669 v4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14670 (Texture *)(uTextureID_507698 != -1 ? &pIcons_LOD->pTextures[uTextureID_507698] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14671 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14672 a2a + 544,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14673 v22,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14674 (Texture *)(uTextureID_5076A4 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076A4] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14675 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14676 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14677 v9 = v4 + 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14678 if ( (signed int)uHeight > 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14679 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14680 pRenderer->Clip(a2a, v9, a4, a5a);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14681 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14682 a2a,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14683 v9,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14684 (Texture *)(uTextureID_5076A0 != -1 ? &pIcons_LOD->pTextures[uTextureID_5076A0] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14685 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14686 a4 - 10,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14687 v9,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14688 (Texture *)(uTextureID_50769C != -1 ? &pIcons_LOD->pTextures[uTextureID_50769C] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14689 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14690 pRenderer->ResetClip();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14691 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14692 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14693
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14694
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14695 //----- (00415485) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14696 char *__cdecl DrawCopyrightWindow()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14697 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14698 GUIWindow Dst; // [sp+8h] [bp-54h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14699
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14700 memset(&Dst, 0, 0x54u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14701 Dst.uFrameWidth = 624;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14702 Dst.uFrameHeight = 256;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14703 Dst.uFrameX = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14704 Dst.uFrameY = 30; // c 1999 The 3DO Company.
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14705 Dst.uFrameHeight = pFontSmallnum->CalcTextHeight(pGlobalTXT_LocalizationStrings[157], &Dst, 24, 0)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14706 + 2 * LOBYTE(pFontSmallnum->uFontHeight)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14707 + 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14708 Dst.uFrameY = 470 - Dst.uFrameHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14709 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14710 Dst.uFrameW = 469;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14711 Dst.DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14712 Dst.uFrameWidth -= 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14713 Dst.uFrameX += 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14714 Dst.uFrameY += 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14715 Dst.uFrameHeight -= 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14716 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14717 Dst.uFrameW = Dst.uFrameY + Dst.uFrameHeight - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14718 return Dst.DrawText2(pFontSmallnum, 0, 0xCu, 0, pGlobalTXT_LocalizationStrings[157], 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14719 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14720
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14721
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14722
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14723
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14724 //----- (004156F0) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14725 void __cdecl GUI_UpdateWindows()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14726 {
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14727 GUIWindow *pWindow; // esi@4
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14728 unsigned int pWindowType; // eax@4
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14729 int v2; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14730 int v3; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14731 int v4; // eax@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14732 int v5; // eax@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14733 int v6; // eax@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14734 int v7; // eax@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14735 int v8; // eax@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14736 int v9; // eax@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14737 void *v10; // eax@41
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14738 int v11; // ecx@42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14739 int v12; // eax@48
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14740 int v13; // eax@49
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14741 int v14; // eax@57
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14742 int v15; // eax@58
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14743 int v16; // eax@59
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14744 int v17; // eax@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14745 int v18; // eax@61
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14746 int v19; // eax@62
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14747 void *v20; // ebp@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14748 char *v21; // edx@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14749 GUIButton *v22; // ebp@79
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14750 char *v23; // edx@80
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14751 char v24; // zf@81
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14752 unsigned int v25; // eax@91
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14753 int v26; // eax@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14754 unsigned int v27; // ebp@106
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14755 GUIWindow *v28; // ecx@109
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14756 unsigned int v29; // eax@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14757 GUIFont *v30; // ST1C_4@115
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14758 int v31; // eax@115
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14759 void *v32; // ebp@118
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14760 int v33; // eax@119
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14761 int v34; // eax@120
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14762 int v35; // eax@121
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14763 int v36; // eax@122
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14764 int v37; // eax@123
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14765 int v38; // eax@124
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14766 int v39; // eax@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14767 char *v40; // edx@138
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14768 unsigned int v41; // eax@142
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14769 GUIButton *v42; // ebp@146
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14770 char *v43; // edx@146
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14771 unsigned int v44; // [sp-1Ch] [bp-124h]@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14772 unsigned int v45; // [sp-18h] [bp-120h]@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14773 Texture *v46; // [sp-14h] [bp-11Ch]@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14774 Texture *v47; // [sp-14h] [bp-11Ch]@86
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14775 int i; // [sp+0h] [bp-108h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14776 ItemGen _this; // [sp+4h] [bp-104h]@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14777 GUIButton Dst; // [sp+28h] [bp-E0h]@133
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14778 ItemGen v51; // [sp+E4h] [bp-24h]@129
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14779
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
14780 if (GetCurrentMenuID() != MENU_CREATEPARTY)
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
14781 sub_41CD4F(34);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14782 for ( i = 1; i <= uNumVisibleWindows; ++i )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14783 {
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
14784 //v0 = (GUIWindow *)&pWindowList_at_506F50_minus1_indexing[21 * pVisibleWindowsIdxs[i]];
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14785 pWindow = &pWindowList[pVisibleWindowsIdxs[i] - 1];
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14786 pWindowType = pWindow->eWindowType;
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14787
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14788 switch (pWindow->eWindowType)
3
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
14789 {
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
14790 case WINDOW_MainMenu_Load:
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
14791 GameUI_MainMenu_DrawLoad();
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
14792 continue;
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14793
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14794 case WINDOW_5E: // window that initiates savegame loading
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14795 {
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14796 if (pWindow->Hint != (char *)1)
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14797 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14798 auto v20 = (GUIButton *)pWindow->ptr_1C;
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14799 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, v20->pTextures[0]);
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14800 v21 = pWindow->Hint;
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14801 viewparams->bRedrawGameUI = 1;
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14802 if ( v21 && v21 != (char *)1 )
14
Nomad
parents: 4
diff changeset
14803 v20->DrawLabel(v21, pFontCreate, 0, 0);
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14804 pWindow->Release();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14805 if (pCurrentScreen == 11)
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14806 pMessageQueue_50CBD0->SendMessage(UIMSG_SaveGame, 0, 0);
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14807 else
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14808 pMessageQueue_50CBD0->SendMessage(UIMSG_LoadGame, 0, 0);
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14809 }
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
14810 continue;
3
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
14811 }
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
14812
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
14813
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14814 if ( (signed int)pWindowType > 70 )
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14815 {
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14816 if ( (signed int)pWindowType > 95 )
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14817 {
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14818 v33 = pWindowType - 96;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14819 if ( !v33 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14820 {
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14821 if ( pWindow->Hint != (char *)1 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14822 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14823 v42 = (GUIButton *)pWindow->ptr_1C;
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14824 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, v42->pTextures[0]);
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14825 v43 = pWindow->Hint;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14826 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14827 if ( v43 && v43 != (char *)1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14828 v42->DrawLabel(v43, pFontCreate, 0, 0);
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14829 pWindow->Release();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14830 if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14831 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14832 v41 = pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14833 LABEL_151:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14834 pMessageQueue_50CBD0->pMessages[v41].eType = (UIMessageType)113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14835 LABEL_152:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14836 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14837 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14838 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14839 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14840 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14841 v34 = v33 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14842 if ( v34 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14843 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14844 v35 = v34 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14845 if ( v35 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14846 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14847 v36 = v35 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14848 if ( v36 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14849 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14850 v37 = v36 - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14851 if ( v37 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14852 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14853 v38 = v37 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14854 if ( v38 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14855 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14856 if ( v38 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14857 GameMenuUI_DrawVideoOptions();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14858 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14859 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14860 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14861 GameMenuUI_DrawKeyBindings();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14862 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14863 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14864 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14865 {
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14866 pWindow->DrawMessageBox(0);
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14867 pWindow->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0);
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14868 pWindow->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14869 if ( !pKeyActionMap->field_204 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14870 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14871 v51.Reset();
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14872 pWindow->Release();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14873 pEventTimer->Resume();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14874 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14875 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14876 v39 = atoi((const char *)pKeyActionMap->pPressedKeysBuffer);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14877 if ( v39 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14878 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14879 if ( v39 < 800 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14880 SpawnActor(v39);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14881 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14882 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14883 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14884 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14885 }
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14886 v46 = (Texture *)*((_DWORD *)pWindow->ptr_1C + 15);
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14887 v45 = pWindow->uFrameY;
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14888 v44 = pWindow->uFrameX;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14889 LABEL_18:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14890 pRenderer->DrawTextureIndexed(v44, v45, v46);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14891 LABEL_114:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14892 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14893 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14894 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14895 memset(&Dst, 0, 0xBCu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14896 Dst.uZ = 197;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14897 Dst.uW = 197;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14898 Dst.uX = 27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14899 Dst.uY = 161;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14900 Dst.uWidth = 171;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14901 Dst.uHeight = 37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14902 Dst.pParent = pButton_RestUI_WaitUntilDawn->pParent;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14903 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14904 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, *((Texture **)pWindow->ptr_1C + 15));
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14905 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14906 Dst.DrawLabel(pGlobalTXT_LocalizationStrings[183], pFontCreate, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14907 Dst.pParent = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14908 goto LABEL_134;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14909 }
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14910 if ( pWindow->Hint != (char *)1 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14911 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14912 v32 = pWindow->ptr_1C;
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14913 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, *((Texture **)v32 + 16));
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14914 goto LABEL_138;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14915 }
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14916 if ( pWindowType == 95 )
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14917 {
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14918 if ( pWindow->Hint != (char *)1 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14919 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14920 v32 = pWindow->ptr_1C;
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14921 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, *((Texture **)v32 + 15));
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14922 LABEL_138:
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14923 v40 = pWindow->Hint;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14924 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14925 if ( v40 && v40 != (char *)1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14926 ((GUIButton *)v32)->DrawLabel(v40, pFontCreate, 0, 0);
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14927 pWindow->Release();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14928 LABEL_142:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14929 v41 = pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14930 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14931 goto LABEL_151;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14932 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14933 }
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14934 v14 = pWindowType - 80;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14935 if ( v14 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14936 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14937 v15 = v14 - 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14938 if ( !v15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14939 {
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14940 pWindow->DrawMessageBox(0);
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14941 pWindow->DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0);
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14942 pWindow->DrawText(pFontLucida, 10, 40, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 0, 0, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14943 if ( !pKeyActionMap->field_204 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14944 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14945 _this.Reset();
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14946 pWindow->Release();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14947 pEventTimer->Resume();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
14948 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14949 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14950 v26 = atoi((const char *)pKeyActionMap->pPressedKeysBuffer);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14951 if ( v26 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14952 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14953 if ( v26 < 800 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14954 {
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
14955 _this.uAttributes |= 1u;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14956 _this.uItemID = v26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14957 if ( pItemsTable->pItems[v26].uEquipType == 12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14958 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14959 _this.uNumCharges = rand() % 6 + pItemsTable->pItems[_this.uItemID].uDamageMod + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14960 _this.uMaxCharges = LOBYTE(_this.uNumCharges);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14961 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14962 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14963 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14964 if ( v26 >= 221 && v26 < 271 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14965 _this._bonus_type = rand() % 10 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14966 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14967 pItemsTable->SetSpecialBonus(&_this);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14968 pParty->SetHoldingItem(&_this);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14969 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14970 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14971 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14972 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14973 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14974 v16 = v15 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14975 if ( !v16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14976 {
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14977 if ( pWindow->Hint != (char *)1 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14978 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14979 v22 = (GUIButton *)pWindow->ptr_1C;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14980 if ( (v22->uX & 0x80000000u) == 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14981 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14982 if ( (signed int)v22->uX <= 640 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14983 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14984 v25 = v22->uY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14985 if ( (v25 & 0x80000000u) == 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14986 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14987 if ( (signed int)v25 <= 480 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14988 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14989 v47 = v22->pTextures[0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14990 goto LABEL_94;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14991 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14992 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14993 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14994 }
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
14995 v23 = pWindow->Hint;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14996 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14997 if ( v23 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14998 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14999 v24 = v23 == (char *)1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15000 goto LABEL_82;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15001 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15002 LABEL_134:
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15003 v28 = pWindow;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15004 goto LABEL_110;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15005 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15006 v17 = v16 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15007 if ( !v17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15008 {
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15009 if ( pWindow->Hint != (char *)1 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15010 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15011 v22 = (GUIButton *)pWindow->ptr_1C;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15012 v47 = v22->pTextures[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15013 LABEL_94:
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15014 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, v47);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15015 LABEL_80:
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15016 v23 = pWindow->Hint;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15017 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15018 if ( v23 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15019 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15020 v24 = v23 == (char *)1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15021 LABEL_82:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15022 if ( !v24 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15023 v22->DrawLabel(v23, pFontCreate, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15024 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15025 goto LABEL_134;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15026 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15027 v18 = v17 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15028 if ( !v18 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15029 {
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15030 if ( pWindow->Hint != (char *)1 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15031 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15032 v22 = (GUIButton *)pWindow->ptr_1C;
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15033 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, v22->pTextures[0]);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15034 goto LABEL_80;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15035 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15036 v19 = v18 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15037 if ( !v19 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15038 {
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15039 if ( pWindow->Hint != (char *)1 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15040 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0);
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15041 pRenderer->DrawTextureTransparent(pWindow->uFrameX, pWindow->uFrameY, *((Texture **)pWindow->ptr_1C + 16));
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15042 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15043 goto LABEL_134;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15044 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15045 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15046 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15047 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15048 v27 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15049 if ( ptr_507BD0->field_40 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15050 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15051 ptr_507BD0->DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15052 ptr_507BD0->DrawText(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15053 pFontCreate,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15054 30,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15055 40,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15056 v27,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15057 (const char *)pKeyActionMap->pPressedKeysBuffer,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15058 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15059 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15060 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15061 v30 = pFontCreate;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15062 v31 = pFontCreate->GetLineWidth((const char *)pKeyActionMap->pPressedKeysBuffer);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15063 ptr_507BD0->DrawFlashingInputCursor(v31 + 30, 40, v30);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15064 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15065 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15066 if ( ptr_507BD0->field_40 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15067 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15068 v29 = pMessageQueue_50CBD0->uNumMessages;
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15069 pWindow->field_40 = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15070 if ( (signed int)v29 < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15071 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15072 pMessageQueue_50CBD0->pMessages[v29].eType = (UIMessageType)(int)ptr_507BD0->ptr_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15073 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15074 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15075 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15076 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15077 pEventTimer->Resume();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15078 ptr_507BD0->Release();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15079 pCurrentScreen = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15080 goto LABEL_114;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15081 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15082 if ( ptr_507BD0->field_40 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15083 {
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15084 pWindow->field_40 = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15085 pEventTimer->Resume();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15086 v28 = ptr_507BD0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15087 LABEL_110:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15088 v28->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15089 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15090 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15091 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15092 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15093 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15094 {
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15095 if ( pWindowType == 70 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15096 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15097 sub_41420D_press_esc();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15098 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15099 }
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15100 if ( (signed int)pWindowType > 18 )
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15101 {
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15102 if ( (signed int)pWindowType > 25 )
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15103 {
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15104 v12 = pWindowType - 26;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15105 if ( v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15106 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15107 v13 = v12 - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15108 if ( v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15109 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15110 if ( v13 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15111 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15112 pRenderer->ClearZBuffer(0, 479);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15113 draw_leather();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15114 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15115 CharacterUI_DrawPaperdoll(uActiveCharacter);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15116 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15117 ptr_5076F4->uX,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15118 ptr_5076F4->uY,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15119 (Texture *)(uTextureID_x_x_u != -1 ? &pIcons_LOD->pTextures[uTextureID_x_x_u] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15120 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15121 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15122 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15123 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15124 sub_467FB6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15125 }
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 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15129 TransitionUI_Draw();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15130 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15131 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15132 }
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15133 if ( pWindowType != 25 )
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15134 {
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15135 v7 = pWindowType - 19;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15136 if ( v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15137 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15138 v8 = v7 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15139 if ( v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15140 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15141 v9 = v8 - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15142 if ( v9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15143 {
3
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
15144 //if ( v9 == 1 )
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
15145 // sub_4606F7();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15146 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15147 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15148 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15149 sub_4606FE();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15150 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15151 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15152 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15153 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15154 if ( pCurrentScreen == 10 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15155 {
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15156 Chest::DrawChestUI((unsigned int)pWindow->ptr_1C);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15157 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15158 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15159 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15160 if ( pCurrentScreen == 15 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15161 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15162 pRenderer->ClearZBuffer(0, 479);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15163 draw_leather();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15164 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15165 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15166 ptr_5076F4->uX,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15167 ptr_5076F4->uY,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15168 (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15169 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15170 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15171 }
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 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15175 DrawBranchlessDialogueUI();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15176 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15177 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15178 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15179 pWindowList[pVisibleWindowsIdxs[i] - 1]._4B3157();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15180 if ( !ptr_507BC0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15181 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15182 v10 = ptr_507BC0->ptr_1C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15183 if ( (signed int)v10 >= 53 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15184 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15185 v11 = pParty->field_3C._shop_ban_times[2 * (_DWORD)v10 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15186 if ( !__PAIR__(v11, pParty->field_3C._shop_ban_times[2 * (_DWORD)v10])
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15187 || v11 < SHIDWORD(pParty->uTimePlayed)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15188 || v11 <= SHIDWORD(pParty->uTimePlayed)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15189 && (unsigned int)pParty->field_3C._shop_ban_times[2 * (_DWORD)v10] <= LODWORD(pParty->uTimePlayed) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15190 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15191 if ( (signed int)v10 < 53 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15192 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15193 pParty->field_3C._shop_ban_times[2 * (_DWORD)v10] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15194 pParty->field_3C._shop_ban_times[2 * (_DWORD)v10 + 1] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15195 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15196 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15197 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15198 goto LABEL_142;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15199 }
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15200 if ( pWindowType == 18 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15201 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15202 sub_412B58();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15203 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15204 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15205 {
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15206 if ( (signed int)pWindowType > 10 )
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15207 {
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15208 v5 = pWindowType - 12;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15209 if ( v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15210 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15211 v6 = v5 - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15212 if ( v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15213 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15214 if ( v6 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15215 TravelUI_Draw();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15216 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15217 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15218 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15219 RestUI_Draw();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15220 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15221 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15222 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15223 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15224 QuickRefDraw();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15225 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15226 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15227 }
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15228 if ( pWindowType != 10 )
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15229 {
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15230 v2 = pWindowType - 3;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15231 if ( v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15232 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15233 v3 = v2 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15234 if ( v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15235 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15236 v4 = v3 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15237 if ( v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15238 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15239 if ( v4 == 3 )
66
5ec98919c8fd PlayerCreation 26.10.12
Ritor1
parents: 65
diff changeset
15240 DrawSpellbook((unsigned int)pWindow->ptr_1C);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15241 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15242 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15243 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15244 sub_414F82_DrawGameOptions();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15245 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15246 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15247 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15248 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15249 CharacterUI_CharacterScreen_Draw(uActiveCharacter);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15250 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15251 continue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15252 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15253 v46 = (Texture *)(uTextureID_507944 != -1 ? &pIcons_LOD->pTextures[uTextureID_507944] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15254 v45 = pViewport->uViewportY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15255 v44 = pViewport->uViewportX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15256 goto LABEL_18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15257 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15258 DrawDialogueUI();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15259 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15260 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15261 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15262 if ( GetCurrentMenuID() == -1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15263 GameUI_DrawFoodAndGold();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15264 if ( sub_4637E0_is_there_popup_onscreen() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15265 sub_416D62_ShowPopupWindow_MonsterRecord_ItemInfo_etcsub_416D62(0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15266 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15267
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15268
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15269
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15270
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15271
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15272
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15273
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15274 //----- (00416196) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15275 void __cdecl identify_item()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15276 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15277 Player *v0; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15278 POINT *v1; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15279 signed int v2; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15280 signed int v3; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15281 int v4; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15282 char v5; // sf@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15283 int v6; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15284 int v7; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15285 unsigned __int16 v8; // ax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15286 int v9; // edi@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15287 int v10; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15288 int v11; // edx@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15289 LONG v12; // edx@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15290 signed int v13; // edx@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15291 int v14; // edx@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15292 unsigned int v15; // edi@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15293 signed int v16; // edx@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15294 int v17; // eax@54
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15295 unsigned int v18; // edx@57
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15296 int v19; // eax@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15297 int v20; // edi@67
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15298 int v21; // eax@72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15299 int v22; // ecx@74
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15300 int v23; // edx@78
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15301 int v24; // eax@79
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15302 int v25; // eax@80
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15303 int v26; // eax@84
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15304 ItemGen *v27; // esi@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15305 unsigned int v28; // eax@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15306 ItemGen *v29; // edi@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15307 unsigned int v30; // ecx@103
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15308 double v31; // st7@112
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15309 unsigned __int64 v32; // qax@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15310 unsigned int v33; // ecx@117
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15311 int v34; // eax@126
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15312 unsigned int v35; // ecx@127
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15313 double v36; // st7@132
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15314 signed __int64 v37; // qax@135
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15315 unsigned int v38; // eax@138
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15316 Vec3_int_ v39; // [sp-18h] [bp-A8h]@83
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15317 int *v40; // [sp-Ch] [bp-9Ch]@83
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15318 int *v41; // [sp-8h] [bp-98h]@83
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15319 int *v42; // [sp-4h] [bp-94h]@83
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15320 GUIWindow v43; // [sp+Ch] [bp-84h]@137
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15321 unsigned int pY; // [sp+60h] [bp-30h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15322 int v45; // [sp+64h] [bp-2Ch]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15323 unsigned int pX; // [sp+68h] [bp-28h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15324 int v47; // [sp+6Ch] [bp-24h]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15325 POINT y; // [sp+70h] [bp-20h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15326 POINT a2; // [sp+78h] [bp-18h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15327 Vec3_int_ pOut; // [sp+80h] [bp-10h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15328 unsigned int v51; // [sp+8Ch] [bp-4h]@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15329
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15330 if ( dword_50CDCC )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15331 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15332 v0 = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15333 v1 = pMouse->GetCursorPos(&a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15334 pOut.z = pRenderer->pActiveZBuffer[v1->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&y)->y]] & 0xFFFF;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15335 pMouse->GetClickPos(&pX, &pY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15336 if ( !pOut.z )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15337 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15338 if ( (signed int)pX <= 13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15339 || (signed int)pX >= 462
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15340 || (v2 = pX - 14,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15341 v3 = pY - 17,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15342 pX = v2,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15343 pY = v3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15344 v4 = 14 * (v3 >> 5),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15345 v2 >>= 5,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15346 v5 = v2 + v4 < 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15347 v6 = v2 + v4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15348 pOut.z = v6,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15349 v5)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15350 || v6 > 126
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15351 || (v7 = v0->GetItemIDAtInventoryIndex(&pOut.z)) == 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15352 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15353 pOut.z = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15354 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15355 if ( !v0->CanAct() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15356 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15357 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[427], v0->pName, pGlobalTXT_LocalizationStrings[541]);
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15358 v43.Hint = pTmpBuf;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15359 v43.uFrameWidth = 384;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15360 v43.uFrameHeight = 180;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15361 v43.uFrameY = 40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15362 if ( pMouse->GetCursorPos(&a2)->x <= 320 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15363 v38 = pMouse->GetCursorPos(&a2)->x + 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15364 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15365 v38 = pMouse->GetCursorPos(&a2)->x - 414;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15366 v43.uFrameX = v38;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15367 v43.DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15368 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15369 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15370 --pOut.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15371 LOBYTE(v8) = v0->GetActualSkillLevel(PLAYER_SKILL_ALCHEMY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15372 v9 = v8 & 0x3F;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15373 v45 = v8 & 0x3F;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15374 pOut.y = SkillToMastery(v8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15375 v10 = pOut.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15376 if ( pParty->pPickedItem.uItemID == 220 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15377 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15378 LABEL_116:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15379 GameUI_DrawItemInfo(&v0->pInventoryItems[v10]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15380 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15381 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15382 if ( (signed int)pParty->pPickedItem.uItemID < 200
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15383 || (signed int)pParty->pPickedItem.uItemID > 219
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15384 || (v11 = (int)((char *)v0 + 36 * pOut.z), *(int *)(v11 + 532) != 220) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15385 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15386 if ( (signed int)pParty->pPickedItem.uItemID < 221
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15387 || (signed int)pParty->pPickedItem.uItemID > 271
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15388 || (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
15389 || v13 > 271 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15390 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15391 if ( pParty->pPickedItem.uItemID != 236
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15392 && ((signed int)pParty->pPickedItem.uItemID < 246 || (signed int)pParty->pPickedItem.uItemID > 250)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15393 && pParty->pPickedItem.uItemID != 263
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15394 && pParty->pPickedItem.uItemID != 233 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15395 goto LABEL_116;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15396 v27 = &v0->pInventoryItems[pOut.z];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15397 v28 = v27->uItemID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15398 v51 = pItemsTable->pItems[v27->uItemID].uEquipType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15399 v29 = (ItemGen *)(1800 * pParty->pPickedItem._bonus_type);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15400 if ( pParty->pPickedItem.uItemID != 233 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15401 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15402 if ( pParty->pPickedItem.uItemID == 236 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15403 {
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
15404 v35 = v27->uAttributes;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15405 if ( v35 & 2 || (v51 & 0x80000000u) != 0 || (signed int)v51 > 12 || (signed int)v28 >= 500 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15406 goto LABEL_92;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15407 LOWORD(v35) = v35 | 0x210;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
15408 v27->uAttributes = v35;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15409 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15410 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15411 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15412 if ( (signed int)pParty->pPickedItem.uItemID <= 245 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15413 goto LABEL_92;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15414 if ( (signed int)pParty->pPickedItem.uItemID <= 250 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15415 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15416 v27->UpdateTempBonus(pParty->uTimePlayed);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15417 v33 = v27->uItemID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15418 if ( (signed int)v27->uItemID >= 64 && (signed int)v33 <= 65
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
15419 || (pOut.y = v27->uAttributes, pOut.y & 2)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15420 || v27->uAdditionalValue
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15421 || v27->_bonus_type
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15422 || v51 && v51 != 1 && v51 != 2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15423 || (signed int)v33 >= 500 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15424 goto LABEL_92;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15425 v34 = *(int *)&aSbwb00[4 * pParty->pPickedItem.uItemID + 4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15426 a2.y = (int)v29 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15427 v31 = (double)(signed int)((int)v29 << 7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15428 v27->uAdditionalValue = v34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15429 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15430 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15431 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15432 if ( pParty->pPickedItem.uItemID != 263
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15433 || (v27->UpdateTempBonus(pParty->uTimePlayed), v30 = v27->uItemID, (signed int)v27->uItemID >= 64)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15434 && (signed int)v30 <= 65
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
15435 || (pOut.y = v27->uAttributes, pOut.y & 2)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15436 || v27->uAdditionalValue
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15437 || v27->_bonus_type
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15438 || v51 && v51 != 1 && v51 != 2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15439 || (signed int)v30 >= 500 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15440 goto LABEL_92;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15441 a2.y = (int)v29 << 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15442 v27->uAdditionalValue = 40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15443 v31 = (double)a2.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15444 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15445 v32 = pParty->uTimePlayed + (signed int)(signed __int64)(v31 * 0.033333335);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15446 LODWORD(v27->uExpireTime) = v32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15447 LODWORD(v32) = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15448 LOBYTE(v32) = LOBYTE(pOut.y) | 0x18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15449 HIDWORD(v27->uExpireTime) = HIDWORD(v32);
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
15450 v27->uAttributes = v32;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15451 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15452 dword_50C9A8 = 256;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15453 goto LABEL_92;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15454 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15455 v36 = (70.0 - (double)pParty->pPickedItem._bonus_type) * 0.01;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15456 if ( v36 < 0.0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15457 v36 = 0.0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15458 if ( v51 != 12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15459 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15460 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15461 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15462 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15463 a2.y = v27->uMaxCharges;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15464 v37 = (signed __int64)((double)a2.y - v36 * (double)a2.y);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15465 v27->uMaxCharges = v37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15466 v27->uNumCharges = (unsigned __int8)v37;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15467 goto LABEL_92;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15468 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15469 v14 = v13 - 222;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15470 v15 = pParty->pPickedItem.uItemID - 222;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15471 v47 = v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15472 y.y = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15473 if ( pParty->pPickedItem.uItemID == 221 || v51 == 221 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15474 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15475 v16 = 5;
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 v16 = *(short *)&pItemsTable->field_EDE0[2 * (v14 + 50 * v15) + 388];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15480 v10 = pOut.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15481 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15482 v51 = v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15483 if ( v45 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15484 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15485 if ( v16 < 225 || v16 > 227 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15486 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15487 if ( v16 < 228 || v16 > 239 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15488 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15489 if ( v16 < 240 || v16 > 261 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15490 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15491 if ( v16 >= 262 && pOut.y != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15492 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15493 LABEL_53:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15494 v51 = 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15495 goto LABEL_54;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15496 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15497 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15498 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15499 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15500 if ( pOut.y <= 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15501 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15502 LABEL_38:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15503 v51 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15504 goto LABEL_54;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15505 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15506 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15507 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15508 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15509 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15510 if ( pOut.y == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15511 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15512 LABEL_35:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15513 v51 = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15514 goto LABEL_54;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15515 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15516 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15517 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15518 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15519 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15520 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15521 if ( v16 >= 225 && v16 <= 227 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15522 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15523 v51 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15524 goto LABEL_54;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15525 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15526 if ( v16 >= 228 && v16 <= 239 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15527 goto LABEL_35;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15528 if ( v16 >= 240 && v16 <= 261 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15529 goto LABEL_38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15530 if ( v16 >= 262 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15531 goto LABEL_53;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15532 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15533 LABEL_54:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15534 pOut.y = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15535 pOut.x = v10 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15536 v17 = (int)v0->pInventoryIndices;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15537 while ( *(int *)v17 != pOut.x )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15538 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15539 ++pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15540 v17 += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15541 if ( pOut.y >= 126 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15542 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15543 v18 = y.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15544 goto LABEL_59;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15545 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15546 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15547 v18 = pOut.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15548 LABEL_59:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15549 if ( !v51 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15550 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15551 LABEL_115:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15552 v10 = pOut.z;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15553 goto LABEL_116;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15554 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15555 if ( v51 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15556 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15557 v0->RemoveItemAtInventoryIndex(v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15558 v26 = rand();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15559 v0->ReceiveDamage(v26 % 11 + 10, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15560 pAudioPlayer->PlaySound(SOUND_8, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15561 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15562 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15563 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15564 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15565 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15566 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15567 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15568 v42 = (int *)&a2.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15569 v41 = (int *)&y.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15570 v40 = (int *)&pOut;
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
15571 v39.z = pParty->vPosition.z + pParty->sEyelevel;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15572 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15573 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15574 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15575 if ( v51 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15576 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15577 v0->RemoveItemAtInventoryIndex(v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15578 v25 = rand();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15579 v0->ReceiveDamage(v25 % 71 + 30, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15580 v23 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15581 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15582 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15583 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15584 if ( v51 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15585 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15586 v0->RemoveItemAtInventoryIndex(v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15587 v24 = rand();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15588 v0->ReceiveDamage(v24 % 201 + 50, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15589 v23 = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15590 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15591 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15592 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15593 if ( v51 != 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15594 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15595 if ( v51 != 5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15596 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15597 v19 = v0->AddItem(0xFFFFFFFFu, 0xDCu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15598 if ( v19 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15599 *(int *)&v0->field_1F5[36 * v19 + 15] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15600 v20 = v47 + 50 * v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15601 v0->pInventoryItems[pOut.z].uItemID = v51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15602 v0->pInventoryItems[pOut.z]._bonus_type = (pParty->pPickedItem._bonus_type
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15603 + v0->pInventoryItems[pOut.z]._bonus_type)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15604 / 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15605 v0->SetVariable(VAR_AutoNotes, *(short *)&pItemsTable->field_10168[2 * v20 + 388]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15606 LABEL_74:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15607 v22 = (int)((char *)v0 + 36 * pOut.z);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15608 if ( !BYTE2(pItemsTable->pItems[*(int *)(v22 + 532) + 1].uItemID) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15609 *(int *)(v22 + 552) |= 1u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15610 if ( !dword_4E455C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15611 goto LABEL_92;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15612 v0->PlaySound(16, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15613 goto LABEL_91;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15614 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15615 if ( v45 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15616 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15617 if ( *(int *)(a2.y + 532) == 221 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15618 *(int *)(a2.y + 532) = pParty->pPickedItem.uItemID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15619 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15620 *(int *)(a2.y + 536) = pParty->pPickedItem._bonus_type;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15621 v21 = v0->AddItem(0xFFFFFFFFu, 0xDCu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15622 if ( v21 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15623 *(int *)&v0->field_1F5[36 * v21 + 15] = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15624 goto LABEL_74;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15625 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15626 goto LABEL_115;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15627 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15628 v0->RemoveItemAtInventoryIndex(v18);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15629 v0->SetCondition(0x10u, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15630 v23 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15631 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15632 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15633 v0->_4160CA(v23);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15634 pAudioPlayer->PlaySound(SOUND_8, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15635 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15636 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15637 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15638 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15639 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15640 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15641 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15642 v42 = (int *)&a2.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15643 v41 = (int *)&y.y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15644 v40 = (int *)&pOut;
58
41cbaabde2cb BLV render
Nomad
parents: 52
diff changeset
15645 v39.z = pParty->vPosition.z + pParty->sEyelevel;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15646 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15647 *(_QWORD *)&v39.x = *(_QWORD *)&pParty->vPosition.x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15648 Vec3_int_::Rotate(64, pParty->sRotationY, pParty->sRotationX, v39, v40, v41, v42);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15649 sub_42F7EB_DropItemAt(0x41Bu, pOut.x, y.y, a2.y, 0, 1, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15650 if ( dword_4E455C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15651 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15652 if ( v0->CanAct() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15653 v0->PlaySound(17, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15654 ShowStatusBarString(pGlobalTXT_LocalizationStrings[444], 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15655 LABEL_91:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15656 dword_4E455C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15657 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15658 LABEL_92:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15659 pMouse->RemoveHoldingItem();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15660 dword_50CDCC = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15661 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15662 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15663 *(int *)(v11 + 536) = v9 + pItemsTable->pItems[pParty->pPickedItem.uItemID].uDamageDice;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15664 switch ( pParty->pPickedItem.uItemID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15665 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15666 case 0xC8u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15667 case 0xC9u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15668 case 0xCAu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15669 case 0xCBu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15670 case 0xCCu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15671 v0->pInventoryItems[pOut.z].uItemID = 222;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15672 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15673 case 0xCDu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15674 case 0xCEu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15675 case 0xCFu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15676 case 0xD0u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15677 case 0xD1u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15678 v0->pInventoryItems[pOut.z].uItemID = 223;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15679 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15680 case 0xD2u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15681 case 0xD3u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15682 case 0xD4u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15683 case 0xD5u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15684 case 0xD6u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15685 v0->pInventoryItems[pOut.z].uItemID = 224;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15686 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15687 case 0xD7u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15688 case 0xD8u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15689 case 0xD9u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15690 case 0xDAu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15691 case 0xDBu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15692 v0->pInventoryItems[pOut.z].uItemID = 221;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15693 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15694 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15695 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15696 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15697 pMouse->RemoveHoldingItem();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15698 dword_50CDCC = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15699 if ( dword_4E455C )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15700 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15701 v0->PlaySound(16, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15702 dword_4E455C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15703 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15704 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15705
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15706
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15707 //----- (00416B01) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15708 void __thiscall sub_416B01(void *_this)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15709 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15710 int v1; // edi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15711 int v2; // ecx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15712 NPCData *v3; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15713 NPCData *v4; // esi@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15714 NPCData *v5; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15715 NPCData *v6; // esi@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15716 const CHAR *v7; // eax@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15717 unsigned int v8; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15718 unsigned int v9; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15719 const char *v10; // ST14_4@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15720 char *v11; // esi@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15721 const char *v12; // ST18_4@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15722 unsigned __int16 v13; // ax@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15723 char *v14; // eax@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15724 GUIWindow a1; // [sp+Ch] [bp-60h]@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15725 int a2; // [sp+60h] [bp-Ch]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15726 void *v17; // [sp+64h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15727 LPCSTR lpsz; // [sp+68h] [bp-4h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15728
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15729 v17 = _this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15730 if ( bNoNPCHiring != 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15731 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15732 v1 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15733 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15734 v3 = pParty->pHirelings;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15735 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15736 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15737 if ( v3->pName )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15738 pTmpBuf[v1++] = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15739 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15740 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15741 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15742 while ( (signed int)v3 < (signed int)&pParty->pPickedItem );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15743 lpsz = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15744 if ( (signed int)pNPCStats->uNumNewNPCs > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15745 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15746 v4 = pNPCStats->pNewNPCData;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15747 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15748 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15749 if ( v4->uFlags & 0x80
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15750 && (!pParty->pHirelings[0].pName || strcmp(v4->pName, pParty->pHirelings[0].pName))
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15751 && (!pParty->pHirelings[1].pName || strcmp(v4->pName, pParty->pHirelings[1].pName)) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15752 pTmpBuf[v1++] = (char)lpsz + 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15753 ++lpsz;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15754 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15755 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15756 while ( (signed int)lpsz < (signed int)pNPCStats->uNumNewNPCs );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15757 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15758 if ( (signed int)((char *)v17 + (unsigned __int8)pParty->field_709) < v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15759 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15760 uDialogue_SpeakingActorNPC_ID = -1 - (unsigned __int8)pParty->field_709 - (int)v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15761 v5 = GetNewNPCData(uDialogue_SpeakingActorNPC_ID, (int)&a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15762 v6 = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15763 if ( v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15764 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15765 if ( a2 == 57 )
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
15766 v7 = pNPCTopics[512].pText;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15767 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15768 v7 = (const CHAR *)*(&pNPCStats->field_13A5C + 5 * v5->uProfession);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15769 lpsz = v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15770 if ( !v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15771 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15772 lpsz = (LPCSTR)*(&pNPCStats->field_13A64 + 5 * v6->uProfession);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15773 if ( !lpsz )
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
15774 lpsz = "";
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15775 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15776 a1.Hint = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15777 a1.uFrameX = 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15778 a1.uFrameY = 60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15779 a1.uFrameWidth = 276;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15780 a1.uFrameZ = 313;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15781 a1.uFrameHeight = pFontArrus->CalcTextHeight(lpsz, &a1, 0, 0)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15782 + 2 * LOBYTE(pFontArrus->uFontHeight)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15783 + 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15784 if ( (signed int)a1.uFrameHeight < 130 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15785 a1.uFrameHeight = 130;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15786 a1.uFrameWidth = 400;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15787 a1.uFrameZ = a1.uFrameX + 399;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15788 a1.DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15789 sprintfex(pTmpBuf2, "NPC%03d", v6->uPortraitID);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15790 v8 = pIcons_LOD->LoadTexture(pTmpBuf2, TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15791 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15792 a1.uFrameX + 22,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15793 a1.uFrameY + 36,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15794 (Texture *)(v8 != -1 ? &pIcons_LOD->pTextures[v8] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15795 v9 = v6->uProfession;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15796 if ( v9 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15797 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15798 v10 = v6->pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15799 v11 = pTmpBuf;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15800 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[429], v10, aNPCProfessionNames[v9]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15801 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15802 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15803 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15804 v12 = v6->pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15805 v11 = pTmpBuf;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15806 strcpy(pTmpBuf, v12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15807 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15808 v13 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15809 a1.DrawText2(pFontArrus, 0, 0xCu, v13, v11, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15810 a1.uFrameWidth -= 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15811 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15812 v14 = sub_495461((char *)lpsz, uActiveCharacter - 1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15813 a1.DrawText(pFontArrus, 100, 36, 0, v14, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15814 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15815 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15816 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15817 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15818
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15819
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15820 //----- (00416D62) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15821 void sub_416D62_ShowPopupWindow_MonsterRecord_ItemInfo_etcsub_416D62(Vec2_int_ *_this)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15822 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15823 signed int v1; // eax@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15824 char *v2; // eax@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15825 void *v3; // ecx@52
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15826 unsigned int v4; // eax@59
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15827 int v5; // esi@62
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15828 signed int v6; // esi@64
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15829 signed int v7; // esi@69
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15830 ItemGen *v8; // ecx@70
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15831 unsigned int v9; // eax@72
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15832 unsigned int v10; // eax@76
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15833 char v11; // zf@83
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15834 GUIButton *v12; // esi@84
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15835 unsigned int v13; // ecx@85
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15836 char *v14; // edi@85
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15837 signed int v15; // eax@92
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15838 int v16; // eax@95
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15839 int v17; // eax@96
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15840 enum PLAYER_SKILL_TYPE v18; // eax@98
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15841 char *v19; // eax@99
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15842 unsigned int v20; // eax@108
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15843 unsigned int v21; // eax@109
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15844 const char *v22; // eax@111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15845 char *v23; // ebx@112
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15846 char *v24; // edx@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15847 unsigned int v25; // eax@113
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15848 GUIWindow a1; // [sp+4h] [bp-74h]@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15849 double v27; // [sp+58h] [bp-20h]@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15850 struct tagPOINT Point; // [sp+60h] [bp-18h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15851 char *v29; // [sp+68h] [bp-10h]@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15852 float v30; // [sp+6Ch] [bp-Ch]@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15853 unsigned int pX; // [sp+70h] [bp-8h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15854 unsigned int pY; // [sp+74h] [bp-4h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15855
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15856 if ( pCurrentScreen == 16 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15857 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15858 if ( _this )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15859 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15860 pX = _this->x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15861 pY = _this->y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15862 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15863 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15864 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15865 pMouse->GetClickPos(&pX, &pY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15866 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15867 if ( pRenderer->bWindowMode )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15868 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15869 GetCursorPos(&Point);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15870 ScreenToClient(hWnd, &Point);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15871 if ( Point.x < 1 || Point.y < 1 || Point.x > 638 || Point.y > 478 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15872 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15873 back_to_game();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15874 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15875 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15876 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15877 if ( pParty->pPickedItem.uItemID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15878 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15879 v1 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15880 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15881 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15882 if ( (signed int)pX > word_4E2930[v1]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15883 && (signed int)pX < word_4E2938[v1]
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15884 && (signed int)pY > 375
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15885 && (signed int)pY < 466 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15886 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15887 pPlayers[uActiveCharacter]->UseItem_DrinkPotion_etc(v1 + 1, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15888 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15889 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15890 ++v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15891 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15892 while ( v1 < 4 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15893 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15894 pEventTimer->Pause();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15895 if ( pCurrentScreen <= 10 )
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15896 {
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15897 if ( pCurrentScreen == 10 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15898 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15899 if ( !pPlayers[uActiveCharacter]->CanAct() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15900 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15901 sprintfex(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15902 pTmpBuf,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15903 pGlobalTXT_LocalizationStrings[427],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15904 pPlayers[uActiveCharacter]->pName,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15905 pGlobalTXT_LocalizationStrings[541]);
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15906 a1.Hint = pTmpBuf;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15907 a1.uFrameWidth = 384;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15908 a1.uFrameHeight = 180;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15909 a1.uFrameY = 40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15910 if ( (signed int)pX <= 320 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15911 v10 = pX + 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15912 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15913 v10 = pX - 414;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15914 a1.uFrameX = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15915 goto LABEL_42;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15916 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15917 v9 = pX + pSRZBufferLineOffsets[pY];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15918 if ( !(pRenderer->pActiveZBuffer[v9] & 0xFFFF) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15919 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15920 v8 = (ItemGen *)(&pOtherOverlayList->pOverlays[49].field_4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15921 + 2662 * (unsigned int)ptr_507BB8->ptr_1C
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15922 + 18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15923 * *((short *)&pChests[0].mm7__vector_pItems[139].uExpireTime
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15924 + (pRenderer->pActiveZBuffer[v9] & 0xFFFF)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15925 + 2662 * (unsigned int)ptr_507BB8->ptr_1C
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15926 + 3));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15927 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15928 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15929 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15930 if ( pCurrentScreen )
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15931 {
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15932 if ( pCurrentScreen != 3 )
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15933 {
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15934 if ( pCurrentScreen != 7 )
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15935 {
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15936 if ( pCurrentScreen == 8 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15937 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15938 if ( dword_507B00_spell_info_to_draw_in_popup )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15939 DrawSpellDescriptionPopup((void *)(dword_507B00_spell_info_to_draw_in_popup - 1));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15940 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15941 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15942 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15943 LABEL_119:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15944 if ( (signed int)pX > 467
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15945 && pCurrentScreen != 14 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15946 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15947 LABEL_126:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15948 identify_item();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15949 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15950 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15951 if ( (signed int)pY >= 345 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15952 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15953 if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 100 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15954 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15955 CharacterUI_StatsTab_ShowHint();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15956 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15957 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15958 if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 101 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15959 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15960 CharacterUI_SkillsTab_ShowHint();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15961 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15962 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15963 v11 = pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 103;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15964 LABEL_125:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15965 if ( !v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15966 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15967 goto LABEL_126;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15968 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15969 if ( !dword_506364
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15970 || (signed int)pX < (signed int)pViewport->uViewportX
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15971 || (signed int)pX > (signed int)pViewport->uViewportZ
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15972 || (signed int)pY < (signed int)pViewport->uViewportY
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15973 || (signed int)pY > (signed int)pViewport->uViewportW
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15974 || (v2 = (char *)sub_444564(), (a1.Hint = v2) == 0) )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15975 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15976 v30 = (double)(pFontArrus->GetLineWidth(v2) + 32);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15977 v27 = v30 + 6.7553994e15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15978 v29 = (char *)LODWORD(v27);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15979 a1.uFrameWidth = LODWORD(v27);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15980 a1.uFrameX = pX + 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15981 a1.uFrameY = pY + 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15982 goto LABEL_41;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15983 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15984 if ( (GetCurrentMenuID() & 0x80000000u) == 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15985 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15986 if ( (signed int)pY > (signed int)pViewport->uViewportW )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15987 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15988 a1.ptr_1C = (void *)((signed int)pX / 118);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15989 if ( (signed int)pX / 118 < 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15990 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
15991 a1.Hint = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15992 a1.uFrameWidth = 400;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15993 a1.uFrameHeight = 200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15994 a1.uFrameX = 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15995 a1.uFrameY = 60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15996 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15997 a1._41D3B7();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15998 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15999 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16000 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16001 if ( (signed int)pX > (signed int)pViewport->uViewportZ )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16002 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16003 if ( (signed int)pY >= 130 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16004 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16005 if ( (signed int)pX >= 476 && (signed int)pX <= 636 && (signed int)pY >= 240 && (signed int)pY <= 300 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16006 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16007 a1.Hint = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16008 a1.uFrameWidth = 400;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16009 a1.uFrameHeight = 200;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16010 a1.uFrameX = 38;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16011 a1.uFrameY = 60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16012 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16013 a1._41D73D_draw_buff_tooltip();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16014 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16015 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16016 if ( (signed int)pX < 485 || (signed int)pX > 548 || (signed int)pY < 156 || (signed int)pY > 229 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16017 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16018 if ( (signed int)pX < 566 || (signed int)pX > 629 || (signed int)pY < 156 || (signed int)pY > 229 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16019 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16020 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16021 v3 = (void *)1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16022 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16023 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16024 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16025 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16026 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16027 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16028 sub_416B01(v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16029 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16030 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16031 a1.Hint = _4443D5_GetMinimapRightClickText();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16032 a1.uFrameWidth = 256;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16033 a1.uFrameX = 130;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16034 a1.uFrameY = 140;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16035 LABEL_41:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16036 a1.uFrameHeight = 64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16037 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16038 LABEL_42:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16039 a1.DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16040 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16041 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16042 a1.Hint = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16043 a1.uFrameWidth = 320;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16044 a1.uFrameHeight = 320;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16045 v4 = pX - 350;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16046 if ( (signed int)pX <= 320 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16047 v4 = pX + 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16048 a1.uFrameX = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16049 a1.uFrameY = 40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16050 if ( pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16051 LOWORD(v5) = pGame->pVisInstance->get_picked_object_zbuf_val();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16052 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16053 v5 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16054 v6 = (unsigned __int16)v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16055 if ( (v6 & 7) != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16056 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16057 if ( (v6 & 7) == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16058 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16059 if ( pRenderer->uNumSceneBegins )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16060 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16061 a1.DrawMessageBox(1);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16062 MonsterPopup_Draw(v6 >> 3, &a1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16063 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16064 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16065 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16066 pRenderer->BeginScene();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16067 a1.DrawMessageBox(1);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16068 MonsterPopup_Draw(v6 >> 3, &a1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16069 pRenderer->EndScene();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16070 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16071 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16072 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16073 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16074 v7 = v6 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16075 if ( pObjectList->pObjects[pLayingItems[v7].uObjectDescID].uFlags & 0x10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16076 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16077 v8 = &pLayingItems[v7].stru_24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16078 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16079 GameUI_DrawItemInfo(v8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16080 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16081 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16082 if ( pCurrentScreen == 13 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16083 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16084 if ( (signed int)pY < 345 && (signed int)pX < 469 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16085 sub_4B1A2D();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16086 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16087 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16088 if ( pCurrentScreen <= 13 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16089 goto LABEL_132;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16090 if ( pCurrentScreen <= 15 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16091 goto LABEL_119;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16092 if ( pCurrentScreen != 21 )
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16093 {
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16094 v11 = pCurrentScreen == 23;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16095 goto LABEL_125;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16096 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16097 a1.Hint = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16098 v12 = pGUIWindow_CurrentMenu->pControlsHead;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16099 if ( !v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16100 goto LABEL_132;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16101 v13 = pY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16102 v14 = v29;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16103 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16104 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16105 if ( v12->uButtonType != 1 && v12->uButtonType != 3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16106 || (signed int)pX < (signed int)v12->uX
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16107 || (signed int)pX > (signed int)v12->uZ
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16108 || (signed int)v13 < (signed int)v12->uY
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16109 || (signed int)v13 > (signed int)v12->uW )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16110 goto LABEL_117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16111 v15 = v12->uControlID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16112 if ( v15 <= 65 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16113 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16114 if ( v15 == 65 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16115 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16116 a1.Hint = pClassDescriptions[v12->uControlParam];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16117 v14 = pClassNames[v12->uControlParam];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16118 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16119 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16120 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16121 if ( v15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16122 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16123 v16 = v15 - 62;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16124 if ( v16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16125 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16126 v17 = v16 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16127 if ( v17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16128 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16129 if ( v17 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16130 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16131 v18 = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].GetSkillIdxByOrder(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16132 v12->uControlParam + 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16133 v14 = pSkillNames[v18];
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16134 a1.Hint = pSkillDesc[v18];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16135 v13 = pY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16136 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16137 goto LABEL_117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16138 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16139 v14 = pGlobalTXT_LocalizationStrings[668];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16140 v19 = pGlobalTXT_LocalizationStrings[669];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16141 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16142 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16143 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16144 v14 = pGlobalTXT_LocalizationStrings[670];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16145 v19 = pGlobalTXT_LocalizationStrings[671];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16146 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16147 goto LABEL_116;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16148 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16149 a1.Hint = pAttributeDescriptions[(signed int)v12->uControlParam % 7];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16150 v14 = aAttributeNames[(signed int)v12->uControlParam % 7];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16151 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16152 goto LABEL_117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16153 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16154 if ( v15 == 66 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16155 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16156 v19 = pGlobalTXT_LocalizationStrings[664];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16157 v14 = pGlobalTXT_LocalizationStrings[665];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16158 goto LABEL_116;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16159 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16160 if ( v15 == 67 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16161 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16162 v19 = pGlobalTXT_LocalizationStrings[666];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16163 v14 = pGlobalTXT_LocalizationStrings[667];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16164 goto LABEL_116;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16165 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16166 if ( v15 > 71 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16167 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16168 LABEL_117:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16169 v12 = v12->pNext;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16170 if ( !v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16171 goto LABEL_112;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16172 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16173 if ( v15 > 75 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16174 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16175 if ( v15 == 118 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16176 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16177 v20 = v12->uControlParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16178 v14 = pParty->pPlayers[v20].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16179 v19 = pClassDescriptions[pParty->pPlayers[v20].uClass];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16180 LABEL_116:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16181 a1.Hint = v19;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16182 goto LABEL_117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16183 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16184 goto LABEL_117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16185 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16186 v21 = pParty->pPlayers[v12->uControlParam].GetSkillIdxByOrder(v15 - 72);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16187 v13 = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16188 pY = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16189 if ( (v21 & 0x80000000u) != 0 || (signed int)v21 >= 37 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16190 goto LABEL_117;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16191 v22 = CharacterUI_GetSkillDescText(v12->uControlParam, (enum PLAYER_SKILL_TYPE)v21);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16192 strcpy(pTmpBuf2, v22);
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16193 a1.Hint = pTmpBuf2;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16194 v14 = pSkillNames[pY];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16195 LABEL_112:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16196 v23 = a1.Hint;
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16197 if ( a1.Hint )
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16198 {
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16199 v24 = a1.Hint;
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16200 a1.Hint = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16201 a1.uFrameWidth = 384;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16202 a1.uFrameHeight = 256;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16203 a1.uFrameX = 128;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16204 a1.uFrameY = 40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16205 a1.uFrameHeight = pFontSmallnum->CalcTextHeight(v24, &a1, 24, 0)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16206 + 2 * LOBYTE(pFontLucida->uFontHeight)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16207 + 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16208 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16209 a1.uFrameW = a1.uFrameY + a1.uFrameHeight - 1;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16210 a1.DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16211 a1.uFrameX += 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16212 a1.uFrameWidth -= 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16213 a1.uFrameY += 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16214 a1.uFrameHeight -= 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16215 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16216 a1.uFrameW = a1.uFrameY + a1.uFrameHeight - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16217 v25 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16218 sprintfex(pTmpBuf, format_4E2D80, v25, v14);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16219 a1.DrawText2(pFontCreate, 0, 0, 0, pTmpBuf, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16220 a1.DrawText(pFontSmallnum, 1, LOBYTE(pFontLucida->uFontHeight), 0, v23, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16221 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16222 LABEL_132:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16223 dword_507BF0_is_there_popup_onscreen = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16224 viewparams->bRedrawGameUI = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16225 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16226
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16227
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16228 //----- (004175C0) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16229 void __thiscall UI_OnMouseLeftClick(int *pXY)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16230 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16231 int *pXY_; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16232 signed int y; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16233 signed int x; // ecx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16234 unsigned int v4; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16235 signed int v5; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16236 signed int v6; // esi@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16237 int v7; // esi@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16238 GUIWindow *v8; // edx@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16239 GUIButton *i; // esi@37
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16240 signed int v10; // eax@50
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16241 int v11; // ecx@52
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16242 unsigned int pX; // [sp+14h] [bp-8h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16243 unsigned int pY; // [sp+18h] [bp-4h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16244
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16245 pXY_ = pXY;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16246 if ( pCurrentScreen == 16
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16247 || sub_4637E0_is_there_popup_onscreen() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16248 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16249 if ( pGUIWindow2 && pGUIWindow2->ptr_1C == (void *)33 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16250 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16251 sub_4452BB();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16252 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16253 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16254 if ( pXY_ )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16255 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16256 x = *pXY_;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16257 y = pXY_[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16258 pX = *pXY_;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16259 pY = y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16260 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16261 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16262 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16263 pMouse->GetClickPos(&pX, &pY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16264 y = pY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16265 x = pX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16266 }
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16267 if ( pCurrentScreen
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16268 || !dword_507B98_ctrl_pressed )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16269 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16270 v4 = GetCurrentMenuID();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16271 x = pX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16272 if ( (v4 & 0x80000000u) == 0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16273 || (signed int)pX < (signed int)pViewport->uViewportX
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16274 || (signed int)pX > (signed int)pViewport->uViewportZ )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16275 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16276 y = pY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16277 LABEL_30:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16278 v7 = uNumVisibleWindows;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16279 if ( uNumVisibleWindows < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16280 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16281 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16282 {
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
16283 //v8 = (GUIWindow *)&pWindowList_at_506F50_minus1_indexing[21 * pVisibleWindowsIdxs[v7]];
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
16284 v8 = &pWindowList[pVisibleWindowsIdxs[v7] - 1];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16285 if ( x >= (signed int)v8->uFrameX )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16286 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16287 if ( x <= (signed int)v8->uFrameZ && y >= (signed int)v8->uFrameY && y <= (signed int)v8->uFrameW )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16288 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16289 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16290 --v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16291 if ( v7 < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16292 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16293 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16294 for ( i = v8->pControlsHead; ; i = i->pNext )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16295 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16296 if ( !i )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16297 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16298 if ( i->uButtonType == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16299 goto LABEL_41;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16300 if ( i->uButtonType != 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16301 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16302 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
16303 goto LABEL_50;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16304 y = pY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16305 x = pX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16306 LABEL_45:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16307 ;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16308 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16309 if ( i->uButtonType != 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16310 goto LABEL_45;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16311 LABEL_41:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16312 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
16313 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16314 LABEL_50:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16315 i->field_2C = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16316 v10 = pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16317 if ( pMessageQueue_50CBD0->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16318 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16319 v10 = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16320 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16321 }
4
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
16322 //v11 = i->uControlParam;
4acbadf78023 missing file added
Nomad
parents: 3
diff changeset
16323 pMessageQueue_50CBD0->SendMessage((UIMessageType)i->uControlID, i->uControlParam, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16324 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16325 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16326 goto LABEL_45;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16327 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16328 y = pY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16329 if ( (signed int)pY < (signed int)pViewport->uViewportY || (signed int)pY > (signed int)pViewport->uViewportW )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16330 goto LABEL_30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16331 if ( pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16332 v5 = pGame->pVisInstance->get_picked_object_zbuf_val();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16333 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16334 v5 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16335 v6 = (unsigned __int16)v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16336 if ( (v5 & 7) == 3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16337 && uActiveCharacter
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16338 && v5 < 33554432
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16339 && pPlayers[uActiveCharacter]->CanAct()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16340 && pPlayers[uActiveCharacter]->CanSteal() )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16341 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16342 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16343 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16344 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16345 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = v6 >> 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16346 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16347 ++pMessageQueue_50CBD0->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16348 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16349 if ( pParty->bTurnBasedModeOn == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16350 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16351 if ( pTurnEngine->field_4 == 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16352 pTurnEngine->field_18 |= 8u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16353 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16354 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16355 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16356
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16357
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16358
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16359 //----- (00417871) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16360 void __thiscall sub_417871(int *pXY)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16361 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16362 POINT v1; // [sp+0h] [bp-18h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16363 POINT a2; // [sp+8h] [bp-10h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16364 unsigned int pY; // [sp+10h] [bp-8h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16365 unsigned int pX; // [sp+14h] [bp-4h]@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16366
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16367 if ( !pRenderer->pRenderD3D )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16368 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16369 if ( pXY )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16370 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16371 pX = *pXY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16372 pY = pXY[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16373 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16374 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16375 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16376 pMouse->GetClickPos(&pX, &pY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16377 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16378 pMouse->GetCursorPos(&a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16379 pMouse->GetCursorPos(&v1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16380 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16381 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16382
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16383 //----- (004178C4) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16384 void __cdecl sub_4178C4()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16385 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16386 if ( pArcomageGame->bGameInProgress == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16387 {
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
16388 if (pAsyncMouse)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16389 pArcomageGame->stru1.field_0 = 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16390 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16391 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16392
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16393 //----- (004178E1) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16394 void __cdecl sub_4178E1()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16395 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16396 if ( pArcomageGame->bGameInProgress == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16397 {
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
16398 if (pAsyncMouse)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16399 pArcomageGame->stru1.field_0 = 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16400 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16401 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16402
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16403 //----- (004178FE) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16404 unsigned int __fastcall sub_4178FE(signed int a1, signed int a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16405 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16406 unsigned __int16 v2; // dx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16407 unsigned __int16 v3; // cx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16408 int v5; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16409 unsigned __int16 v6; // [sp-4h] [bp-8h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16410
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16411 if ( a1 <= a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16412 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16413 if ( a1 == a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16414 return 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16415 v5 = 100 * a1 / a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16416 v3 = 255;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16417 if ( v5 >= 25 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16418 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16419 v6 = 100;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16420 v2 = 255;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16421 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16422 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16423 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16424 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16425 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16426 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16427 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16428 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16429 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16430 v6 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16431 v2 = 255;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16432 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16433 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16434 return GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(v3, v2, v6);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16435 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16436
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16437 //----- (00417939) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16438 signed int __thiscall GetConditionDrawColor(unsigned int uConditionIdx)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16439 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16440 unsigned int v1; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16441 signed int v2; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16442 unsigned int v3; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16443 unsigned int v4; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16444 unsigned int v6; // [sp+Ch] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16445
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16446 v1 = uConditionIdx;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16447 v2 = 65535;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16448 v3 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE1u, 0xCDu, 0x23u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16449 v6 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0x23u, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16450 v4 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16451 switch ( v1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16452 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16453 case 0u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16454 case 1u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16455 case 3u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16456 case 4u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16457 case 5u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16458 case 6u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16459 case 7u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16460 v2 = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16461 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16462 case 2u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16463 case 8u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16464 case 9u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16465 case 0xCu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16466 case 0xDu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16467 v2 = v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16468 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16469 case 0xAu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16470 case 0xBu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16471 case 0xEu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16472 case 0xFu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16473 case 0x10u:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16474 v2 = v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16475 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16476 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16477 return v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16478 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16479 return v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16480 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16481
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16482 //----- (004179BC) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16483 char __fastcall sub_4179BC_draw_tooltip(const char *a1, const char *a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16484 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16485 const char *v2; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16486 const char *v3; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16487 unsigned int v4; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16488 GUIWindow Dst; // [sp+Ch] [bp-5Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16489 POINT v6; // [sp+60h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16490
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16491 v2 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16492 v3 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16493 memset(&Dst, 0, 0x54u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16494 Dst.uFrameWidth = 384;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16495 Dst.uFrameHeight = 256;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16496 Dst.uFrameX = 128;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16497 Dst.uFrameY = pMouse->GetCursorPos(&v6)->y + 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16498 Dst.uFrameHeight = pFontSmallnum->CalcTextHeight(v2, &Dst, 24, 0) + 2 * LOBYTE(pFontLucida->uFontHeight) + 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16499 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16500 Dst.uFrameW = Dst.uFrameY + Dst.uFrameHeight - 1;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 39
diff changeset
16501 Dst.DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16502 Dst.uFrameX += 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16503 Dst.uFrameWidth -= 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16504 Dst.uFrameY += 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16505 Dst.uFrameHeight -= 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16506 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16507 Dst.uFrameW = Dst.uFrameY + Dst.uFrameHeight - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16508 v4 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16509 sprintfex(pTmpBuf, format_4E2D80, v4, v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16510 Dst.DrawText2(pFontCreate, 0, 0, 0, pTmpBuf, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16511 return Dst.DrawText(pFontSmallnum, 1, LOBYTE(pFontLucida->uFontHeight), 0, v2, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16512 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16513
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16514 //----- (00417AD4) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16515 unsigned int __fastcall sub_417AD4(unsigned int uPlayerClass, enum PLAYER_SKILL_TYPE uPlayerSkillType, signed int a3)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16516 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16517 enum PLAYER_SKILL_TYPE v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16518 signed int v4; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16519 unsigned int v5; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16520 int v6; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16521 int v7; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16522 int v8; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16523 unsigned __int8 v9; // sf@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16524 unsigned __int8 v10; // of@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16525 int v11; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16526 int v12; // eax@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16527 unsigned int yellow; // [sp+Ch] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16528 unsigned int red; // [sp+10h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16529 unsigned int white; // [sp+14h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16530
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16531 v3 = uPlayerSkillType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16532 v4 = uPlayerClass;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16533 white = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16534 red = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16535 yellow = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16536 v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16537 v6 = v4 % 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16538 if ( !(v4 % 4) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16539 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16540 v11 = 37 * v4 + v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16541 if ( byte_4ED970_skill_learn_ability_by_class_table[0][v11] >= a3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16542 goto LABEL_8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16543 if ( byte_4ED970_skill_learn_ability_by_class_table[1][v11] < a3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16544 && byte_4ED970_skill_learn_ability_by_class_table[2][v11] < a3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16545 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16546 v12 = byte_4ED970_skill_learn_ability_by_class_table[3][v11];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16547 v10 = __OFSUB__(v12, a3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16548 v9 = v12 - a3 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16549 LABEL_15:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16550 v5 = red;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16551 if ( v9 ^ v10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16552 return v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16553 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16554 return yellow;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16555 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16556 if ( v6 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16557 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16558 v7 = 37 * v4 + v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16559 if ( byte_4ED970_skill_learn_ability_by_class_table[0][v7] >= a3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16560 goto LABEL_8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16561 if ( byte_4ED970_skill_learn_ability_by_class_table[1][v7] < a3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16562 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16563 v8 = byte_4ED970_skill_learn_ability_by_class_table[2][v7];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16564 v10 = __OFSUB__(v8, a3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16565 v9 = v8 - a3 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16566 goto LABEL_15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16567 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16568 return yellow;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16569 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16570 if ( v6 > 1 && v6 <= 3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16571 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16572 if ( byte_4ED970_skill_learn_ability_by_class_table[v4][v3] < a3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16573 return red;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16574 LABEL_8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16575 v5 = white;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16576 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16577 return v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16578 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16579
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16580 //----- (00417BB5) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16581 const char *__fastcall CharacterUI_GetSkillDescText(unsigned int uPlayerID, enum PLAYER_SKILL_TYPE uPlayerSkillType)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16582 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16583 enum PLAYER_SKILL_TYPE v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16584 unsigned int v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16585 int v4; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16586 int v5; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16587 Player *pPlayer; // ebx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16588 char v7; // al@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16589 char v8; // cl@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16590 unsigned int v9; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16591 unsigned int v10; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16592 unsigned int v11; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16593 enum PLAYER_SKILL_TYPE v12; // edi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16594 unsigned int v13; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16595 unsigned int v14; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16596 enum PLAYER_SKILL_TYPE v15; // esi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16597 int v16; // edi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16598 char v17; // al@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16599 int v18; // ST5C_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16600 int v19; // ST4C_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16601 int v20; // ST3C_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16602 int v21; // ST2C_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16603 int v22; // ST1C_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16604 char *v23; // esi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16605 unsigned int v24; // eax@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16606 unsigned int v25; // eax@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16607 unsigned int v26; // eax@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16608 unsigned int v27; // ecx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16609 enum PLAYER_SKILL_TYPE v28; // ebx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16610 unsigned int v29; // eax@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16611 char a2[1200]; // [sp+Ch] [bp-538h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16612 char Source[120]; // [sp+4BCh] [bp-88h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16613 unsigned __int16 *v33; // [sp+534h] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16614 int v34; // [sp+538h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16615 unsigned __int16 *v35; // [sp+53Ch] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16616 enum PLAYER_SKILL_TYPE v36; // [sp+540h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16617
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16618 v2 = uPlayerSkillType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16619 v3 = uPlayerID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16620 v36 = uPlayerSkillType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16621 v4 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[431]);// Normal
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16622 v34 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[433]);// Expert
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16623 v33 = (unsigned __int16 *)pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[432]);// Master
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16624 v5 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[96]);// Grand
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16625 v35 = (unsigned __int16 *)v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16626 if ( v34 > v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16627 v35 = (unsigned __int16 *)v34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16628 if ( (signed int)v33 > (signed int)v35 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16629 v35 = v33;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16630 if ( v5 > (signed int)v35 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16631 v35 = (unsigned __int16 *)v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16632 pPlayer = &pParty->pPlayers[v3];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16633 v33 = &pPlayer->pActiveSkills[v2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16634 v7 = pPlayer->GetActualSkillLevel(v2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16635 v8 = LOBYTE(pPlayer->pActiveSkills[v2]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16636 a2[0] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16637 Source[0] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16638 if ( (v8 & 0x3F) == (v7 & 0x3F) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16639 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16640 strcpy(a2, "%s\n\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16641 v24 = sub_417AD4(pPlayer->uClass, v2, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16642 sprintfex(Source, format_4E2DC8, v24);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16643 strcat(a2, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16644 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16645 v25 = sub_417AD4(pPlayer->uClass, v36, 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16646 sprintfex(Source, format_4E2DC8, v25);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16647 strcat(a2, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16648 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16649 v26 = sub_417AD4(pPlayer->uClass, v36, 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16650 sprintfex(Source, format_4E2DC8, v26);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16651 strcat(a2, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16652 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16653 v27 = pPlayer->uClass;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16654 v28 = v36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16655 v29 = sub_417AD4(v27, v36, 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16656 sprintfex(Source, format_4E2DC8, v29);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16657 strcat(a2, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16658 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16659
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16660 v23 = static_sub_417BB5_out_string;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16661 sprintfex(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16662 static_sub_417BB5_out_string,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16663 a2,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16664 pSkillDesc[v28],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16665 pGlobalTXT_LocalizationStrings[431], // Normal
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16666 (char *)v35 + 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16667 v35 + 5,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16668 pNormalSkillDesc[v28],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16669 pGlobalTXT_LocalizationStrings[433], // Expert
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16670 (char *)v35 + 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16671 v35 + 5,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16672 pExpertSkillDesc[v28],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16673 pGlobalTXT_LocalizationStrings[432], // Master
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16674 (char *)v35 + 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16675 v35 + 5,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16676 pMasterSkillDesc[v28],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16677 pGlobalTXT_LocalizationStrings[96], // Grand
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16678 (char *)v35 + 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16679 v35 + 5,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16680 pGrandSkillDesc[v28]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16681 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16682 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16683 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16684 strcpy(a2, "%s\n\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16685 v9 = sub_417AD4(pPlayer->uClass, v2, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16686 sprintfex(Source, format_4E2DC8, v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16687 strcat(a2, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16688 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16689 v10 = sub_417AD4(pPlayer->uClass, v36, 2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16690 sprintfex(Source, format_4E2DC8, v10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16691 strcat(a2, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16692 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16693 v11 = sub_417AD4(pPlayer->uClass, v36, 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16694 sprintfex(Source, format_4E2DC8, v11);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16695 strcat(a2, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16696 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16697 v12 = v36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16698 v13 = sub_417AD4(pPlayer->uClass, v36, 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16699 sprintfex(Source, format_4E2DC8, v13);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16700 strcat(a2, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16701 strcat(a2, "%s\t%03d:\t%03d%s\t000\n\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16702 v14 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16703 sprintfex(Source, format_4E2DC8, v14);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16704 strcat(a2, Source);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16705 strcat(a2, "%s: +%d");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16706 v15 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16707 v16 = (int)(v35 + 5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16708 v15 = (PLAYER_SKILL_TYPE)((int)v15 * 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16709 v34 = (int)((char *)v35 + 3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16710 v17 = pPlayer->GetActualSkillLevel(v36);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16711 v18 = *(int *)((char *)pGrandSkillDesc + v15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16712 v19 = *(int *)((char *)pMasterSkillDesc + v15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16713 v20 = *(int *)((char *)pExpertSkillDesc + v15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16714 v21 = *(int *)((char *)pNormalSkillDesc + v15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16715 v22 = *(int *)((char *)pSkillDesc + v15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16716 v23 = static_sub_417BB5_out_string;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16717 sprintfex(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16718 static_sub_417BB5_out_string,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16719 a2,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16720 v22,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16721 pGlobalTXT_LocalizationStrings[431],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16722 v34,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16723 v16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16724 v21,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16725 pGlobalTXT_LocalizationStrings[433],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16726 v34,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16727 v16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16728 v20,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16729 pGlobalTXT_LocalizationStrings[432],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16730 v34,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16731 v16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16732 v19,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16733 pGlobalTXT_LocalizationStrings[96],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16734 v34,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16735 v16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16736 v18,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16737 pGlobalTXT_LocalizationStrings[623],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16738 (v17 & 0x3F) - (*(char *)v33 & 0x3F));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16739 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16740 return v23;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16741 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16742
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16743 //----- (00417FE5) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16744 char __cdecl CharacterUI_SkillsTab_ShowHint()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16745 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16746 unsigned int v0; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16747 unsigned int v1; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16748 GUIButton *i; // esi@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16749 const char *v3; // eax@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16750 unsigned int pX; // [sp+4h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16751 unsigned int pY; // [sp+8h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16752
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16753 pMouse->GetClickPos(&pX, &pY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16754 v0 = pX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16755 v1 = pY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16756 if ( (signed int)pX < 24 || (signed int)pX > 455 || (signed int)pY < 18 || (signed int)pY > 36 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16757 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16758 for ( i = pGUIWindow_CurrentMenu->pControlsHead; i; i = i->pNext )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16759 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16760 if ( i->uControlID == 121
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16761 && (signed int)v0 >= (signed int)i->uX
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16762 && (signed int)v0 <= (signed int)i->uZ
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16763 && (signed int)v1 >= (signed int)i->uY
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16764 && (signed int)v1 <= (signed int)i->uW )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16765 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16766 v3 = CharacterUI_GetSkillDescText(uActiveCharacter - 1, (enum PLAYER_SKILL_TYPE)i->uControlParam);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16767 sub_4179BC_draw_tooltip(pSkillNames[i->uControlParam], v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16768 v1 = pY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16769 v0 = pX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16770 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16771 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16772 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16773 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16774 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16775 LOBYTE(v1) = sub_4179BC_draw_tooltip(pGlobalTXT_LocalizationStrings[207], pSkillPointsAttributeDescription);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16776 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16777 return v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16778 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16779
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16780 //----- (00418083) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16781 char __cdecl CharacterUI_StatsTab_ShowHint()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16782 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16783 LONG _x; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16784 Player *_y; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16785 int v2; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16786 __int16 *v3; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16787 LONG v4; // edx@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16788 signed int v5; // edx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16789 char *v6; // ecx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16790 char *v7; // ebx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16791 unsigned int v8; // ebx@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16792 unsigned __int64 v9; // kr00_8@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16793 char *v10; // ST2C_4@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16794 signed int v11; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16795 char *v12; // ecx@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16796 char *v13; // eax@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16797 Player *v14; // esi@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16798 int v15; // ebx@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16799 int v16; // eax@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16800 POINT a2; // [sp+Ch] [bp-24h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16801 __int64 v19; // [sp+14h] [bp-1Ch]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16802 char *v20; // [sp+1Ch] [bp-14h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16803 Player *v21; // [sp+20h] [bp-10h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16804 unsigned int v22; // [sp+24h] [bp-Ch]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16805 int *v23; // [sp+28h] [bp-8h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16806 const char *v24; // [sp+2Ch] [bp-4h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16807
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16808 _x = pMouse->GetCursorPos(&a2)->x;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16809 _y = (Player *)pMouse->GetCursorPos(&a2)->y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16810 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16811 v3 = &array_4E2940[0].field_2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16812 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16813 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16814 v4 = *(v3 - 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16815 if ( _x >= v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16816 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16817 if ( _x <= v4 + v3[1] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16818 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16819 v5 = *v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16820 if ( (signed int)_y >= v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16821 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16822 if ( (signed int)_y <= v5 + v3[2] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16823 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16824 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16825 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16826 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16827 v3 += 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16828 ++v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16829 if ( (signed int)v3 >= (signed int)&off_4E2A12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16830 return (char)_y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16831 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16832 switch ( v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16833 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16834 case 0:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16835 case 1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16836 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16837 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16838 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16839 case 5:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16840 case 6:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16841 LOBYTE(_y) = 4 * v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16842 v6 = aAttributeNames[v2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16843 v7 = pAttributeDescriptions[v2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16844 goto LABEL_46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16845 case 7:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16846 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[108]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16847 v7 = pHealthPointsAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16848 v24 = pGlobalTXT_LocalizationStrings[108];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16849 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16850 case 8:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16851 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[212]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16852 v7 = pSpellPointsAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16853 v24 = pGlobalTXT_LocalizationStrings[212];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16854 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16855 case 9:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16856 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[12]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16857 v7 = pArmourClassAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16858 v24 = pGlobalTXT_LocalizationStrings[12];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16859 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16860 case 10:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16861 v24 = pGlobalTXT_LocalizationStrings[47];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16862 strcpy(pTmpBuf2, pPlayerConditionAttributeDescription);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16863 v7 = pTmpBuf2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16864 v20 = pTmpBuf2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16865 strcat(pTmpBuf2, "\n");
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
16866
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
16867 extern unsigned int pConditionImportancyTable[18];
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
16868 v23 = (int *)pConditionImportancyTable;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16869 _y = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16870 v21 = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16871 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16872 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16873 if ( _y->pConditions[*v23] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16874 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16875 strcat(pTmpBuf2, " \n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16876 v8 = *v23;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16877 v9 = pParty->uTimePlayed - v21->pConditions[*v23];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16878 a2.x = LODWORD(pParty->uTimePlayed) - LODWORD(v21->pConditions[*v23]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16879 a2.y = HIDWORD(v9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16880 v19 = (signed __int64)((double)*(signed __int64 *)&a2 * 0.234375) / 60 / 60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16881 v22 = (unsigned int)v19 / 0x18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16882 v10 = aCharacterConditionNames[v8];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16883 v19 %= 24i64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16884 v11 = GetConditionDrawColor(v8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16885 sprintfex(pTmpBuf, &byte_4E2DE8, v11, v10);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16886 strcat(pTmpBuf2, pTmpBuf);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16887 if ( v19 && v19 <= 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16888 v12 = pGlobalTXT_LocalizationStrings[109];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16889 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16890 v12 = pGlobalTXT_LocalizationStrings[110];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16891 if ( !v22 || (v13 = pGlobalTXT_LocalizationStrings[56], v22 > 1) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16892 v13 = pGlobalTXT_LocalizationStrings[57];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16893 sprintfex(pTmpBuf, "%lu %s, %lu %s", v22, v13, v19, v12);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16894 strcat(pTmpBuf2, pTmpBuf);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16895 v7 = v20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16896 _y = v21;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16897 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16898 ++v23;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16899 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16900 while ( (signed int)v23 < (signed int)&unk_4EDF40 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16901 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16902 case 11:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16903 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[172]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16904 v7 = pFastSpellAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16905 v24 = pGlobalTXT_LocalizationStrings[172];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16906 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16907 case 12:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16908 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[5]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16909 v7 = pPlayerAgeAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16910 v24 = pGlobalTXT_LocalizationStrings[5];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16911 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16912 case 13:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16913 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[131]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16914 v7 = pPlayerLevelAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16915 v24 = pGlobalTXT_LocalizationStrings[131];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16916 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16917 case 14:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16918 v14 = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16919 v24 = pGlobalTXT_LocalizationStrings[83];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16920 v15 = v14->uLevel;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16921 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16922 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16923 if ( (signed __int64)v14->uExperience < (unsigned int)sub_4B46F8(v15) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16924 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16925 ++v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16926 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16927 while ( v15 <= 10000 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16928 pTmpBuf[0] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16929 pTmpBuf2[0] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16930 if ( v15 > v14->uLevel )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16931 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[147], v15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16932 v16 = sub_4B46F8(v15) - LODWORD(v14->uExperience);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16933 sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[538], v16, v15 + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16934 strcat(pTmpBuf, "\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16935 strcat(pTmpBuf, pTmpBuf2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16936 LOBYTE(_y) = sprintfex(pTmpBuf2, "%s\n \n%s", pPlayerExperienceAttributeDescription, pTmpBuf);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16937 v7 = pTmpBuf2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16938 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16939 case 15:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16940 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[587]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16941 v7 = pAttackBonusAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16942 v24 = pGlobalTXT_LocalizationStrings[587];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16943 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16944 case 16:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16945 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[588]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16946 v7 = pAttackDamageAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16947 v24 = pGlobalTXT_LocalizationStrings[588];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16948 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16949 case 17:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16950 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[589]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16951 v7 = pMissleBonusAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16952 v24 = pGlobalTXT_LocalizationStrings[589];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16953 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16954 case 18:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16955 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[590]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16956 v7 = pMissleDamageAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16957 v24 = pGlobalTXT_LocalizationStrings[590];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16958 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16959 case 19:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16960 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[87]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16961 v7 = pFireResistanceAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16962 v24 = pGlobalTXT_LocalizationStrings[87];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16963 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16964 case 20:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16965 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[6]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16966 v7 = pAirResistanceAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16967 v24 = pGlobalTXT_LocalizationStrings[6];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16968 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16969 case 21:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16970 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[240]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16971 v7 = pWaterResistanceAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16972 v24 = pGlobalTXT_LocalizationStrings[240];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16973 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16974 case 22:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16975 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[70]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16976 v7 = pEarthResistanceAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16977 v24 = pGlobalTXT_LocalizationStrings[70];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16978 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16979 case 23:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16980 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[142]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16981 v7 = pMindResistanceAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16982 v24 = pGlobalTXT_LocalizationStrings[142];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16983 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16984 case 24:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16985 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[29]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16986 v7 = pBodyResistanceAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16987 v24 = pGlobalTXT_LocalizationStrings[29];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16988 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16989 case 25:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16990 LOBYTE(_y) = LOBYTE(pGlobalTXT_LocalizationStrings[207]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16991 v7 = pSkillPointsAttributeDescription;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16992 v24 = pGlobalTXT_LocalizationStrings[207];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16993 goto LABEL_47;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16994 case 26:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16995 _y = (Player *)(4 * pPlayers[uActiveCharacter]->uClass);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16996 v6 = *(char **)((char *)_y->pConditions + (int)pClassNames);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16997 v7 = *(char **)((char *)_y->pConditions + (int)pClassDescriptions);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16998 LABEL_46:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16999 v24 = v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17000 LABEL_47:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17001 if ( v24 && v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17002 LOBYTE(_y) = sub_4179BC_draw_tooltip(v24, v7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17003 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17004 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17005 return (char)_y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17006 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17007 return (char)_y;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17008 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17009
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17010 //----- (00418511) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17011 char __fastcall CharacterUI_StatsTab_Draw(unsigned int uPlayerID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17012 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17013 Player *pPlayer; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17014 unsigned int v2; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17015 unsigned int v3; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17016 unsigned int v4; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17017 int v5; // ST20_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17018 int v6; // ST1C_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17019 int v7; // ebp@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17020 int v8; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17021 unsigned int v9; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17022 int v10; // ST34_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17023 int v11; // ST20_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17024 int v12; // ST1C_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17025 int v13; // ebp@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17026 int v14; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17027 unsigned int v15; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17028 int v16; // ST34_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17029 int v17; // ST20_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17030 int v18; // ST1C_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17031 int v19; // ebp@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17032 int v20; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17033 unsigned int v21; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17034 int v22; // ST34_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17035 int v23; // ST20_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17036 int v24; // ST1C_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17037 int v25; // ebp@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17038 int v26; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17039 unsigned int v27; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17040 int v28; // ST34_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17041 int v29; // ST20_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17042 int v30; // ST1C_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17043 int v31; // ebp@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17044 int v32; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17045 unsigned int v33; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17046 int v34; // ST34_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17047 int v35; // ST20_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17048 int v36; // ST1C_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17049 int v37; // ebp@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17050 int v38; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17051 unsigned int v39; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17052 int v40; // ST34_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17053 int v41; // ST20_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17054 int v42; // ST1C_4@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17055 int v43; // ebp@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17056 int v44; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17057 unsigned int v45; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17058 int v46; // ebp@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17059 signed int v47; // ST20_4@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17060 int v48; // ST1C_4@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17061 signed int v49; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17062 unsigned int v50; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17063 int v51; // ST20_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17064 int v52; // ST1C_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17065 int v53; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17066 unsigned int v54; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17067 int v55; // ST34_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17068 int v56; // ST20_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17069 int v57; // ST1C_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17070 int v58; // ebp@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17071 int v59; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17072 unsigned int v60; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17073 unsigned int v61; // ebp@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17074 unsigned int v62; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17075 char *v63; // ST20_4@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17076 signed int v64; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17077 unsigned int v65; // ebp@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17078 unsigned __int8 v66; // al@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17079 char *v67; // eax@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17080 unsigned int v68; // ST20_4@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17081 unsigned int v69; // ST1C_4@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17082 signed int v70; // ebp@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17083 signed int v71; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17084 unsigned int v72; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17085 int v73; // ST20_4@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17086 int v74; // ST1C_4@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17087 int v75; // ebp@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17088 int v76; // eax@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17089 unsigned int v77; // eax@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17090 char *v78; // ecx@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17091 int v79; // ST20_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17092 char *v80; // ST40_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17093 unsigned int v81; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17094 int v82; // ST34_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17095 int v83; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17096 int v84; // ST34_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17097 char *v85; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17098 int v86; // ST34_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17099 int v87; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17100 int v88; // ST34_4@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17101 char *v89; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17102 int v90; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17103 int v91; // ST20_4@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17104 unsigned int v92; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17105 int v93; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17106 int v94; // ST20_4@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17107 unsigned int v95; // eax@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17108 int v96; // eax@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17109 int v97; // ST20_4@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17110 unsigned int v98; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17111 int v99; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17112 int v100; // ST20_4@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17113 unsigned int v101; // eax@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17114 int v102; // eax@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17115 int v103; // ST20_4@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17116 unsigned int v104; // eax@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17117 char *v105; // ST20_4@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17118 unsigned int v106; // eax@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17119 int v107; // eax@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17120 int v108; // ST20_4@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17121 unsigned int v109; // eax@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17122 char *v110; // ST20_4@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17123 unsigned int v111; // eax@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17124 int uY; // [sp+10h] [bp-10h]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17125 int uYa; // [sp+10h] [bp-10h]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17126 int uYb; // [sp+10h] [bp-10h]@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17127 int uYc; // [sp+10h] [bp-10h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17128 int uYd; // [sp+10h] [bp-10h]@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17129 int uYe; // [sp+10h] [bp-10h]@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17130 int uYf; // [sp+10h] [bp-10h]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17131 int uYg; // [sp+10h] [bp-10h]@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17132 int uYh; // [sp+10h] [bp-10h]@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17133 const char *a2; // [sp+14h] [bp-Ch]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17134 const char *a2a; // [sp+14h] [bp-Ch]@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17135 const char *a2b; // [sp+14h] [bp-Ch]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17136 const char *a2c; // [sp+14h] [bp-Ch]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17137 const char *a2d; // [sp+14h] [bp-Ch]@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17138 const char *a2e; // [sp+14h] [bp-Ch]@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17139 const char *a2f; // [sp+14h] [bp-Ch]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17140 const char *a2g; // [sp+14h] [bp-Ch]@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17141 const char *a2h; // [sp+14h] [bp-Ch]@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17142 int v131; // [sp+18h] [bp-8h]@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17143 int v132; // [sp+18h] [bp-8h]@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17144 int v133; // [sp+18h] [bp-8h]@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17145 int v134; // [sp+18h] [bp-8h]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17146 int v135; // [sp+18h] [bp-8h]@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17147 int v136; // [sp+18h] [bp-8h]@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17148 int v137; // [sp+1Ch] [bp-4h]@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17149 int v138; // [sp+1Ch] [bp-4h]@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17150
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17151 pPlayer = (Player *)&stru_AA1058[3].pSounds[6972 * uPlayerID + 40552];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17152 v2 = pIcons_LOD->LoadTexture("fr_stats", TEXTURE_16BIT_PALETTE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17153 pRenderer->DrawTextureIndexed(8u, 8u, (Texture *)(v2 != -1 ? (int)&pIcons_LOD->pTextures[v2] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17154 v3 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17155 sprintfex(pTmpBuf, format_4E2DC8, v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17156 sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[429], pPlayer->pName, pClassNames[pPlayer->uClass]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17157 strcat(pTmpBuf, pTmpBuf2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17158 if ( pPlayer->uSkillPoints )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17159 v4 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17160 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17161 v4 = 0xFFFFu;
45
bcc051713d20 BLV render & seffects
Nomad
parents: 39
diff changeset
17162 sprintfex(pTmpBuf2, "\xC" "00000\xD" "180%s: \xC%05d%d\xC" "00000\n\n\n", pGlobalTXT_LocalizationStrings[207], v4, pPlayer->uSkillPoints);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17163 strcat(pTmpBuf, pTmpBuf2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17164 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 18, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17165 v5 = pPlayer->GetBaseStrength();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17166 v6 = pPlayer->GetActualMight();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17167 v7 = pPlayer->GetBaseStrength();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17168 v8 = pPlayer->GetActualMight();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17169 v9 = sub_4178FE(v8, v7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17170 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[144], v9, v6, v5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17171 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 53, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17172 v10 = LOBYTE(pFontArrus->uFontHeight) + 51;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17173 v11 = pPlayer->GetBaseIntelligence();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17174 v12 = pPlayer->GetActualIntelligence();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17175 v13 = pPlayer->GetBaseIntelligence();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17176 v14 = pPlayer->GetActualIntelligence();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17177 v15 = sub_4178FE(v14, v13);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17178 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[116], v15, v12, v11);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17179 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v10, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17180 v16 = LOBYTE(pFontArrus->uFontHeight) + v10 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17181 v17 = pPlayer->GetBaseWillpower();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17182 v18 = pPlayer->GetActualWillpower();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17183 v19 = pPlayer->GetBaseWillpower();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17184 v20 = pPlayer->GetActualWillpower();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17185 v21 = sub_4178FE(v20, v19);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17186 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[163], v21, v18, v17);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17187 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v16, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17188 v22 = LOBYTE(pFontArrus->uFontHeight) + v16 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17189 v23 = pPlayer->GetBaseEndurance();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17190 v24 = pPlayer->GetActualEndurance();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17191 v25 = pPlayer->GetBaseEndurance();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17192 v26 = pPlayer->GetActualEndurance();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17193 v27 = sub_4178FE(v26, v25);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17194 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[75], v27, v24, v23);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17195 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v22, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17196 v28 = LOBYTE(pFontArrus->uFontHeight) + v22 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17197 v29 = pPlayer->GetBaseAccuracy();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17198 v30 = pPlayer->GetActualAccuracy();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17199 v31 = pPlayer->GetBaseAccuracy();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17200 v32 = pPlayer->GetActualAccuracy();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17201 v33 = sub_4178FE(v32, v31);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17202 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[1], v33, v30, v29);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17203 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v28, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17204 v34 = LOBYTE(pFontArrus->uFontHeight) + v28 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17205 v35 = pPlayer->GetBaseSpeed();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17206 v36 = pPlayer->GetActualSpeed();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17207 v37 = pPlayer->GetBaseSpeed();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17208 v38 = pPlayer->GetActualSpeed();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17209 v39 = sub_4178FE(v38, v37);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17210 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[211], v39, v36, v35);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17211 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v34, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17212 v40 = LOBYTE(pFontArrus->uFontHeight) + v34 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17213 v41 = pPlayer->GetBaseLuck();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17214 v42 = pPlayer->GetActualLuck();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17215 v43 = pPlayer->GetBaseLuck();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17216 v44 = pPlayer->GetActualLuck();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17217 v45 = sub_4178FE(v44, v43);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17218 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[136], v45, v42, v41);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17219 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v40, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17220 a2 = "%s";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17221 v46 = v40 + 2 * LOBYTE(pFontArrus->uFontHeight) + 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17222 if ( pPlayer->GetMaxHealth() >= 1000 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17223 a2 = (const char *)&unk_4E2EB8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17224 v47 = pPlayer->GetMaxHealth();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17225 v48 = pPlayer->sHealth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17226 v49 = pPlayer->GetMaxHealth();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17227 v50 = sub_4178FE(pPlayer->sHealth, v49);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17228 sprintfex(pTmpBuf, a2, pGlobalTXT_LocalizationStrings[108], v50, v48, v47);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17229 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v46, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17230 a2a = "%s";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17231 uY = LOBYTE(pFontArrus->uFontHeight) + v46 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17232 if ( pPlayer->GetMaxMana() >= 1000 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17233 a2a = (const char *)&unk_4E2EB8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17234 v51 = pPlayer->GetMaxMana();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17235 v52 = pPlayer->sMana;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17236 v53 = pPlayer->GetMaxMana();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17237 v54 = sub_4178FE(pPlayer->sMana, v53);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17238 sprintfex(pTmpBuf, a2a, pGlobalTXT_LocalizationStrings[212], v54, v52, v51);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17239 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, uY, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17240 v55 = LOBYTE(pFontArrus->uFontHeight) + uY - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17241 v56 = pPlayer->GetBaseAC();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17242 v57 = pPlayer->GetActualAC();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17243 v58 = pPlayer->GetBaseAC();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17244 v59 = pPlayer->GetActualAC();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17245 v60 = sub_4178FE(v59, v58);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17246 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[12], v60, v57, v56);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17247 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, v55, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17248 v61 = v55 + 2 * LOBYTE(pFontArrus->uFontHeight) - 2;
23
509744251c8e Player-related members
Nomad
parents: 21
diff changeset
17249 v62 = pPlayer->GetMajorConditionIdx();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17250 v63 = aCharacterConditionNames[v62];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17251 v64 = GetConditionDrawColor(v62);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17252 sprintfex(pTmpBuf, "%s: ", pGlobalTXT_LocalizationStrings[47], v64, v63);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17253 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x1Au, v61, 0, pTmpBuf, 226, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17254 v65 = LOBYTE(pFontArrus->uFontHeight) + v61 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17255 v66 = pPlayer->uQuickSpell;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17256 if ( v66 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17257 v67 = pSpellStats->pInfos[v66].pShortName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17258 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17259 v67 = pGlobalTXT_LocalizationStrings[153];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17260 sprintfex(pTmpBuf, "%s: %s", pGlobalTXT_LocalizationStrings[172], v67);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17261 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 0x1Au, v65, 0, pTmpBuf, 226, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17262 v68 = pPlayer->GetBaseAge();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17263 v69 = pPlayer->GetActualAge();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17264 v70 = pPlayer->GetBaseAge();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17265 v71 = pPlayer->GetActualAge();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17266 v72 = sub_4178FE(v71, v70);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17267 sprintfex(pTmpBuf, "%s", pGlobalTXT_LocalizationStrings[5], v72, v69, v68);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17268 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, 50, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17269 a2b = "%s";
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17270 uYa = LOBYTE(pFontArrus->uFontHeight) + 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17271 if ( pPlayer->GetBaseLevel() > 99 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17272 a2b = format_4E2E68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17273 v73 = pPlayer->GetBaseLevel();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17274 v74 = pPlayer->GetActualLevel();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17275 v75 = pPlayer->GetBaseLevel();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17276 v76 = pPlayer->GetActualLevel();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17277 v77 = sub_4178FE(v76, v75);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17278 sprintfex(pTmpBuf, a2b, pGlobalTXT_LocalizationStrings[131], v77, v74, v73);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17279 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYa, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17280 uYb = uYa + LOBYTE(pFontArrus->uFontHeight) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17281 if ( (signed __int64)pPlayer->uExperience <= 9999999 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17282 v78 = pGlobalTXT_LocalizationStrings[83];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17283 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17284 v78 = pGlobalTXT_LocalizationStrings[17];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17285 v79 = LODWORD(pPlayer->uExperience);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17286 v80 = v78;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17287 v81 = pPlayer->GetExperienceDisplayColor();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17288 sprintfex(pTmpBuf, "%s\r180", v80, v81, v79);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17289 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYb, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17290 v82 = uYb + 2 * LOBYTE(pFontArrus->uFontHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17291 v83 = pPlayer->GetActualAttack(0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17292 sprintfex(pTmpBuf, "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[18], v83);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17293 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v82, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17294 v84 = v82 + LOBYTE(pFontArrus->uFontHeight) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17295 v85 = pPlayer->GetMeleeDamageString();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17296 sprintfex(pTmpBuf, "%s\t100 %s\n", pGlobalTXT_LocalizationStrings[53], v85);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17297 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v84, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17298 v86 = v84 + LOBYTE(pFontArrus->uFontHeight) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17299 v87 = pPlayer->GetRangedAttack();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17300 sprintfex(pTmpBuf, "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[203], v87);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17301 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v86, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17302 v88 = v86 + LOBYTE(pFontArrus->uFontHeight) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17303 v89 = pPlayer->GetRangedDamageString();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17304 sprintfex(pTmpBuf, "%s\t100 %s\n\n", pGlobalTXT_LocalizationStrings[53], v89);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17305 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, v88, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17306 a2c = format_4E2E10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17307 uYc = v88 + 2 * LOBYTE(pFontArrus->uFontHeight) - 4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17308 v131 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17309 v90 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17310 if ( v131 > 99 || v90 > 99 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17311 a2c = format_4E2E68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17312 v91 = v90;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17313 v92 = sub_4178FE(v131, v90);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17314 sprintfex(pTmpBuf, a2c, pGlobalTXT_LocalizationStrings[87], v92, v131, v91);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17315 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYc, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17316 a2d = format_4E2E10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17317 uYd = uYc + LOBYTE(pFontArrus->uFontHeight) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17318 v132 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_AIR);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17319 v93 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_AIR);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17320 if ( v132 > 99 || v93 > 99 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17321 a2d = format_4E2E68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17322 v94 = v93;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17323 v95 = sub_4178FE(v132, v93);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17324 sprintfex(pTmpBuf, a2d, pGlobalTXT_LocalizationStrings[6], v95, v132, v94);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17325 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYd, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17326 a2e = format_4E2E10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17327 uYe = uYd + LOBYTE(pFontArrus->uFontHeight) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17328 v133 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_WATER);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17329 v96 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_WATER);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17330 if ( v133 > 99 || v96 > 99 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17331 a2e = format_4E2E68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17332 v97 = v96;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17333 v98 = sub_4178FE(v133, v96);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17334 sprintfex(pTmpBuf, a2e, pGlobalTXT_LocalizationStrings[240], v98, v133, v97);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17335 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYe, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17336 a2f = format_4E2E10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17337 uYf = uYe + LOBYTE(pFontArrus->uFontHeight) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17338 v134 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17339 v99 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17340 if ( v134 > 99 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17341 a2f = format_4E2E68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17342 v100 = v99;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17343 v101 = sub_4178FE(v134, v99);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17344 sprintfex(pTmpBuf, a2f, pGlobalTXT_LocalizationStrings[70], v101, v134, v100);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17345 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYf, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17346 a2g = format_4E2E10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17347 uYg = uYf + LOBYTE(pFontArrus->uFontHeight) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17348 v135 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17349 v102 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17350 v137 = v102;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17351 if ( v135 > 99 || v102 > 99 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17352 a2g = format_4E2E68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17353 v103 = v102;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17354 v104 = sub_4178FE(v135, v102);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17355 sprintfex(pTmpBuf, a2g, pGlobalTXT_LocalizationStrings[142], v104, v135, v103);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17356 if ( pPlayer->uClass == 35 && v137 == 200 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17357 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17358 v105 = pGlobalTXT_LocalizationStrings[625];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17359 v106 = sub_4178FE(v135, 200);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17360 sprintfex(pTmpBuf, format_4E2E00, pGlobalTXT_LocalizationStrings[142], v106, v105);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17361 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17362 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYg, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17363 a2h = format_4E2E10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17364 uYh = uYg + LOBYTE(pFontArrus->uFontHeight) - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17365 v136 = pPlayer->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17366 v107 = pPlayer->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17367 v138 = v107;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17368 if ( v136 > 99 || v107 > 99 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17369 a2h = format_4E2E68;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17370 v108 = v107;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17371 v109 = sub_4178FE(v136, v107);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17372 sprintfex(pTmpBuf, a2h, pGlobalTXT_LocalizationStrings[29], v109, v136, v108);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17373 if ( pPlayer->uClass == 35 && v138 == 200 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17374 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17375 v110 = pGlobalTXT_LocalizationStrings[625];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17376 v111 = sub_4178FE(v136, 200);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17377 sprintfex(pTmpBuf, format_4E2E00, pGlobalTXT_LocalizationStrings[29], v111, v110);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17378 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17379 return pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, uYh, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17380 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17381
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17382 //----- (00419100) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17383 int __cdecl sub_419100()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17384 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17385 Player *v0; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17386 int v1; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17387 unsigned __int8 *v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17388 int v3; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17389 int result; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17390 int v5; // esi@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17391 unsigned __int8 v6; // zf@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17392 unsigned __int8 v7; // sf@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17393 int v8; // edx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17394 int v9; // ecx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17395 unsigned __int8 v10; // of@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17396 stru179 *v11; // edi@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17397 int v12; // edx@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17398 int v13; // [sp+Ch] [bp-8h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17399 signed int v14; // [sp+Ch] [bp-8h]@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17400 int i; // [sp+10h] [bp-4h]@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17401
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17402 v0 = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17403 memset(&pStru179, 0, 0xFA0u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17404 memset(pTmpBuf2, 0, 0x7D0u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17405 v1 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17406 dword_506544 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17407 dword_506548 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17408 dword_506520 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17409 dword_50651C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17410 dword_506528 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17411 v2 = (unsigned __int8 *)v0->field_152;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17412 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17413 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17414 v13 = dword_723E80_award_related[2 * v1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17415 if ( (unsigned __int16)_449B57_test_bit(v2, v1) && v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17416 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17417 v3 = dword_506520++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17418 pStru179->field_0[v3] = v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17419 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17420 ++v1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17421 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17422 while ( v1 < 105 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17423 result = dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17424 v5 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17425 v6 = dword_506520 == 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17426 v7 = dword_506520 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17427 dword_506524 = dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17428 dword_506520 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17429 if ( !(v7 | v6) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17430 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17431 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17432 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17433 v8 = rand() % 16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17434 result = dword_506524;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17435 v9 = dword_506524 + v5++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17436 v10 = __OFSUB__(v5, dword_506524);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17437 v7 = v5 - dword_506524 < 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17438 pStru179->field_0[v9] = v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17439 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17440 while ( v7 ^ v10 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17441 if ( result > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17442 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17443 v14 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17444 v11 = pStru179;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17445 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17446 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17447 for ( i = v14; i < result; ++i )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17448 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17449 v12 = pStru179->field_0[i];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17450 if ( dword_723E84[2 * v12] < dword_723E84[2 * v11->field_0[0]] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17451 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17452 pStru179->field_0[i] = v11->field_0[0];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17453 v11->field_0[0] = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17454 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17455 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17456 ++v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17457 v11 = (stru179 *)((char *)v11 + 4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17458 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17459 while ( v14 - 1 < result );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17460 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17461 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17462 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17463 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17464
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17465
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17466 //----- (00419220) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17467 void __cdecl sub_419220()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17468 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17469 GUIButton *i; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17470
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17471 if ( !dword_507CBC )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17472 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17473 dword_507CBC = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17474 for ( i = pGUIWindow_CurrentMenu->pControlsHead; i; i = i->pNext )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17475 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17476 if ( i->uControlID == 120 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17477 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17478 dword_50698C = i->uX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17479 dword_506988 = i->uY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17480 dword_506984 = i->uZ;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17481 dword_506980 = i->uW;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17482 i->uW = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17483 i->uZ = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17484 i->uY = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17485 i->uX = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17486 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17487 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17488 ptr_507B9C = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17489 0x1B6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17490 0x2Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17491 (uTextureID_ar_up_up != -1 ? pIcons_LOD->pTextures[uTextureID_ar_up_up].uTextureWidth : 24),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17492 (uTextureID_ar_up_up != -1 ? pIcons_LOD->pTextures[uTextureID_ar_up_up].uTextureHeight : 26),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17493 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17494 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17495 0xA9u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17496 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17497 0,
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
17498 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17499 (Texture *)(uTextureID_ar_up_up != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ar_up_up] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17500 uTextureID_ar_up_dn != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ar_up_dn] : 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17501 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17502 ptr_507BA0 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17503 0x1B6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17504 0x124u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17505 (uTextureID_ar_dn_up != -1 ? pIcons_LOD->pTextures[uTextureID_ar_dn_up].uTextureWidth : 24),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17506 (uTextureID_ar_dn_up != -1 ? pIcons_LOD->pTextures[uTextureID_ar_dn_up].uTextureHeight : 26),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17507 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17508 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17509 0xAAu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17510 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17511 0,
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
17512 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17513 (Texture *)(uTextureID_ar_dn_up != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ar_dn_up] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17514 uTextureID_ar_dn_dn != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ar_dn_dn] : 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17515 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17516 ptr_507BA4 = pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17517 0x1B8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17518 0x3Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17519 0x10u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17520 0xE8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17521 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17522 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17523 0xC0u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17524 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17525 0,
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
17526 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17527 0);
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
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17533 //----- (00419379) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17534 void __cdecl sub_419379()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17535 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17536 GUIButton *i; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17537
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17538 if ( dword_507CBC )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17539 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17540 dword_507CBC = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17541 GUIButton::_41D0D8(ptr_507BA4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17542 GUIButton::_41D0D8(ptr_507B9C);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17543 GUIButton::_41D0D8(ptr_507BA0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17544 ptr_507BA0 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17545 ptr_507B9C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17546 for ( i = pGUIWindow_CurrentMenu->pControlsHead; i; i = i->pNext )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17547 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17548 if ( i->uControlID == 120 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17549 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17550 i->uX = dword_50698C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17551 i->uY = dword_506988;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17552 i->uZ = dword_506984;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17553 i->uW = dword_506980;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17554 pGUIWindow_CurrentMenu->_41D08F(1, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17555 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17556 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17557 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17558 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17559
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17560
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17561 //----- (00419401) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17562 void __cdecl sub_419401()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17563 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17564 unsigned int v0; // ecx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17565 GUIButton *i; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17566 GUIFont *v2; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17567 unsigned int v3; // esi@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17568 int v4; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17569 unsigned int v5; // esi@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17570 int v6; // eax@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17571 unsigned int v7; // esi@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17572 int v8; // eax@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17573 unsigned int v9; // esi@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17574 int v10; // eax@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17575 int a2; // [sp+10h] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17576 int v12; // [sp+14h] [bp-10h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17577 int v13; // [sp+14h] [bp-10h]@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17578 unsigned int *v14; // [sp+18h] [bp-Ch]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17579 unsigned int *v15; // [sp+18h] [bp-Ch]@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17580 unsigned int *v16; // [sp+18h] [bp-Ch]@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17581 unsigned int *v17; // [sp+18h] [bp-Ch]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17582 char *v18; // [sp+1Ch] [bp-8h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17583 int a5; // [sp+20h] [bp-4h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17584
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17585 a2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17586 if ( dword_507CC0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17587 sub_4196A0();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17588 v0 = uActiveCharacter;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17589 dword_507CC0 = uActiveCharacter;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17590 for ( i = pGUIWindow_CurrentMenu->pControlsHead; i; i = i->pNext )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17591 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17592 if ( i->uControlID == 120 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17593 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17594 dword_50698C = i->uX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17595 dword_506988 = i->uY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17596 dword_506984 = i->uZ;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17597 dword_506980 = i->uW;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17598 i->uW = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17599 i->uZ = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17600 i->uY = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17601 i->uX = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17602 v0 = uActiveCharacter;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17603 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17604 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17605 v12 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17606 a5 = pGUIWindow_CurrentMenu->uNumControls;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17607 v18 = &stru_AA1058[3].pSounds[6972 * v0 + 40552];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17608 v2 = pFontLucida;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17609 v14 = (unsigned int *)dword_4E2A2C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17610 v3 = 2 * LOBYTE(pFontLucida->uFontHeight) + 13;
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 * *v14 + 264] & 0x3F )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17614 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17615 v4 = LOBYTE(v2->uFontHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17616 v3 = v3 + v4 - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17617 ++a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17618 ++v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17619 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17620 0x18u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17621 v3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17622 0xCCu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17623 v4 - 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17624 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17625 *v14 | 0x8000,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17626 0x79u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17627 *v14,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17628 0,
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
17629 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17630 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17631 v2 = pFontLucida;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17632 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17633 ++v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17634 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17635 while ( (signed int)v14 < (signed int)dword_4E2A50 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17636 if ( !v12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17637 v3 = v3 + LOBYTE(v2->uFontHeight) - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17638 v15 = (unsigned int *)_4E2A80_skills;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17639 v5 = v3 + 2 * LOBYTE(v2->uFontHeight) - 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17640 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17641 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17642 if ( v18[2 * *v15 + 264] & 0x3F && a2 < 15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17643 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17644 v6 = LOBYTE(v2->uFontHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17645 v5 = v5 + v6 - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17646 ++a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17647 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17648 0x18u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17649 v5,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17650 0xCCu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17651 v6 - 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17652 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17653 *v15 | 0x8000,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17654 0x79u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17655 *v15,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17656 0,
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
17657 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17658 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17659 v2 = pFontLucida;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17660 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17661 ++v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17662 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17663 while ( (signed int)v15 < (signed int)pAwardsTextColors );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17664 v13 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17665 v16 = (unsigned int *)dword_4E2A18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17666 v7 = 2 * LOBYTE(v2->uFontHeight) + 13;
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 * *v16 + 264] & 0x3F )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17670 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17671 v8 = LOBYTE(v2->uFontHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17672 v7 = v7 + v8 - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17673 ++a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17674 ++v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17675 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17676 0xF6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17677 v7,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17678 0xCCu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17679 v8 - 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17680 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17681 *v16 | 0x8000,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17682 0x79u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17683 *v16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17684 0,
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
17685 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17686 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17687 v2 = pFontLucida;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17688 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17689 ++v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17690 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17691 while ( (signed int)v16 < (signed int)dword_4E2A2C );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17692 if ( !v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17693 v7 = v7 + LOBYTE(v2->uFontHeight) - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17694 v17 = (unsigned int *)dword_4E2A50;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17695 v9 = v7 + 2 * LOBYTE(v2->uFontHeight) - 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17696 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17697 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17698 if ( v18[2 * *v17 + 264] & 0x3F )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17699 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17700 v10 = LOBYTE(v2->uFontHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17701 v9 = v9 + v10 - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17702 ++a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17703 pGUIWindow_CurrentMenu->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17704 0xF6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17705 v9,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17706 0xCCu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17707 v10 - 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17708 3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17709 *v17 | 0x8000,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17710 0x79u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17711 *v17,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17712 0,
59
5159d2e6f559 BLV render
Nomad
parents: 58
diff changeset
17713 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17714 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17715 v2 = pFontLucida;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17716 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17717 ++v17;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17718 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17719 while ( (signed int)v17 < (signed int)_4E2A80_skills );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17720 if ( a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17721 pGUIWindow_CurrentMenu->_41D08F(a2, 1, 0, a5);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17722 }