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