Mercurial > mm7
annotate GUI/UI/UICharacter.cpp @ 2550:fb42e2662c38
Chest UI refactored to a class
author | a.parshin |
---|---|
date | Tue, 12 May 2015 11:28:22 +0200 |
parents | fed97f15d1e1 |
children | f2a8ed07e921 |
rev | line source |
---|---|
2501 | 1 #define _CRTDBG_MAP_ALLOC |
2 #include <stdlib.h> | |
3 #include <crtdbg.h> | |
4 | |
5 #define _CRT_SECURE_NO_WARNINGS | |
6 #include <algorithm> | |
2541 | 7 |
8 #include "Engine/Engine.h" | |
9 | |
2501 | 10 #include "UICharacter.h" |
11 #include "..\../Engine/MapInfo.h" | |
2502 | 12 #include "..\../GUI/GUIWindow.h" |
13 #include "..\../GUI/GUIFont.h" | |
14 #include "..\../GUI/GUIProgressBar.h" | |
2501 | 15 #include "..\../Engine/Party.h" |
2502 | 16 #include "..\../Media/Audio/AudioPlayer.h" |
2501 | 17 #include "..\../Engine/Graphics/Render.h" |
18 #include "..\../Engine/LOD.h" | |
19 #include "..\../Engine/Graphics/Viewport.h" | |
20 #include "..\../Engine/Timer.h" | |
21 #include "..\../Engine/Awards.h" | |
22 #include "..\../Engine/Spells/CastSpellInfo.h" | |
23 #include "..\../Engine/texts.h" | |
2502 | 24 #include "..\../IO/Mouse.h" |
2501 | 25 |
2541 | 26 |
2547 | 27 void CharacterUI_LoadPaperdollTextures(); |
28 void WetsuitOn(unsigned int uPlayerID); | |
29 void WetsuitOff(unsigned int uPlayerID); | |
2501 | 30 |
31 int bRingsShownInCharScreen; // 5118E0 | |
32 | |
33 unsigned int ui_mainmenu_copyright_color; | |
34 | |
35 unsigned int ui_character_tooltip_header_default_color; | |
36 unsigned int ui_character_default_text_color; | |
37 unsigned int ui_character_skill_highlight_color; | |
38 unsigned int ui_character_header_text_color; | |
39 unsigned int ui_character_bonus_text_color; | |
40 unsigned int ui_character_bonus_text_color_neg; | |
41 unsigned int ui_character_skill_upgradeable_color; | |
42 unsigned int ui_character_skill_default_color; | |
43 unsigned int ui_character_stat_default_color; | |
44 unsigned int ui_character_stat_buffed_color; | |
45 unsigned int ui_character_stat_debuffed_color; | |
46 unsigned int ui_character_skillinfo_can_learn; | |
47 unsigned int ui_character_skillinfo_can_learn_gm; | |
48 unsigned int ui_character_skillinfo_cant_learn; | |
49 unsigned int ui_character_condition_normal_color; | |
50 unsigned int ui_character_condition_light_color; | |
51 unsigned int ui_character_condition_moderate_color; | |
52 unsigned int ui_character_condition_severe_color; | |
53 std::array<unsigned int, 6> ui_character_award_color; | |
54 | |
55 unsigned int ui_game_minimap_outline_color; | |
56 unsigned int ui_game_minimap_actor_friendly_color; | |
57 unsigned int ui_game_minimap_actor_hostile_color; | |
58 unsigned int ui_game_minimap_actor_corpse_color; | |
59 unsigned int ui_game_minimap_decoration_color_1; | |
60 unsigned int ui_game_minimap_projectile_color; | |
61 unsigned int ui_game_minimap_treasure_color; | |
62 std::array<unsigned int, 24> ui_game_character_record_playerbuff_colors; | |
63 | |
64 unsigned int ui_gamemenu_video_gamma_title_color; | |
65 unsigned int ui_gamemenu_keys_action_name_color; | |
66 unsigned int ui_gamemenu_keys_key_selection_blink_color_1; | |
67 unsigned int ui_gamemenu_keys_key_selection_blink_color_2; | |
68 unsigned int ui_gamemenu_keys_key_default_color; | |
69 | |
70 unsigned int ui_book_quests_title_color; | |
71 unsigned int ui_book_quests_text_color; | |
72 unsigned int ui_book_autonotes_title_color; | |
73 unsigned int ui_book_autonotes_text_color; | |
74 unsigned int ui_book_map_title_color; | |
75 unsigned int ui_book_map_coordinates_color; | |
76 | |
77 unsigned int ui_book_calendar_title_color; | |
78 unsigned int ui_book_calendar_time_color; | |
79 unsigned int ui_book_calendar_day_color; | |
80 unsigned int ui_book_calendar_month_color; | |
81 unsigned int ui_book_calendar_year_color; | |
82 unsigned int ui_book_calendar_moon_color; | |
83 unsigned int ui_book_calendar_location_color; | |
84 | |
85 unsigned int ui_book_journal_title_color; | |
86 unsigned int ui_book_journal_text_color; | |
87 unsigned int ui_book_journal_text_shadow; | |
88 | |
89 unsigned int ui_game_dialogue_npc_name_color; | |
90 unsigned int ui_game_dialogue_option_highlight_color; | |
91 unsigned int ui_game_dialogue_option_normal_color; | |
92 | |
93 unsigned int ui_house_player_cant_interact_color; | |
94 | |
95 | |
96 void set_default_ui_skin() | |
97 { | |
98 ui_mainmenu_copyright_color = Color16(255, 255, 255); | |
99 | |
100 ui_character_tooltip_header_default_color = Color16(255, 255, 155); | |
101 ui_character_default_text_color = Color16(255, 255, 255); | |
102 ui_character_header_text_color = Color16(255, 255, 155); | |
103 ui_character_bonus_text_color = Color16(0, 255, 0); | |
104 ui_character_bonus_text_color_neg = Color16(255, 0, 0); | |
105 | |
106 ui_character_skill_upgradeable_color = Color16(0, 175, 255); | |
107 ui_character_skill_default_color = Color16(255, 0, 0); | |
108 ui_character_skill_highlight_color = Color16(255, 0, 0); | |
109 | |
110 ui_character_stat_default_color = Color16(255, 255, 255); | |
111 ui_character_stat_buffed_color = Color16(0, 255, 0); | |
112 ui_character_stat_debuffed_color = Color16(255, 35, 0); | |
113 | |
114 ui_character_skillinfo_can_learn = Color16(255, 255, 255); | |
115 ui_character_skillinfo_can_learn_gm = Color16(255, 255, 0); | |
116 ui_character_skillinfo_cant_learn = Color16(255, 0, 0); | |
117 | |
118 ui_character_condition_normal_color = Color16(255, 255, 255); | |
119 ui_character_condition_light_color = Color16(0, 255, 0); | |
120 ui_character_condition_moderate_color = Color16(225, 205, 35); | |
121 ui_character_condition_severe_color = Color16(255, 35, 0); | |
122 | |
123 ui_character_award_color[0] = Color16(248, 108, 160); | |
124 ui_character_award_color[1] = Color16(112, 220, 248); | |
125 ui_character_award_color[2] = Color16(192, 192, 240); | |
126 ui_character_award_color[3] = Color16( 64, 244, 96); | |
127 ui_character_award_color[4] = Color16(232, 244, 96); | |
128 ui_character_award_color[5] = Color16(240, 252, 192); | |
129 | |
130 ui_game_minimap_outline_color = Color16(0, 0, 255); | |
131 ui_game_minimap_actor_friendly_color = Color16(0, 255, 0); | |
132 ui_game_minimap_actor_hostile_color = Color16(255, 0, 0); | |
133 ui_game_minimap_actor_corpse_color = Color16(255, 255, 0); | |
134 ui_game_minimap_decoration_color_1 = Color16(255, 255, 255); | |
135 ui_game_minimap_projectile_color = Color16(255, 0, 0); | |
136 ui_game_minimap_treasure_color = Color16(0, 0, 255); | |
137 | |
138 ui_game_character_record_playerbuff_colors[0] = Color16(150, 212, 255); | |
139 ui_game_character_record_playerbuff_colors[1] = Color16(225, 225, 225); | |
140 ui_game_character_record_playerbuff_colors[2] = Color16(255, 128, 0); | |
141 ui_game_character_record_playerbuff_colors[3] = Color16(128, 128, 128); | |
142 ui_game_character_record_playerbuff_colors[4] = Color16(225, 225, 225); | |
143 ui_game_character_record_playerbuff_colors[5] = Color16(255, 85, 0); | |
144 ui_game_character_record_playerbuff_colors[6] = Color16(255, 128, 0); | |
145 ui_game_character_record_playerbuff_colors[7] = Color16(255, 85, 0); | |
146 ui_game_character_record_playerbuff_colors[8] = Color16(225, 225, 225); | |
147 ui_game_character_record_playerbuff_colors[9] = Color16(235, 15, 255); | |
148 ui_game_character_record_playerbuff_colors[10] = Color16(192, 192, 240); | |
149 ui_game_character_record_playerbuff_colors[11] = Color16(225, 225, 225); | |
150 ui_game_character_record_playerbuff_colors[12] = Color16(255, 128, 0); | |
151 ui_game_character_record_playerbuff_colors[13] = Color16(150, 212, 255); | |
152 ui_game_character_record_playerbuff_colors[14] = Color16(128, 128, 128); | |
153 ui_game_character_record_playerbuff_colors[15] = Color16(255, 255, 155); | |
154 ui_game_character_record_playerbuff_colors[16] = Color16(255, 255, 155); | |
155 ui_game_character_record_playerbuff_colors[17] = Color16(255, 255, 155); | |
156 ui_game_character_record_playerbuff_colors[18] = Color16(255, 255, 155); | |
157 ui_game_character_record_playerbuff_colors[19] = Color16(255, 255, 155); | |
158 ui_game_character_record_playerbuff_colors[20] = Color16(255, 255, 155); | |
159 ui_game_character_record_playerbuff_colors[21] = Color16(255, 255, 155); | |
160 ui_game_character_record_playerbuff_colors[22] = Color16(0, 128, 255); | |
161 ui_game_character_record_playerbuff_colors[23] = Color16(0, 128, 255); | |
162 | |
163 ui_gamemenu_video_gamma_title_color = Color16(255, 255, 155); | |
164 ui_gamemenu_keys_action_name_color = Color16(255, 255, 255); | |
165 ui_gamemenu_keys_key_selection_blink_color_1 = Color16(50, 0, 0); | |
166 ui_gamemenu_keys_key_selection_blink_color_2 = Color16(225, 205, 35); | |
167 ui_gamemenu_keys_key_default_color = Color16(255, 255, 255); | |
168 | |
169 ui_book_quests_title_color = Color16(255, 255, 255); | |
170 ui_book_quests_text_color = Color16(255, 255, 255); | |
171 ui_book_autonotes_title_color = Color16(255, 255, 255); | |
172 ui_book_autonotes_text_color = Color16(255, 255, 255); | |
173 ui_book_map_title_color = Color16(255, 255, 255); | |
174 ui_book_map_coordinates_color = Color16(255, 255, 255); | |
175 | |
176 ui_book_calendar_title_color = Color16(255, 255, 255); | |
177 ui_book_calendar_time_color = Color16(75, 75, 75); | |
178 ui_book_calendar_day_color = Color16(75, 75, 75); | |
179 ui_book_calendar_month_color = Color16(75, 75, 75); | |
180 ui_book_calendar_year_color = Color16(75, 75, 75); | |
181 ui_book_calendar_moon_color = Color16(75, 75, 75); | |
182 ui_book_calendar_location_color = Color16(75, 75, 75); | |
183 | |
184 ui_book_journal_title_color = Color16(255, 255, 255); | |
185 ui_book_journal_text_color = Color16(255, 255, 255); | |
186 ui_book_journal_text_shadow = Color16(0, 0, 0); | |
187 | |
188 ui_game_dialogue_npc_name_color = Color16(21, 153, 233); | |
189 ui_game_dialogue_option_highlight_color = Color16(225, 205, 35); | |
190 ui_game_dialogue_option_normal_color = Color16(255, 255, 255); | |
191 | |
192 ui_house_player_cant_interact_color = Color16(255, 255, 155); | |
193 } | |
194 | |
195 std::array<unsigned int, 16> papredoll_dbrds; | |
196 unsigned int papredoll_drhs[4]; | |
197 unsigned int papredoll_dlhus[4]; | |
198 unsigned int papredoll_dlhs[4]; | |
199 unsigned int papredoll_dbods[5]; | |
200 int paperdoll_armor_texture[4][17][3];//0x511294 | |
201 //int paperdoll_array_51132C[165]; | |
202 unsigned int papredoll_dlaus[5]; | |
203 unsigned int papredoll_dlads[4]; | |
204 int papredoll_flying_feet[22]; // 005115E0 | |
205 int paperdoll_boots_texture[4][6];//511638 | |
206 int paperdoll_cloak_collar_texture[4][10]; // weak | |
207 int paperdoll_cloak_texture[4][10]; | |
208 int paperdoll_helm_texture[2][16]; //511698 | |
209 int paperdoll_belt_texture[4][7]; //511718 | |
210 | |
211 const int paperdoll_Weapon[4][16][2] = {//4E4C30 | |
212 {{128, 205}, {30, 144}, {88, 85}, {0, 0}, {0, 0}, {0, 0}, {17, 104}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, | |
213 {{131, 201}, {38, 158}, {98, 87}, {0, 0}, {0, 0}, {0, 0}, {21, 100}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, | |
214 {{131, 216}, {29, 186}, {88, 119}, {0, 0}, {0, 0}, {0, 0}, { 0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, | |
215 {{123, 216}, {35, 184}, {98, 119}, {0, 0}, {0, 0}, {0, 0}, { 0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}, | |
216 }; | |
217 | |
218 const int paperdoll_Boot[4][7][2] = //4E5490 | |
219 { | |
220 0xE, 0x11D, 0xD, 0x11D, 0xC, 0x10A, 0xA, 0xFF, 0xD, 0xF9, 0xD, 0x137, 0xC, 0x10E, | |
221 0x14, 0x125, 0x13, 0x122, 0x15, 0x120, 0x15, 0x114, 0x13, 0x10A, 0x11, 0x13E, 0x11, 0x116, | |
222 0x1D, 0x121, 0x1C, 0x11F, 0x1B, 0x11B, 0x1C, 0x117, 0x16, 0x116, 0x1B, 0x137, 0x1B, 0x11B, | |
223 0x1F, 0x127, 0x1F, 0x122, 0x1B, 0x11B, 0x1D, 0x117, 0x1D, 0x116, 0x1D, 0x137, 0x1B, 0x11F, | |
224 }; | |
225 const int paperdoll_Cloak[4][10][2] = //4E5570 | |
226 { | |
227 0x11, 0x68, 0xF, 0x68, 0x14, 0x71, 0x19, 0x6B, 0x21, 0x6F, 0x5, 0x68, 0x5, 0x68, 0x14, 0x71, 0x3, 0x6B, 0xF, 0x6F, | |
228 0x15, 0x64, 0xB, 0x6B, 0xE, 0x67, 0x15, 0x6B, 0x1B, 0x6F, 0x3, 0x6B, 0, 0x6B, 0xE, 0x67, 0, 0x6B, 0x3, 0x6F, | |
229 0x10, 0x8A, 0x9, 0x8B, 0x18, 0x98, 0x25, 0x91, 0x29, 0x90, 0x8, 0x8A, 0x9, 0x8B, 0x18, 0x98, 0x3, 0x91, 0x3, 0x90, | |
230 0x14, 0x92, 0x10, 0x92, 0x15, 0x98, 0x1F, 0x91, 0x22, 0x90, 0x8, 0x92, 0xC, 0x92, 0x15, 0x98, 0x3, 0x91, 0x3, 0x90, | |
231 }; | |
232 const int paperdoll_CloakCollar[4][10][2] = //4E56B0 | |
233 { | |
234 0x11, 0x68, 0x34, 0x64, 0x21, 0x69, 0x1D, 0x67, 0x20, 0x67, 0x21, 0x68, 0x34, 0x64, 0x21, 0x69, 0x1D, 0x67, 0x1F, 0x67, | |
235 0x13, 0x64, 0x35, 0x66, 0x29, 0x68, 0x1F, 0x68, 0x1F, 0x6A, 0x21, 0x6A, 0x2B, 0x66, 0x26, 0x68, 0x1F, 0x68, 0x1F, 0x6A, | |
236 0, 0, 0x30, 0x87, 0x1E, 0x86, 0x1B, 0x86, 0x1C, 0x8A, 0x21, 0x87, 0x30, 0x87, 0x1E, 0x86, 0x1B, 0x86, 0x1C, 0x8A, | |
237 0, 0, 0x38, 0x8A, 0x24, 0x8B, 0x1D, 0x8B, 0x21, 0x8C, 0x27, 0x8A, 0x34, 0x8A, 0x24, 0x8B, 0x25, 0x8B, 0x21, 0x8C, | |
238 }; | |
239 //int dword_4E56B4; // weak | |
240 const int paperdoll_Belt[4][7][2] = //4E57F0 | |
241 { | |
242 0x3A, 0xB6, 0x37, 0xB2, 0x34, 0xB9, 0x3A, 0xB9, 0x37, 0xB7, 0x38, 0xAC, 0x37, 0xB7, | |
243 0x3E, 0xAD, 0x3A, 0xAC, 0x37, 0xB0, 0x3A, 0xB1, 0x39, 0xB0, 0x3C, 0xA5, 0x39, 0xB0, | |
244 0x3B, 0xD5, 0x37, 0xD2, 0x31, 0xD5, 0x39, 0xD6, 0x37, 0xD8, 0x37, 0xD1, 0x37, 0xD8, | |
245 0x42, 0xD2, 0x3F, 0xD0, 0x3B, 0xD7, 0x3C, 0xD5, 0x3B, 0xD6, 0x3E, 0xCF, 0x36, 0xD6, | |
246 }; | |
247 const int paperdoll_Helm[4][16][2] = //4E58D0 | |
248 { | |
249 0x3E, 0x1F, 0x41, 0x2C, 0x37, 0x2F, 0x31, 0x32, 0x37, 0x2A, 0x39, 0x28, 0x36, 0x34, 0x41, 0x38, 0x40, 0x31, 0x40, 0x21, 0x40, 0x31, 0x3C, 0x33, 0x3D, 0x24, 0x3A, 0x1A, 0x37, 0x2A, 0x41, 0x48, | |
250 0x41, 0x1E, 0x42, 0x2B, 0x37, 0x2F, 0x34, 0x30, 0x39, 0x29, 0x3A, 0x26, 0x36, 0x34, 0x41, 0x37, 0x42, 0x32, 0x40, 0x21, 0x40, 0x31, 0x40, 0x2F, 0x3E, 0x22, 0x3B, 0x1A, 0x39, 0x29, 0x42, 0x47, | |
251 0x3F, 0x47, 0x41, 0x56, 0x37, 0x59, 0x32, 0x5E, 0x37, 0x58, 0x39, 0x54, 0x34, 0x61, 0x40, 0x61, 0x41, 0x5D, 0x3E, 0x4F, 0x3E, 0x5B, 0x3D, 0x5B, 0x3F, 0x4C, 0x3B, 0x45, 0x37, 0x58, 0x41, 0x74, | |
252 0x45, 0x45, 0x46, 0x54, 0x3A, 0x55, 0x38, 0x58, 0x3C, 0x54, 0x3F, 0x52, 0x39, 0x5B, 0x45, 0x5C, 0x47, 0x5C, 0x44, 0x4B, 0x44, 0x57, 0x43, 0x55, 0x44, 0x4A, 0x3E, 0x45, 0x3C, 0x54, 0x47, 0x70, | |
253 }; | |
254 const int pPaperdoll_Beards[4] = //4E5AD0 | |
255 { | |
256 52, 130, 56, 136, | |
257 }; | |
258 const int pPaperdoll_LeftHand[4][2] = //4E5AE0 | |
259 { | |
260 0x67, 0x6A, | |
261 0x65, 0x6C, | |
262 0x74, 0x8D, | |
263 0x74, 0x93, | |
264 }; | |
265 const int pPaperdoll_SecondLeftHand[4][2] = //4E5B00 | |
266 { | |
267 0x1A, 0x6B, | |
268 0x28, 0x6D, | |
269 0x19, 0x8D, | |
270 0x20, 0x92, | |
271 }; | |
272 const int pPaperdoll_RightHand[4][2] = //4E5B20 | |
273 { | |
274 0x1E, 0x90, | |
275 0x22, 0x9E, | |
276 0x19, 0xBA, | |
277 0x1F, 0xB8, | |
278 }; | |
279 const int pPaperdollLeftEmptyHand[4][2] = //4E5B40 | |
280 { | |
281 0x80, 0xCD, | |
282 0x83, 0xC9, | |
283 0x83, 0xD8, | |
284 0x7B, 0xD8, | |
285 }; | |
286 | |
287 int pPaperdoll_BodyX = 481; // 004E4C28 | |
288 int pPaperdoll_BodyY = 0; // 004E4C2C | |
289 const int paperdoll_Armor_Coord[4][17][2] = //4E4E30 | |
290 { | |
291 // X Y | |
292 0x2C, 0x67, 0x30, 0x69, 0x2D, 0x67, 0x2C, 0x64, 0x14, 0x66, 0x22, 0x67, 0x20, 0x66, 0x25, 0x66, 0x12, 0x66,//Human | |
293 0x0A, 0x66, 0x13, 0x64, 0x0E, 0x64, 0x0A, 0x63, 0x14, 0x66, 0x0A, 0x63, 0x0A, 0x66, 0x25, 0x66, | |
294 | |
295 0x32, 0x68, 0x32, 0x69, 0x35, 0x69, 0x33, 0x68, 0x24, 0x67, 0x30, 0x69, 0x33, 0x68, 0x31, 0x69, 0x19, 0x69, | |
296 0x19, 0x6A, 0x16, 0x66, 0x16, 0x65, 0x0F, 0x6B, 0x24, 0x67, 0x0F, 0x6B, 0x19, 0x6A, 0x31, 0x69, | |
297 | |
298 0x2A, 0x8C, 0x29, 0x8C, 0x2A, 0x89, 0x29, 0x86, 0x12, 0x87, 0x2D, 0x89, 0x2A, 0x88, 0x25, 0x87, 0x12, 0x8B, | |
299 0x12, 0x8B, 0x11, 0x8A, 0x15, 0x87, 0x09, 0x89, 0x12, 0x87, 0x09, 0x89, 0x12, 0x8B, 0x25, 0x87, | |
300 | |
301 0x33, 0x90, 0x32, 0x90, 0x34, 0x91, 0x32, 0x8E, 0x21, 0x8B, 0x31, 0x8B, 0x33, 0x8E, 0x2F, 0x8F, 0x16, 0x8D, | |
302 0x18, 0x8C, 0x19, 0x8C, 0x1B, 0x8E, 0x0C, 0x8C, 0x21, 0x8B, 0x0C, 0x8C, 0x18, 0x8C, 0x2F, 0x8F, | |
303 }; | |
304 const int paperdoll_shoulder_coord[4][17][2] = //4E5050 | |
305 { | |
306 0x64, 0x67, 0x61, 0x67, 0x65, 0x68, 0x6E, 0x74, 0x6C, 0x68, 0x61, 0x67, 0x66, 0x68, 0x6C, 0x6A, 0x6E, 0x6D, | |
307 0x67, 0x69, 0x70, 0x67, 0x6E, 0x6D, 0x6C, 0x6F, 0x6C, 0x68, 0x6C, 0x6F, 0x67, 0x69, 0x6C, 0x6A, | |
308 | |
309 0x60, 0x6B, 0x60, 0x6C, 0x60, 0x6B, 0x61, 0x6A, 0x60, 0x69, 0x60, 0x6A, 0x60, 0x6A, 0x61, 0x69, 0x63, 0x6A, | |
310 0x64, 0x6A, 0x61, 0x66, 0x66, 0x67, 0x64, 0x6C, 0x60, 0x69, 0x64, 0x6C, 0x64, 0x6A, 0x61, 0x69, | |
311 | |
312 0x6D, 0x8C, 0x75, 0x8C, 0, 0, 0x72, 0x8D, 0x6A, 0x89, 0, 0, 0x73, 0x8C, 0x69, 0x8C, 0x6E, 0x8D, | |
313 0x71, 0x8D, 0x70, 0x8D, 0x72, 0x8D, 0x74, 0x8E, 0x6A, 0x89, 0x74, 0x8E, 0x71, 0x8D, 0x69, 0x8C, | |
314 | |
315 0x72, 0x91, 0x72, 0x91, 0, 0, 0x6E, 0x92, 0x6F, 0x91, 0, 0, 0, 0, 0x6E, 0x91, 0x71, 0x90, | |
316 0x72, 0x8D, 0x72, 0x90, 0x73, 0x93, 0x73, 0x90, 0x6F, 0x91, 0x73, 0x90, 0x72, 0x8D, 0x6E, 0x91, | |
317 }; | |
318 const int paperdoll_shoulder_second_coord[4][17][2] = //dword_4E5270 | |
319 { | |
320 0, 0, 0x61, 0x67, 0, 0, 0x64, 0x69, 0x64, 0x68, 0, 0, 0, 0, 0x5E, 0x66, 0x5F, 0x69, | |
321 0x55, 0x69, 0x5F, 0x67, 0x5F, 0x68, 0x32, 0x69, 0x64, 0x68, 0x32, 0x69, 0x55, 0x69, 0x5E, 0x66, | |
322 | |
323 0, 0, 0x60, 0x6C, 0, 0, 0x60, 0x6C, 0x5E, 0x69, 0, 0, 0, 0, 0x5D, 0x6A, 0x5B, 0x6A, | |
324 0x5B, 0x6A, 0x59, 0x69, 0x56, 0x68, 0x38, 0x6E, 0x5E, 0x69, 0x38, 0x6E, 0x5B, 0x6A, 0x5D, 0x6A, | |
325 | |
326 0, 0, 0x75, 0x8C, 0, 0, 0x72, 0x8D, 0x62, 0x89, 0, 0, 0, 0, 0x69, 0x8C, 0x5E, 0x8D, | |
327 0x61, 0x8D, 0x5F, 0x8D, 0x60, 0x8D, 0x2E, 0x8C, 0x62, 0x89, 0x2E, 0x8C, 0x61, 0x8D, 0x69, 0x8C, | |
328 | |
329 0, 0, 0x72, 0x91, 0, 0, 0x72, 0x91, 0x67, 0x8F, 0, 0, 0, 0, 0x6E, 0x91, 0x64, 0x93, | |
330 0x65, 0x8C, 0x65, 0x91, 0x67, 0x91, 0x36, 0x90, 0x67, 0x8F, 0x36, 0x90, 0x65, 0x8C, 0x6E, 0x91, | |
331 }; | |
332 | |
333 const char *dlad_texnames_by_face[25] = | |
2542 | 334 { |
2501 | 335 "pc01lad", "pc02lad", "pc03lad", "pc04lad", "pc05lad", "pc06lad", |
336 "pc07lad", "pc08lad", "pc09lad", "pc10lad", "pc11lad", "pc12lad", | |
337 "pc13lad", "pc14lad", "pc15lad", "pc16lad", "pc17lad", "pc18lad", | |
338 "pc19lad", "pc20lad", "pc21lad", "pc22lad", "pc23lad", "pc24lad", | |
339 "pc25lad" | |
2542 | 340 }; |
2501 | 341 const char *dlau_texnames_by_face[25] = |
2542 | 342 { |
2501 | 343 "pc01lau", "pc02lau", "pc03lau", "pc04lau", "pc05lau", "pc06lau", |
344 "pc07lau", "pc08lau", "pc09lau", "pc10lau", "pc11lau", "pc12lau", | |
345 "pc13lau", "pc14lau", "pc15lau", "pc16lau", "pc17lau", "pc18lau", | |
346 "pc19lau", "pc20lau", "pc21lau", "pc22lau", "pc23lau", "pc24lau", | |
347 "pc25lau" | |
2542 | 348 }; |
2501 | 349 const char *dbod_texnames_by_face[25] = |
2542 | 350 { |
2501 | 351 "pc01bod", "pc02bod", "pc03bod", "pc04bod", "pc05bod", "pc06bod", |
352 "pc07bod", "pc08bod", "pc09bod", "pc10bod", "pc11bod", "pc12bod", | |
353 "pc13bod", "pc14bod", "pc15bod", "pc16bod", "pc17bod", "pc18bod", | |
354 "pc19bod", "pc20bod", "pc21bod", "pc22bod", "pc23bod", "pc24bod", | |
355 "pc25bod" | |
2542 | 356 }; |
2501 | 357 const char *drh_texnames_by_face[25] = |
2542 | 358 { |
2501 | 359 |
360 "pc01rh", "pc02rh", "pc03rh", "pc04rh", "pc05rh", "pc06rh", | |
361 "pc07rh", "pc08rh", "pc09rh", "pc10rh", "pc11rh", "pc12rh", | |
362 "pc13rh", "pc14rh", "pc15rh", "pc16rh", "pc17rh", "pc18rh", | |
363 "pc19rh", "pc20rh", "pc21rh", "pc22rh", "pc23rh", "pc24rh", | |
364 "pc25rh" | |
2542 | 365 }; |
2501 | 366 const char *dlh_texnames_by_face[25] = |
2542 | 367 { |
2501 | 368 "pc01lh", "pc02lh", "pc03lh", "pc04lh", "pc05lh", "pc06lh", |
369 "pc07lh", "pc08lh", "pc09lh", "pc10lh", "pc11lh", "pc12lh", | |
370 "pc13lh", "pc14lh", "pc15lh", "pc16lh", "pc17lh", "pc18lh", | |
371 "pc19lh", "pc20lh", "pc21lh", "pc22lh", "pc23lh", "pc24lh", | |
372 "pc25lh" | |
2542 | 373 }; |
2501 | 374 const char *dlhu_texnames_by_face[25] = |
2542 | 375 { |
2501 | 376 "pc01lhu", "pc02lhu", "pc03lhu", "pc04lhu", "pc05lhu", "pc06lhu", |
377 "pc07lhu", "pc08lhu", "pc09lhu", "pc10lhu", "pc11lhu", "pc12lhu", | |
378 "pc13lhu", "pc14lhu", "pc15lhu", "pc16lhu", "pc17lhu", "pc18lhu", | |
379 "pc19lhu", "pc20lhu", "pc21lhu", "pc22lhu", "pc23lhu", "pc24lhu", | |
380 "pc25lhu" | |
2542 | 381 }; |
2501 | 382 |
2542 | 383 const int pArmorSkills[5] = |
384 { | |
385 PLAYER_SKILL_LEATHER, | |
386 PLAYER_SKILL_CHAIN, | |
387 PLAYER_SKILL_PLATE, | |
388 PLAYER_SKILL_SHIELD, | |
389 PLAYER_SKILL_DODGE | |
390 }; | |
391 const int pWeaponSkills[9] = | |
392 { | |
393 PLAYER_SKILL_AXE, | |
394 PLAYER_SKILL_BOW, | |
395 PLAYER_SKILL_DAGGER, | |
396 PLAYER_SKILL_MACE, | |
397 PLAYER_SKILL_SPEAR, | |
398 PLAYER_SKILL_STAFF, | |
399 PLAYER_SKILL_SWORD, | |
400 PLAYER_SKILL_UNARMED, | |
401 PLAYER_SKILL_BLASTER | |
402 }; | |
2501 | 403 const int pMiscSkills[12] = {PLAYER_SKILL_ALCHEMY, PLAYER_SKILL_ARMSMASTER, PLAYER_SKILL_BODYBUILDING, PLAYER_SKILL_ITEM_ID, PLAYER_SKILL_MONSTER_ID, |
404 PLAYER_SKILL_LEARNING, PLAYER_SKILL_TRAP_DISARM, PLAYER_SKILL_MEDITATION, PLAYER_SKILL_MERCHANT, PLAYER_SKILL_PERCEPTION, | |
405 PLAYER_SKILL_REPAIR, PLAYER_SKILL_STEALING}; | |
406 const int pMagicSkills[9] = {PLAYER_SKILL_FIRE, PLAYER_SKILL_AIR, PLAYER_SKILL_WATER, PLAYER_SKILL_EARTH, PLAYER_SKILL_SPIRIT, | |
407 PLAYER_SKILL_MIND, PLAYER_SKILL_BODY, PLAYER_SKILL_LIGHT, PLAYER_SKILL_DARK}; | |
408 | |
2547 | 409 |
410 GUIWindow_CharacterRecord::GUIWindow_CharacterRecord(unsigned int uActiveCharacter, enum CURRENT_SCREEN screen) : | |
411 GUIWindow(0, 0, window->GetWidth(), window->GetHeight(), uActiveCharacter, nullptr) | |
412 { | |
2501 | 413 //----- (00421626) -------------------------------------------------------- |
2547 | 414 // 00421626 CharacterUI_Initialize --- part |
415 //GUIWindow *CharacterUI_Initialize(enum CURRENT_SCREEN screen) | |
416 | |
2501 | 417 ++pIcons_LOD->uTexturePacksCount; |
418 if ( !pIcons_LOD->uNumPrevLoadedFiles ) | |
419 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; | |
420 | |
421 pEventTimer->Pause(); | |
422 pAudioPlayer->StopChannels(-1, -1); | |
423 bRingsShownInCharScreen = false; | |
424 CharacterUI_LoadPaperdollTextures(); | |
2541 | 425 current_screen_type = screen; |
2501 | 426 |
2547 | 427 //auto wnd = new GUIWindow_CharacterRecord(0, 0, window->GetWidth(), window->GetHeight(), uActiveCharacter, 0); |
428 pCharacterScreen_StatsBtn = CreateButton(pViewport->uViewportTL_X + 12, pViewport->uViewportTL_Y + 308, | |
2501 | 429 pIcons_LOD->GetTexture(papredoll_dbrds[9])->uTextureWidth, |
430 pIcons_LOD->GetTexture(papredoll_dbrds[9])->uTextureHeight, | |
431 1, 0, UIMSG_ClickStatsBtn, 0, 'S', pGlobalTXT_LocalizationStrings[216],// Stats | |
432 pIcons_LOD->GetTexture(papredoll_dbrds[10]), | |
433 pIcons_LOD->GetTexture(papredoll_dbrds[9]), 0); | |
2547 | 434 pCharacterScreen_SkillsBtn = CreateButton(pViewport->uViewportTL_X + 102, pViewport->uViewportTL_Y + 308, |
2501 | 435 pIcons_LOD->GetTexture(papredoll_dbrds[7])->uTextureWidth, |
436 pIcons_LOD->GetTexture(papredoll_dbrds[7])->uTextureHeight, | |
437 1, 0, UIMSG_ClickSkillsBtn, 0, 'K', pGlobalTXT_LocalizationStrings[205],//Skills | |
438 pIcons_LOD->GetTexture(papredoll_dbrds[8]), | |
439 pIcons_LOD->GetTexture(papredoll_dbrds[7]), 0); | |
2547 | 440 pCharacterScreen_InventoryBtn = CreateButton(pViewport->uViewportTL_X + 192, pViewport->uViewportTL_Y + 308, |
2501 | 441 pIcons_LOD->GetTexture(papredoll_dbrds[5])->uTextureWidth, |
442 pIcons_LOD->GetTexture(papredoll_dbrds[5])->uTextureHeight, | |
443 1, 0, UIMSG_ClickInventoryBtn, 0, 'I', pGlobalTXT_LocalizationStrings[120], //Inventory | |
444 pIcons_LOD->GetTexture(papredoll_dbrds[6]), | |
445 pIcons_LOD->GetTexture(papredoll_dbrds[5]), 0); | |
2547 | 446 pCharacterScreen_AwardsBtn = CreateButton(pViewport->uViewportTL_X + 282, pViewport->uViewportTL_Y + 308, |
2501 | 447 pIcons_LOD->GetTexture(papredoll_dbrds[3])->uTextureWidth, |
448 pIcons_LOD->GetTexture(papredoll_dbrds[3])->uTextureHeight, | |
449 1, 0, UIMSG_ClickAwardsBtn, 0, 'A', pGlobalTXT_LocalizationStrings[22], //Awards | |
450 pIcons_LOD->GetTexture(papredoll_dbrds[4]), | |
451 pIcons_LOD->GetTexture(papredoll_dbrds[3]), 0); | |
2547 | 452 pCharacterScreen_ExitBtn = CreateButton(pViewport->uViewportTL_X + 371, pViewport->uViewportTL_Y + 308, |
2501 | 453 pIcons_LOD->GetTexture(papredoll_dbrds[1])->uTextureWidth, |
454 pIcons_LOD->GetTexture(papredoll_dbrds[1])->uTextureHeight, | |
455 1, 0, UIMSG_ClickExitCharacterWindowBtn, 0, 0, pGlobalTXT_LocalizationStrings[79],//Exit | |
456 pIcons_LOD->GetTexture(papredoll_dbrds[2]), | |
457 pIcons_LOD->GetTexture(papredoll_dbrds[1]), 0); | |
2547 | 458 CreateButton(0, 0, 476, 345, 1, 122, UIMSG_InventoryLeftClick, 0, 0, "", 0); |
459 pCharacterScreen_DetalizBtn = CreateButton(600, 300, 30, 30, 1, 0, UIMSG_ChangeDetaliz, 0, 0, pGlobalTXT_LocalizationStrings[64], 0); | |
460 pCharacterScreen_DollBtn = CreateButton(476, 0, 164, 345, 1, 0, UIMSG_ClickPaperdoll, 0, 0, "", 0); | |
461 | |
462 CreateButton(61, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0); | |
463 CreateButton(177, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0); | |
464 CreateButton(292, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0); | |
465 CreateButton(407, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0); | |
466 | |
467 CreateButton(0, 0, 0, 0, 1, 0, UIMSG_CycleCharacters, 0, '\t', "", 0); | |
468 FillAwardsData(); | |
469 } | |
470 | |
471 //----- (0041ABFD) -------------------------------------------------------- | |
472 void GUIWindow_CharacterRecord::Update() | |
473 { | |
474 // ----------------------------------- | |
475 // 004156F0 GUI_UpdateWindows --- part | |
476 // { | |
477 // 0041ABFD CharacterUI_CharacterScreen_Draw(pPlayers[uActiveCharacter]); | |
478 // } | |
479 | |
480 auto player = pPlayers[uActiveCharacter]; | |
481 | |
482 pRenderer->ClearZBuffer(0, 479); | |
483 switch (current_character_screen_window) | |
484 { | |
485 case WINDOW_CharacterWindow_Stats: | |
486 { | |
487 CharacterUI_ReleaseButtons(); | |
488 ReleaseAwardsScrollBar(); | |
489 CharacterUI_StatsTab_Draw(player); | |
490 pRenderer->DrawTextureIndexed( | |
491 pCharacterScreen_StatsBtn->uX, | |
492 pCharacterScreen_StatsBtn->uY, | |
493 pIcons_LOD->LoadTexturePtr("ib-cd1-d", TEXTURE_16BIT_PALETTE) | |
494 ); | |
495 } | |
496 break; | |
497 | |
498 case WINDOW_CharacterWindow_Skills: | |
499 { | |
500 if (dword_507CC0_activ_ch != uActiveCharacter) | |
501 { | |
502 CharacterUI_ReleaseButtons(); | |
503 CharacterUI_SkillsTab_CreateButtons(); | |
504 } | |
505 ReleaseAwardsScrollBar(); | |
506 CharacterUI_SkillsTab_Draw(player); | |
507 pRenderer->DrawTextureIndexed( | |
508 pCharacterScreen_SkillsBtn->uX, | |
509 pCharacterScreen_SkillsBtn->uY, | |
510 pIcons_LOD->LoadTexturePtr("ib-cd2-d", TEXTURE_16BIT_PALETTE) | |
511 ); | |
512 } | |
513 break; | |
514 | |
515 case WINDOW_CharacterWindow_Awards: | |
516 { | |
517 CharacterUI_ReleaseButtons(); | |
518 ReleaseAwardsScrollBar(); | |
519 CreateAwardsScrollBar(); | |
520 CharacterUI_AwardsTab_Draw(player); | |
521 pRenderer->DrawTextureIndexed( | |
522 pCharacterScreen_AwardsBtn->uX, | |
523 pCharacterScreen_AwardsBtn->uY, | |
524 pIcons_LOD->LoadTexturePtr("ib-cd4-d", TEXTURE_16BIT_PALETTE) | |
525 ); | |
526 } | |
527 break; | |
2501 | 528 |
2547 | 529 case WINDOW_CharacterWindow_Inventory: |
530 { | |
531 CharacterUI_ReleaseButtons(); | |
532 ReleaseAwardsScrollBar(); | |
533 CharacterUI_InventoryTab_Draw(player, false); | |
534 pRenderer->DrawTextureIndexed( | |
535 pCharacterScreen_InventoryBtn->uX, | |
536 pCharacterScreen_InventoryBtn->uY, | |
537 pIcons_LOD->LoadTexturePtr("ib-cd3-d", TEXTURE_16BIT_PALETTE) | |
538 ); | |
539 } | |
540 break; | |
541 | |
542 default: __debugbreak(); break; | |
543 } | |
544 | |
545 if (bRingsShownInCharScreen) | |
546 CharacterUI_DrawPaperdollWithRingOverlay(player); | |
547 else | |
548 CharacterUI_DrawPaperdoll(player); | |
549 } | |
550 | |
551 | |
552 | |
553 void GUIWindow_CharacterRecord::ShowStatsTab() | |
554 { | |
555 // 004304E7 Game_EventLoop --- part | |
556 current_character_screen_window = WINDOW_CharacterWindow_Stats; | |
557 CharacterUI_ReleaseButtons(); | |
558 ReleaseAwardsScrollBar(); | |
559 new OnButtonClick3(pCharacterScreen_StatsBtn->uX, pCharacterScreen_StatsBtn->uY, 0, 0, (int)pCharacterScreen_StatsBtn, 0); | |
560 } | |
561 | |
562 void GUIWindow_CharacterRecord::ShowSkillsTab() | |
563 { | |
564 // 004304E7 Game_EventLoop --- part | |
565 current_character_screen_window = WINDOW_CharacterWindow_Skills; | |
566 CharacterUI_ReleaseButtons(); | |
567 ReleaseAwardsScrollBar(); | |
568 CharacterUI_SkillsTab_CreateButtons(); | |
569 new OnButtonClick3(pCharacterScreen_SkillsBtn->uX, pCharacterScreen_SkillsBtn->uY, 0, 0, (int)pCharacterScreen_SkillsBtn, 0); | |
570 } | |
2501 | 571 |
2547 | 572 void GUIWindow_CharacterRecord::ShowInventoryTab() |
573 { | |
574 // 004304E7 Game_EventLoop --- part | |
575 current_character_screen_window = WINDOW_CharacterWindow_Inventory; | |
576 ReleaseAwardsScrollBar(); | |
577 CharacterUI_ReleaseButtons(); | |
578 new OnButtonClick3(pCharacterScreen_InventoryBtn->uX, pCharacterScreen_InventoryBtn->uY, 0, 0, (int)pCharacterScreen_InventoryBtn, 0); | |
579 } | |
580 | |
581 void GUIWindow_CharacterRecord::ShowAwardsTab() | |
582 { | |
583 // 004304E7 Game_EventLoop --- part | |
584 ReleaseAwardsScrollBar(); | |
585 CharacterUI_ReleaseButtons(); | |
586 CreateAwardsScrollBar(); | |
587 current_character_screen_window = WINDOW_CharacterWindow_Awards; | |
588 new OnButtonClick3(pCharacterScreen_AwardsBtn->uX, pCharacterScreen_AwardsBtn->uY, 0, 0, (int)pCharacterScreen_AwardsBtn, 0); | |
589 FillAwardsData(); | |
590 } | |
591 | |
592 void GUIWindow_CharacterRecord::ToggleRingsOverlay() | |
593 { | |
594 int v128, v125, v123, v121; | |
2541 | 595 |
2547 | 596 bRingsShownInCharScreen ^= 1; |
597 pCharacterScreen_DetalizBtn->Release(); | |
598 pCharacterScreen_DollBtn->Release(); | |
599 if (bRingsShownInCharScreen) | |
600 { | |
601 v128 = pIcons_LOD->GetTexture(uTextureID_detaliz_close_button)->uTextureHeight; | |
602 v125 = pIcons_LOD->GetTexture(uTextureID_detaliz_close_button)->uTextureWidth; | |
603 v123 = 445; | |
604 v121 = 470; | |
605 } | |
606 else | |
607 { | |
608 v128 = 30; | |
609 v125 = 30; | |
610 v123 = 300; | |
611 v121 = 600; | |
612 } | |
613 pCharacterScreen_DetalizBtn = pGUIWindow_CurrentMenu->CreateButton( | |
614 v121, v123, v125, v128, 1, 0, UIMSG_ChangeDetaliz, 0, 0, | |
615 pGlobalTXT_LocalizationStrings[64],// "Detail Toggle" | |
616 0 | |
617 ); | |
618 pCharacterScreen_DollBtn = pGUIWindow_CurrentMenu->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, 1, 0, UIMSG_ClickPaperdoll, 0, 0, "", 0); | |
619 viewparams->bRedrawGameUI = true; | |
2501 | 620 } |
621 | |
2547 | 622 |
623 | |
2501 | 624 //----- (004219BE) -------------------------------------------------------- |
625 GUIWindow *CastSpellInfo::GetCastSpellInInventoryWindow() | |
626 { | |
627 GUIWindow *CS_inventory_window; // ebx@1 | |
628 | |
629 pEventTimer->Pause(); | |
630 pAudioPlayer->StopChannels(-1, -1); | |
631 bRingsShownInCharScreen = 0; | |
632 CharacterUI_LoadPaperdollTextures(); | |
2541 | 633 current_screen_type = SCREEN_CASTING; |
2544
c674d547cc7c
GUIWindow switch logic refactored into behaviour classes
a.parshin
parents:
2542
diff
changeset
|
634 CS_inventory_window = new GUIWindow_Inventory_CastSpell(0, 0, window->GetWidth(), window->GetHeight(), (int)this, 0); |
2501 | 635 pCharacterScreen_ExitBtn = CS_inventory_window->CreateButton(394, 318, 75, 33, 1, 0, UIMSG_ClickExitCharacterWindowBtn, 0, 0, |
636 pGlobalTXT_LocalizationStrings[79], // Close | |
637 pIcons_LOD->GetTexture(papredoll_dbrds[2]), | |
638 pIcons_LOD->GetTexture(papredoll_dbrds[1]), 0); | |
639 CS_inventory_window->CreateButton(0, 0, 0x1DCu, 0x159u, 1, 122, UIMSG_InventoryLeftClick, 0, 0, "", 0); | |
640 pCharacterScreen_DollBtn = CS_inventory_window->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, 1, 0, UIMSG_ClickPaperdoll, 0, 0, "", 0); | |
641 | |
642 CS_inventory_window->CreateButton( 61, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 1, '1', "", 0); | |
643 CS_inventory_window->CreateButton(177, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 2, '2', "", 0); | |
644 CS_inventory_window->CreateButton(292, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 3, '3', "", 0); | |
645 CS_inventory_window->CreateButton(407, 424, 31, 0, 2, 94, UIMSG_SelectCharacter, 4, '4', "", 0); | |
646 | |
647 return CS_inventory_window; | |
648 } | |
649 | |
650 static int CharacterUI_SkillsTab_Draw__DrawSkillTable(Player *player, int x, int y, const int *skill_list, int skill_list_size, int right_margin, const char *skill_group_name) | |
651 { | |
652 int y_offset = y; | |
653 | |
654 sprintf(pTmpBuf.data(), "%s\r%03d%s", skill_group_name, right_margin, pGlobalTXT_LocalizationStrings[131]); //"Level" | |
655 pGUIWindow_CurrentMenu->DrawText(pFontArrus, x, y, ui_character_header_text_color, pTmpBuf.data(), 0, 0, 0); | |
656 | |
657 int num_skills_drawn = 0; | |
658 for (int i = 0; i < skill_list_size; ++i) | |
659 { | |
660 PLAYER_SKILL_TYPE skill = (PLAYER_SKILL_TYPE)skill_list[i]; | |
661 for (uint j = 0; j < pGUIWindow_CurrentMenu->uNumControls; ++j) | |
662 { | |
663 GUIButton* v8 = pGUIWindow_CurrentMenu->pControlsHead; | |
664 | |
665 for (int v7 = j; v7 > 0; --v7) | |
666 v8 = v8->pNext; | |
667 | |
668 int v9 = v8->field_1C; | |
669 if ((short)(v8->field_1C) >= 0) | |
670 continue; | |
671 if ( (v9 & 0x7FFF) != skill ) | |
672 continue; | |
673 | |
674 ++num_skills_drawn; | |
675 y_offset = v8->uY; | |
676 | |
677 ushort skill_value = player->pActiveSkills[skill]; | |
678 int skill_level = skill_value & 0x3F; | |
679 | |
680 uint skill_color = 0; | |
681 uint skill_mastery_color = 0; | |
682 if (player->uSkillPoints > skill_level) | |
683 skill_color = ui_character_skill_upgradeable_color; | |
684 | |
685 if (pGUIWindow_CurrentMenu->pCurrentPosActiveItem == j) | |
686 { | |
687 if (player->uSkillPoints > skill_level) | |
688 skill_mastery_color = ui_character_bonus_text_color; | |
689 else | |
690 skill_mastery_color = ui_character_skill_default_color; | |
691 skill_color = skill_mastery_color; | |
692 } | |
693 | |
694 if (SkillToMastery(skill_value) == 1) | |
695 { | |
696 sprintfex(pTmpBuf.data(), "%s\r%03d%2d", pSkillNames[skill], right_margin, skill_level); | |
697 pGUIWindow_CurrentMenu->DrawText(pFontLucida, x, v8->uY, skill_color, pTmpBuf.data(), 0, 0, 0); | |
698 } | |
699 else | |
700 { | |
701 const char *skill_level_str = nullptr; | |
702 | |
703 switch (SkillToMastery(skill_value)) | |
704 { | |
705 case 4: skill_level_str = pGlobalTXT_LocalizationStrings[96]; break; // "Grand" | |
706 case 3: skill_level_str = pGlobalTXT_LocalizationStrings[432]; break; // Master | |
707 case 2: skill_level_str = pGlobalTXT_LocalizationStrings[433]; break; // Expert | |
708 } | |
709 | |
710 if (!skill_mastery_color) | |
711 skill_mastery_color = ui_character_header_text_color; | |
712 sprintfex(pTmpBuf.data(), "%s \f%05d%s\f%05d\r%03d%2d", pSkillNames[skill], skill_mastery_color, skill_level_str, skill_color, right_margin, skill_level); | |
713 pGUIWindow_CurrentMenu->DrawText(pFontLucida, x, v8->uY, skill_color, pTmpBuf.data(), 0, 0, 0); | |
714 } | |
715 } | |
716 } | |
717 | |
718 if (!num_skills_drawn) | |
719 { | |
720 y_offset += LOBYTE(pFontLucida->uFontHeight) - 3; | |
721 pGUIWindow_CurrentMenu->DrawText(pFontLucida, x, y_offset, 0, pGlobalTXT_LocalizationStrings[153], 0, 0, 0); //"None" | |
722 } | |
723 | |
724 return y_offset; | |
725 } | |
726 | |
727 //----- (00419719) -------------------------------------------------------- | |
2547 | 728 void GUIWindow_CharacterRecord::CharacterUI_SkillsTab_Draw(Player *player) |
2501 | 729 { |
730 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->LoadTexturePtr("fr_skill", TEXTURE_16BIT_PALETTE)); | |
731 | |
732 sprintfex(pTmpBuf.data(), "%s \f%05d^Pv[%s]\f00000\r177%s: \f%05d%d\f00000", | |
733 pGlobalTXT_LocalizationStrings[206], // Skills for | |
734 ui_character_header_text_color, | |
735 player->pName, | |
736 pGlobalTXT_LocalizationStrings[207], // Skill Points | |
737 player->uSkillPoints ? ui_character_bonus_text_color : ui_character_default_text_color, | |
738 player->uSkillPoints); | |
739 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, 18, 0, pTmpBuf.data(), 0, 0, 0); | |
740 | |
741 int y = 2 * LOBYTE(pFontLucida->uFontHeight) + 13; | |
742 y = CharacterUI_SkillsTab_Draw__DrawSkillTable(player, 24, y, pWeaponSkills, 9, 400, pGlobalTXT_LocalizationStrings[242]); // "Weapons" | |
743 | |
744 y += 2 * LOBYTE(pFontLucida->uFontHeight) - 10; | |
745 CharacterUI_SkillsTab_Draw__DrawSkillTable(player, 24, y, pMagicSkills, 9, 400, pGlobalTXT_LocalizationStrings[138]); // "Magic" | |
746 | |
747 y = 2 * LOBYTE(pFontLucida->uFontHeight) + 13; | |
748 y = CharacterUI_SkillsTab_Draw__DrawSkillTable(player, 248, y, pArmorSkills, 5, 177, pGlobalTXT_LocalizationStrings[11]); // "Armor" | |
749 | |
750 y += 2 * LOBYTE(pFontLucida->uFontHeight) - 10; | |
751 y = CharacterUI_SkillsTab_Draw__DrawSkillTable(player, 248, y, pMiscSkills, 12, 177, pGlobalTXT_LocalizationStrings[143]); //"Misc" | |
752 } | |
753 | |
754 //----- (0041A000) -------------------------------------------------------- | |
2547 | 755 void GUIWindow_CharacterRecord::CharacterUI_AwardsTab_Draw(Player *player) |
2501 | 756 { |
757 int items_per_page; // eax@1 | |
758 char *v6; // ebx@15 | |
759 char Source[100]; // [sp+Ch] [bp-C4h]@1 | |
760 GUIWindow awards_window; // [sp+70h] [bp-60h]@1 | |
761 | |
762 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->LoadTexturePtr("fr_award", TEXTURE_16BIT_PALETTE)); | |
763 sprintfex(pTmpBuf.data(), "%s \f%05d", pGlobalTXT_LocalizationStrings[LOCSTR_AVARDS_FOR], ui_character_header_text_color); | |
764 sprintfex(Source, pGlobalTXT_LocalizationStrings[LOCSTR_S_THE_S], player->pName, pClassNames[player->classType]); | |
765 strcat(pTmpBuf.data(), Source); | |
766 strcat(pTmpBuf.data(), "\f00000"); | |
767 | |
768 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, 18, 0, pTmpBuf.data(), 0, 0, 0); | |
769 items_per_page = books_primary_item_per_page; | |
770 awards_window.uFrameX = 12; | |
771 awards_window.uFrameY = 48; | |
772 awards_window.uFrameWidth = 424; | |
773 awards_window.uFrameHeight = 290; | |
774 awards_window.uFrameZ = 435; | |
775 awards_window.uFrameW = 337; | |
776 if (BtnDown_flag && num_achieved_awards + books_primary_item_per_page < full_num_items_in_book) | |
777 items_per_page = books_primary_item_per_page++ + 1; | |
778 if (BtnUp_flag && items_per_page) | |
779 { | |
780 --items_per_page; | |
781 books_primary_item_per_page = items_per_page; | |
782 } | |
783 | |
784 if ( books_page_number < 0 ) | |
785 { | |
786 items_per_page += num_achieved_awards; | |
787 books_primary_item_per_page = items_per_page; | |
788 if ( (signed int)(num_achieved_awards + items_per_page) > full_num_items_in_book ) | |
789 { | |
790 items_per_page = full_num_items_in_book - num_achieved_awards; | |
791 books_primary_item_per_page = items_per_page; | |
792 } | |
793 } | |
794 else if ( books_page_number > 0 ) | |
795 { | |
796 items_per_page -= num_achieved_awards; | |
797 books_primary_item_per_page = items_per_page; | |
798 if ( items_per_page < 0 ) | |
799 { | |
800 items_per_page = 0; | |
801 books_primary_item_per_page = items_per_page; | |
802 } | |
803 } | |
804 BtnDown_flag = 0; | |
805 BtnUp_flag = 0; | |
806 num_achieved_awards = 0; | |
807 books_page_number = 0; | |
808 | |
809 for ( int i = items_per_page; i < full_num_items_in_book; ++i) | |
810 { | |
811 v6 = (char *)pAwards[achieved_awards[i]].pText;//(char *)dword_723E80_award_related[v20 / 4]; | |
812 pTmpBuf[0] = 0; | |
813 switch (achieved_awards[i]) | |
814 { | |
815 case Award_Arena_PageWins: sprintf(pTmpBuf.data(), v6, pParty->uNumArenaPageWins); break; | |
816 case Award_Arena_SquireWins: sprintf(pTmpBuf.data(), v6, pParty->uNumArenaSquireWins); break; | |
817 case Award_Arena_KnightWins: sprintf(pTmpBuf.data(), v6, pParty->uNumArenaKnightWins); break; | |
818 case Award_Arena_LordWins: sprintf(pTmpBuf.data(), v6, pParty->uNumArenaLordWins); break; | |
819 case Award_ArcomageWins: sprintf(pTmpBuf.data(), v6, pParty->uNumArcomageWins); break; | |
820 case Award_ArcomageLoses: sprintf(pTmpBuf.data(), v6, pParty->uNumArcomageLoses); break; | |
821 case Award_Deaths: sprintf(pTmpBuf.data(), v6, pParty->uNumDeaths); break; | |
822 case Award_BountiesCollected: sprintf(pTmpBuf.data(), v6, pParty->uNumBountiesCollected); break; | |
823 case Award_Fine: sprintf(pTmpBuf.data(), v6, pParty->uFine); break; | |
824 case Award_PrisonTerms: sprintf(pTmpBuf.data(), v6, pParty->uNumPrisonTerms); break; | |
825 } | |
826 | |
827 if (*pTmpBuf.data()) | |
828 v6 = pTmpBuf.data(); | |
829 | |
830 awards_window.DrawText(pFontArrus, 0, 0, ui_character_award_color[pAwards[achieved_awards[i]].uPriority % 6], v6, 0, 0, 0); | |
831 awards_window.uFrameY = pFontArrus->CalcTextHeight(v6, &awards_window, 0, 0) + awards_window.uFrameY + 8; | |
832 if (awards_window.uFrameY > awards_window.uFrameHeight) | |
833 break; | |
834 | |
835 ++num_achieved_awards; | |
836 } | |
837 } | |
838 | |
839 //----- (0041A2C1) -------------------------------------------------------- | |
840 unsigned int __fastcall GetSizeInInventorySlots(unsigned int uNumPixels) | |
841 { | |
842 if ( (signed int)uNumPixels < 14 ) | |
843 uNumPixels = 14; | |
844 return ((signed int)(uNumPixels - 14) >> 5) + 1; | |
845 } | |
846 | |
847 //----- (0041A556) -------------------------------------------------------- | |
848 void draw_leather() | |
849 { | |
850 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_Leather)); | |
851 } | |
852 | |
853 | |
854 //----- (0043CC7C) -------------------------------------------------------- | |
855 void CharacterUI_DrawPaperdoll(Player *player) | |
856 { | |
857 ItemGen *item; // edi@38 | |
858 int item_X; // ebx@38 | |
859 int index; // eax@65 | |
860 int v59; // ebx@129 | |
861 unsigned int v75; // ebx@170 | |
862 int v94; // ebx@214 | |
863 unsigned int v127; // ebx@314 | |
864 unsigned int v153; // eax@370 | |
865 char *v166; // [sp-8h] [bp-54h]@16 | |
866 const char *container; // [sp-8h] [bp-54h]@79 | |
867 char *v181; // [sp-8h] [bp-54h]@337 | |
868 int item_Y; // [sp+10h] [bp-3Ch]@38 | |
869 int pBodyComplection; // [sp+24h] [bp-28h]@6 | |
870 bool two_handed_left_fist; // [sp+34h] [bp-18h]@361 | |
871 signed int IsDwarf; // [sp+40h] [bp-Ch]@4 | |
872 | |
873 pIcons_LOD->LoadTexture("sptext01", TEXTURE_16BIT_PALETTE); | |
874 if (player->GetRace() == CHARACTER_RACE_DWARF) | |
875 { | |
876 IsDwarf = 1; | |
877 pBodyComplection = player->GetSexByVoice() == SEX_MALE ? 2 : 3; | |
878 } | |
879 else | |
880 { | |
881 IsDwarf = 0; | |
882 pBodyComplection = player->GetSexByVoice() == SEX_MALE ? 0 : 1; | |
883 } | |
884 | |
885 int uPlayerID = 0; | |
886 for (uint i = 0; i < 4; ++i) | |
887 if (pPlayers[i + 1] == player) | |
888 { | |
889 uPlayerID = i + 1; | |
890 break; | |
891 } | |
892 | |
2524 | 893 pRenderer->ResetUIClipRect(); |
2501 | 894 pRenderer->DrawTextureIndexed(467, 0, pIcons_LOD->GetTexture(uTextureID_BACKDOLL));//Подложка |
895 if ( IsPlayerWearingWatersuit[uPlayerID] )//акваланг | |
896 { | |
2524 | 897 pRenderer->DrawTextureIndexedAlpha(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1])); |
2501 | 898 if ( !bRingsShownInCharScreen ) |
899 pRenderer->DrawMaskToZBuffer(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]), player->pEquipment.uArmor); | |
900 //Рука не занята или ... | |
901 if ( !player->GetItem(&PlayerEquipment::uMainHand) | |
902 || ( player->GetMainHandItem()->GetItemEquipType() != EQUIP_TWO_HANDED) | |
903 && (player->GetMainHandItem()->GetItemEquipType() != PLAYER_SKILL_SPEAR | |
904 || player->GetItem(&PlayerEquipment::uShield)) ) | |
2524 | 905 pRenderer->DrawTextureIndexedAlpha(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], |
2501 | 906 pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1])); |
907 //-----------------------------------------------------(Hand/Рука)--------------------------------------------------------------- | |
908 if ( player->GetItem(&PlayerEquipment::uMainHand) ) | |
909 { | |
910 item = player->GetMainHandItem(); | |
911 item_X = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[item->uItemID].uEquipX; | |
912 item_Y = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][1][1] - pItemsTable->pItems[item->uItemID].uEquipY; | |
913 if ( item->uItemID == 64 ) //blaster | |
914 v166 = "item64v1"; | |
915 else | |
916 v166 = item->GetIconName(); | |
917 | |
918 if ( item->ItemEnchanted() ) | |
919 { | |
920 if ( item->AuraEffectRed() ) | |
921 container = "sptext01"; | |
922 else if ( item->AuraEffectBlue() ) | |
923 container = "sp28a"; | |
924 else if ( item->AuraEffectGreen() ) | |
925 container = "sp30a"; | |
926 else if ( item->AuraEffectPurple() ) | |
927 container = "sp91a"; | |
928 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | |
929 if ( _50C9A8_item_enchantment_timer <= 0 ) | |
930 { | |
931 _50C9A8_item_enchantment_timer = 0; | |
932 item->ResetEnchantAnimation(); | |
933 ptr_50C9A4_ItemToEnchant = nullptr; | |
934 } | |
935 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE)), | |
936 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255); | |
937 } | |
938 else if ( item->uAttributes & ITEM_BROKEN ) | |
939 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE))); | |
940 else if ( item->uAttributes & ITEM_IDENTIFIED ) | |
2524 | 941 pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE))); |
2501 | 942 else |
943 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE))); | |
944 | |
945 if ( !bRingsShownInCharScreen ) | |
946 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE)), player->pEquipment.uMainHand); | |
947 } | |
948 } | |
949 else// без акваланга | |
950 { | |
951 //----------------(Bow/ Лук)------------------------------------------------- | |
952 if ( player->GetItem(&PlayerEquipment::uBow) ) | |
953 { | |
954 item = player->GetBowItem(); | |
955 item_X = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][2][0] - pItemsTable->pItems[item->uItemID].uEquipX; | |
956 item_Y = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][2][1] - pItemsTable->pItems[item->uItemID].uEquipY; | |
957 | |
958 if ( item->ItemEnchanted() )// применён закл | |
959 { | |
960 if ( item->AuraEffectRed() ) | |
961 container = "sptext01"; | |
962 else if ( item->AuraEffectBlue() ) | |
963 container = "sp28a"; | |
964 else if ( item->AuraEffectGreen() ) | |
965 container = "sp30a"; | |
966 else if ( item->AuraEffectPurple() ) | |
967 container = "sp91a"; | |
968 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | |
969 if ( _50C9A8_item_enchantment_timer <= 0 ) | |
970 { | |
971 _50C9A8_item_enchantment_timer = 0; | |
972 item->ResetEnchantAnimation(); | |
973 ptr_50C9A4_ItemToEnchant = nullptr; | |
974 } | |
975 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(item->GetIconName(), TEXTURE_16BIT_PALETTE)), | |
976 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE),GetTickCount() * 0.1, 0, 255); | |
977 } | |
978 else if ( item->uAttributes & ITEM_BROKEN ) | |
979 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(item->GetIconName(), TEXTURE_16BIT_PALETTE))); | |
980 else if ( !(item->uAttributes & ITEM_IDENTIFIED) )//не опознанный лук зелёный | |
981 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(item->GetIconName(), TEXTURE_16BIT_PALETTE))); | |
982 else // опознанный лук | |
2524 | 983 pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(item->GetIconName(), TEXTURE_16BIT_PALETTE))); |
2501 | 984 |
985 if ( !bRingsShownInCharScreen ) | |
986 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(item->GetIconName(), TEXTURE_16BIT_PALETTE)), | |
987 player->pEquipment.uBow); | |
988 } | |
989 //-----------------------------(Cloak/Плащ)--------------------------------------------------------- | |
990 if ( player->GetItem(&PlayerEquipment::uCloak) ) | |
991 { | |
992 item = player->GetCloakItem(); | |
993 switch ( item->uItemID ) | |
994 { | |
995 case ITEM_RELIC_TWILIGHT: | |
996 index = 5; | |
997 break; | |
998 case ITEM_ARTIFACT_CLOAK_OF_THE_SHEEP: | |
999 index = 6; | |
1000 break; | |
1001 case ITEM_RARE_SUN_CLOAK: | |
1002 index = 7; | |
1003 break; | |
1004 case ITEM_RARE_MOON_CLOAK: | |
1005 index = 8; | |
1006 break; | |
1007 case ITEM_RARE_VAMPIRES_CAPE: | |
1008 index = 9; | |
1009 break; | |
1010 default: | |
1011 index = item->uItemID - 105; | |
1012 break; | |
1013 } | |
1014 if ( index >= 0 && index < 10 ) | |
1015 { | |
1016 item_X = pPaperdoll_BodyX + paperdoll_Cloak[pBodyComplection][index][0]; | |
1017 item_Y = pPaperdoll_BodyY + paperdoll_Cloak[pBodyComplection][index][1]; | |
1018 | |
1019 if ( item->ItemEnchanted() ) | |
1020 { | |
1021 if ( item->AuraEffectRed() ) | |
1022 container = "sptext01"; | |
1023 else if ( item->AuraEffectBlue() ) | |
1024 container = "sp28a"; | |
1025 else if ( item->AuraEffectGreen() ) | |
1026 container = "sp30a"; | |
1027 else if ( item->AuraEffectPurple() ) | |
1028 container = "sp91a"; | |
1029 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | |
1030 if ( _50C9A8_item_enchantment_timer <= 0 ) | |
1031 { | |
1032 _50C9A8_item_enchantment_timer = 0; | |
1033 item->ResetEnchantAnimation();//~0x000000F0 | |
1034 ptr_50C9A4_ItemToEnchant = nullptr; | |
1035 } | |
1036 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_texture[pBodyComplection][index]), | |
1037 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255); | |
1038 } | |
1039 else if ( item->uAttributes & ITEM_BROKEN ) | |
1040 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_texture[pBodyComplection][index])); | |
1041 else | |
2524 | 1042 pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_texture[pBodyComplection][index])); |
2501 | 1043 |
1044 if ( !bRingsShownInCharScreen ) | |
1045 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_texture[pBodyComplection][index]), | |
1046 player->pEquipment.uCloak); | |
1047 } | |
1048 } | |
1049 //-------------------------------(Paperdoll/Кукла)------------------------------------------- | |
2524 | 1050 pRenderer->DrawTextureIndexedAlpha(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1])); |
2501 | 1051 //-------------------------------(Armor/Броня)----------------------------------------------- |
1052 if ( player->GetItem(&PlayerEquipment::uArmor) ) | |
1053 { | |
1054 item = player->GetArmorItem(); | |
1055 switch ( item->uItemID ) | |
1056 { | |
1057 case ITEM_ARTIFACT_GOVERNORS_ARMOR: | |
1058 index = 15; | |
1059 break; | |
1060 case ITEM_ARTIFACT_YORUBA: | |
1061 index = 14; | |
1062 break; | |
1063 case ITEM_RELIC_HARECS_LEATHER: | |
1064 index = 13; | |
1065 break; | |
1066 case ITEM_ELVEN_CHAINMAIL: | |
1067 index = 16; | |
1068 break; | |
1069 default: | |
1070 index = item->uItemID - 66; | |
1071 break; | |
1072 } | |
1073 if ( index >= 0 && index < 17 ) | |
1074 { | |
1075 item_X = pPaperdoll_BodyX + paperdoll_Armor_Coord[pBodyComplection][index][0]; | |
1076 item_Y = pPaperdoll_BodyY + paperdoll_Armor_Coord[pBodyComplection][index][1]; | |
1077 | |
1078 if ( item->ItemEnchanted() ) | |
1079 { | |
1080 if ( item->AuraEffectRed() ) | |
1081 container = "sptext01"; | |
1082 else if ( item->AuraEffectBlue() ) | |
1083 container = "sp28a"; | |
1084 else if ( item->AuraEffectGreen() ) | |
1085 container = "sp30a"; | |
1086 else if ( item->AuraEffectPurple() ) | |
1087 container = "sp91a"; | |
1088 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | |
1089 if ( _50C9A8_item_enchantment_timer <= 0 ) | |
1090 { | |
1091 _50C9A8_item_enchantment_timer = 0; | |
1092 item->ResetEnchantAnimation();//~0x000000F0 | |
1093 ptr_50C9A4_ItemToEnchant = nullptr; | |
1094 } | |
1095 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][0]), | |
1096 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255); | |
1097 } | |
1098 else if ( item->uAttributes & ITEM_BROKEN ) | |
1099 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][0])); | |
1100 else if ( !(item->uAttributes & ITEM_IDENTIFIED) ) | |
1101 pRenderer->DrawTransparentGreenShade(item_X, item_Y, &pIcons_LOD->pTextures[paperdoll_armor_texture[pBodyComplection][index][0]]); | |
1102 else | |
2524 | 1103 pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, &pIcons_LOD->pTextures[paperdoll_armor_texture[pBodyComplection][index][0]]); |
2501 | 1104 |
1105 if ( !bRingsShownInCharScreen ) | |
1106 pRenderer->DrawMaskToZBuffer(item_X, item_Y, &pIcons_LOD->pTextures[paperdoll_armor_texture[pBodyComplection][index][0]], | |
1107 player->pEquipment.uArmor); | |
1108 } | |
1109 } | |
1110 //----------------------------------(Boot/Обувь)-------------------------------------------------------- | |
1111 if ( player->GetItem(&PlayerEquipment::uBoot) ) | |
1112 { | |
1113 item = player->GetBootItem(); | |
1114 switch ( item->uItemID ) | |
1115 { | |
1116 case ITEM_ARTIFACT_HERMES_SANDALS: | |
1117 index = 5; | |
1118 v59 = papredoll_flying_feet[player->uCurrentFace]; | |
1119 break; | |
1120 case ITEM_ARTIFACT_LEAGUE_BOOTS: | |
1121 index = 6; | |
1122 v59 = paperdoll_boots_texture[pBodyComplection][5]; | |
1123 break; | |
1124 default: | |
1125 index = item->uItemID - 115; | |
1126 v59 = paperdoll_boots_texture[pBodyComplection][index]; | |
1127 break; | |
1128 } | |
1129 if ( index >= 0 && index < 7 ) | |
1130 { | |
1131 item_X = pPaperdoll_BodyX + paperdoll_Boot[pBodyComplection][index][0]; | |
1132 item_Y = pPaperdoll_BodyY + paperdoll_Boot[pBodyComplection][index][1]; | |
1133 | |
1134 if ( item->ItemEnchanted() ) | |
1135 { | |
1136 if ( item->AuraEffectRed() ) | |
1137 container = "sptext01"; | |
1138 else if ( item->AuraEffectBlue() ) | |
1139 container = "sp28a"; | |
1140 else if ( item->AuraEffectGreen() ) | |
1141 container = "sp30a"; | |
1142 else if ( item->AuraEffectPurple() ) | |
1143 container = "sp91a"; | |
1144 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | |
1145 if ( _50C9A8_item_enchantment_timer <= 0 ) | |
1146 { | |
1147 _50C9A8_item_enchantment_timer = 0; | |
1148 item->ResetEnchantAnimation();//~0x000000F0 | |
1149 ptr_50C9A4_ItemToEnchant = nullptr; | |
1150 } | |
1151 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v59), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), | |
1152 GetTickCount() * 0.1, 0, 255); | |
1153 } | |
1154 else if ( item->uAttributes & ITEM_BROKEN ) | |
1155 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v59)); | |
1156 else if ( item->uAttributes & ITEM_IDENTIFIED ) | |
2524 | 1157 pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(v59)); |
2501 | 1158 else |
1159 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v59)); | |
1160 | |
1161 if ( !bRingsShownInCharScreen ) | |
1162 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v59), player->pEquipment.uBoot); | |
1163 } | |
1164 } | |
1165 //--------------------------------------------(Hand/Рука)------------------------------------------------------ | |
1166 if ( !player->GetItem(&PlayerEquipment::uMainHand) | |
1167 || ( player->GetMainHandItem()->GetItemEquipType() != EQUIP_TWO_HANDED) | |
1168 && (player->GetMainHandItem()->GetPlayerSkillType() != PLAYER_SKILL_SPEAR | |
1169 || player->GetItem(&PlayerEquipment::uShield)) ) | |
2524 | 1170 pRenderer->DrawTextureIndexedAlpha(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], |
2501 | 1171 pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1])); |
1172 //--------------------------------------------(Belt/Пояс)------------------------------------------------------- | |
1173 if ( player->GetItem(&PlayerEquipment::uBelt)) | |
1174 { | |
1175 item = player->GetBeltItem(); | |
1176 switch ( item->uItemID ) | |
1177 { | |
1178 case ITEM_RILIC_TITANS_BELT: | |
1179 index = 5; | |
1180 break; | |
1181 case ITEM_ARTIFACT_HEROS_BELT: | |
1182 index = 6; | |
1183 break; | |
1184 default: | |
1185 index = item->uItemID - 100; | |
1186 break; | |
1187 } | |
1188 if ( index >= 0 && index < 7 ) | |
1189 { | |
1190 item_X = pPaperdoll_BodyX + paperdoll_Belt[pBodyComplection][index][0]; | |
1191 item_Y = pPaperdoll_BodyY + paperdoll_Belt[pBodyComplection][index][1]; | |
1192 if ( IsDwarf != 1 || index == 5 ) | |
1193 v75 = paperdoll_belt_texture[pBodyComplection][index]; | |
1194 else | |
1195 v75 = paperdoll_belt_texture[pBodyComplection - 2][index]; | |
1196 | |
1197 if ( item->ItemEnchanted() ) | |
1198 { | |
1199 if ( item->AuraEffectRed() ) | |
1200 container = "sptext01"; | |
1201 else if ( item->AuraEffectBlue() ) | |
1202 container = "sp28a"; | |
1203 else if ( item->AuraEffectGreen() ) | |
1204 container = "sp30a"; | |
1205 else if ( item->AuraEffectPurple() ) | |
1206 container = "sp91a"; | |
1207 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | |
1208 if ( _50C9A8_item_enchantment_timer <= 0 ) | |
1209 { | |
1210 _50C9A8_item_enchantment_timer = 0; | |
1211 item->ResetEnchantAnimation();//~0x000000F0 | |
1212 ptr_50C9A4_ItemToEnchant = nullptr; | |
1213 } | |
1214 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v75), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), | |
1215 GetTickCount() * 0.1, 0, 255); | |
1216 } | |
1217 else if ( item->uAttributes & ITEM_BROKEN ) | |
1218 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v75)); | |
1219 else if ( item->uAttributes & ITEM_IDENTIFIED ) | |
2524 | 1220 pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(v75)); |
2501 | 1221 else |
1222 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v75)); | |
1223 | |
1224 if ( !bRingsShownInCharScreen ) | |
1225 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v75), player->pEquipment.uBelt); | |
1226 } | |
1227 } | |
1228 //--------------------------------(Shoulder/Плечи)--------------------------------------------- | |
1229 if (player->GetItem(&PlayerEquipment::uArmor)) | |
1230 { | |
1231 item = player->GetArmorItem(); | |
1232 switch ( item->uItemID ) | |
1233 { | |
1234 case ITEM_ARTIFACT_GOVERNORS_ARMOR: | |
1235 index = 15; | |
1236 break; | |
1237 case ITEM_ARTIFACT_YORUBA: | |
1238 index = 14; | |
1239 break; | |
1240 case ITEM_RELIC_HARECS_LEATHER: | |
1241 index = 13; | |
1242 break; | |
1243 case ITEM_ELVEN_CHAINMAIL: | |
1244 index = 16; | |
1245 break; | |
1246 default: | |
1247 index = item->uItemID - 66; | |
1248 break; | |
1249 } | |
1250 if ( index >= 0 && index < 17 ) | |
1251 { | |
1252 if ( player->GetItem(&PlayerEquipment::uMainHand) && (player->GetMainHandItem()->GetItemEquipType() == EQUIP_TWO_HANDED | |
1253 || player->GetMainHandItem()->GetPlayerSkillType() == PLAYER_SKILL_SPEAR | |
1254 && !player->GetItem(&PlayerEquipment::uShield) ))//без щита | |
1255 { | |
1256 v94 = paperdoll_armor_texture[pBodyComplection][index][2]; | |
1257 if ( paperdoll_armor_texture[pBodyComplection][index][2] == pIcons_LOD->FindTextureByName("pending") ) | |
1258 { | |
1259 v94 = paperdoll_armor_texture[pBodyComplection][index][1]; | |
1260 item_X = pPaperdoll_BodyX + paperdoll_shoulder_coord[pBodyComplection][index][0]; | |
1261 item_Y = pPaperdoll_BodyY + paperdoll_shoulder_coord[pBodyComplection][index][1]; | |
1262 } | |
1263 else | |
1264 { | |
1265 item_X = pPaperdoll_BodyX + paperdoll_shoulder_second_coord[pBodyComplection][index][0]; | |
1266 item_Y = pPaperdoll_BodyY + paperdoll_shoulder_second_coord[pBodyComplection][index][1]; | |
1267 } | |
1268 if ( v94 != pIcons_LOD->FindTextureByName("pending") ) | |
1269 { | |
1270 if ( item->ItemEnchanted() ) | |
1271 { | |
1272 if ( paperdoll_armor_texture[pBodyComplection][index][2] != pIcons_LOD->FindTextureByName("pending") ) | |
1273 { | |
1274 if ( item->AuraEffectRed() ) | |
1275 container = "sptext01"; | |
1276 else if ( item->AuraEffectBlue() ) | |
1277 container = "sp28a"; | |
1278 else if ( item->AuraEffectGreen() ) | |
1279 container = "sp30a"; | |
1280 else if ( item->AuraEffectPurple() ) | |
1281 container = "sp91a"; | |
1282 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | |
1283 if ( _50C9A8_item_enchantment_timer <= 0 ) | |
1284 { | |
1285 _50C9A8_item_enchantment_timer = 0; | |
1286 item->ResetEnchantAnimation();//~0x000000F0 | |
1287 ptr_50C9A4_ItemToEnchant = nullptr; | |
1288 } | |
1289 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v94), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), | |
1290 GetTickCount() * 0.1, 0, 255); | |
1291 } | |
1292 } | |
1293 else if ( item->uAttributes & ITEM_BROKEN ) | |
1294 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v94)); | |
1295 else if ( item->uAttributes & ITEM_IDENTIFIED ) | |
2524 | 1296 pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(v94)); |
2501 | 1297 else |
1298 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v94)); | |
1299 | |
1300 } | |
1301 } | |
1302 else//без ничего или с щитом | |
1303 { | |
1304 //v94 = paperdoll_armor_texture[pBodyComplection][index][1]; | |
1305 if ( paperdoll_armor_texture[pBodyComplection][index][1] != pIcons_LOD->FindTextureByName("pending") ) | |
1306 { | |
1307 item_X = pPaperdoll_BodyX + paperdoll_shoulder_coord[pBodyComplection][index][0]; | |
1308 item_Y = pPaperdoll_BodyY + paperdoll_shoulder_coord[pBodyComplection][index][1]; | |
1309 | |
1310 if ( item->ItemEnchanted() ) | |
1311 { | |
1312 if ( item->AuraEffectRed() ) | |
1313 container = "sptext01"; | |
1314 else if ( item->AuraEffectBlue() ) | |
1315 container = "sp28a"; | |
1316 else if ( item->AuraEffectGreen() ) | |
1317 container = "sp30a"; | |
1318 else if ( item->AuraEffectPurple() ) | |
1319 container = "sp91a"; | |
1320 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | |
1321 if ( _50C9A8_item_enchantment_timer <= 0 ) | |
1322 { | |
1323 _50C9A8_item_enchantment_timer = 0; | |
1324 item->ResetEnchantAnimation();//~0x000000F0 | |
1325 ptr_50C9A4_ItemToEnchant = nullptr; | |
1326 } | |
1327 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]), | |
1328 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255); | |
1329 } | |
1330 else if ( item->uAttributes & ITEM_BROKEN ) | |
1331 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1])); | |
1332 else if ( item->uAttributes & ITEM_IDENTIFIED ) | |
2524 | 1333 pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1])); |
2501 | 1334 else |
1335 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1])); | |
1336 | |
1337 } | |
1338 } | |
1339 } | |
1340 } | |
1341 //----------------------------------------------(Cloak collar/воротник плаща)------------------------------------- | |
1342 if ( player->GetItem(&PlayerEquipment::uCloak) ) | |
1343 { | |
1344 item = player->GetCloakItem(); | |
1345 switch ( item->uItemID ) | |
1346 { | |
1347 case ITEM_RELIC_TWILIGHT: | |
1348 index = 5; | |
1349 break; | |
1350 case ITEM_ARTIFACT_CLOAK_OF_THE_SHEEP: | |
1351 index = 6; | |
1352 break; | |
1353 case ITEM_RARE_SUN_CLOAK: | |
1354 index = 7; | |
1355 break; | |
1356 case ITEM_RARE_MOON_CLOAK: | |
1357 index = 8; | |
1358 break; | |
1359 case ITEM_RARE_VAMPIRES_CAPE: | |
1360 index = 9; | |
1361 break; | |
1362 default: | |
1363 index = item->uItemID - 105; | |
1364 } | |
1365 if ( index >= 0 && index < 10 ) | |
1366 { | |
1367 item_X = pPaperdoll_BodyX + paperdoll_CloakCollar[pBodyComplection][index][0]; | |
1368 item_Y = pPaperdoll_BodyY + paperdoll_CloakCollar[pBodyComplection][index][1]; | |
1369 signed int r = pIcons_LOD->FindTextureByName("item325v2a1"); | |
1370 | |
1371 if ( paperdoll_cloak_collar_texture[pBodyComplection][index] != pIcons_LOD->FindTextureByName("pending") ) | |
1372 { | |
1373 if ( item->ItemEnchanted() ) | |
1374 { | |
1375 if ( item->AuraEffectRed() ) | |
1376 container = "sptext01"; | |
1377 else if ( item->AuraEffectBlue() ) | |
1378 container = "sp28a"; | |
1379 else if ( item->AuraEffectGreen() ) | |
1380 container = "sp30a"; | |
1381 else if ( item->AuraEffectPurple() ) | |
1382 container = "sp91a"; | |
1383 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | |
1384 if ( _50C9A8_item_enchantment_timer <= 0 ) | |
1385 { | |
1386 _50C9A8_item_enchantment_timer = 0; | |
1387 item->ResetEnchantAnimation();//~0x000000F0 | |
1388 ptr_50C9A4_ItemToEnchant = nullptr; | |
1389 } | |
1390 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_collar_texture[pBodyComplection][index]), | |
1391 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255); | |
1392 } | |
1393 else if ( item->uAttributes & ITEM_BROKEN ) | |
1394 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_collar_texture[pBodyComplection][index])); | |
1395 else | |
2524 | 1396 pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_collar_texture[pBodyComplection][index])); |
2501 | 1397 |
1398 if ( !bRingsShownInCharScreen ) | |
1399 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_collar_texture[pBodyComplection][index]), | |
1400 player->pEquipment.uCloak); | |
1401 } | |
1402 } | |
1403 } | |
1404 //--------------------------------------------(Beards/Борода)------------------------------------------------------- | |
1405 if ( player->uCurrentFace == 12 || player->uCurrentFace == 13 ) | |
1406 { | |
1407 if ( papredoll_dbrds[player->uCurrentFace] != pIcons_LOD->FindTextureByName("Pending") ) | |
2524 | 1408 pRenderer->DrawTextureIndexedAlpha(pPaperdoll_BodyX + pPaperdoll_Beards[2 * player->uCurrentFace - 24], |
2501 | 1409 pPaperdoll_BodyY + pPaperdoll_Beards[2 * player->uCurrentFace - 23], |
1410 pIcons_LOD->GetTexture(papredoll_dbrds[player->uCurrentFace])); | |
1411 } | |
1412 //--------------------------------------------(Helm/Шлем)------------------------------------------------------------ | |
1413 if ( player->GetItem(&PlayerEquipment::uHelm) ) | |
1414 { | |
1415 item = player->GetHelmItem(); | |
1416 switch ( item->uItemID ) | |
1417 { | |
1418 case ITEM_RELIC_TALEDONS_HELM: | |
1419 index = 11; | |
1420 break; | |
1421 case ITEM_RELIC_SCHOLARS_CAP: | |
1422 index = 12; | |
1423 break; | |
1424 case ITEM_RELIC_PHYNAXIAN_CROWN: | |
1425 index = 13; | |
1426 break; | |
1427 case ITEM_ARTIFACT_MINDS_EYE: | |
1428 index = 14; | |
1429 break; | |
1430 case ITEM_RARE_SHADOWS_MASK: | |
1431 index = 15; | |
1432 break; | |
1433 default: | |
1434 index = item->uItemID - 89; | |
1435 } | |
1436 if ( index >= 0 && index < 16 ) | |
1437 { | |
1438 item_X = pPaperdoll_BodyX + paperdoll_Helm[pBodyComplection][index][0]; | |
1439 item_Y = pPaperdoll_BodyY + paperdoll_Helm[pBodyComplection][index][1]; | |
1440 if ( IsDwarf != 1 || item->uItemID != 92 ) | |
1441 v127 = paperdoll_helm_texture[player->GetSexByVoice()][index]; | |
1442 else | |
1443 v127 = papredoll_dbrds[11]; | |
1444 | |
1445 if ( item->ItemEnchanted() ) | |
1446 { | |
1447 if ( item->AuraEffectRed() ) | |
1448 container = "sptext01"; | |
1449 else if ( item->AuraEffectBlue() ) | |
1450 container = "sp28a"; | |
1451 else if ( item->AuraEffectGreen() ) | |
1452 container = "sp30a"; | |
1453 else if ( item->AuraEffectPurple() ) | |
1454 container = "sp91a"; | |
1455 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | |
1456 if ( _50C9A8_item_enchantment_timer <= 0 ) | |
1457 { | |
1458 _50C9A8_item_enchantment_timer = 0; | |
1459 item->ResetEnchantAnimation(); | |
1460 ptr_50C9A4_ItemToEnchant = nullptr; | |
1461 } | |
1462 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v127), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), | |
1463 GetTickCount() * 0.1, 0, 255); | |
1464 } | |
1465 else if ( item->uAttributes & ITEM_BROKEN ) | |
1466 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v127)); | |
1467 else if ( item->uAttributes & ITEM_IDENTIFIED ) | |
2524 | 1468 pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(v127)); |
2501 | 1469 else |
1470 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v127)); | |
1471 | |
1472 if ( !bRingsShownInCharScreen ) | |
1473 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v127), player->pEquipment.uHelm); | |
1474 } | |
1475 } | |
1476 //------------------------------------------------(Hand3/Рука3)------------------------------------------- | |
1477 if ( player->GetItem(&PlayerEquipment::uMainHand) ) | |
1478 { | |
1479 item = player->GetMainHandItem(); | |
1480 item_X = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[item->uItemID].uEquipX; | |
1481 item_Y = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][1][1] - pItemsTable->pItems[item->uItemID].uEquipY; | |
1482 if ( item->uItemID == 64 ) | |
1483 v181 = "item64v1"; | |
1484 else | |
1485 v181 = item->GetIconName(); | |
1486 | |
1487 if ( item->ItemEnchanted() ) | |
1488 { | |
1489 if ( item->AuraEffectRed() ) | |
1490 container = "sptext01"; | |
1491 else if ( item->AuraEffectBlue() ) | |
1492 container = "sp28a"; | |
1493 else if ( item->AuraEffectGreen() ) | |
1494 container = "sp30a"; | |
1495 else if ( item->AuraEffectPurple() ) | |
1496 container = "sp91a"; | |
1497 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | |
1498 if ( _50C9A8_item_enchantment_timer <= 0 ) | |
1499 { | |
1500 _50C9A8_item_enchantment_timer = 0; | |
1501 item->ResetEnchantAnimation(); | |
1502 ptr_50C9A4_ItemToEnchant = nullptr; | |
1503 } | |
1504 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE)), | |
1505 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255); | |
1506 } | |
1507 else if ( item->uAttributes & ITEM_BROKEN ) | |
1508 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE))); | |
1509 else if ( item->uAttributes & ITEM_IDENTIFIED ) | |
2524 | 1510 pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE))); |
2501 | 1511 else |
1512 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE))); | |
1513 | |
1514 if ( !bRingsShownInCharScreen ) | |
1515 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE)), | |
1516 player->pEquipment.uMainHand); | |
1517 } | |
1518 //--------------------------------------------------(Shield/Щит)--------------------------------------------- | |
1519 if ( player->GetItem(&PlayerEquipment::uShield) ) | |
1520 { | |
1521 item = player->GetOffHandItem(); | |
1522 if ( item->GetPlayerSkillType() == PLAYER_SKILL_DAGGER | |
1523 || item->GetPlayerSkillType() == PLAYER_SKILL_SWORD ) | |
1524 { | |
1525 //v151 = item->uItemID - 400; | |
1526 item_X = 596; | |
1527 two_handed_left_fist = true; | |
1528 switch ( item->uItemID ) | |
1529 { | |
1530 case 400: | |
1531 item_Y = 86; | |
1532 break; | |
1533 case 403: | |
1534 item_Y = 28; | |
1535 break; | |
1536 case 415: | |
1537 item_X = 595; | |
1538 item_Y = 33; | |
1539 break; | |
1540 default: | |
1541 item_X = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][0][0] - pItemsTable->pItems[item->uItemID].uEquipX; | |
1542 item_Y = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][0][1] - pItemsTable->pItems[item->uItemID].uEquipY; | |
1543 break; | |
1544 } | |
1545 } | |
1546 else | |
1547 { | |
1548 two_handed_left_fist = false; | |
1549 item_X = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][0][0] - pItemsTable->pItems[item->uItemID].uEquipX; | |
1550 item_Y = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][0][1] - pItemsTable->pItems[item->uItemID].uEquipY; | |
1551 } | |
1552 v153 = pIcons_LOD->LoadTexture(item->GetIconName(), TEXTURE_16BIT_PALETTE); | |
1553 | |
1554 if ( item->ItemEnchanted() ) | |
1555 { | |
1556 if ( item->AuraEffectRed() ) | |
1557 container = "sptext01"; | |
1558 else if ( item->AuraEffectBlue() ) | |
1559 container = "sp28a"; | |
1560 else if ( item->AuraEffectGreen() ) | |
1561 container = "sp30a"; | |
1562 else if ( item->AuraEffectPurple() ) | |
1563 container = "sp91a"; | |
1564 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | |
1565 if ( _50C9A8_item_enchantment_timer <= 0 ) | |
1566 { | |
1567 _50C9A8_item_enchantment_timer = 0; | |
1568 item->ResetEnchantAnimation(); | |
1569 ptr_50C9A4_ItemToEnchant = nullptr; | |
1570 } | |
1571 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v153), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), | |
1572 GetTickCount() * 0.1, 0, 255); | |
1573 } | |
1574 else if ( item->uAttributes & ITEM_BROKEN ) | |
1575 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v153)); | |
1576 else if ( !(item->uAttributes & ITEM_IDENTIFIED) ) | |
1577 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v153)); | |
1578 else | |
2524 | 1579 pRenderer->DrawTextureIndexedAlpha(item_X, item_Y, pIcons_LOD->GetTexture(v153)); |
2501 | 1580 |
1581 if ( two_handed_left_fist )//two-handed - left fist/двуручие - левая кисть | |
2524 | 1582 pRenderer->DrawTextureIndexedAlpha(pPaperdoll_BodyX + pPaperdollLeftEmptyHand[pBodyComplection][0], |
2501 | 1583 pPaperdoll_BodyY + pPaperdollLeftEmptyHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlhs[uPlayerID - 1])); |
1584 if ( !bRingsShownInCharScreen ) | |
1585 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v153), player->pEquipment.uShield); | |
1586 } | |
1587 } | |
1588 //--------------------------------------------------------(RightHand/Правая кисть)-------------------------------------------------- | |
2524 | 1589 pRenderer->DrawTextureIndexedAlpha(pPaperdoll_BodyX + pPaperdoll_RightHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_RightHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_drhs[uPlayerID - 1])); |
2501 | 1590 //---------------------------------------------(two-handed - hand/Двуручие - рука)-------------------------------------------------- |
1591 if ( player->GetItem(&PlayerEquipment::uMainHand) ) | |
1592 { | |
1593 if ( player->GetMainHandItem()->GetItemEquipType() == EQUIP_TWO_HANDED | |
1594 || player->GetMainHandItem()->GetPlayerSkillType() == PLAYER_SKILL_SPEAR | |
1595 && !player->GetItem(&PlayerEquipment::uShield) ) | |
2524 | 1596 pRenderer->DrawTextureIndexedAlpha(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], |
2501 | 1597 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlaus[uPlayerID - 1])); |
1598 } | |
1599 //--------------------------------------------------------(two-handed - fist/двуручие - кисть)---------------------------------------------------- | |
1600 if ( player->GetItem(&PlayerEquipment::uMainHand)) | |
1601 { | |
1602 item = player->GetMainHandItem(); | |
1603 if ( item->GetItemEquipType() == EQUIP_TWO_HANDED | |
1604 || item->GetPlayerSkillType() == PLAYER_SKILL_SPEAR | |
1605 && !player->GetItem(&PlayerEquipment::uShield) ) | |
2524 | 1606 pRenderer->DrawTextureIndexedAlpha(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], |
2501 | 1607 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], |
1608 pIcons_LOD->GetTexture(papredoll_dlhus[uPlayerID - 1])); | |
1609 } | |
1610 if ( !bRingsShownInCharScreen )//рисование лупы | |
2524 | 1611 pRenderer->DrawTextureIndexedAlpha(603, 299, pIcons_LOD->GetTexture(uTextureID_MAGNIF_B)); |
1612 pRenderer->DrawTextureIndexedAlpha(468, 0, pIcons_LOD->GetTexture(uTextureID_right_panel_loop));//обрамление | |
2501 | 1613 } |
1614 | |
1615 //----- (0041A2D1) -------------------------------------------------------- | |
1616 void CharacterUI_InventoryTab_Draw(Player *player, bool a2) | |
1617 { | |
1618 Texture *pTexture; // esi@6 | |
1619 unsigned int v17; // edi@15 | |
1620 unsigned int uCellX; // [sp+30h] [bp-8h]@5 | |
1621 unsigned int uCellY; // [sp+34h] [bp-4h]@5 | |
1622 | |
1623 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_CharacterUI_InventoryBackground)); | |
1624 if (a2) | |
1625 pRenderer->DrawTextureIndexed(8, 305, pIcons_LOD->LoadTexturePtr("fr_strip", TEXTURE_16BIT_PALETTE)); | |
1626 for (uint i = 0; i < 126; ++i) | |
1627 { | |
1628 if ( player->pInventoryMatrix[i] <= 0 ) | |
1629 continue; | |
1630 if ( !player->pInventoryItemList[player->pInventoryMatrix[i] - 1].uItemID ) | |
1631 continue; | |
1632 uCellY = 32 * (i / 14) + 17; | |
1633 uCellX = 32 * (i % 14) + 14; | |
1634 uint item_texture_id = pIcons_LOD->LoadTexture(player->pInventoryItemList[player->pInventoryMatrix[i] - 1].GetIconName(), TEXTURE_16BIT_PALETTE); | |
1635 pTexture = pIcons_LOD->GetTexture(item_texture_id); | |
1636 if (pTexture->uTextureWidth < 14) | |
1637 pTexture->uTextureWidth = 14; | |
1638 if ( (pTexture->uTextureWidth - 14) / 32 == 0 && pTexture->uTextureWidth < 32) | |
1639 uCellX += (32 - pTexture->uTextureWidth) / 2; | |
1640 //v13 = pTexture->uTextureWidth - 14; | |
1641 //LOBYTE(v13) = v13 & 0xE0; | |
1642 //v15 = v13 + 32; | |
1643 if (pTexture->uTextureHeight < 14 ) | |
1644 pTexture->uTextureHeight = 14; | |
1645 v17 = uCellX + (( (int)((pTexture->uTextureWidth - 14) & 0xE0) + 32 - pTexture->uTextureWidth) / 2) | |
1646 + pSRZBufferLineOffsets[uCellY + (( (int)((pTexture->uTextureHeight - 14) & 0xFFFFFFE0) - pTexture->uTextureHeight + 32) / 2)]; //added typecast. without it the value in the brackets got cat to unsigned which messed stuff up | |
1647 if (player->pInventoryItemList[player->pInventoryMatrix[i] - 1].uAttributes & ITEM_ENCHANT_ANIMATION) | |
1648 { | |
1649 Texture *loadedTextureptr = nullptr; | |
1650 switch (player->pInventoryItemList[player->pInventoryMatrix[i] - 1].uAttributes & ITEM_ENCHANT_ANIMATION) | |
1651 { | |
1652 case ITEM_AURA_EFFECT_RED: loadedTextureptr = pIcons_LOD->LoadTexturePtr("sptext01", TEXTURE_16BIT_PALETTE); break; | |
1653 case ITEM_AURA_EFFECT_BLUE: loadedTextureptr = pIcons_LOD->LoadTexturePtr("sp28a", TEXTURE_16BIT_PALETTE); break; | |
1654 case ITEM_AURA_EFFECT_GREEN: loadedTextureptr = pIcons_LOD->LoadTexturePtr("sp30a", TEXTURE_16BIT_PALETTE); break; | |
1655 case ITEM_AURA_EFFECT_PURPLE: loadedTextureptr = pIcons_LOD->LoadTexturePtr("sp91a", TEXTURE_16BIT_PALETTE); break; | |
1656 } | |
1657 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | |
1658 if (_50C9A8_item_enchantment_timer <= 0) | |
1659 { | |
1660 _50C9A8_item_enchantment_timer = 0; | |
1661 LOBYTE(player->pInventoryItemList[player->pInventoryMatrix[i] - 1].uAttributes) &= 0xF; | |
1662 ptr_50C9A4_ItemToEnchant = nullptr; | |
1663 } | |
1664 | |
1665 pRenderer->DrawAura(uCellX, uCellY, pTexture, loadedTextureptr, GetTickCount() * 0.1, 0, 255); | |
1666 ZBuffer_Fill(&pRenderer->pActiveZBuffer[v17], item_texture_id, player->pInventoryMatrix[i]); | |
1667 } | |
1668 else | |
1669 { | |
2541 | 1670 if (player->pInventoryItemList[player->pInventoryMatrix[i] - 1].IsIdentified() || current_screen_type != SCREEN_HOUSE) |
2501 | 1671 { |
1672 if (player->pInventoryItemList[player->pInventoryMatrix[i] - 1].IsBroken()) | |
1673 pRenderer->DrawTransparentRedShade(uCellX, uCellY, pTexture); | |
1674 else | |
2524 | 1675 pRenderer->DrawTextureIndexedAlpha(uCellX, uCellY, pTexture); |
2501 | 1676 } |
1677 else | |
1678 pRenderer->DrawTransparentGreenShade(uCellX, uCellY, pTexture); | |
1679 ZBuffer_Fill(&pRenderer->pActiveZBuffer[v17], item_texture_id, player->pInventoryMatrix[i]); | |
1680 continue; | |
1681 } | |
1682 } | |
1683 } | |
1684 | |
1685 static void CharacterUI_DrawItem(int x, int y, ItemGen *item, int id) | |
1686 { | |
1687 Texture* item_texture = pIcons_LOD->LoadTexturePtr(item->GetIconName(), TEXTURE_16BIT_PALETTE); | |
1688 | |
1689 if (item->uAttributes & ITEM_ENCHANT_ANIMATION) // enchant animation | |
1690 { | |
1691 Texture *enchantment_texture = nullptr; | |
1692 switch (item->uAttributes & ITEM_ENCHANT_ANIMATION) | |
1693 { | |
1694 case ITEM_AURA_EFFECT_RED: enchantment_texture = pIcons_LOD->LoadTexturePtr("sptext01", TEXTURE_16BIT_PALETTE); break; | |
1695 case ITEM_AURA_EFFECT_BLUE: enchantment_texture = pIcons_LOD->LoadTexturePtr("sp28a", TEXTURE_16BIT_PALETTE); break; | |
1696 case ITEM_AURA_EFFECT_GREEN: enchantment_texture = pIcons_LOD->LoadTexturePtr("sp30a", TEXTURE_16BIT_PALETTE); break; | |
1697 case ITEM_AURA_EFFECT_PURPLE: enchantment_texture = pIcons_LOD->LoadTexturePtr("sp91a", TEXTURE_16BIT_PALETTE); break; | |
1698 } | |
1699 | |
1700 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | |
1701 if (_50C9A8_item_enchantment_timer <= 0) | |
1702 { | |
1703 _50C9A8_item_enchantment_timer = 0; | |
1704 item->uAttributes &= 0xFFFFFF0F; | |
1705 ptr_50C9A4_ItemToEnchant = nullptr; | |
1706 } | |
1707 pRenderer->DrawAura(x, y, item_texture, enchantment_texture, GetTickCount() * 0.1, 0, 255); | |
1708 } | |
1709 else | |
1710 { | |
1711 if (item->IsBroken()) | |
1712 pRenderer->DrawTransparentRedShade(x, y, item_texture); | |
1713 else if (!item->IsIdentified()) | |
1714 pRenderer->DrawTransparentGreenShade(x, y, item_texture); | |
1715 else | |
2524 | 1716 pRenderer->DrawTextureIndexedAlpha(x, y, item_texture); |
2501 | 1717 |
1718 pRenderer->ZBuffer_Fill_2(x, y, item_texture, id); | |
1719 } | |
1720 } | |
1721 | |
1722 //----- (0043E825) -------------------------------------------------------- | |
1723 void CharacterUI_DrawPaperdollWithRingOverlay(Player *player) | |
1724 { | |
1725 CharacterUI_DrawPaperdoll(player); | |
2524 | 1726 pRenderer->DrawTextureIndexedAlpha(0x1D9u, 0, pIcons_LOD->GetTexture(uTextureID_BACKHAND)); |
1727 pRenderer->DrawTextureIndexedAlpha(0x1D4u, 0, pIcons_LOD->GetTexture(uTextureID_right_panel_loop)); | |
2501 | 1728 pRenderer->DrawTextureIndexed(pCharacterScreen_DetalizBtn->uX, pCharacterScreen_DetalizBtn->uY, |
1729 pIcons_LOD->GetTexture(uTextureID_detaliz_close_button)); | |
1730 for (uint i = 0; i < 6; ++i) | |
1731 { | |
1732 if (!player->pEquipment.uRings[i]) | |
1733 continue; | |
1734 static int pPaperdollRingsX[6] = {0x1EA, 0x21A, 0x248, 0x1EA, 0x21A, 0x248}; | |
1735 static int pPaperdollRingsY[6] = {0x0CA, 0x0CA, 0x0CA, 0x0FA, 0x0FA, 0x0FA}; | |
1736 CharacterUI_DrawItem(pPaperdollRingsX[i], pPaperdollRingsY[i], &player->pInventoryItemList[player->pEquipment.uRings[i] - 1], | |
1737 player->pEquipment.uRings[i]); | |
1738 } | |
1739 if (player->pEquipment.uAmulet) | |
1740 CharacterUI_DrawItem(493, 91, player->GetAmuletItem(), player->pEquipment.uAmulet); | |
1741 if (player->pEquipment.uGlove) | |
1742 CharacterUI_DrawItem(586, 88, player->GetGloveItem(), player->pEquipment.uGlove); | |
1743 } | |
1744 | |
1745 //----- (0043BCA7) -------------------------------------------------------- | |
1746 void CharacterUI_LoadPaperdollTextures() | |
1747 { | |
1748 int v3; // ebx@10 | |
1749 Player *pPlayer; // edi@12 | |
1750 signed int v32; // [sp+10h] [bp-28h]@75 | |
1751 signed int v33; // [sp+10h] [bp-28h]@77 | |
1752 int pItemTXTNum; // [sp+14h] [bp-24h]@75 | |
1753 signed int v38; // [sp+14h] [bp-24h]@79 | |
1754 char pContainer[128]; // [sp+24h] [bp-14h]@12 | |
1755 | |
1756 uTextureID_MAGNIF_B = pIcons_LOD->LoadTexture("MAGNIF-B", TEXTURE_16BIT_PALETTE); | |
1757 //if ( !pParty->uAlignment || pParty->uAlignment == 1 || pParty->uAlignment == 2 ) | |
1758 uTextureID_BACKDOLL = pIcons_LOD->LoadTexture("BACKDOLL", TEXTURE_16BIT_PALETTE); | |
1759 uTextureID_right_panel_loop = uTextureID_right_panel; | |
1760 uTextureID_BACKHAND = pIcons_LOD->LoadTexture("BACKHAND", TEXTURE_16BIT_PALETTE); | |
1761 uTextureID_detaliz_close_button = uExitCancelTextureId; | |
1762 for ( uint i = 0; i < 4; ++i ) | |
1763 { | |
1764 if ( pPlayers[i + 1]->HasUnderwaterSuitEquipped() ) | |
1765 { | |
1766 if ( pPlayers[i + 1]->GetRace() == CHARACTER_RACE_DWARF ) | |
1767 v3 = (pPlayers[i + 1]->GetSexByVoice() != 0) + 3; | |
1768 else | |
1769 v3 = (pPlayers[i + 1]->GetSexByVoice() != 0) + 1; | |
1770 wsprintfA(pContainer, "pc23v%dBod", v3); | |
1771 papredoll_dbods[i] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);//Body texture | |
1772 wsprintfA(pContainer, "pc23v%dlad", v3); | |
1773 papredoll_dlads[i] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Left Hand | |
1774 wsprintfA(pContainer, "pc23v%dlau", v3); | |
1775 papredoll_dlaus[i] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Left Hand2 | |
1776 wsprintfA(pContainer, "pc23v%drh", v3); | |
1777 papredoll_drhs[i] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Right Hand | |
1778 wsprintfA(pContainer, "pc23v%dlh", v3); | |
1779 papredoll_dlhs[i] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// Left Fist | |
1780 wsprintfA(pContainer, "pc23v%dlhu", v3); | |
1781 papredoll_dlhus[i] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); // Left Fist 2 | |
1782 pPlayer = pPlayers[i + 1]; | |
1783 if ( pPlayer->uCurrentFace == 12 || pPlayer->uCurrentFace == 13 ) | |
1784 papredoll_dbrds[(char)pPlayer->uCurrentFace] = 0; | |
1785 papredoll_flying_feet[pPlayer->uCurrentFace] = 0; | |
1786 IsPlayerWearingWatersuit[i + 1] = 1; | |
1787 } | |
1788 else | |
1789 { | |
1790 papredoll_dbods[i] = pIcons_LOD->LoadTexture(dbod_texnames_by_face[pPlayers[i + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE); | |
1791 papredoll_dlads[i] = pIcons_LOD->LoadTexture(dlad_texnames_by_face[pPlayers[i + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE); | |
1792 papredoll_dlaus[i] = pIcons_LOD->LoadTexture(dlau_texnames_by_face[pPlayers[i + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE); | |
1793 papredoll_drhs[i] = pIcons_LOD->LoadTexture(drh_texnames_by_face[pPlayers[i + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE); | |
1794 papredoll_dlhs[i] = pIcons_LOD->LoadTexture(dlh_texnames_by_face[pPlayers[i + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE); | |
1795 papredoll_dlhus[i] = pIcons_LOD->LoadTexture(dlhu_texnames_by_face[pPlayers[i + 1]->uCurrentFace], TEXTURE_16BIT_PALETTE); | |
1796 if ( pPlayers[i + 1]->uCurrentFace == 12 || pPlayers[i + 1]->uCurrentFace == 13 ) | |
1797 { | |
1798 wsprintfA(pContainer, "pc%02dbrd", pPlayers[i + 1]->uCurrentFace + 1); | |
1799 papredoll_dbrds[pPlayers[i + 1]->uCurrentFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1800 } | |
1801 wsprintfA(pContainer, "item281pc%02d", pPlayers[i + 1]->uCurrentFace + 1); | |
1802 papredoll_flying_feet[pPlayers[i + 1]->uCurrentFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1803 IsPlayerWearingWatersuit[i + 1] = 0; | |
1804 } | |
1805 } | |
1806 | |
1807 uTextureID_ar_up_up = pIcons_LOD->LoadTexture("ar_up_up", TEXTURE_16BIT_PALETTE); | |
1808 uTextureID_ar_up_dn = pIcons_LOD->LoadTexture("ar_up_dn", TEXTURE_16BIT_PALETTE); | |
1809 uTextureID_ar_dn_up = pIcons_LOD->LoadTexture("ar_dn_up", TEXTURE_16BIT_PALETTE); | |
1810 uTextureID_ar_dn_dn = pIcons_LOD->LoadTexture("ar_dn_dn", TEXTURE_16BIT_PALETTE); | |
1811 papredoll_dbrds[9] = pIcons_LOD->LoadTexture("ib-cd1-d", TEXTURE_16BIT_PALETTE); | |
1812 papredoll_dbrds[7] = pIcons_LOD->LoadTexture("ib-cd2-d", TEXTURE_16BIT_PALETTE); | |
1813 papredoll_dbrds[5] = pIcons_LOD->LoadTexture("ib-cd3-d", TEXTURE_16BIT_PALETTE); | |
1814 papredoll_dbrds[3] = pIcons_LOD->LoadTexture("ib-cd4-d", TEXTURE_16BIT_PALETTE); | |
1815 papredoll_dbrds[1] = pIcons_LOD->LoadTexture("ib-cd5-d", TEXTURE_16BIT_PALETTE); | |
1816 for ( uint i = 0; i < 54; ++i )// test equipment | |
1817 { | |
1818 party_has_equipment[i] = 0; | |
1819 if ( pParty->pPickedItem.uItemID != i + 66 ) | |
1820 { | |
1821 for ( uint j = 0; j < 4; ++j) | |
1822 { | |
1823 if ( pParty->pPlayers[j].HasItem(i + 66, 0) ) | |
1824 party_has_equipment[i] = 1; | |
1825 } | |
1826 } | |
1827 } | |
1828 memset(byte_5111F6_OwnedArtifacts.data(), 0, sizeof(byte_5111F6_OwnedArtifacts)); | |
1829 for (uint i = 0; i < 4; ++i) | |
1830 { | |
1831 Player* player = &pParty->pPlayers[i]; | |
1832 | |
1833 if (player->HasItem(ITEM_ARTIFACT_GOVERNORS_ARMOR, 1)) byte_5111F6_OwnedArtifacts[0] = 1; | |
1834 if (player->HasItem(ITEM_ARTIFACT_YORUBA, 1)) byte_5111F6_OwnedArtifacts[1] = 1; | |
1835 if (player->HasItem(ITEM_RELIC_HARECS_LEATHER, 1)) byte_5111F6_OwnedArtifacts[2] = 1; | |
1836 if (player->HasItem(ITEM_ARTIFACT_LEAGUE_BOOTS, 1)) byte_5111F6_OwnedArtifacts[3] = 1; | |
1837 if (player->HasItem(ITEM_RELIC_TALEDONS_HELM, 1)) byte_5111F6_OwnedArtifacts[4] = 1; | |
1838 if (player->HasItem(ITEM_RELIC_SCHOLARS_CAP, 1)) byte_5111F6_OwnedArtifacts[5] = 1; | |
1839 if (player->HasItem(ITEM_RELIC_PHYNAXIAN_CROWN, 1)) byte_5111F6_OwnedArtifacts[6] = 1; | |
1840 if (player->HasItem(ITEM_ARTIFACT_MINDS_EYE, 1)) byte_5111F6_OwnedArtifacts[7] = 1; | |
1841 if (player->HasItem(ITEM_RARE_SHADOWS_MASK, 1)) byte_5111F6_OwnedArtifacts[8] = 1; | |
1842 if (player->HasItem(ITEM_RILIC_TITANS_BELT, 1)) byte_5111F6_OwnedArtifacts[9] = 1; | |
1843 if (player->HasItem(ITEM_ARTIFACT_HEROS_BELT, 1)) byte_5111F6_OwnedArtifacts[10] = 1; | |
1844 if (player->HasItem(ITEM_RELIC_TWILIGHT, 1)) byte_5111F6_OwnedArtifacts[11] = 1; | |
1845 if (player->HasItem(ITEM_ARTIFACT_CLOAK_OF_THE_SHEEP, 1)) byte_5111F6_OwnedArtifacts[12] = 1; | |
1846 if (player->HasItem(ITEM_RARE_SUN_CLOAK, 1)) byte_5111F6_OwnedArtifacts[13] = 1; | |
1847 if (player->HasItem(ITEM_RARE_MOON_CLOAK, 1)) byte_5111F6_OwnedArtifacts[14] = 1; | |
1848 if (player->HasItem(ITEM_RARE_VAMPIRES_CAPE, 1)) byte_5111F6_OwnedArtifacts[15] = 1; | |
1849 if (player->HasItem(ITEM_ELVEN_CHAINMAIL, 1)) byte_5111F6_OwnedArtifacts[16] = 1; | |
1850 } | |
1851 | |
1852 for (uint i = 0; i < 2; ++i) | |
1853 { | |
1854 for ( uint j = 0; j < 5; ++j )//Belt | |
1855 { | |
1856 GetItemTextureFilename(pContainer, j + 100, i + 1, 0); | |
1857 paperdoll_belt_texture[i][j] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1858 } | |
1859 GetItemTextureFilename(pContainer, 535, i + 1, 0); | |
1860 paperdoll_belt_texture[i][6] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1861 for ( uint j = 0; j < 11; ++j )//Helm | |
1862 { | |
1863 GetItemTextureFilename(pContainer, j + 89, i + 1, 0); | |
1864 paperdoll_helm_texture[i][j] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1865 } | |
1866 GetItemTextureFilename(pContainer, 521, i + 1, 0); | |
1867 paperdoll_helm_texture[i][11] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1868 GetItemTextureFilename(pContainer, 522, i + 1, 0); | |
1869 paperdoll_helm_texture[i][12] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1870 GetItemTextureFilename(pContainer, 523, i + 1, 0); | |
1871 paperdoll_helm_texture[i][13] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1872 GetItemTextureFilename(pContainer, 532, i + 1, 0); | |
1873 paperdoll_helm_texture[i][14] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1874 GetItemTextureFilename(pContainer, 544, i + 1, 0); | |
1875 paperdoll_helm_texture[i][15] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1876 if ( IsDwarfPresentInParty(true) ) //the phynaxian helm uses a slightly different graphic for dwarves | |
1877 papredoll_dbrds[11] = pIcons_LOD->LoadTexture("item092v3", TEXTURE_16BIT_PALETTE); | |
1878 } | |
1879 //v43 = 0; | |
1880 for (uint i = 0; i < 4; ++i) | |
1881 { | |
1882 if ( ShouldLoadTexturesForRaceAndGender(i) ) | |
1883 { | |
1884 GetItemTextureFilename(pContainer, 524, i + 1, 0); | |
1885 paperdoll_belt_texture[i][5] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);//Titans belt | |
1886 pItemTXTNum = 66; | |
1887 for ( v32 = 0; v32 < 13; ++v32 )//simple armor | |
1888 { | |
1889 GetItemTextureFilename(pContainer, pItemTXTNum, i + 1, 0); | |
1890 paperdoll_armor_texture[i][v32][0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// armor | |
1891 GetItemTextureFilename(pContainer, pItemTXTNum, i + 1, 1); | |
1892 paperdoll_armor_texture[i][v32][1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// shoulder 1 | |
1893 GetItemTextureFilename(pContainer, pItemTXTNum, i + 1, 2); | |
1894 paperdoll_armor_texture[i][v32][2] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE);// shoulder 2 | |
1895 pItemTXTNum++; | |
1896 } | |
1897 GetItemTextureFilename(pContainer, 516, i + 1, 0);//artefacts | |
1898 paperdoll_armor_texture[i][v32][0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1899 GetItemTextureFilename(pContainer, 516, i + 1, 1); | |
1900 paperdoll_armor_texture[i][v32][1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1901 GetItemTextureFilename(pContainer, 516, i + 1, 2); | |
1902 paperdoll_armor_texture[i][v32][2] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1903 GetItemTextureFilename(pContainer, 505, i + 1, 0); | |
1904 paperdoll_armor_texture[i][v32 + 1][0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1905 GetItemTextureFilename(pContainer, 505, i + 1, 1); | |
1906 paperdoll_armor_texture[i][v32 + 1][1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1907 GetItemTextureFilename(pContainer, 505, i + 1, 2); | |
1908 paperdoll_armor_texture[i][v32 + 1][2] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1909 GetItemTextureFilename(pContainer, 504, i + 1, 0); | |
1910 paperdoll_armor_texture[i][v32 + 2][0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1911 GetItemTextureFilename(pContainer, 504, i + 1, 1); | |
1912 paperdoll_armor_texture[i][v32 + 2][1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1913 GetItemTextureFilename(pContainer, 504, i + 1, 2); | |
1914 paperdoll_armor_texture[i][v32 + 2][2] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1915 GetItemTextureFilename(pContainer, 533, i + 1, 0); | |
1916 paperdoll_armor_texture[i][v32 + 3][0] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1917 GetItemTextureFilename(pContainer, 533, i + 1, 1); | |
1918 paperdoll_armor_texture[i][v32 + 3][1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1919 GetItemTextureFilename(pContainer, 533, i + 1, 2); | |
1920 paperdoll_armor_texture[i][v32 + 3][2] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1921 for ( v33 = 0; v33 < 5; ++v33 )//boots | |
1922 { | |
1923 GetItemTextureFilename(pContainer, v33 + 115, i + 1, 0); | |
1924 paperdoll_boots_texture[i][v33] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1925 } | |
1926 GetItemTextureFilename(pContainer, 512, i + 1, 0); | |
1927 paperdoll_boots_texture[i][v33] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1928 for ( v38 = 0; v38 < 5; ++v38 )//Cloak | |
1929 { | |
1930 GetItemTextureFilename(pContainer, v38 + 105, i + 1, 0); | |
1931 paperdoll_cloak_texture[i][v38] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1932 GetItemTextureFilename(pContainer, v38 + 105, i + 1, 1); | |
1933 paperdoll_cloak_collar_texture[i][v38] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1934 } | |
1935 GetItemTextureFilename(pContainer, 525, i + 1, 0); | |
1936 paperdoll_cloak_texture[i][5] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1937 GetItemTextureFilename(pContainer, 530, i + 1, 0); | |
1938 paperdoll_cloak_texture[i][6] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1939 GetItemTextureFilename(pContainer, 547, i + 1, 0); | |
1940 paperdoll_cloak_texture[i][7] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1941 GetItemTextureFilename(pContainer, 548, i + 1, 0); | |
1942 paperdoll_cloak_texture[i][8] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1943 GetItemTextureFilename(pContainer, 550, i + 1, 0); | |
1944 paperdoll_cloak_texture[i][9] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1945 GetItemTextureFilename(pContainer, 525, i + 1, 1); | |
1946 paperdoll_cloak_collar_texture[i][5] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1947 GetItemTextureFilename(pContainer, 530, i + 1, 1); | |
1948 paperdoll_cloak_collar_texture[i][6] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1949 GetItemTextureFilename(pContainer, 547, i + 1, 1); | |
1950 paperdoll_cloak_collar_texture[i][7] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1951 GetItemTextureFilename(pContainer, 548, i + 1, 1); | |
1952 paperdoll_cloak_collar_texture[i][8] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1953 GetItemTextureFilename(pContainer, 550, i + 1, 1); | |
1954 paperdoll_cloak_collar_texture[i][9] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
1955 } | |
1956 //else | |
1957 //{ | |
1958 //v26 = v43; | |
1959 //} | |
1960 //v43 = v26 + 40; | |
1961 } | |
1962 } | |
1963 | |
1964 //----- (00419401) -------------------------------------------------------- | |
2547 | 1965 void GUIWindow_CharacterRecord::CharacterUI_SkillsTab_CreateButtons() |
2501 | 1966 { |
1967 GUIButton *pButton; // eax@3 | |
1968 unsigned int current_Y; // esi@8 | |
1969 int buttons_count; // [sp+10h] [bp-14h]@1 | |
1970 int first_rows; // [sp+14h] [bp-10h]@19 | |
1971 int skill_id; // [sp+18h] [bp-Ch]@8 | |
1972 Player *curr_player; // [sp+1Ch] [bp-8h]@8 | |
1973 int i; | |
1974 int uCurrFontHeght; | |
1975 | |
1976 buttons_count = 0; | |
1977 if ( dword_507CC0_activ_ch ) | |
1978 CharacterUI_ReleaseButtons(); | |
1979 dword_507CC0_activ_ch = uActiveCharacter; | |
1980 for ( pButton = pGUIWindow_CurrentMenu->pControlsHead; pButton; pButton = pButton->pNext ) | |
1981 { | |
1982 if ( pButton->msg == UIMSG_InventoryLeftClick ) | |
1983 { | |
1984 dword_50698C_uX = pButton->uX; | |
1985 dword_506988_uY = pButton->uY; | |
1986 dword_506984_uZ = pButton->uZ; | |
1987 dword_506980_uW = pButton->uW; | |
1988 pButton->uW = 0; | |
1989 pButton->uZ = 0; | |
1990 pButton->uY = 0; | |
1991 pButton->uX = 0; | |
1992 } | |
1993 } | |
1994 first_rows = 0; | |
1995 int a5 = pGUIWindow_CurrentMenu->uNumControls; | |
1996 curr_player = &pParty->pPlayers[uActiveCharacter-1]; | |
1997 | |
1998 uCurrFontHeght=pFontLucida->uFontHeight; | |
1999 current_Y = 2 *uCurrFontHeght + 13; | |
2000 for( i = 0; i < 9; ++i ) | |
2001 { | |
2002 skill_id = pWeaponSkills[i]; | |
2003 if ( curr_player->pActiveSkills[skill_id] & 0x3F ) | |
2004 { | |
2005 current_Y += uCurrFontHeght - 3; | |
2006 ++buttons_count; | |
2007 ++first_rows; | |
2008 pGUIWindow_CurrentMenu->CreateButton(24, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000, UIMSG_SkillUp, skill_id, 0, "", 0, 0); | |
2009 } | |
2010 } | |
2011 if ( !first_rows ) | |
2012 current_Y += uCurrFontHeght - 3; | |
2013 current_Y += 2 * uCurrFontHeght - 6; | |
2014 for ( i = 0; i < 9; ++i ) | |
2015 { | |
2016 skill_id = pMagicSkills[i]; | |
2017 if ( curr_player->pActiveSkills[skill_id] & 0x3F && buttons_count < 15 ) | |
2018 { | |
2019 current_Y += uCurrFontHeght - 3; | |
2020 ++buttons_count; | |
2021 pGUIWindow_CurrentMenu->CreateButton(24, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000, UIMSG_SkillUp, skill_id, 0, "", 0, 0); | |
2022 } | |
2023 } | |
2024 first_rows = 0; | |
2025 current_Y = 2 * uCurrFontHeght + 13; | |
2026 for ( i = 0; i < 5; ++i ) | |
2027 { | |
2028 skill_id = pArmorSkills[i]; | |
2029 if ( curr_player->pActiveSkills[skill_id] & 0x3F ) | |
2030 { | |
2031 current_Y+= uCurrFontHeght - 3; | |
2032 ++buttons_count; | |
2033 ++first_rows; | |
2034 pGUIWindow_CurrentMenu->CreateButton(246, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000, UIMSG_SkillUp, skill_id, 0, "", 0, 0); | |
2035 } | |
2036 } | |
2037 if ( !first_rows ) | |
2038 current_Y += uCurrFontHeght - 3; | |
2039 current_Y += 2 * uCurrFontHeght - 6; | |
2040 for ( i = 0; i < 12; ++i ) | |
2041 { | |
2042 skill_id = pMiscSkills[i]; | |
2043 if ( curr_player->pActiveSkills[skill_id] & 0x3F ) | |
2044 { | |
2045 current_Y += uCurrFontHeght - 3; | |
2046 ++buttons_count; | |
2047 pGUIWindow_CurrentMenu->CreateButton(246, current_Y, 204, uCurrFontHeght - 3, 3, skill_id | 0x8000, UIMSG_SkillUp, skill_id, 0, "", 0, 0); | |
2048 } | |
2049 } | |
2050 | |
2051 if ( buttons_count ) | |
2052 pGUIWindow_CurrentMenu->_41D08F_set_keyboard_control_group(buttons_count, 1, 0, a5); | |
2053 } | |
2054 | |
2055 //----- (00418511) -------------------------------------------------------- | |
2547 | 2056 void GUIWindow_CharacterRecord::CharacterUI_StatsTab_Draw(Player *player) |
2501 | 2057 { |
2058 int pY; // ST34_4@4 | |
2059 const char *pText; // eax@9 | |
2060 const char *text_format; // [sp+14h] [bp-Ch]@4 | |
2061 | |
2062 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->LoadTexturePtr("fr_stats", TEXTURE_16BIT_PALETTE)); | |
2063 sprintf(pTmpBuf.data(), "\f%05d", ui_character_header_text_color); | |
2064 sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[429], player->pName, pClassNames[player->classType]);//"^Pi[%s] %s" / "%s the %s" | |
2065 strcat(pTmpBuf.data(), pTmpBuf2.data()); | |
2066 sprintfex(pTmpBuf2.data(), "\f00000\r180%s: \f%05d%d\f00000\n\n\n", | |
2067 pGlobalTXT_LocalizationStrings[207], // "Skill points" | |
2068 player->uSkillPoints ? ui_character_bonus_text_color : ui_character_default_text_color, | |
2069 player->uSkillPoints); | |
2070 strcat(pTmpBuf.data(), pTmpBuf2.data()); | |
2071 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, 18, 0, pTmpBuf.data(), 0, 0, 0); | |
2072 | |
2073 //First column(Первая колонка) | |
2074 pY = 53; | |
2075 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[144], | |
2076 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualMight(), player->GetBaseStrength()), | |
2077 player->GetActualMight(), player->GetBaseStrength());//Might | |
2078 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0); | |
2079 | |
2080 pY += LOBYTE(pFontArrus->uFontHeight) - 2; | |
2081 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[116], | |
2082 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualIntelligence(), player->GetBaseIntelligence()), | |
2083 player->GetActualIntelligence(), player->GetBaseIntelligence());//Intellect | |
2084 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0); | |
2085 | |
2086 pY += LOBYTE(pFontArrus->uFontHeight) - 2; | |
2087 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[163], | |
2088 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualWillpower(), player->GetBaseWillpower()), | |
2089 player->GetActualWillpower(), player->GetBaseWillpower());// | |
2090 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0); | |
2091 | |
2092 pY += LOBYTE(pFontArrus->uFontHeight) - 2; | |
2093 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[75], | |
2094 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualEndurance(), player->GetBaseEndurance()), | |
2095 player->GetActualEndurance(), player->GetBaseEndurance());// | |
2096 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0); | |
2097 | |
2098 pY += LOBYTE(pFontArrus->uFontHeight) - 2; | |
2099 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[1], | |
2100 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualAccuracy(), player->GetBaseAccuracy()), | |
2101 player->GetActualAccuracy(), player->GetBaseAccuracy()); | |
2102 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0); | |
2103 | |
2104 pY += LOBYTE(pFontArrus->uFontHeight) - 2; | |
2105 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[211], | |
2106 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualSpeed(), player->GetBaseSpeed()), | |
2107 player->GetActualSpeed(), player->GetBaseSpeed()); | |
2108 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0); | |
2109 | |
2110 pY += LOBYTE(pFontArrus->uFontHeight) - 2; | |
2111 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n\n", pGlobalTXT_LocalizationStrings[136], | |
2112 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualLuck(), player->GetBaseLuck()), | |
2113 player->GetActualLuck(), player->GetBaseLuck()); | |
2114 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0); | |
2115 | |
2116 text_format = "%s\f%05u\r424%d\f00000 /\t185%d\n"; | |
2117 if ( player->GetMaxHealth() >= 1000 ) | |
2118 text_format = "%s\f%05u\r388%d\f00000 / %d\n"; | |
2119 pY += 2 * LOBYTE(pFontArrus->uFontHeight) + 5; | |
2120 sprintf(pTmpBuf.data(), text_format, pGlobalTXT_LocalizationStrings[108], | |
2121 UI_GetHealthManaAndOtherQualitiesStringColor(player->sHealth, player->GetMaxHealth()), | |
2122 player->sHealth, player->GetMaxHealth()); | |
2123 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0); | |
2124 | |
2125 text_format = "%s\f%05u\r424%d\f00000 /\t185%d\n"; | |
2126 if ( player->GetMaxMana() >= 1000 ) | |
2127 text_format = "%s\f%05u\r388%d\f00000 / %d\n"; | |
2128 pY += LOBYTE(pFontArrus->uFontHeight) - 2; | |
2129 sprintf(pTmpBuf.data(), text_format, pGlobalTXT_LocalizationStrings[212], | |
2130 UI_GetHealthManaAndOtherQualitiesStringColor(player->sMana, player->GetMaxMana()), | |
2131 player->sMana, player->GetMaxMana()); | |
2132 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0); | |
2133 | |
2134 pY += LOBYTE(pFontArrus->uFontHeight) - 2; | |
2135 sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n\n", pGlobalTXT_LocalizationStrings[12], | |
2136 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualAC(), player->GetBaseAC()), | |
2137 player->GetActualAC(), player->GetBaseAC()); | |
2138 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0); | |
2139 | |
2140 pY += 2 * LOBYTE(pFontArrus->uFontHeight) - 2; | |
2141 sprintf(pTmpBuf.data(), "%s: \f%05d%s\n", pGlobalTXT_LocalizationStrings[47], GetConditionDrawColor(player->GetMajorConditionIdx()), | |
2142 aCharacterConditionNames[player->GetMajorConditionIdx()]);//Состояние | |
2143 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 26, pY, 0, pTmpBuf.data(), 226, 0); | |
2144 | |
2145 pY += LOBYTE(pFontArrus->uFontHeight) + - 1; | |
2146 pText = pGlobalTXT_LocalizationStrings[153];//Нет | |
2147 if (player->uQuickSpell) | |
2148 pText = pSpellStats->pInfos[player->uQuickSpell].pShortName; | |
2149 sprintf(pTmpBuf.data(), "%s: %s", pGlobalTXT_LocalizationStrings[172], pText);//Б. применение | |
2150 pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 26, pY, 0, pTmpBuf.data(), 226, 0); | |
2151 | |
2152 //Second column (Вторая колонка) | |
2153 pY = 50; | |
2154 text_format = Stat_string_format_2_column_less_100; | |
2155 if ( player->GetActualAge() > 99 ) | |
2156 text_format = Stat_string_format_2_column_over_100; | |
2157 sprintf(pTmpBuf.data(), text_format, pGlobalTXT_LocalizationStrings[5], | |
2158 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualAge(), player->GetBaseAge()), | |
2159 player->GetActualAge(), player->GetBaseAge()); | |
2160 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0); | |
2161 | |
2162 text_format = Stat_string_format_2_column_less_100; | |
2163 if ( player->GetBaseLevel() > 99 ) | |
2164 text_format = Stat_string_format_2_column_over_100; | |
2165 pY += LOBYTE(pFontArrus->uFontHeight) - 2; | |
2166 sprintf(pTmpBuf.data(), text_format, pGlobalTXT_LocalizationStrings[131],//Уров. | |
2167 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualLevel(), player->GetBaseLevel()), | |
2168 player->GetActualLevel(), player->GetBaseLevel()); | |
2169 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0); | |
2170 | |
2171 pY += LOBYTE(pFontArrus->uFontHeight) - 2; | |
2172 pText = pGlobalTXT_LocalizationStrings[17]; // "Exp." | |
2173 if (player->uExperience <= 9999999) | |
2174 pText = pGlobalTXT_LocalizationStrings[83]; // "Experience" | |
2175 sprintf(pTmpBuf.data(), "%s\r180\f%05d%lu\f00000\n\n", pText, player->GetExperienceDisplayColor(), LODWORD(player->uExperience)); | |
2176 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0); | |
2177 | |
2178 pY += 2 * LOBYTE(pFontArrus->uFontHeight); | |
2179 sprintf(pTmpBuf.data(), "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[18], player->GetActualAttack(false)); | |
2180 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0); | |
2181 | |
2182 pY += LOBYTE(pFontArrus->uFontHeight) - 2; | |
2183 sprintf(pTmpBuf.data(), "%s\t100 %s\n", pGlobalTXT_LocalizationStrings[53], player->GetMeleeDamageString()); | |
2184 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0); | |
2185 | |
2186 pY += LOBYTE(pFontArrus->uFontHeight) - 2; | |
2187 sprintf(pTmpBuf.data(), "%s\t100%+d\n", pGlobalTXT_LocalizationStrings[203], player->GetRangedAttack()); | |
2188 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0); | |
2189 | |
2190 pY += LOBYTE(pFontArrus->uFontHeight) - 2; | |
2191 sprintf(pTmpBuf.data(), "%s\t100 %s\n\n", pGlobalTXT_LocalizationStrings[53], player->GetRangedDamageString()); | |
2192 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0); | |
2193 | |
2194 text_format = Stat_string_format_2_column_less_100; | |
2195 if ( player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE) > 99 || player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE) > 99 ) | |
2196 text_format = Stat_string_format_2_column_over_100; | |
2197 pY += 2 * LOBYTE(pFontArrus->uFontHeight) - 4; | |
2198 sprintf(pTmpBuf.data(), text_format, pGlobalTXT_LocalizationStrings[87], | |
2199 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE)), | |
2200 player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE)); | |
2201 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0); | |
2202 | |
2203 text_format = Stat_string_format_2_column_less_100; | |
2204 if ( player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_AIR) > 99 || player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_AIR) > 99 ) | |
2205 text_format = Stat_string_format_2_column_over_100; | |
2206 pY += LOBYTE(pFontArrus->uFontHeight) - 2; | |
2207 sprintf(pTmpBuf.data(), text_format, pGlobalTXT_LocalizationStrings[6], | |
2208 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_AIR), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_AIR)), | |
2209 player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_AIR), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_AIR)); | |
2210 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0); | |
2211 | |
2212 text_format = Stat_string_format_2_column_less_100; | |
2213 if ( player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_WATER) > 99 || player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_WATER) > 99 ) | |
2214 text_format = Stat_string_format_2_column_over_100; | |
2215 pY += LOBYTE(pFontArrus->uFontHeight) - 2; | |
2216 sprintf(pTmpBuf.data(), text_format, pGlobalTXT_LocalizationStrings[240], | |
2217 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_WATER), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_WATER)), | |
2218 player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_WATER), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_WATER)); | |
2219 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0); | |
2220 | |
2221 text_format = Stat_string_format_2_column_less_100; | |
2222 if ( player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH) > 99 ) | |
2223 text_format = Stat_string_format_2_column_over_100; | |
2224 pY += LOBYTE(pFontArrus->uFontHeight) - 2; | |
2225 sprintf(pTmpBuf.data(), text_format, pGlobalTXT_LocalizationStrings[70], | |
2226 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH)), | |
2227 player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH)); | |
2228 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0); | |
2229 | |
2230 text_format = Stat_string_format_2_column_less_100; | |
2231 if ( player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND) > 99 || player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND) > 99 ) | |
2232 text_format = Stat_string_format_2_column_over_100; | |
2233 pY += LOBYTE(pFontArrus->uFontHeight) - 2; | |
2234 sprintf(pTmpBuf.data(), text_format, pGlobalTXT_LocalizationStrings[142], | |
2235 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND)), | |
2236 player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND)); | |
2237 if ( player->classType == PLAYER_CLASS_LICH && player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND) == 200 ) | |
2238 sprintf(pTmpBuf.data(), Stat_string_format_2_column_text, pGlobalTXT_LocalizationStrings[142], | |
2239 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND), 200), pGlobalTXT_LocalizationStrings[625]); | |
2240 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0); | |
2241 | |
2242 text_format = Stat_string_format_2_column_less_100; | |
2243 if ( player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY) > 99 || player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY) > 99 ) | |
2244 text_format = Stat_string_format_2_column_over_100; | |
2245 pY += LOBYTE(pFontArrus->uFontHeight) - 2; | |
2246 int it = player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY); | |
2247 sprintf(pTmpBuf.data(), text_format, pGlobalTXT_LocalizationStrings[29], | |
2248 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY)), | |
2249 player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY)); | |
2250 if ( player->classType == PLAYER_CLASS_LICH && player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY) == 200 ) | |
2251 sprintf(pTmpBuf.data(), Stat_string_format_2_column_text, pGlobalTXT_LocalizationStrings[29], | |
2252 UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY), 200), pGlobalTXT_LocalizationStrings[625]); | |
2253 pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0); | |
2254 } | |
2255 | |
2256 bool awardSort (int i, int j) | |
2257 { | |
2258 if (pAwards[i].uPriority == 0) //none | |
2259 return false; | |
2260 else if (pAwards[j].uPriority == 0) | |
2261 return true; | |
2262 else if(pAwards[i].uPriority == 1) //fines,arena stuff,etc | |
2263 return false; | |
2264 else if(pAwards[j].uPriority == 1) | |
2265 return true; | |
2266 else if(pAwards[i].uPriority == 5) //joined guilds | |
2267 return false; | |
2268 else if(pAwards[j].uPriority == 5) | |
2269 return true; | |
2270 else | |
2271 return (pAwards[i].uPriority < pAwards[j].uPriority); | |
2272 } | |
2273 | |
2274 //----- (00419100) -------------------------------------------------------- | |
2275 void FillAwardsData() | |
2276 { | |
2277 Player* pPlayer = pPlayers[uActiveCharacter]; | |
2278 | |
2279 memset(achieved_awards.data(), 0, 4000); | |
2280 num_achieved_awards = 0; | |
2281 | |
2282 memset(pTmpBuf2.data(), 0, 0x7D0u); | |
2283 BtnDown_flag = 0; | |
2284 BtnUp_flag = 0; | |
2285 books_page_number = 0; | |
2286 books_primary_item_per_page = 0; | |
2287 for ( int i = 1; i < 105; ++i ) | |
2288 { | |
2289 if ( _449B57_test_bit(pPlayer->_achieved_awards_bits, i) && pAwards[i].pText ) | |
2290 achieved_awards[num_achieved_awards++] = (AwardType)i; | |
2291 } | |
2292 full_num_items_in_book = num_achieved_awards; | |
2293 num_achieved_awards = 0; | |
2294 | |
2295 //sort awards index | |
2296 | |
2297 if (full_num_items_in_book>0) | |
2298 { | |
2299 for (int i = 0; i< full_num_items_in_book; ++i) | |
2300 achieved_awards[full_num_items_in_book+i] = (AwardType)(rand()%16);//случайные значения от 0 до 15 | |
2301 for (int i = 1; i< full_num_items_in_book; ++i) | |
2302 { | |
2303 for (int j = i; j< full_num_items_in_book; ++j) | |
2304 { | |
2305 AwardType tmp; | |
2306 if (pAwards[achieved_awards[j]].uPriority < pAwards[achieved_awards[i]].uPriority) | |
2307 { | |
2308 tmp= achieved_awards[j]; | |
2309 achieved_awards[j] = achieved_awards[i]; | |
2310 achieved_awards[i] = tmp; | |
2311 } | |
2312 } | |
2313 } | |
2314 } | |
2315 | |
2316 // if (full_num_items_in_book > 0) | |
2317 /* { | |
2318 std::stable_sort(achieved_awards.begin(), achieved_awards.end(), awardSort); | |
2319 }*/ | |
2320 } | |
2321 | |
2322 //----- (0043EF2B) -------------------------------------------------------- | |
2323 void WetsuitOn( unsigned int uPlayerID ) | |
2324 { | |
2325 CHARACTER_RACE player_race; // edi@2 | |
2326 signed int player_sex; // eax@2 | |
2327 int texture_num; // ecx@5 | |
2328 char pContainer[20]; // [sp+4h] [bp-1Ch]@7 | |
2329 | |
2330 if ( uPlayerID> 0 ) | |
2331 { | |
2332 player_race = pPlayers[uPlayerID]->GetRace(); | |
2333 player_sex = pPlayers[uPlayerID]->GetSexByVoice(); | |
2334 if ( player_race == CHARACTER_RACE_DWARF ) | |
2335 texture_num = (player_sex != 0) + 3; | |
2336 else | |
2337 texture_num = (player_sex != 0) + 1; | |
2338 wsprintfA(pContainer, "pc23v%dBod", texture_num); | |
2339 papredoll_dbods[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
2340 wsprintfA(pContainer, "pc23v%dlad", texture_num); | |
2341 papredoll_dlads[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
2342 wsprintfA(pContainer, "pc23v%dlau", texture_num); | |
2343 papredoll_dlaus[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
2344 wsprintfA(pContainer, "pc23v%drh", texture_num); | |
2345 papredoll_drhs[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
2346 wsprintfA(pContainer, "pc23v%dlh", texture_num); | |
2347 papredoll_dlhs[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
2348 wsprintfA(pContainer, "pc23v%dlhu", texture_num); | |
2349 papredoll_dlhus[uPlayerID - 1] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
2350 | |
2351 if ( pPlayers[uPlayerID]->uCurrentFace == 12 || pPlayers[uPlayerID]->uCurrentFace == 13 ) | |
2352 papredoll_dbrds[pPlayers[uPlayerID]->uCurrentFace] = 0; | |
2353 papredoll_flying_feet[pPlayers[uPlayerID]->uCurrentFace] = 0; | |
2354 IsPlayerWearingWatersuit[uPlayerID] = 1; | |
2355 } | |
2356 } | |
2357 | |
2358 //----- (0043F0BD) -------------------------------------------------------- | |
2359 void WetsuitOff( unsigned int uPlayerID ) | |
2360 { | |
2361 char pContainer[20]; // [sp+0h] [bp-18h]@4 | |
2362 | |
2363 if (uPlayerID > 0 ) | |
2364 { | |
2365 papredoll_dbods[uPlayerID - 1] = pIcons_LOD->LoadTexture(dbod_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE); | |
2366 papredoll_dlads[uPlayerID - 1] = pIcons_LOD->LoadTexture(dlad_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE); | |
2367 papredoll_dlaus[uPlayerID - 1] = pIcons_LOD->LoadTexture(dlau_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE); | |
2368 papredoll_drhs [uPlayerID - 1] = pIcons_LOD->LoadTexture(drh_texnames_by_face [pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE); | |
2369 papredoll_dlhs [uPlayerID - 1] = pIcons_LOD->LoadTexture(dlh_texnames_by_face [pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE); | |
2370 papredoll_dlhus[uPlayerID - 1] = pIcons_LOD->LoadTexture(dlhu_texnames_by_face[pPlayers[uPlayerID]->uCurrentFace], TEXTURE_16BIT_PALETTE); | |
2371 | |
2372 if ( pPlayers[uPlayerID]->uCurrentFace == 12 || pPlayers[uPlayerID]->uCurrentFace == 13 ) | |
2373 { | |
2374 wsprintfA(pContainer, "pc%02dbrd", pPlayers[uPlayerID]->uCurrentFace + 1); | |
2375 papredoll_dbrds[pPlayers[uPlayerID]->uCurrentFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
2376 } | |
2377 wsprintfA(pContainer, "item281pc%02d", pPlayers[uPlayerID]->uCurrentFace + 1); | |
2378 papredoll_flying_feet[pPlayers[uPlayerID]->uCurrentFace] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | |
2379 IsPlayerWearingWatersuit[uPlayerID] = 0; | |
2380 } | |
2381 } | |
2382 | |
2383 //----- (00468F8A) -------------------------------------------------------- | |
2384 void OnPaperdollLeftClick() | |
2385 { | |
2386 int v1; // ecx@1 | |
2387 unsigned int v2; // edi@1 | |
2388 unsigned int v3; // edx@4 | |
2389 unsigned int pSkillType; // esi@5 | |
2390 unsigned __int16 v5; // ax@7 | |
2391 int v7; // esi@27 | |
2392 int v8; // eax@29 | |
2393 int v17; // eax@44 | |
2394 //unsigned int v18; // ecx@55 | |
2395 //unsigned int v19; // eax@55 | |
2396 // unsigned int v22; // eax@61 | |
2397 int v23; // eax@62 | |
2398 int v26; // eax@69 | |
2399 int v34; // esi@90 | |
2400 ItemGen _this; // [sp+Ch] [bp-40h]@1 | |
2401 // unsigned int v48; // [sp+30h] [bp-1Ch]@88 | |
2402 unsigned int v50; // [sp+38h] [bp-14h]@50 | |
2403 int v51; // [sp+3Ch] [bp-10h]@1 | |
2404 int v52; // [sp+40h] [bp-Ch]@5 | |
2405 ITEM_EQUIP_TYPE pEquipType; | |
2406 CastSpellInfo *pSpellInfo; | |
2407 | |
2408 v51 = 0; | |
2409 _this.Reset(); | |
2410 v1 = pPlayers[uActiveCharacter]->pEquipment.uMainHand; | |
2411 v2 = pPlayers[uActiveCharacter]->pEquipment.uShield; | |
2412 if ( v1 && pPlayers[uActiveCharacter]->pInventoryItemList[v1 - 1].GetItemEquipType() == EQUIP_TWO_HANDED ) | |
2413 v51 = v1; | |
2414 v3 = pParty->pPickedItem.uItemID; | |
2415 if ( pParty->pPickedItem.uItemID ) | |
2416 { | |
2417 pEquipType = pParty->pPickedItem.GetItemEquipType(); | |
2418 pSkillType = pParty->pPickedItem.GetPlayerSkillType(); | |
2419 if ( pSkillType == 4 ) | |
2420 { | |
2421 if ( v2 ) | |
2422 { | |
2423 LOBYTE(v5) = pPlayers[uActiveCharacter]->GetActualSkillLevel(PLAYER_SKILL_SPEAR); | |
2424 if ( (signed int)SkillToMastery(v5) < 3 ) | |
2425 { | |
2426 pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0); | |
2427 return; | |
2428 } | |
2429 v3 = pParty->pPickedItem.uItemID; | |
2430 } | |
2431 } | |
2432 else | |
2433 { | |
2434 if ( (pSkillType == 8 || pSkillType == 1 || pSkillType == 2) | |
2435 && v1 | |
2436 && pPlayers[uActiveCharacter]->pInventoryItemList[v1 - 1].GetPlayerSkillType() == 4 ) | |
2437 { | |
2438 LOBYTE(v5) = pPlayers[uActiveCharacter]->GetActualSkillLevel(PLAYER_SKILL_SPEAR); | |
2439 if ( (signed int)SkillToMastery(v5) < 3 ) | |
2440 { | |
2441 pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0); | |
2442 return; | |
2443 } | |
2444 } | |
2445 } | |
2446 if ( !pPlayers[uActiveCharacter]->CanEquip_RaceAndAlignmentCheck(v3) ) | |
2447 { | |
2448 | |
2449 pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0); | |
2450 return; | |
2451 } | |
2452 if ( pParty->pPickedItem.uItemID == ITEM_WETSUIT ) | |
2453 { | |
2454 pPlayers[uActiveCharacter]->EquipBody((ITEM_EQUIP_TYPE)3); | |
2455 WetsuitOn(uActiveCharacter); | |
2456 return; | |
2457 } | |
2458 switch ( pEquipType ) | |
2459 { | |
2460 case EQUIP_BOW: | |
2461 case EQUIP_ARMOUR: | |
2462 case EQUIP_HELMET: | |
2463 case EQUIP_BELT: | |
2464 case EQUIP_CLOAK: | |
2465 case EQUIP_GAUNTLETS: | |
2466 case EQUIP_BOOTS: | |
2467 case EQUIP_AMULET: | |
2468 if ( !pPlayers[uActiveCharacter]->HasSkill(pSkillType) )//нет навыка | |
2469 { | |
2470 pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0); | |
2471 return; | |
2472 } | |
2473 if ( pPlayers[uActiveCharacter]->HasUnderwaterSuitEquipped() && (pEquipType != EQUIP_ARMOUR || bUnderwater) ) | |
2474 { | |
2475 pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0, 0, 0); | |
2476 return; | |
2477 } | |
2478 pPlayers[uActiveCharacter]->EquipBody(pEquipType); | |
2479 if ( pParty->pPickedItem.uItemID == ITEM_WETSUIT ) | |
2480 WetsuitOff(uActiveCharacter); | |
2481 return; | |
2482 //------------------------dress rings(одевание колец)---------------------------------- | |
2483 case EQUIP_RING: | |
2484 if ( pPlayers[uActiveCharacter]->HasUnderwaterSuitEquipped() ) | |
2485 { | |
2486 pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0, 0, 0); | |
2487 return; | |
2488 } | |
2489 //слоты для колец | |
2490 v7 = 0; | |
2491 for ( v52 = 10; (signed int)v52 < 16; ++v52 ) | |
2492 { | |
2493 if ( !pPlayers[uActiveCharacter]->pEquipment.uRings[v7] ) | |
2494 { | |
2495 v8 = pPlayers[uActiveCharacter]->FindFreeInventoryListSlot(); | |
2496 if ( v8 >= 0 ) | |
2497 { | |
2498 pParty->pPickedItem.uBodyAnchor = v52 + 1; | |
2499 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v8], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v8])); | |
2500 pPlayers[uActiveCharacter]->pEquipment.uRings[v7] = v8 + 1; | |
2501 pMouse->RemoveHoldingItem(); | |
2502 break; | |
2503 } | |
2504 } | |
2505 v7++; | |
2506 } | |
2507 if ( v52 == 16 )//замещение последнего кольца | |
2508 { | |
2509 v52 = pPlayers[uActiveCharacter]->pEquipment.uRings[5] - 1; | |
2510 memcpy(&_this, &pParty->pPickedItem, sizeof(_this)); | |
2511 pPlayers[uActiveCharacter]->pInventoryItemList[v52].uBodyAnchor = 0; | |
2512 pParty->pPickedItem.Reset(); | |
2513 pParty->SetHoldingItem(&pPlayers[uActiveCharacter]->pInventoryItemList[v52]); | |
2514 _this.uBodyAnchor = 16; | |
2515 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v52], &_this, 0x24u); | |
2516 pPlayers[uActiveCharacter]->pEquipment.uRings[5] = v52 + 1; | |
2517 } | |
2518 return; | |
2519 //------------------dress shield(одеть щит)------------------------------------------------------ | |
2520 case EQUIP_SHIELD://Щит | |
2521 if ( pPlayers[uActiveCharacter]->HasUnderwaterSuitEquipped() )//в акваланге | |
2522 { | |
2523 pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0, 0, 0); | |
2524 return; | |
2525 } | |
2526 if ( !pPlayers[uActiveCharacter]->HasSkill(pSkillType) )//нет навыка | |
2527 { | |
2528 pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0); | |
2529 return; | |
2530 } | |
2531 if ( v2 )//смена щита щитом | |
2532 { | |
2533 --v2; | |
2534 memcpy(&_this, &pParty->pPickedItem, sizeof(_this)); | |
2535 pPlayers[uActiveCharacter]->pInventoryItemList[v2].uBodyAnchor = 0; | |
2536 pParty->pPickedItem.Reset(); | |
2537 pParty->SetHoldingItem(&pPlayers[uActiveCharacter]->pInventoryItemList[v2]); | |
2538 _this.uBodyAnchor = 1; | |
2539 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v2], &_this, 0x24u); | |
2540 pPlayers[uActiveCharacter]->pEquipment.uShield = v2 + 1; | |
2541 if ( v51 == EQUIP_SINGLE_HANDED ) | |
2542 return; | |
2543 } | |
2544 else | |
2545 { | |
2546 v52 = pPlayers[uActiveCharacter]->FindFreeInventoryListSlot(); | |
2547 if ( v52 < 0 ) | |
2548 return; | |
2549 if ( !v51 )// обычная установка щита на пустую руку | |
2550 { | |
2551 pParty->pPickedItem.uBodyAnchor = 1; | |
2552 v17 = v52 + 1; | |
2553 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v52], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v52])); | |
2554 pPlayers[uActiveCharacter]->pEquipment.uShield = v17; | |
2555 pMouse->RemoveHoldingItem(); | |
2556 return; | |
2557 } | |
2558 v1--;//ставим щит когда держит двуручный меч | |
2559 memcpy(&_this, &pParty->pPickedItem, sizeof(_this)); | |
2560 pPlayers[uActiveCharacter]->pInventoryItemList[v1].uBodyAnchor = 0; | |
2561 pParty->pPickedItem.Reset(); | |
2562 pParty->SetHoldingItem(&pPlayers[uActiveCharacter]->pInventoryItemList[v1]); | |
2563 _this.uBodyAnchor = 1; | |
2564 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v52], &_this, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v52])); | |
2565 pPlayers[uActiveCharacter]->pEquipment.uShield = v52 + 1; | |
2566 } | |
2567 pPlayers[uActiveCharacter]->pEquipment.uMainHand = 0; | |
2568 return; | |
2569 //-------------------------taken in hand(взять в руку)------------------------------------------- | |
2570 case EQUIP_SINGLE_HANDED: | |
2571 case EQUIP_WAND: | |
2572 if ( pPlayers[uActiveCharacter]->HasUnderwaterSuitEquipped() | |
2573 && pParty->pPickedItem.uItemID != 64 | |
2574 && pParty->pPickedItem.uItemID != 65 ) | |
2575 { | |
2576 pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0, 0, 0); | |
2577 return; | |
2578 } | |
2579 if ( !pPlayers[uActiveCharacter]->HasSkill(pSkillType) ) | |
2580 { | |
2581 pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0); | |
2582 return; | |
2583 } | |
2584 v50 = 0; | |
2585 if ( pSkillType == 2 && (unsigned __int16)(pPlayers[uActiveCharacter]->pActiveSkills[PLAYER_SKILL_DAGGER] & 0xFFC0) | |
2586 || pSkillType == 1 && (signed int)SkillToMastery(pPlayers[uActiveCharacter]->pActiveSkills[PLAYER_SKILL_SWORD]) >= 3 ) | |
2587 { | |
2588 //v18 = pMouse->uMouseClickX; | |
2589 //v19 = pMouse->uMouseClickY; | |
2590 if ( (signed int)pMouse->uMouseClickX >= 560 ) | |
2591 { | |
2592 if ( !v51 ) | |
2593 { | |
2594 if ( v2 ) | |
2595 { | |
2596 --v2; | |
2597 memcpy(&_this, &pParty->pPickedItem, sizeof(_this)); | |
2598 pPlayers[uActiveCharacter]->pInventoryItemList[v2].uBodyAnchor = 0; | |
2599 pParty->pPickedItem.Reset(); | |
2600 pParty->SetHoldingItem(&pPlayers[uActiveCharacter]->pInventoryItemList[v2]); | |
2601 _this.uBodyAnchor = 1; | |
2602 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v2], &_this, 0x24u); | |
2603 pPlayers[uActiveCharacter]->pEquipment.uShield = v2 + 1; | |
2604 if ( pEquipType != EQUIP_WAND ) | |
2605 return; | |
2606 v50 = _this.uItemID; | |
2607 if ( _this.uItemID ) | |
2608 { | |
2609 __debugbreak(); // looks like offset in player's inventory and wand_lut much like case in 0042ECB5 | |
2610 stru_A750F8[uActiveCharacter - 1].AddPartySpellSound(wand_spell_ids[pPlayers[uActiveCharacter]->pInventoryItemList[v50].uItemID - ITEM_WAND_FIRE], uActiveCharacter - 1 + 9); | |
2611 } | |
2612 break; | |
2613 } | |
2614 v23 = pPlayers[uActiveCharacter]->FindFreeInventoryListSlot(); | |
2615 if ( v23 < 0 ) | |
2616 return; | |
2617 pParty->pPickedItem.uBodyAnchor = 1; | |
2618 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v23], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v23])); | |
2619 pPlayers[uActiveCharacter]->pEquipment.uShield = v23 + 1; | |
2620 pMouse->RemoveHoldingItem(); | |
2621 if ( pEquipType != EQUIP_WAND ) | |
2622 return; | |
2623 v50 = pPlayers[uActiveCharacter]->pInventoryItemList[v23].uItemID; | |
2624 if ( v50 ) | |
2625 { | |
2626 __debugbreak(); // looks like offset in player's inventory and wand_lut much like case in 0042ECB5 | |
2627 stru_A750F8[uActiveCharacter - 1].AddPartySpellSound(wand_spell_ids[pPlayers[uActiveCharacter]->pInventoryItemList[v50].uItemID - ITEM_WAND_FIRE], uActiveCharacter - 1 + 9); | |
2628 } | |
2629 break; | |
2630 } | |
2631 } | |
2632 } | |
2633 if ( !v1 ) | |
2634 { | |
2635 v26 = pPlayers[uActiveCharacter]->FindFreeInventoryListSlot(); | |
2636 if ( v26 < 0 ) | |
2637 return; | |
2638 pParty->pPickedItem.uBodyAnchor = 2; | |
2639 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v26], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v26])); | |
2640 pPlayers[uActiveCharacter]->pEquipment.uMainHand = v26 + 1; | |
2641 pMouse->RemoveHoldingItem(); | |
2642 if ( pEquipType != EQUIP_WAND ) | |
2643 return; | |
2644 if ( pPlayers[uActiveCharacter]->pInventoryItemList[v26].uItemID ) | |
2645 stru_A750F8[uActiveCharacter - 1].AddPartySpellSound(wand_spell_ids[pPlayers[uActiveCharacter]->pInventoryItemList[v26].uItemID - ITEM_WAND_FIRE], uActiveCharacter - 1 + 9); | |
2646 break; | |
2647 } | |
2648 --v1; | |
2649 memcpy(&_this, &pParty->pPickedItem, sizeof(_this)); | |
2650 pPlayers[uActiveCharacter]->pInventoryItemList[v1].uBodyAnchor = 0; | |
2651 pParty->pPickedItem.Reset(); | |
2652 pParty->SetHoldingItem(&pPlayers[uActiveCharacter]->pInventoryItemList[v1]); | |
2653 _this.uBodyAnchor = 2; | |
2654 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v1], &_this, 0x24); | |
2655 pPlayers[uActiveCharacter]->pEquipment.uMainHand = v1 + 1; | |
2656 if ( pEquipType == EQUIP_WAND ) | |
2657 v50 = _this.uItemID; | |
2658 if ( v51 ) | |
2659 pPlayers[uActiveCharacter]->pEquipment.uShield = 0; | |
2660 if ( v50 )//взять жезл | |
2661 { | |
2662 __debugbreak(); // looks like offset in player's inventory and wand_lut much like case in 0042ECB5 | |
2663 stru_A750F8[uActiveCharacter - 1].AddPartySpellSound(wand_spell_ids[v50 - ITEM_WAND_FIRE], uActiveCharacter - 1 + 9); | |
2664 } | |
2665 break; | |
2666 //---------------------------take two hands(взять двумя руками)--------------------------------- | |
2667 case EQUIP_TWO_HANDED: | |
2668 if ( pPlayers[uActiveCharacter]->HasUnderwaterSuitEquipped() ) | |
2669 { | |
2670 pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0, 0, 0); | |
2671 return; | |
2672 } | |
2673 if ( !pPlayers[uActiveCharacter]->HasSkill(pSkillType) ) | |
2674 { | |
2675 pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0); | |
2676 return; | |
2677 } | |
2678 if ( v1 )//взять двуручный меч когда нет щита(замещение оружия) | |
2679 { | |
2680 if ( v2 ) | |
2681 { | |
2682 pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0, 0, 0); | |
2683 return; | |
2684 } | |
2685 --v1; | |
2686 memcpy(&_this, &pParty->pPickedItem, sizeof(_this)); | |
2687 pPlayers[uActiveCharacter]->pInventoryItemList[v1].uBodyAnchor = 0; | |
2688 pParty->pPickedItem.Reset(); | |
2689 pParty->SetHoldingItem(&pPlayers[uActiveCharacter]->pInventoryItemList[v1]); | |
2690 _this.uBodyAnchor = 2; | |
2691 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v1], &_this, 0x24u); | |
2692 pPlayers[uActiveCharacter]->pEquipment.uMainHand = v1 + 1; | |
2693 } | |
2694 else | |
2695 { | |
2696 v52 = pPlayers[uActiveCharacter]->FindFreeInventoryListSlot(); | |
2697 if ( v52 >= 0 ) | |
2698 { | |
2699 if ( v2 )//взять двуручный меч когда есть щит(замещение щитом) | |
2700 { | |
2701 v2--; | |
2702 memcpy(&_this, &pParty->pPickedItem, sizeof(_this)); | |
2703 pPlayers[uActiveCharacter]->pInventoryItemList[v2].uBodyAnchor = 0; | |
2704 pParty->pPickedItem.Reset(); | |
2705 pParty->SetHoldingItem(&pPlayers[uActiveCharacter]->pInventoryItemList[v2]); | |
2706 _this.uBodyAnchor = 2; | |
2707 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v52], &_this, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v52])); | |
2708 pPlayers[uActiveCharacter]->pEquipment.uShield = 0; | |
2709 pPlayers[uActiveCharacter]->pEquipment.uMainHand = v52 + 1; | |
2710 } | |
2711 else | |
2712 { | |
2713 pParty->pPickedItem.uBodyAnchor = 2; | |
2714 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v52], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v52])); | |
2715 pPlayers[uActiveCharacter]->pEquipment.uMainHand = v52 + 1; | |
2716 pMouse->RemoveHoldingItem(); | |
2717 } | |
2718 } | |
2719 } | |
2720 return; | |
2721 //------------------------------------------------------------------------------- | |
2722 default: | |
2723 pPlayers[uActiveCharacter]->UseItem_DrinkPotion_etc(uActiveCharacter, 0);//выпить напиток и др. | |
2724 return; | |
2725 } | |
2726 return; | |
2727 } | |
2728 | |
2729 v34 = pRenderer->pActiveZBuffer[pMouse->uMouseClickX + pSRZBufferLineOffsets[pMouse->uMouseClickY]] & 0xFFFF; | |
2730 if ( v34 ) | |
2731 { | |
2732 //v36 = v34 - 1; | |
2733 //v38 = &pPlayers[uActiveCharacter]->pInventoryItemList[v34 - 1]; | |
2734 pEquipType = pPlayers[uActiveCharacter]->pInventoryItemList[v34 - 1].GetItemEquipType(); | |
2735 if ( pPlayers[uActiveCharacter]->pInventoryItemList[v34 - 1].uItemID == ITEM_WETSUIT ) | |
2736 { | |
2737 if ( bUnderwater ) | |
2738 { | |
2739 pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0, 0, 0); | |
2740 return; | |
2741 } | |
2742 WetsuitOff(uActiveCharacter); | |
2743 } | |
2744 if ( _50C9A0_IsEnchantingInProgress )//наложить закл на экипировку | |
2745 { | |
2746 /* *((char *)pGUIWindow_Settings->ptr_1C + 8) &= 0x7Fu;//CastSpellInfo | |
2747 *((short *)pGUIWindow_Settings->ptr_1C + 2) = uActiveCharacter - 1; | |
2748 *((int *)pGUIWindow_Settings->ptr_1C + 3) = v36; | |
2749 *((short *)pGUIWindow_Settings->ptr_1C + 3) = pEquipType;*/ | |
2750 pSpellInfo = (CastSpellInfo *)pGUIWindow_Settings->ptr_1C; | |
2751 pSpellInfo->uFlags &= 0x7F; | |
2752 pSpellInfo->uPlayerID_2 = uActiveCharacter - 1; | |
2753 pSpellInfo->spell_target_pid = v34 - 1; | |
2754 pSpellInfo->field_6 = pEquipType; | |
2755 | |
2756 ptr_50C9A4_ItemToEnchant = &pPlayers[uActiveCharacter]->pInventoryItemList[v34 - 1]; | |
2757 _50C9A0_IsEnchantingInProgress = 0; | |
2758 if ( pMessageQueue_50CBD0->uNumMessages ) | |
2759 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | |
2760 pMouse->SetCursorBitmap("MICON1"); | |
2761 _50C9D4_AfterEnchClickEventSecondParam = 0; | |
2762 _50C9D0_AfterEnchClickEventId = 113; | |
2763 _50C9D8_AfterEnchClickEventTimeout = 256; | |
2764 } | |
2765 else | |
2766 { | |
2767 if ( !ptr_50C9A4_ItemToEnchant )//снять вещь | |
2768 { | |
2769 pParty->SetHoldingItem(&pPlayers[uActiveCharacter]->pInventoryItemList[v34 - 1]); | |
2770 pPlayers[uActiveCharacter]->pEquipment.pIndices[pPlayers[uActiveCharacter]->pInventoryItemList[v34 - 1].uBodyAnchor - 1] = 0; | |
2771 pPlayers[uActiveCharacter]->pInventoryItemList[v34 - 1].Reset(); | |
2772 } | |
2773 } | |
2774 } | |
2775 else//снять лук | |
2776 { | |
2777 if ( pPlayers[uActiveCharacter]->pEquipment.uBow ) | |
2778 { | |
2779 _this = pPlayers[uActiveCharacter]->pInventoryItemList[pPlayers[uActiveCharacter]->pEquipment.uBow - 1]; | |
2780 pParty->SetHoldingItem(&_this); | |
2781 _this.Reset(); | |
2782 pPlayers[uActiveCharacter]->pEquipment.uBow = 0; | |
2783 } | |
2784 } | |
2785 } | |
2786 | |
2787 //----- (004196A0) -------------------------------------------------------- | |
2788 void CharacterUI_ReleaseButtons() | |
2789 { | |
2790 GUIButton *i; // esi@2 | |
2791 GUIButton *j; // esi@7 | |
2792 | |
2793 if ( dword_507CC0_activ_ch ) | |
2794 { | |
2795 dword_507CC0_activ_ch = 0; | |
2796 for ( i = pGUIWindow_CurrentMenu->pControlsHead; i; i = j ) | |
2797 { | |
2798 j = i->pNext; | |
2799 if ( i->field_1C & 0x8000 ) | |
2800 { | |
2801 i->Release(); | |
2802 free(i); | |
2803 } | |
2804 } | |
2805 for ( j = pGUIWindow_CurrentMenu->pControlsHead; j; j = j->pNext ) | |
2806 { | |
2807 if ( j->msg == UIMSG_InventoryLeftClick) | |
2808 { | |
2809 j->uX = dword_50698C_uX; | |
2810 j->uY = dword_506988_uY; | |
2811 j->uZ = dword_506984_uZ; | |
2812 j->uW = dword_506980_uW; | |
2813 pGUIWindow_CurrentMenu->_41D08F_set_keyboard_control_group(1, 0, 0, 0); | |
2814 } | |
2815 } | |
2816 } | |
2817 } |