annotate UI/UIPopup.cpp @ 1662:620b6ba3e6b8

Слияние
author Ritor1
date Wed, 18 Sep 2013 14:20:00 +0600
parents 96a1f5e0b6cd
children 6faacde46271
rev   line source
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1 #ifdef _MSC_VER
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2 #define _CRT_SECURE_NO_WARNINGS
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
3 #endif
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
4
1299
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
5 #include "..\MM7.h"
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
6
1299
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
7 #include "..\Mouse.h"
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
8
1299
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
9 #include "..\Sprites.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
10 #include "..\Vis.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
11 #include "..\Game.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
12 #include "..\GUIWindow.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
13 #include "..\GUIFont.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
14 #include "..\Party.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
15 #include "..\AudioPlayer.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
16 #include "..\LOD.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
17 #include "..\Actor.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
18 #include "..\Viewport.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
19 #include "..\SpriteObject.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
20 #include "..\ObjectList.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
21 #include "..\Chest.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
22 #include "..\PaletteManager.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
23 #include "..\Time.h"
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
24 #include "..\texts.h"
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
25
1299
8c2f689b5f0b folder UI
Ritor1
parents: 1298
diff changeset
26 #include "..\mm7_data.h"
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
27
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
28 static char static_sub_417BB5_out_string[1200]; // static to a file, not sub actually
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
29
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
30
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
31 //----- (004179BC) --------------------------------------------------------
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
32 void CharacterUI_DrawTooltip(const char *a1, const char *a2)
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
33 {
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
34 //const char *v2; // ebx@1
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
35 //const char *v3; // edi@1
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
36 //unsigned int v4; // eax@1
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
37 GUIWindow Dst; // [sp+Ch] [bp-5Ch]@1
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
38 POINT v6; // [sp+60h] [bp-8h]@1
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
39
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
40 //v2 = a2;
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
41 //v3 = a1;
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
42 memset(&Dst, 0, 0x54u);
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
43 Dst.uFrameWidth = 384;
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
44 Dst.uFrameHeight = 256;
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
45 Dst.uFrameX = 128;
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
46 Dst.uFrameY = pMouse->GetCursorPos(&v6)->y + 30;
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
47 Dst.uFrameHeight = pFontSmallnum->CalcTextHeight(a2, &Dst, 24, 0) + 2 * LOBYTE(pFontLucida->uFontHeight) + 24;
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
48 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1;
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
49 Dst.uFrameW = Dst.uFrameY + Dst.uFrameHeight - 1;
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
50 Dst.DrawMessageBox(0);
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
51 Dst.uFrameX += 12;
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
52 Dst.uFrameWidth -= 24;
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
53 Dst.uFrameY += 12;
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
54 Dst.uFrameHeight -= 12;
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
55 Dst.uFrameZ = Dst.uFrameX + Dst.uFrameWidth - 1;
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
56 Dst.uFrameW = Dst.uFrameY + Dst.uFrameHeight - 1;
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
57 sprintf(pTmpBuf.data(), "\f%05d%s\f00000\n", ui_character_tooltip_header_default_color, a1);
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
58 Dst.DrawTitleText(pFontCreate, 0, 0, 0, pTmpBuf.data(), 3u);
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
59 Dst.DrawText(pFontSmallnum, 1, LOBYTE(pFontLucida->uFontHeight), 0, a2, 0, 0, 0);
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
60 }
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
61
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
62 //----- (004151D9) --------------------------------------------------------
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
63 void __fastcall DrawPopupWindow(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
64 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
65 unsigned int v4; // ebx@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
66 Texture *v5; // edi@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
67 signed int uTileWidth; // ecx@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
68 int v7; // eax@5
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
69 int v8; // ecx@10
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
70 unsigned int v9; // ebx@14
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
71 int v10; // [sp+10h] [bp-28h]@5
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
72 signed int uTileHeight; // [sp+18h] [bp-20h]@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
73 int v12; // [sp+1Ch] [bp-1Ch]@7
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
74 int v13; // [sp+20h] [bp-18h]@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
75 int a5; // [sp+24h] [bp-14h]@5
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
76 unsigned int a5a; // [sp+24h] [bp-14h]@11
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
77 unsigned int a4; // [sp+28h] [bp-10h]@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
78 int uNumXTiles; // [sp+2Ch] [bp-Ch]@3
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
79 unsigned int uNumXTilesa; // [sp+2Ch] [bp-Ch]@6
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
80 unsigned int uNumXTilesb; // [sp+2Ch] [bp-Ch]@11
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
81 unsigned int a2a; // [sp+30h] [bp-8h]@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
82 unsigned int v21; // [sp+34h] [bp-4h]@5
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
83 unsigned int v22; // [sp+34h] [bp-4h]@11
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
84
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
85 v4 = uY;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
86 a2a = uX;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
87 a4 = uX + uWidth;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
88 pRenderer->SetTextureClipRect(uX, v4, uX + uWidth, v4 + uHeight);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
89 v5 = pIcons_LOD->GetTexture(uTextureID_Parchment);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
90 uTileWidth = v5->uTextureWidth;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
91 v13 = v5->uTextureWidth;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
92 uTileHeight = v5->uTextureHeight;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
93 if ( v5->uTextureWidth && v5->uTextureHeight)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
94 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
95 uNumXTiles = (signed int)uWidth / uTileWidth;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
96 if ( (signed int)uWidth % uTileWidth )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
97 ++uNumXTiles;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
98 a5 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
99 v21 = v4;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
100 v7 = uNumXTiles + 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
101 v10 = uNumXTiles + 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
102 do
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
103 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
104 uNumXTilesa = a2a - v13;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
105 if ( v7 > 0 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
106 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
107 v12 = v7;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
108 do
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
109 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
110 uNumXTilesa += v13;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
111 pRenderer->DrawTextureIndexed(uNumXTilesa, v21, v5);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
112 --v12;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
113 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
114 while ( v12 );
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
115 v7 = v10;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
116 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
117 v21 += uTileHeight;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
118 v8 = a5++;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
119 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
120 while ( v8 < (signed int)uHeight / uTileHeight );
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
121 a5a = v4 + uHeight - 32;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
122 pRenderer->DrawTextureTransparent(a2a, v4, pIcons_LOD->GetTexture(uTextureID_5076AC));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
123 pRenderer->DrawTextureTransparent(a2a, a5a, pIcons_LOD->GetTexture(uTextureID_5076B4));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
124 pRenderer->DrawTextureTransparent(a4 - 32, v4, pIcons_LOD->GetTexture(uTextureID_5076A8));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
125 pRenderer->DrawTextureTransparent(a4 - 32, a5a, pIcons_LOD->GetTexture(uTextureID_5076B0));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
126 uNumXTilesb = a2a + 32;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
127 v22 = v4 + uHeight - 10;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
128 if ( (signed int)uWidth > 64 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
129 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
130 pRenderer->SetTextureClipRect(a2a + 32, v4, a4 - 32, v4 + uHeight);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
131 pRenderer->DrawTextureTransparent(uNumXTilesb, v4, pIcons_LOD->GetTexture(uTextureID_507698));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
132 pRenderer->DrawTextureTransparent(uNumXTilesb, v22, pIcons_LOD->GetTexture(uTextureID_5076A4));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
133 if ( (signed int)uWidth > 512 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
134 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
135 pRenderer->DrawTextureTransparent(a2a + 544, v4, pIcons_LOD->GetTexture(uTextureID_507698));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
136 pRenderer->DrawTextureTransparent(a2a + 544, v22, pIcons_LOD->GetTexture(uTextureID_5076A4));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
137 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
138 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
139 v9 = v4 + 32;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
140 if ( (signed int)uHeight > 64 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
141 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
142 pRenderer->SetTextureClipRect(a2a, v9, a4, a5a);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
143 pRenderer->DrawTextureTransparent(a2a, v9, pIcons_LOD->GetTexture(uTextureID_5076A0));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
144 pRenderer->DrawTextureTransparent(a4 - 10, v9, pIcons_LOD->GetTexture(uTextureID_50769C));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
145 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
146 pRenderer->ResetTextureClipRect();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
147 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
148 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
149
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
150
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
151
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
152 //----- (0041D895) --------------------------------------------------------
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
153 void GameUI_DrawItemInfo( struct ItemGen* inspect_item )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
154 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
155 ItemGen *v1; // esi@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
156 unsigned int v2; // eax@3
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
157 //char *v3; // edi@5
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
158 //unsigned int v4; // eax@5
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
159 //unsigned int v5; // esi@5
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
160 signed int v6; // eax@5
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
161 int v7; // edx@5
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
162 //unsigned int v9; // eax@12
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
163 char v10; // zf@16
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
164 ItemGen *v11; // eax@16
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
165 ItemGen *v12; // eax@25
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
166 //unsigned int v13; // ecx@32
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
167 //unsigned int v14; // eax@32
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
168 //Render *v15; // edi@33
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
169 const char *v16; // eax@34
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
170 int v17; // eax@36
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
171 int v18; // esi@37
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
172 unsigned __int16 v19; // ax@37
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
173 //char v20; // al@40
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
174 char v21; // al@44
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
175 //char v22; // al@48
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
176 //char v23; // al@51
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
177 int v24; // eax@52
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
178 int v25; // eax@57
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
179 int v26; // eax@60
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
180 int v27; // eax@67
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
181 const char *v28; // edi@69
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
182 int v29; // eax@70
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
183 char v30; // edi@78
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
184 const char *v31; // eax@78
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
185 int v32; // ecx@81
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
186 unsigned int v33; // eax@81
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
187 int v34; // esi@81
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
188 const char *v35; // eax@85
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
189 const char *v36; // eax@87
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
190 unsigned int v37; // eax@109
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
191 unsigned int v38; // eax@109
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
192 int v39; // eax@113
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
193 GUIFont *v40; // edx@113
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
194 signed int v41; // [sp-20h] [bp-298h]@113
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
195 int v42; // [sp-1Ch] [bp-294h]@113
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
196 //char *v43; // [sp-18h] [bp-290h]@46
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
197 unsigned int v44; // [sp-18h] [bp-290h]@113
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
198 //int v45; // [sp-14h] [bp-28Ch]@46
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
199 const char *v46; // [sp-14h] [bp-28Ch]@58
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
200 char *v47; // [sp-14h] [bp-28Ch]@110
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
201 //char *v48; // [sp-10h] [bp-288h]@46
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
202 const char *v49; // [sp-10h] [bp-288h]@56
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
203 char *v50; // [sp-10h] [bp-288h]@58
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
204 int v51; // [sp-10h] [bp-288h]@110
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
205 const char *v52; // [sp-Ch] [bp-284h]@36
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
206 //int v53; // [sp-Ch] [bp-284h]@46
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
207 char *v54; // [sp-Ch] [bp-284h]@56
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
208 int v55; // [sp-Ch] [bp-284h]@58
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
209 int v56; // [sp-Ch] [bp-284h]@110
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
210 unsigned int v57; // [sp-8h] [bp-280h]@36
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
211 //int v58; // [sp-8h] [bp-280h]@46
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
212 int v59; // [sp-8h] [bp-280h]@56
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
213 int v60; // [sp-8h] [bp-280h]@58
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
214 unsigned int v61; // [sp-8h] [bp-280h]@110
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
215 char out_text[300]; // [sp+8h] [bp-270h]@40
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
216 //char Dest[100]; // [sp+6Ch] [bp-20Ch]@40
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
217 //char v64[100]; // [sp+D0h] [bp-1A8h]@40
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
218 char v65[120]; // [sp+134h] [bp-144h]@92
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
219 char Source[40]; // [sp+1ACh] [bp-CCh]@49
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
220 stru351_summoned_item v67;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
221 //int v67; // [sp+1D4h] [bp-A4h]@91
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
222 //int v68; // [sp+1D8h] [bp-A0h]@106
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
223 //int v69; // [sp+1DCh] [bp-9Ch]@101
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
224 //int v70; // [sp+1E0h] [bp-98h]@97
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
225 //int v71; // [sp+1E8h] [bp-90h]@93
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
226 //int v72; // [sp+1ECh] [bp-8Ch]@91
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
227 int var88; // [sp+1F0h] [bp-88h]@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
228 Texture *v73; // [sp+1F4h] [bp-84h]@5
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
229 //unsigned int v75; // [sp+1F8h] [bp-80h]@5
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
230 //char *v76; // [sp+1FCh] [bp-7Ch]@5
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
231 int v77; // [sp+200h] [bp-78h]@12
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
232 int v78; // [sp+204h] [bp-74h]@5
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
233 GUIWindow wHintWindow; // [sp+208h] [bp-70h]@2
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
234 POINT a2; // [sp+25Ch] [bp-1Ch]@2
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
235 int v81; // [sp+264h] [bp-14h]@5
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
236 // GUIFont *pFontComic; // [sp+268h] [bp-10h]@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
237 PlayerSpeech v83; // [sp+26Ch] [bp-Ch]@18
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
238 char* v84;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
239 int v85;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
240 char *Str; // [sp+270h] [bp-8h]@65
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
241
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
242 v1 = inspect_item;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
243 var88 = TargetColor(0xFFu, 0xFFu, 0x9Bu);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
244 if (!inspect_item->uItemID)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
245 return;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
246
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
247 wHintWindow.Hint = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
248 wHintWindow.uFrameWidth = 384;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
249 wHintWindow.uFrameHeight = 180;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
250 wHintWindow.uFrameY = 40;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
251 if ( pMouse->GetCursorPos(&a2)->x <= 320 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
252 v2 = pMouse->GetCursorPos(&a2)->x + 30;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
253 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
254 v2 = pMouse->GetCursorPos(&a2)->x - wHintWindow.uFrameWidth - 30;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
255 wHintWindow.uFrameX = v2;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
256 auto item_desc = &pItemsTable->pItems[inspect_item->uItemID];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
257 //v3 = (char *)&pItemsTable->pItems[_this->uItemID].pIconName;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
258 //v76 = v3;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
259 //v4 = pIcons_LOD->LoadTexture(pItemsTable->pItems[_this->uItemID].pIconName, TEXTURE_16BIT_PALETTE);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
260 //v5 = v4;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
261 //v4 *= 72;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
262 //v75 = v4;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
263 //v73 = &pIcons_LOD->pTextures[v4];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
264 v73 = pIcons_LOD->LoadTexturePtr(item_desc->pIconName, TEXTURE_16BIT_PALETTE);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
265 v6 = 100 - v73->uTextureWidth;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
266 v7 = v73->uTextureHeight;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
267 v78 = v6;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
268 v81 = 144 - v7;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
269 if ( v6 > 0 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
270 v78 = v6 >> 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
271 if ( v81 <= 0 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
272 v81 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
273 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
274 v81 >>= 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
275 if ( !item_desc->uItemID_Rep_St )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
276 inspect_item->SetIdentified();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
277 //v9 = v8->uAttributes;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
278 v77 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
279 //a2.y = v8->uAttributes & 2;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
280 if (pItemsTable->pItems[inspect_item->uItemID].uEquipType == EQUIP_GOLD)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
281 v77 = inspect_item->uSpecEnchantmentType;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
282 if ( uActiveCharacter )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
283 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
284 //try to identify
1567
9f8b3e904e14 Player::ReceiveDamage, very small edits; prepended "Is" to item functions returning bool values (broken, indetified, stolen)
Grumpy7
parents: 1545
diff changeset
285 if (!inspect_item->IsIdentified())
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
286 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
287
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
288 v11 = inspect_item;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
289 if ( pPlayers[uActiveCharacter]->CanIdentify(inspect_item) == 1 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
290 inspect_item->SetIdentified();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
291 v83 = SPEECH_9;
1567
9f8b3e904e14 Player::ReceiveDamage, very small edits; prepended "Is" to item functions returning bool values (broken, indetified, stolen)
Grumpy7
parents: 1545
diff changeset
292 if ( !inspect_item->IsIdentified() )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
293 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
294 ShowStatusBarString(pGlobalTXT_LocalizationStrings[446], 2u);//"Identify Failed"
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
295 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
296 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
297 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
298 v83 = SPEECH_8;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
299 if ( inspect_item->GetValue() < 100 * (pPlayers[uActiveCharacter]->uLevel + 5) )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
300 v83 = SPEECH_7;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
301 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
302 if ( dword_4E455C )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
303 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
304 pPlayers[uActiveCharacter]->PlaySound((PlayerSpeech)(int)v83, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
305 dword_4E455C = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
306 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
307 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
308 inspect_item->UpdateTempBonus(pParty->uTimePlayed);
1567
9f8b3e904e14 Player::ReceiveDamage, very small edits; prepended "Is" to item functions returning bool values (broken, indetified, stolen)
Grumpy7
parents: 1545
diff changeset
309 if (inspect_item->IsBroken())
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
310 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
311 if ( pPlayers[uActiveCharacter]->CanRepair(inspect_item) == 1 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
312 inspect_item->uAttributes = inspect_item->uAttributes & 0xFFFFFFFD | 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
313 v83 = SPEECH_11;
1567
9f8b3e904e14 Player::ReceiveDamage, very small edits; prepended "Is" to item functions returning bool values (broken, indetified, stolen)
Grumpy7
parents: 1545
diff changeset
314 if ( !inspect_item->IsBroken() )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
315 v83 = SPEECH_10;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
316 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
317 ShowStatusBarString(pGlobalTXT_LocalizationStrings[448], 2u);//"Repair Failed"
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
318 if ( dword_4E455C )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
319 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
320 pPlayers[uActiveCharacter]->PlaySound(v83, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
321 dword_4E455C = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
322 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
323 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
324 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
325 //v13 = _this->uAttributes;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
326 //v14 = _this->Identified();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
327 //a2.y = inspect_item->Identified();
1567
9f8b3e904e14 Player::ReceiveDamage, very small edits; prepended "Is" to item functions returning bool values (broken, indetified, stolen)
Grumpy7
parents: 1545
diff changeset
328 if (inspect_item->IsBroken())
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
329 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
330 wHintWindow.DrawMessageBox(0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
331 //v15 = &;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
332 pRenderer->SetTextureClipRect(wHintWindow.uFrameX + 12, wHintWindow.uFrameY + 12,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
333 wHintWindow.uFrameX + wHintWindow.uFrameWidth - 12,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
334 wHintWindow.uFrameY + wHintWindow.uFrameHeight - 12);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
335 wHintWindow.uFrameWidth -= 24;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
336 wHintWindow.uFrameHeight -= 12;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
337 wHintWindow.uFrameZ = wHintWindow.uFrameX + wHintWindow.uFrameWidth - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
338 wHintWindow.uFrameW = wHintWindow.uFrameY + wHintWindow.uFrameHeight - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
339 pRenderer->DrawTransparentRedShade(wHintWindow.uFrameX + v78, v81 + wHintWindow.uFrameY + 30, v73);
1567
9f8b3e904e14 Player::ReceiveDamage, very small edits; prepended "Is" to item functions returning bool values (broken, indetified, stolen)
Grumpy7
parents: 1545
diff changeset
340 if ( inspect_item->IsIdentified())
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
341 v16 = inspect_item->GetIdentifiedName();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
342 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
343 v16 = item_desc->pUnidentifiedName;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
344 wHintWindow.DrawTitleText(pFontArrus, 0, 0xCu, var88, v16, 3u);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
345 v17 = pFontArrus->CalcTextHeight(pGlobalTXT_LocalizationStrings[32], &wHintWindow, 0, 0); //"Broken Item"
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
346 v18 = v17 >> 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
347 v19 = TargetColor(0xFFu, 0x19u, 0x19u);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
348 wHintWindow.DrawTitleText(pFontArrus, 0x64u, ((signed int)wHintWindow.uFrameHeight >> 1) - v18, v19, pGlobalTXT_LocalizationStrings[32], 3); //"Broken Item"
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
349 pRenderer->ResetTextureClipRect();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
350 if ( !areWeLoadingTexture )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
351 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
352 v73->Release();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
353 pIcons_LOD->SyncLoadedFilesCount();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
354 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
355 return;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
356 }
1567
9f8b3e904e14 Player::ReceiveDamage, very small edits; prepended "Is" to item functions returning bool values (broken, indetified, stolen)
Grumpy7
parents: 1545
diff changeset
357 if (!inspect_item->IsIdentified())
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
358 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
359 wHintWindow.DrawMessageBox(0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
360 pRenderer->SetTextureClipRect(wHintWindow.uFrameX + 12, wHintWindow.uFrameY + 12,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
361 wHintWindow.uFrameX + wHintWindow.uFrameWidth - 12,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
362 wHintWindow.uFrameY + wHintWindow.uFrameHeight - 12);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
363 wHintWindow.uFrameWidth -= 24;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
364 wHintWindow.uFrameHeight -= 12;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
365 wHintWindow.uFrameZ = wHintWindow.uFrameX + wHintWindow.uFrameWidth - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
366 wHintWindow.uFrameW = wHintWindow.uFrameY + wHintWindow.uFrameHeight - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
367 pRenderer->DrawTextureTransparent(wHintWindow.uFrameX + v78, v81 + wHintWindow.uFrameY + 30, v73);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
368 wHintWindow.DrawTitleText(pFontArrus, 0, 0xCu, var88, item_desc->pUnidentifiedName, 3u);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
369 v17 = pFontArrus->CalcTextHeight(pGlobalTXT_LocalizationStrings[232], &wHintWindow, 0, 0); ///"Not Identified"
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
370 v18 = v17 >> 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
371 v19 = TargetColor(0xFFu, 0x19u, 0x19u);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
372 wHintWindow.DrawTitleText(pFontArrus, 0x64u, ((signed int)wHintWindow.uFrameHeight >> 1) - v18, v19, pGlobalTXT_LocalizationStrings[232], 3);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
373 pRenderer->ResetTextureClipRect();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
374 if ( !areWeLoadingTexture )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
375 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
376 v73->Release();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
377 pIcons_LOD->SyncLoadedFilesCount();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
378 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
379 return;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
380 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
381
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
382 sprintfex(out_text, pGlobalTXT_LocalizationStrings[463], item_desc->pUnidentifiedName); //"Type: %s"
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
383 out_text[100] = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
384 out_text[200] = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
385 //v20 = item_desc->uEquipType;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
386 switch (item_desc->uEquipType)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
387 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
388 case EQUIP_OFF_HAND:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
389 case EQUIP_MAIN_HAND:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
390 sprintfex(out_text + 100, "%s: +%d %s: %dd%d", pGlobalTXT_LocalizationStrings[LOCSTR_ATTACK],
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
391 (int)item_desc->uDamageMod, pGlobalTXT_LocalizationStrings[53], (int)item_desc->uDamageDice, (int)item_desc->uDamageRoll); //"Damage"
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
392 if (item_desc->uDamageMod)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
393 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
394 char mod[16];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
395 sprintf(mod, "+%d", (int)item_desc->uDamageMod);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
396 strcat(out_text + 100, mod);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
397 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
398 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
399
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
400 case EQUIP_BOW:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
401 sprintfex(out_text + 100, "%s: +%d %s: %dd%d", pGlobalTXT_LocalizationStrings[203], //"Shoot"
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
402 (int)item_desc->uDamageMod, pGlobalTXT_LocalizationStrings[53], //"Damage"
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
403 (int)item_desc->uDamageDice, (int)item_desc->uDamageRoll);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
404 if (item_desc->uDamageMod)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
405 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
406 char mod[16];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
407 sprintf(mod, "+%d", (int)item_desc->uDamageMod);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
408 strcat(out_text + 100, mod);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
409 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
410 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
411
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
412 case EQUIP_ARMOUR:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
413 case EQUIP_SHIELD:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
414 case EQUIP_HELMET:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
415 case EQUIP_BELT:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
416 case EQUIP_CLOAK:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
417 case EQUIP_GAUNTLETS:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
418 case EQUIP_BOOTS:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
419 case EQUIP_RING:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
420 case EQUIP_AMULET:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
421 if (item_desc->uDamageDice) //"Armor"
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
422 sprintfex(out_text + 100, "%s: +%d", pGlobalTXT_LocalizationStrings[11], item_desc->uDamageDice + item_desc->uDamageMod);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
423 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
424
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
425 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
426
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
427 if ( !v77 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
428 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
429 if (item_desc->uEquipType ==EQUIP_POTION) //this is CORRECT! do not move to switch!
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
430 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
431 if ( inspect_item->uEnchantmentType )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
432 sprintf(out_text + 200, "%s: %d",pGlobalTXT_LocalizationStrings[449] , inspect_item->uEnchantmentType); //"Power"
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
433 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
434 else if (item_desc->uEquipType == EQUIP_REAGENT)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
435 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
436 sprintf(out_text + 200, "%s: %d", pGlobalTXT_LocalizationStrings[449], pItemsTable->pItems[inspect_item->uItemID].uDamageDice); //"Power"
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
437 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
438
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
439 else if ( inspect_item->uEnchantmentType )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
440 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
441 sprintf(out_text + 200, "%s: %s +%d", pGlobalTXT_LocalizationStrings[210],
1599
bb2378f58767 Player::GetItemsBonus removed majority of labels
Grumpy7
parents: 1567
diff changeset
442 pItemsTable->pEnchantments[inspect_item->uEnchantmentType-1].pBonusStat, inspect_item->m_enchantmentStrength); //"Special"
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
443 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
444 else if ( inspect_item->uSpecEnchantmentType )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
445 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
446 sprintf(out_text + 200, "%s: %s", pGlobalTXT_LocalizationStrings[210],
1599
bb2378f58767 Player::GetItemsBonus removed majority of labels
Grumpy7
parents: 1567
diff changeset
447 pItemsTable->pSpecialEnchantments[inspect_item->uSpecEnchantmentType-1].pBonusStatement, inspect_item->m_enchantmentStrength);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
448 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
449
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
450 else if ( inspect_item->uNumCharges )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
451 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
452 sprintf(out_text + 200, "%s: %lu", pGlobalTXT_LocalizationStrings[464], inspect_item->uNumCharges); //"Charges"
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
453
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
454 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
455 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
456 wHintWindow.uFrameWidth -= 12;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
457 v85 = 3;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
458 wHintWindow.uFrameZ = wHintWindow.uFrameX + wHintWindow.uFrameWidth - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
459 wHintWindow.uFrameW = wHintWindow.uFrameY + wHintWindow.uFrameHeight - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
460 Str = (char *)(3 * (LOBYTE(pFontArrus->uFontHeight) + 8));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
461 v84 = &out_text[0];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
462 do
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
463 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
464 if ( *v84 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
465 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
466 v27 = pFontComic->CalcTextHeight(v84, &wHintWindow, 100, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
467 Str += v27 + 3;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
468 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
469 v84 += 100;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
470 --v85;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
471 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
472 while ( v85 );
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
473 v28 = item_desc->pDescription;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
474 if ( *v28 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
475 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
476 v29 = pFontSmallnum->CalcTextHeight(v28, &wHintWindow, 100, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
477 Str += v29;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
478 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
479 wHintWindow.uFrameHeight = v73->uTextureHeight + v81 + 54;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
480 if ( (signed int)Str > (signed int)wHintWindow.uFrameHeight )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
481 wHintWindow.uFrameHeight = (unsigned int)Str;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
482 if ( inspect_item->uAttributes & 8 && (inspect_item->uSpecEnchantmentType || inspect_item->uEnchantmentType) )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
483 wHintWindow.uFrameHeight += LOBYTE(pFontComic->uFontHeight);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
484 v85 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
485 if ( pFontArrus->uFontHeight )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
486 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
487 wHintWindow.uFrameWidth -= 24;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
488 v30 = pFontArrus->uFontHeight;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
489 v31 = inspect_item->GetIdentifiedName();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
490 if ( pFontArrus->CalcTextHeight(v31, &wHintWindow, 0, 0) / (signed int)v30 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
491 v85 = v30;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
492 wHintWindow.uFrameWidth += 24;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
493 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
494 wHintWindow.uFrameWidth += 12;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
495 wHintWindow.uFrameHeight += (unsigned int)v85;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
496 wHintWindow.uFrameW = wHintWindow.uFrameY + wHintWindow.uFrameHeight - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
497 wHintWindow.uFrameZ = wHintWindow.uFrameX + wHintWindow.uFrameWidth - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
498 wHintWindow.DrawMessageBox(0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
499 //v15 = pRenderer;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
500 pRenderer->SetTextureClipRect(wHintWindow.uFrameX + 12, wHintWindow.uFrameY + 12,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
501 wHintWindow.uFrameX + wHintWindow.uFrameWidth - 12, wHintWindow.uFrameY + wHintWindow.uFrameHeight - 12);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
502 wHintWindow.uFrameWidth -= 12;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
503 v32 = v73->uTextureHeight;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
504 v33 = wHintWindow.uFrameHeight;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
505 wHintWindow.uFrameHeight -= 12;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
506 wHintWindow.uFrameZ = wHintWindow.uFrameX + wHintWindow.uFrameWidth - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
507 wHintWindow.uFrameW = wHintWindow.uFrameY + wHintWindow.uFrameHeight - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
508 pRenderer->DrawTextureTransparent(
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
509 wHintWindow.uFrameX + v78,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
510 wHintWindow.uFrameY + (signed int)(v33 - v32) / 2,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
511 v73);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
512
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
513 v34 = (int)(v85 + 35);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
514 v85 = 3;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
515 Str = out_text;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
516 do
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
517 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
518 if ( *Str )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
519 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
520 wHintWindow.DrawText(pFontComic, 100, v34, 0, Str, 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
521 v34 += pFontComic->CalcTextHeight(Str, &wHintWindow, 100, 0) + 3;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
522 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
523 Str += 100;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
524 --v85;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
525 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
526 while (v85 );
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
527 v35 = item_desc->pDescription;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
528 if ( *v35 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
529 wHintWindow.DrawText(pFontSmallnum, 100, v34, 0, v35, 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
530 wHintWindow.uFrameX += 12;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
531 wHintWindow.uFrameWidth -= 24;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
532 v36 = inspect_item->GetIdentifiedName();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
533 wHintWindow.DrawTitleText(pFontArrus, 0, 0xCu, var88, v36, 3u);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
534 wHintWindow.uFrameWidth += 24;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
535 wHintWindow.uFrameX -= 12;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
536 if ( v77 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
537 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
538 sprintf(pTmpBuf.data(), "%s: %lu", pGlobalTXT_LocalizationStrings[465], v77);//"Value"
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
539 v40 = pFontComic;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
540 v61 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
541 v56 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
542 v51 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
543 v47 = pTmpBuf.data();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
544 v44 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
545 v42 = wHintWindow.uFrameHeight - LOBYTE(pFontComic->uFontHeight);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
546 v41 = 100;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
547 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
548 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
549 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
550 if ( (inspect_item->uAttributes & 8) && (inspect_item->uSpecEnchantmentType || inspect_item->uEnchantmentType) )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
551 {
1459
2ca62c9e7b3c Function names
Nomad
parents: 1458
diff changeset
552 init_summoned_item(&v67, inspect_item->uExpireTime - pParty->uTimePlayed);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
553 strcpy(pTmpBuf.data(), "Duration:");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
554 Str = (char *)(v67.field_18_expire_year - game_starting_year);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
555 if (v67.field_18_expire_year != 1168 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
556 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
557 sprintf(v65, " %d:yr", v67.field_18_expire_year - game_starting_year);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
558 strcat(pTmpBuf.data(), v65);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
559 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
560 if ( (((v67.field_14_exprie_month || Str) &&
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
561 ((sprintf(v65, " %d:mo", v67.field_14_exprie_month), strcat(pTmpBuf.data(), v65), v67.field_14_exprie_month) || Str)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
562 || v67.field_C_expire_day)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
563 && ((sprintf(v65, " %d:dy", v67.field_C_expire_day), strcat(pTmpBuf.data(), v65), v67.field_14_exprie_month) || Str ||
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
564 v67.field_C_expire_day)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
565 || v67.field_8_expire_hour)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
566 && ((sprintf(v65, " %d:hr", v67.field_8_expire_hour), strcat(pTmpBuf.data(), v65), v67.field_14_exprie_month) || Str ||
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
567 v67.field_C_expire_day || v67.field_8_expire_hour)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
568 || v67.field_4_expire_minute )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
569 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
570 sprintf(v65, " %d:mn", v67.field_4_expire_minute);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
571 strcat(pTmpBuf.data(), v65);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
572 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
573 wHintWindow.DrawText(pFontComic, 100, wHintWindow.uFrameHeight - 2 * LOBYTE(pFontComic->uFontHeight), 0, pTmpBuf.data(), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
574 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
575 v37 = inspect_item->GetValue();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
576 sprintf(pTmpBuf.data(), "%s: %lu", pGlobalTXT_LocalizationStrings[465], v37);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
577 wHintWindow.DrawText(pFontComic, 100, wHintWindow.uFrameHeight - LOBYTE(pFontComic->uFontHeight), 0, pTmpBuf.data(), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
578 v38 = inspect_item->uAttributes;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
579 if ( BYTE1(v38) & 1 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
580 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
581 v61 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
582 v56 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
583 v51 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
584 v47 = pGlobalTXT_LocalizationStrings[187]; //"Stolen"
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
585 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
586 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
587 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
588 if ( !(BYTE1(v38) & 2) )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
589 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
590 pRenderer->ResetTextureClipRect();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
591 if ( !areWeLoadingTexture )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
592 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
593 v73->Release();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
594 pIcons_LOD->SyncLoadedFilesCount();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
595 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
596 return;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
597 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
598 v61 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
599 v56 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
600 v51 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
601 v47 = pGlobalTXT_LocalizationStrings[651]; //"Hardened"
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
602 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
603 LOWORD(v38) = LOWORD(pRenderer->uTargetRMask);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
604 v44 = v38;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
605 v42 = wHintWindow.uFrameHeight - LOBYTE(pFontComic->uFontHeight);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
606 v39 = pFontComic->GetLineWidth(pTmpBuf.data());
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
607 v40 = pFontComic;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
608 v41 = v39 + 132;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
609 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
610 wHintWindow.DrawText(v40, v41, v42, v44, v47, v51, v56, v61);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
611 pRenderer->ResetTextureClipRect();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
612 if ( !areWeLoadingTexture )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
613 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
614 v73->Release();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
615 pIcons_LOD->SyncLoadedFilesCount();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
616 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
617 return;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
618 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
619 // 4E455C: using guessed type int dword_4E455C;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
620 // 506128: using guessed type int areWeLoadingTexture;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
621
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
622
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
623
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
624 //----- (0041E360) --------------------------------------------------------
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
625 void MonsterPopup_Draw(unsigned int uActorID, GUIWindow *edx0)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
626 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
627 unsigned int v2; // esi@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
628 Actor *v3; // esi@3
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
629 int v4; // eax@3
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
630 //unsigned int v5; // ecx@3
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
631 NPCData *v6; // eax@3
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
632 unsigned __int16 v7; // cx@3
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
633 int v8; // eax@4
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
634 unsigned __int16 v9; // dx@4
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
635 SpriteFrame *v10; // edi@17
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
636 LODSprite *v11; // esi@17
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
637 unsigned int v12; // ecx@17
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
638 Sprite *v13; // edi@18
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
639 //int v14; // ecx@18
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
640 //int v15; // edx@18
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
641 //int v16; // edx@18
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
642 //int v17; // eax@18
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
643 unsigned int v18; // ecx@19
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
644 unsigned int v19; // eax@21
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
645 char *v20; // esi@28
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
646 int v21; // edx@29
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
647 unsigned __int16 *v22; // ecx@29
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
648 int v23; // eax@29
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
649 int v24; // eax@32
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
650 int v25; // esi@32
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
651 char *v26; // edx@34
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
652 unsigned __int8 v27; // sf@36
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
653 unsigned __int8 v28; // of@36
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
654 //int v29; // esi@40
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
655 //unsigned __int16 *v30; // ecx@40
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
656 //int v31; // eax@40
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
657 //int v32; // esi@43
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
658 //unsigned __int16 v33; // ax@45
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
659 //int v34; // edx@45
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
660 //int v35; // eax@45
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
661 int v36; // eax@49
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
662 //char *v37; // eax@52
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
663 int v38; // eax@55
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
664 unsigned __int16 v39; // ax@59
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
665 SpellBuff *v40; // eax@60
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
666 int v41; // edi@61
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
667 unsigned int v42; // eax@61
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
668 int v43; // eax@62
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
669 int v44; // eax@63
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
670 signed int v45; // edi@65
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
671 unsigned __int16 v46; // ax@73
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
672 Player *v47; // ecx@77
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
673 //unsigned int v48; // eax@85
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
674 GUIFont *v49; // edi@90
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
675 int v50; // edi@90
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
676 SpellBuff *v51; // eax@91
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
677 char *v52; // ecx@98
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
678 char *v53; // ecx@101
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
679 char *v54; // ST0C_4@118
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
680 unsigned int v55; // eax@118
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
681 GUIFont *v56; // edi@124
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
682 unsigned __int8 v57; // al@128
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
683 int v58; // eax@132
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
684 Actor *v59; // ecx@133
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
685 unsigned __int8 v60; // dl@138
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
686 char *v62; // eax@147
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
687 int v63; // eax@152
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
688 //char *result; // eax@152
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
689 int v65; // eax@155
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
690 const char *v66; // [sp-10h] [bp-1FCh]@121
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
691 const char *v67; // [sp-10h] [bp-1FCh]@125
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
692 const char *v68; // [sp-10h] [bp-1FCh]@142
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
693 int v69; // [sp-Ch] [bp-1F8h]@121
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
694 char *v70; // [sp-Ch] [bp-1F8h]@125
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
695 char *v71; // [sp-Ch] [bp-1F8h]@142
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
696 char *v72; // [sp-8h] [bp-1F4h]@54
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
697 int v73; // [sp-8h] [bp-1F4h]@79
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
698 int v74; // [sp-8h] [bp-1F4h]@121
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
699 int v75; // [sp-8h] [bp-1F4h]@125
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
700 int v76; // [sp-8h] [bp-1F4h]@142
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
701 size_t v77; // [sp-4h] [bp-1F0h]@54
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
702 unsigned int v78; // [sp-4h] [bp-1F0h]@121
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
703 unsigned int v79; // [sp-4h] [bp-1F0h]@125
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
704 char *v80; // [sp-4h] [bp-1F0h]@142
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
705 char *v81; // [sp-4h] [bp-1F0h]@148
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
706 DDBLTFX Dst; // [sp+Ch] [bp-1E0h]@18
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
707 DDSURFACEDESC2 pDesc; // [sp+70h] [bp-17Ch]@18
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
708 RECT v84; // [sp+ECh] [bp-100h]@26
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
709 char *v85[10]; // [sp+FCh] [bp-F0h]@145
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
710 char *v95[11]; // [sp+124h] [bp-C8h]@127
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
711 RenderBillboardTransform_local0 v106; // [sp+150h] [bp-9Ch]@3
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
712 unsigned int v107; // [sp+1A0h] [bp-4Ch]@18
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
713 unsigned __int16 *v108; // [sp+1A4h] [bp-48h]@34
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
714 unsigned int v109; // [sp+1A8h] [bp-44h]@32
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
715 LPVOID v110; // [sp+1ACh] [bp-40h]@28
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
716 unsigned int v111; // [sp+1B0h] [bp-3Ch]@29
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
717 int v112; // [sp+1B4h] [bp-38h]@3
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
718 int v222; // [sp+1B8h] [bp-34h]@18
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
719 unsigned __int8 v114; // [sp+1BFh] [bp-2Dh]@133
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
720 int v115; // [sp+1C0h] [bp-2Ch]@3
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
721 unsigned int v116; // [sp+1C4h] [bp-28h]@18
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
722 int i; // [sp+1C8h] [bp-24h]@18
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
723 int a2; // [sp+1CCh] [bp-20h]@28
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
724 int v119; // [sp+1D0h] [bp-1Ch]@18
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
725 SpellBuff *v120; // [sp+1D4h] [bp-18h]@18
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
726 Actor *v121; // [sp+1D8h] [bp-14h]@3
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
727 int a5; // [sp+1DCh] [bp-10h]@3
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
728 GUIWindow *a1; // [sp+1E0h] [bp-Ch]@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
729 int v124; // [sp+1E4h] [bp-8h]@18
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
730 int a4; // [sp+1E8h] [bp-4h]@18
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
731
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
732 a1 = edx0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
733 v2 = uActorID;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
734
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
735 static Actor pMonsterInfoUI_Doll;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
736 /*if ( !(bMonsterInfoUI_bDollInitialized & 1) )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
737 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
738 bMonsterInfoUI_bDollInitialized |= 1u;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
739 Actor::Actor(&pMonsterInfoUI_Doll);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
740 atexit(nullsub_3);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
741 }*/
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
742 v106.uParentBillboardID = -1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
743 v3 = &pActors[v2];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
744 v121 = v3;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
745 v4 = TargetColor(0xE1u, 255, 0x9Bu);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
746 //v5 = v3->sNPC_ID;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
747 a5 = v4;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
748 v6 = GetNPCData(v3->sNPC_ID);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
749 v7 = v3->pMonsterInfo.uID;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
750 //v112 = (char **)v6;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
751 v115 = monster_popup_y_offsets[((signed __int16)v7 - 1) / 3] - 40;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
752 if ( v7 == pMonsterInfoUI_Doll.pMonsterInfo.uID )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
753 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
754 v9 = pMonsterInfoUI_Doll.uCurrentActionLength;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
755 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
756 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
757 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
758 memcpy(&pMonsterInfoUI_Doll, v3, sizeof(pMonsterInfoUI_Doll));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
759 pMonsterInfoUI_Doll.uCurrentActionAnimation = ANIM_Bored;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
760 pMonsterInfoUI_Doll.uCurrentActionTime = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
761 v8 = rand();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
762 v3 = v121;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
763 v9 = v8 % 256 + 128;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
764 pMonsterInfoUI_Doll.uCurrentActionLength = v8 % 256 + 128;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
765 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
766
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
767 if ( (signed int)pMonsterInfoUI_Doll.uCurrentActionTime > (signed __int16)v9 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
768 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
769 pMonsterInfoUI_Doll.uCurrentActionTime = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
770 if ( pMonsterInfoUI_Doll.uCurrentActionAnimation == ANIM_Bored || pMonsterInfoUI_Doll.uCurrentActionAnimation == ANIM_AtkMelee)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
771 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
772 pMonsterInfoUI_Doll.uCurrentActionAnimation = ANIM_Standing;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
773 pMonsterInfoUI_Doll.uCurrentActionLength = rand() % 128 + 128;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
774 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
775 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
776 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
777 //rand();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
778 pMonsterInfoUI_Doll.uCurrentActionAnimation = ANIM_Bored;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
779 if ( (pMonsterInfoUI_Doll.pMonsterInfo.uID < 115 || pMonsterInfoUI_Doll.pMonsterInfo.uID > 186) &&
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
780 (pMonsterInfoUI_Doll.pMonsterInfo.uID < 232 || pMonsterInfoUI_Doll.pMonsterInfo.uID > 249) && rand() % 30 < 100 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
781 pMonsterInfoUI_Doll.uCurrentActionAnimation = ANIM_AtkMelee;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
782 pMonsterInfoUI_Doll.uCurrentActionLength = 8 * pSpriteFrameTable->pSpriteSFrames[v3->pSpriteIDs[(signed __int16)pMonsterInfoUI_Doll.uCurrentActionAnimation]].uAnimLength;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
783 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
784 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
785 v10 = pSpriteFrameTable->GetFrame( v3->pSpriteIDs[pMonsterInfoUI_Doll.uCurrentActionAnimation], pMonsterInfoUI_Doll.uCurrentActionTime);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
786 v11 = &pSprites_LOD->pSpriteHeaders[v10->pHwSpriteIDs[0]];//40 * v10->pHwSpriteIDs[0] + 7218180;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
787 v106.pTarget = pRenderer->pTargetSurface;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
788 v106.pTargetZ = pRenderer->pActiveZBuffer;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
789 v106.uTargetPitch = pRenderer->uTargetSurfacePitch;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
790 v12 = a1->uFrameY + 52;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
791 v106.uViewportX = a1->uFrameX + 13;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
792 v106.uViewportY = v12;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
793 v106.uViewportW = v12 + 128;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
794 v106.uViewportZ = v106.uViewportX + 128;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
795 v106.uScreenSpaceX = (signed int)(v106.uViewportX + 128 + v106.uViewportX) / 2;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
796 v106._screenspace_x_scaler_packedfloat = 65536;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
797 v106._screenspace_y_scaler_packedfloat = 65536;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
798 v106.uScreenSpaceY = v115 + v12 + v11->uHeight;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
799 v106.pPalette = PaletteManager::Get_Dark_or_Red_LUT(v10->uPaletteIndex, 0, 1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
800 v106.sZValue = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
801 v106.uFlags = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
802 pRenderer->SetRasterClipRect(0, 0, 0x27Fu, 0x1DFu);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
803 pRenderer->RasterLine2D(v106.uViewportX - 1, v106.uViewportY - 1, v106.uViewportX + 129, v106.uViewportY - 1, a5);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
804 pRenderer->RasterLine2D( v106.uViewportX + 129, v106.uViewportY - 1, v106.uViewportX + 129, v106.uViewportW + 1, a5);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
805 pRenderer->RasterLine2D(v106.uViewportX + 129, v106.uViewportW + 1, v106.uViewportX - 1, v106.uViewportW + 1, a5);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
806 pRenderer->RasterLine2D(v106.uViewportX - 1, v106.uViewportW + 1, v106.uViewportX - 1, v106.uViewportY - 1, a5);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
807 if ( pRenderer->pRenderD3D )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
808 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
809 v13 = &pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
810 v106.uScreenSpaceY = v115 + v106.uViewportY + v13->uBufferHeight;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
811 //v222 = (IDirectDrawSurface *)v13->pTextureSurface;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
812 memset(&Dst, 0, 0x64u);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
813 Dst.dwSize = 100;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
814 Dst.dwFillColor = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
815 memset(&pDesc, 0, 0x7Cu);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
816 pDesc.dwSize = 124;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
817 v13->pTextureSurface->GetSurfaceDesc(&pDesc);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
818 //v14 = v13->uBufferHeight;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
819 //v120 = (SpellBuff *)v13->uBufferWidth;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
820 v107 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
821 //v15 = v13->uAreaX;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
822 //v119 = v13->uBufferWidth / 2;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
823 i = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
824 //a4 = v106.uScreenSpaceX + v15 - v13->uBufferWidth / 2;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
825 int dst_x = v106.uScreenSpaceX + v13->uAreaX - v13->uBufferWidth / 2;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
826 //v115 = v13->uAreaY;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
827 //v16 = v13->uAreaWidth + v13->uBufferWidth / 2 + v13->uAreaX - v13->uBufferWidth;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
828 //v124 = v106.uScreenSpaceY + v115 - v14;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
829 int dst_y = v106.uScreenSpaceY + v13->uAreaY - v13->uBufferHeight;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
830 //v17 = v13->uAreaHeight + v13->uAreaY - v14;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
831 //v116 = v106.uScreenSpaceX + v16;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
832 uint dst_z = v106.uScreenSpaceX + v13->uAreaX + v13->uAreaWidth + v13->uBufferWidth / 2 - v13->uBufferWidth;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
833 //v119 = v106.uScreenSpaceY + v17;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
834 uint dst_w = v106.uScreenSpaceY + v13->uAreaY + v13->uAreaHeight - v13->uBufferHeight;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
835 if (dst_x < v106.uViewportX)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
836 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
837 v18 = v106.uViewportX - dst_x;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
838 dst_x = v106.uViewportX;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
839 v107 = v18;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
840 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
841 if (dst_y < v106.uViewportY)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
842 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
843 v19 = v106.uViewportY - dst_y;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
844 dst_y = v106.uViewportY;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
845 i = v19;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
846 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
847 if (dst_z > v106.uViewportZ)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
848 dst_z = v106.uViewportZ;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
849 if (dst_w > v106.uViewportW)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
850 dst_w = v106.uViewportW;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
851 pRenderer->FillRectFast(v106.uViewportX, v106.uViewportY, v106.uViewportZ - v106.uViewportX, v106.uViewportW - v106.uViewportY, pRenderer->uTargetBMask | pRenderer->uTargetGMask);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
852 pRenderer->FillRectFast(v106.uViewportX, v106.uViewportY, v106.uViewportZ - v106.uViewportX, v106.uViewportW - v106.uViewportY, pRenderer->uTargetBMask | pRenderer->uTargetGMask);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
853 v84.left = v106.uViewportX;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
854 v84.top = v106.uViewportY;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
855 v84.right = v106.uViewportZ;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
856 v84.bottom = v106.uViewportW;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
857 ErrD3D(pRenderer->pBackBuffer4->Blt(&v84, 0, 0, 16778240u, &Dst));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
858 if ( pRenderer->uTargetGBits == 5 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
859 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
860 __debugbreak(); // no monster popup for r5g5b5 yet
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
861 memset(&pDesc, 0, 0x7Cu);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
862 pDesc.dwSize = 124;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
863 if ( pRenderer->LockSurface_DDraw4(v13->pTextureSurface, &pDesc, DDLOCK_WAIT))
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
864 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
865 v20 = (char *)dst_y;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
866 v110 = pDesc.lpSurface;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
867 a2 = dst_y;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
868 if (dst_y < dst_w)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
869 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
870 //v111 = 2 * pRenderer->uTargetSurfacePitch;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
871 v21 = dst_x;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
872 v22 = &pRenderer->pTargetSurface[dst_y * pRenderer->uTargetSurfacePitch + dst_x];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
873 auto _v22_2 = v22;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
874 v23 = i - dst_y;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
875 //v120 = (SpellBuff *)&pRenderer->pTargetSurface[(int)&a4[v124 * pRenderer->uTargetSurfacePitch]];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
876 v115 = i - dst_y;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
877 while ( 1 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
878 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
879 dst_y = v21;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
880 if ( v21 < dst_z )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
881 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
882 v24 = (int)&v20[v23];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
883 v25 = v107 - v21;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
884 v109 = v24;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
885 for ( i = v107 - v21; ; v25 = i )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
886 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
887 v108 = (unsigned __int16 *)((pDesc.lPitch >> 1) * pDesc.dwHeight * v109 / v13->uAreaHeight);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
888 v26 = (char *)v108 + pDesc.dwWidth * (v25 + dst_y++) / v13->uAreaWidth;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
889 *v22 = *((short *)v110 + (int)v26);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
890 ++v22;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
891 if ( dst_y >= dst_z )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
892 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
893 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
894 v23 = v115;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
895 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
896 v22 = (unsigned __int16 *)((char *)_v22_2 + 2 * pRenderer->uTargetSurfacePitch);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
897 _v22_2 = v22;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
898 v20 = (char *)(a2 + 1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
899 v28 = __OFSUB__(a2 + 1, dst_w);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
900 v27 = (signed int)(a2++ + 1 - dst_w) < 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
901 //a2 = (Player *)((char *)a2 + 1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
902 //v120 = (SpellBuff *)((char *)v120 + v111);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
903 if ( !(v27 ^ v28) )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
904 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
905 v21 = dst_x;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
906 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
907 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
908 v13->pTextureSurface->Unlock(0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
909 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
910 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
911 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
912 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
913 memset(&pDesc, 0, 0x7Cu);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
914 pDesc.dwSize = 124;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
915 if ( pRenderer->LockSurface_DDraw4(v13->pTextureSurface, &pDesc, DDLOCK_WAIT) )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
916 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
917 auto src = (unsigned __int16 *)pDesc.lpSurface;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
918
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
919 uint num_top_scanlines_above_frame_y = i - dst_y;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
920 for (uint y = dst_y; y < dst_w; ++y)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
921 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
922 auto dst = &pRenderer->pTargetSurface[y * pRenderer->uTargetSurfacePitch + dst_x];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
923
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
924 uint src_y = num_top_scanlines_above_frame_y + y;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
925 for (uint x = dst_x; x < dst_z; ++x)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
926 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
927 uint src_x = v107 - dst_x + x; // num scanlines left to frame_x + current x
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
928
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
929 uint idx = pDesc.dwHeight * src_y / v13->uAreaHeight * (pDesc.lPitch / sizeof(short)) +
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
930 pDesc.dwWidth * src_x / v13->uAreaWidth;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
931 uint b = src[idx] & 0x1F;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
932 *dst++ = b | 2 * (src[idx] & 0xFFE0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
933 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
934 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
935 v13->pTextureSurface->Unlock(0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
936 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
937 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
938 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
939 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
940 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
941 pRenderer->FillRectFast(v106.uViewportX, v106.uViewportY, v106.uViewportZ - v106.uViewportX, v106.uViewportW - v106.uViewportY, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
942 v36 = v10->pHwSpriteIDs[0];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
943 if ( v36 >= 0 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
944 pSprites_LOD->pSpriteHeaders[v36].DrawSprite_sw(&v106, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
945 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
946
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
947 if ( v121->sNPC_ID )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
948 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
949 //v37 = v6->uProfession;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
950 if (v6->uProfession)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
951 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
952 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[429], v6->pName, aNPCProfessionNames[v6->uProfession]); // "%s the %s" / ^Pi[%s] %s
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
953 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
954 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
955 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
956 v77 = 2000;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
957 v72 = v6->pName;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
958 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
959 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
960 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
961 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
962 v38 = v121->dword_000334_unique_name;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
963 v77 = 2000;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
964 if ( v38 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
965 v72 = pMonsterStats->pPlaceStrings[v38];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
966 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
967 v72 = pMonsterStats->pInfos[v121->pMonsterInfo.uID].pName;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
968 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
969 if(!v121->sNPC_ID || (v121->sNPC_ID && !v6->uProfession))
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
970 strncpy(pTmpBuf.data(), v72, v77);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
971 v39 = TargetColor(0xFFu, 0xFFu, 0x9Bu);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
972 a1->DrawTitleText(pFontComic, 0, 0xCu, v39, pTmpBuf.data(), 3u);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
973 Actor::DrawHealthBar(v121, a1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
974 v119 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
975 pMonsterInfoUI_Doll.uCurrentActionTime += pMiscTimer->uTimeElapsed;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
976 v115 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
977 v116 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
978 i = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
979 v112 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
980 if ( !uActiveCharacter )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
981 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
982 v45 = 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
983 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
984 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
985 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
986 LOBYTE(v40) = pPlayers[uActiveCharacter]->GetActualSkillLevel(PLAYER_SKILL_MONSTER_ID);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
987 v120 = v40;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
988 if ( !v40 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
989 v45 = 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
990 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
991 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
992 v41 = (unsigned __int8)v40 & 0x3F;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
993 v42 = SkillToMastery((unsigned __int16)v40) - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
994 if ( !v42 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
995 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
996 if ( v41 + 10 >= v121->pMonsterInfo.uLevel )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
997 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
998 v45 = 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
999 v119 = 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1000 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1001 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1002 v45 = 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1003 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1004 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1005 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1006 v43 = v42 - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1007 if ( !v43 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1008 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1009 if ( 2 * v41 + 10 >= v121->pMonsterInfo.uLevel )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1010 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1011 v45 = 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1012 v119 = 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1013 v116 = 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1014 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1015 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1016 v45 = 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1017 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1018 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1019 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1020 v44 = v43 - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1021 if ( !v44 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1022 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1023 if ( 3 * v41 + 10 >= v121->pMonsterInfo.uLevel )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1024 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1025 v45 = 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1026 v119 = 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1027 v116 = 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1028 i = 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1029 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1030 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1031 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1032 v45 = 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1033 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1034 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1035 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1036 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1037 if ( v44 != 1 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1038 v45 = 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1039 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1040 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1041 v45 = 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1042 v119 = 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1043 v116 = 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1044 i = 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1045 v112 = 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1046 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1047 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1048 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1049 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1050 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1051 // LABEL_73:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1052 v46 = v121->uAIState;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1053 if ( v46 != 5 && v46 != 4 && !dword_507BF0_is_there_popup_onscreen && v120 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1054 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1055 v47 = pPlayers[uActiveCharacter];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1056 if ( v119 | v116 | i | (unsigned int)v112 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1057 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1058 if ( v121->pMonsterInfo.uLevel >= v47->uLevel - 5 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1059 v73 = SPEECH_105;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1060 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1061 v73 = SPEECH_104;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1062 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1063 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1064 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1065 v73 = SPEECH_106;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1066 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1067 v47->PlaySound((PlayerSpeech)v73, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1068 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1069 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1070
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1071 for (uint _it = 0; _it < 4; ++_it)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1072 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1073 auto player = pParty->pPlayers + _it;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1074
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1075 //LOBYTE(v48) = player->GetActualSkillLevel(PLAYER_SKILL_MONSTER_ID);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1076 //v111 = v48;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1077 v111 = player->GetActualSkillLevel(PLAYER_SKILL_MONSTER_ID);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1078 v120 = (SpellBuff *)138;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1079 do
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1080 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1081 if ( (signed int)SkillToMastery(v111) >= 3 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1082 v115 = v45;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1083 v120 = (SpellBuff *)((char *)v120 - 1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1084 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1085 while ( v120 );
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1086 //++a2;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1087 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1088 //while ( (signed int)a2 < (signed int)pParty->pHirelings );
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1089
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1090 v49 = pFontSmallnum;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1091 a2 = (int)pFontSmallnum;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1092 a1->DrawText(pFontSmallnum, 12, 196, a5, pGlobalTXT_LocalizationStrings[631], 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1093 v50 = LOBYTE(v49->uFontHeight) + 193;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1094 if ( !v115 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1095 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1096 v78 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1097 v74 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1098 v69 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1099 v66 = pGlobalTXT_LocalizationStrings[630];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1100 a1->DrawText((GUIFont *)a2, 28, v50, a5, v66, v69, v74, v78);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1101 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1102 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1103 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1104 a4 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1105 v51 = &v121->pActorBuffs[1];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1106 v222 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1107 v120 = &v121->pActorBuffs[1];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1108 do
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1109 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1110 if ( (signed __int64)v51->uExpireTime > 0 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1111 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1112 switch ( (int)v51 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1113 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1114 case 0u:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1115 v124 = 60;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1116 a4 = (int)pGlobalTXT_LocalizationStrings[591];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1117 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1118 case 1u:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1119 v124 = 82;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1120 a4 = (int)pGlobalTXT_LocalizationStrings[649];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1121 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1122 case 2u:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1123 v124 = 92;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1124 a4 = (int)pGlobalTXT_LocalizationStrings[592];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1125 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1126 case 3u:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1127 v124 = 63;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1128 a4 = (int)pGlobalTXT_LocalizationStrings[4];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1129 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1130 case 4u:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1131 v52 = pGlobalTXT_LocalizationStrings[220];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1132 a4 = (int)v52;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1133 v124 = 81;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1134 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1135 case 5u:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1136 v52 = pGlobalTXT_LocalizationStrings[162];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1137 a4 = (int)v52;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1138 v124 = 81;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1139 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1140 case 6u:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1141 v53 = pGlobalTXT_LocalizationStrings[593];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1142 v124 = 35;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1143 a4 = (int)v53;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1144 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1145 case 8u:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1146 v53 = pGlobalTXT_LocalizationStrings[608];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1147 v124 = 62;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1148 a4 = (int)v53;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1149 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1150 case 7u:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1151 case 9u:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1152 a4 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1153 v124 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1154 ++v51;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1155 v222 = v222 + 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1156 v120 = v51;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1157 __debugbreak(); // fix condition
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1158 continue;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1159 case 0xAu:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1160 v124 = 47;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1161 a4 = (int)pGlobalTXT_LocalizationStrings[221];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1162 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1163 case 0xBu:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1164 v124 = 66;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1165 a4 = (int)pGlobalTXT_LocalizationStrings[607];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1166 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1167 case 0xCu:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1168 v124 = 85;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1169 a4 = (int)pGlobalTXT_LocalizationStrings[610];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1170 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1171 case 0xDu:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1172 v124 = 86;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1173 a4 = (int)pGlobalTXT_LocalizationStrings[609];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1174 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1175 case 0xEu:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1176 v124 = 17;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1177 a4 = (int)pGlobalTXT_LocalizationStrings[279];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1178 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1179 case 0xFu:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1180 v124 = 38;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1181 a4 = (int)pGlobalTXT_LocalizationStrings[442];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1182 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1183 case 0x10u:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1184 v124 = 46;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1185 a4 = (int)pGlobalTXT_LocalizationStrings[443];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1186 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1187 case 0x11u:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1188 v124 = 51;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1189 a4 = (int)pGlobalTXT_LocalizationStrings[440];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1190 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1191 case 0x12u:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1192 v124 = 5;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1193 a4 = (int)pGlobalTXT_LocalizationStrings[441];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1194 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1195 case 0x13u:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1196 v124 = 95;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1197 a4 = (int)pGlobalTXT_LocalizationStrings[229];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1198 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1199 case 0x14u:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1200 v124 = 73;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1201 a4 = (int)pGlobalTXT_LocalizationStrings[228];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1202 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1203 default:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1204 a4 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1205 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1206 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1207 if ( a4 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1208 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1209 v54 = (char *)a4;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1210 v55 = GetSpellColor(v124);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1211 a1->DrawText((GUIFont *)a2, 28, v50, v55, v54, 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1212 v50 = v50 + *(char *)(a2 + 5) - 3;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1213 v51 = v120;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1214 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1215 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1216
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1217 ++v51;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1218 v222 = v222 + 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1219 v120 = v51;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1220
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1221 __debugbreak(); // fix condition
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1222 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1223 //while ( (signed int)((char *)&v222->lpVtbl + 1) < 22 );
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1224 while (true);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1225
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1226 if ( !a4 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1227 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1228 v78 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1229 v74 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1230 v69 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1231 v66 = pGlobalTXT_LocalizationStrings[153];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1232 a1->DrawText((GUIFont *)a2, 28, v50, a5, v66, v69, v74, v78);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1233 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1234 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1235 v56 = pFontSmallnum;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1236 a4 = v106.uViewportY;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1237 if ( v119 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1238 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1239 sprintf(pTmpBuf.data(), "%s\f%05u\t100%d\n", pGlobalTXT_LocalizationStrings[108], 0, v121->pMonsterInfo.uHP);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1240 a1->DrawText(v56, 150, (int)a4, a5, pTmpBuf.data(), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1241 a4 = a4 + LOBYTE(v56->uFontHeight) - 3;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1242 v79 = v121->pMonsterInfo.uAC;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1243 v75 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1244 v70 = pGlobalTXT_LocalizationStrings[12];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1245 v67 = "%s\f%05u\t100%d\n";
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1246 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1247 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1248 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1249 sprintf(pTmpBuf.data(), "%s\f%05u\t100%s\n", pGlobalTXT_LocalizationStrings[108], 0, pGlobalTXT_LocalizationStrings[630]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1250 a1->DrawText(v56, 150, (int)a4, a5, pTmpBuf.data(), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1251 v79 = (unsigned int)pGlobalTXT_LocalizationStrings[630];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1252 v75 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1253 v70 = pGlobalTXT_LocalizationStrings[12];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1254 a4 = a4 + LOBYTE(v56->uFontHeight) - 3;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1255 v67 = "%s\f%05u\t100%s\n";
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1256 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1257 sprintf(pTmpBuf.data(), v67, v70, v75, v79);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1258 a1->DrawText(v56, 150, a4, a5, pTmpBuf.data(), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1259 a4 = a4 + LOBYTE(v56->uFontHeight) - 6 + LOBYTE(v56->uFontHeight);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1260 v95[0] = pGlobalTXT_LocalizationStrings[87];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1261 v95[1] = pGlobalTXT_LocalizationStrings[6];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1262 v95[2] = pGlobalTXT_LocalizationStrings[240];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1263 v95[3] = pGlobalTXT_LocalizationStrings[70];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1264 v95[4] = pGlobalTXT_LocalizationStrings[624];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1265 v95[5] = pGlobalTXT_LocalizationStrings[138];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1266 v95[6] = pGlobalTXT_LocalizationStrings[214];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1267 v95[7] = pGlobalTXT_LocalizationStrings[142];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1268 v95[8] = pGlobalTXT_LocalizationStrings[29];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1269 v95[9] = pGlobalTXT_LocalizationStrings[133];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1270 v95[10] = pGlobalTXT_LocalizationStrings[54];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1271 if ( v116 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1272 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1273 sprintf(pTmpBuf.data(), "%s\f%05u\t080%s\n", pGlobalTXT_LocalizationStrings[18], 0, v95[v121->pMonsterInfo.uAttack1Type]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1274 a1->DrawText(v56, 150, (int)a4, a5, pTmpBuf.data(), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1275 a4 = a4 + LOBYTE(v56->uFontHeight) - 3;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1276 v57 = v121->pMonsterInfo.uAttack1DamageBonus;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1277 if ( v57 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1278 sprintf(pTmpBuf.data(), "%s\f%05u\t080%dd%d+%d\n", pGlobalTXT_LocalizationStrings[53],
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1279 0, v121->pMonsterInfo.uAttack1DamageDiceRolls, v121->pMonsterInfo.uAttack1DamageDiceSides, v57);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1280 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1281 sprintf(pTmpBuf.data(), "%s\f%05u\t080%dd%d\n", pGlobalTXT_LocalizationStrings[53],
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1282 0, v121->pMonsterInfo.uAttack1DamageDiceRolls, v121->pMonsterInfo.uAttack1DamageDiceSides);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1283 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1284 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1285 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1286 sprintf(pTmpBuf.data(), "%s\f%05u\t080%s\n", pGlobalTXT_LocalizationStrings[18], 0, pGlobalTXT_LocalizationStrings[630]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1287 a1->DrawText(v56, 150, (int)a4, a5, pTmpBuf.data(), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1288 a4 = a4 + LOBYTE(v56->uFontHeight) - 3;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1289 sprintf(pTmpBuf.data(), "%s\f%05u\t080%s\n", pGlobalTXT_LocalizationStrings[53], 0, pGlobalTXT_LocalizationStrings[630]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1290 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1291 a1->DrawText(v56, 150, a4, a5, pTmpBuf.data(), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1292 v58 = LOBYTE(v56->uFontHeight);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1293 a4 = a4 + v58 - 6 + v58;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1294 if ( !i )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1295 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1296 v80 = pGlobalTXT_LocalizationStrings[630];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1297 v76 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1298 v71 = pGlobalTXT_LocalizationStrings[628];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1299 v68 = "%s\f%05u\t080%s\n";
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1300 sprintf(pTmpBuf.data(), v68, v71, v76, v80);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1301 a1->DrawText(v56, 150, (int)a4, a5, pTmpBuf.data(), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1302 v58 = LOBYTE(v56->uFontHeight);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1303 a4 = a4 + v58 - 3;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1304 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1305 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1306 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1307 v120 = (SpellBuff *)pGlobalTXT_LocalizationStrings[628];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1308 v59 = v121;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1309 v114 = v121->pMonsterInfo.uSpell1ID;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1310 if ( v114 && v121->pMonsterInfo.uSpell2ID )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1311 v120 = (SpellBuff *)pGlobalTXT_LocalizationStrings[629];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1312 if ( v114 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1313 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1314 sprintf(pTmpBuf.data(), "%s\f%05u\t060%s\n", v120, 0, pSpellStats->pInfos[v114].pShortName);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1315 a1->DrawText(v56, 150, (int)a4, a5, pTmpBuf.data(), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1316 v58 = LOBYTE(v56->uFontHeight);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1317 a4 = a4 + v58 - 3;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1318 v59 = v121;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1319 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1320 v60 = v59->pMonsterInfo.uSpell2ID;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1321 if ( v60 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1322 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1323 sprintf(pTmpBuf.data(), "\f%05u\t060%s\n", 0, pSpellStats->pInfos[v60].pShortName);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1324 a1->DrawText(v56, 150, (int)a4, a5, pTmpBuf.data(), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1325 v58 = LOBYTE(v56->uFontHeight);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1326 a4 = a4 + v58 - 3;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1327 v59 = v121;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1328 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1329 if ( !v59->pMonsterInfo.uSpell1ID && !v59->pMonsterInfo.uSpell2ID )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1330 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1331 v80 = pGlobalTXT_LocalizationStrings[153];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1332 v76 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1333 v71 = pGlobalTXT_LocalizationStrings[628];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1334 v68 = "%s\f%05u\t060%s\n";
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1335 sprintf(pTmpBuf.data(), v68, v71, v76, v80);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1336 a1->DrawText(v56, 150, (int)a4, a5, pTmpBuf.data(), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1337 v58 = LOBYTE(v56->uFontHeight);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1338 a4 = a4 + v58 - 3;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1339 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1340 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1341 a4 = a4 + v58 - 3;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1342 a1->DrawText(v56, 150, a4, a5, pGlobalTXT_LocalizationStrings[626], 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1343 a4 = a4 + LOBYTE(v56->uFontHeight) - 3;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1344 v85[0] = pGlobalTXT_LocalizationStrings[87];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1345 v85[1] = pGlobalTXT_LocalizationStrings[6];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1346 v85[2] = pGlobalTXT_LocalizationStrings[240];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1347 v85[3] = pGlobalTXT_LocalizationStrings[70];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1348 v85[4] = pGlobalTXT_LocalizationStrings[142];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1349 v85[5] = pGlobalTXT_LocalizationStrings[214];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1350 v85[6] = pGlobalTXT_LocalizationStrings[29];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1351 v85[7] = pGlobalTXT_LocalizationStrings[133];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1352 v85[8] = pGlobalTXT_LocalizationStrings[54];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1353 v85[9] = pGlobalTXT_LocalizationStrings[624];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1354 v95[1] = (char *)v121->pMonsterInfo.uResFire;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1355 v95[2] = (char *)v121->pMonsterInfo.uResAir;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1356 v95[3] = (char *)v121->pMonsterInfo.uResWater;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1357 v95[4] = (char *)v121->pMonsterInfo.uResEarth;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1358 v95[5] = (char *)v121->pMonsterInfo.uResMind;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1359 v95[6] = (char *)v121->pMonsterInfo.uResSpirit;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1360 v95[7] = (char *)v121->pMonsterInfo.uResBody;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1361 v95[8] = (char *)v121->pMonsterInfo.uResLight;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1362 v95[9] = (char *)v121->pMonsterInfo.uResPhysical;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1363 v95[10] = (char *)v121->pMonsterInfo.uResDark;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1364 if ( v112 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1365 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1366 v124 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1367 do
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1368 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1369 v62 = v95[v124+1];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1370 if ( v62 == (char *)200 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1371 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1372 v81 = pGlobalTXT_LocalizationStrings[625];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1373 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1374 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1375 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1376 if ( v62 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1377 v81 = pGlobalTXT_LocalizationStrings[627];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1378 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1379 v81 = pGlobalTXT_LocalizationStrings[153];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1380 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1381 sprintf(pTmpBuf.data(), "%s\f%05u\t070%s\n", v85[v124], 0, v81);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1382 a1->DrawText(v56, 170, a4, a5, pTmpBuf.data(), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1383 v63 = LOBYTE(v56->uFontHeight);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1384 v124 += 4;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1385 a4 = a4 + v63 - 3;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1386 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1387 while ( v124 < 40 );
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1388 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1389 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1390 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1391 i = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1392 do
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1393 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1394 sprintf(pTmpBuf.data(), "%s\f%05u\t070%s\n", v85[i], 0, pGlobalTXT_LocalizationStrings[630]); // "?"
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1395 a1->DrawText(v56, 170, a4, a5, pTmpBuf.data(), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1396 v65 = LOBYTE(v56->uFontHeight);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1397 ++i;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1398 a4 = a4 + v65 - 3;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1399 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1400 while ( i < 10 );
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1401 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1402 if ( (signed __int64)pParty->pPartyBuffs[PARTY_BUFF_DETECT_LIFE].uExpireTime > 0 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1403 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1404 sprintf(pTmpBuf.data(), "%s: %d", pGlobalTXT_LocalizationStrings[650], v121->sCurrentHP);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1405 pFontSmallnum->GetLineWidth(pTmpBuf.data());
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1406 a1->DrawTitleText(pFontSmallnum, 0, a1->uFrameHeight - LOBYTE(pFontSmallnum->uFontHeight) - 12, 0, pTmpBuf.data(), 3);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1407 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1408 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1409
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1410
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1411 //----- (00417BB5) --------------------------------------------------------
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1412 const char *CharacterUI_GetSkillDescText(unsigned int uPlayerID, PLAYER_SKILL_TYPE uPlayerSkillType)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1413 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1414 //enum PLAYER_SKILL_TYPE v2; // esi@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1415 //unsigned int v3; // ebx@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1416 int v4; // edi@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1417 int v5; // eax@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1418 Player *pPlayer; // ebx@7
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1419 char v7; // al@7
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1420 char v8; // cl@7
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1421 unsigned int v9; // eax@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1422 unsigned int v10; // eax@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1423 unsigned int v11; // eax@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1424 PLAYER_SKILL_TYPE v12; // edi@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1425 unsigned int v13; // eax@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1426 unsigned int v14; // eax@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1427 PLAYER_SKILL_TYPE v15; // esi@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1428 int v16; // edi@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1429 char v17; // al@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1430 int v18; // ST5C_4@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1431 int v19; // ST4C_4@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1432 int v20; // ST3C_4@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1433 int v21; // ST2C_4@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1434 int v22; // ST1C_4@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1435 char *v23; // esi@8
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1436 unsigned int v24; // eax@9
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1437 unsigned int v25; // eax@9
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1438 unsigned int v26; // eax@9
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1439 unsigned int v27; // ecx@9
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1440 PLAYER_SKILL_TYPE v28; // ebx@9
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1441 unsigned int v29; // eax@9
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1442 char a2[1200]; // [sp+Ch] [bp-538h]@7
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1443 char Source[120]; // [sp+4BCh] [bp-88h]@7
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1444 unsigned __int16 *v33; // [sp+534h] [bp-10h]@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1445 int v34; // [sp+538h] [bp-Ch]@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1446 unsigned __int16 *v35; // [sp+53Ch] [bp-8h]@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1447 //enum PLAYER_SKILL_TYPE v36; // [sp+540h] [bp-4h]@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1448
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1449 //v2 = uPlayerSkillType;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1450 //v3 = uPlayerID;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1451 //v36 = uPlayerSkillType;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1452 v4 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[431]);// Normal
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1453 v34 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[433]);// Expert
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1454 v33 = (unsigned __int16 *)pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[432]);// Master
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1455 v5 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[96]);// Grand
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1456 v35 = (unsigned __int16 *)v4;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1457 if ( v34 > v4 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1458 v35 = (unsigned __int16 *)v34;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1459 if ( (signed int)v33 > (signed int)v35 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1460 v35 = v33;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1461 if ( v5 > (signed int)v35 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1462 v35 = (unsigned __int16 *)v5;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1463 pPlayer = &pParty->pPlayers[uPlayerID];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1464 //v33 = &pPlayer->pActiveSkills[uPlayerSkillType];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1465 v7 = pPlayer->GetActualSkillLevel(uPlayerSkillType);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1466 v8 = pPlayer->pActiveSkills[uPlayerSkillType];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1467 a2[0] = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1468 Source[0] = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1469 if ( (v8 & 0x3F) == (v7 & 0x3F) )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1470 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1471 strcpy(a2, "%s\n\n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1472 v24 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1473 sprintf(Source, "\f%05d", v24);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1474 strcat(a2, Source);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1475 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1476 v25 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 2);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1477 sprintf(Source, "\f%05d", v25);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1478 strcat(a2, Source);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1479 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1480 v26 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 3);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1481 sprintf(Source, "\f%05d", v26);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1482 strcat(a2, Source);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1483 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1484 v27 = pPlayer->classType;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1485 v28 = uPlayerSkillType;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1486 v29 = GetSkillColor(v27, uPlayerSkillType, 4);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1487 sprintf(Source, "\f%05d", v29);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1488 strcat(a2, Source);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1489 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1490
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1491 v23 = static_sub_417BB5_out_string;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1492 sprintf(static_sub_417BB5_out_string, a2, pSkillDesc[v28], pGlobalTXT_LocalizationStrings[431], // Normal
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1493 (char *)v35 + 3, v35 + 5, pNormalSkillDesc[v28], pGlobalTXT_LocalizationStrings[433], // Expert
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1494 (char *)v35 + 3, v35 + 5, pExpertSkillDesc[v28], pGlobalTXT_LocalizationStrings[432], // Master
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1495 (char *)v35 + 3, v35 + 5, pMasterSkillDesc[v28], pGlobalTXT_LocalizationStrings[96], // Grand
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1496 (char *)v35 + 3, v35 + 5, pGrandSkillDesc[v28]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1497 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1498 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1499 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1500 strcpy(a2, "%s\n\n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1501 v9 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1502 sprintf(Source, "\f%05d", v9);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1503 strcat(a2, Source);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1504 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1505 v10 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 2);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1506 sprintf(Source, "\f%05d", v10);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1507 strcat(a2, Source);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1508 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1509 v11 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 3);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1510 sprintf(Source, "\f%05d", v11);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1511 strcat(a2, Source);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1512 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1513 v12 = uPlayerSkillType;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1514 v13 = GetSkillColor(pPlayer->classType, uPlayerSkillType, 4);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1515 sprintf(Source, "\f%05d", v13);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1516 strcat(a2, Source);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1517 strcat(a2, "%s\t%03d:\t%03d%s\t000\n\n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1518 v14 = TargetColor(0xFFu, 0xFFu, 0xFFu);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1519 sprintf(Source, "\f%05d", v14);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1520 strcat(a2, Source);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1521 strcat(a2, "%s: +%d");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1522 v15 = v12;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1523 v16 = (int)(v35 + 5);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1524 v15 = (PLAYER_SKILL_TYPE)((int)v15 * 4);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1525 v34 = (int)((char *)v35 + 3);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1526 v17 = pPlayer->GetActualSkillLevel(uPlayerSkillType);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1527 v18 = *(int *)(pGrandSkillDesc[v15]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1528 v19 = *(int *)(pMasterSkillDesc[v15]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1529 v20 = *(int *)(pExpertSkillDesc[v15]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1530 v21 = *(int *)(pNormalSkillDesc[v15]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1531 v22 = *(int *)(pSkillDesc[v15]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1532 v23 = static_sub_417BB5_out_string;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1533 sprintf(
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1534 static_sub_417BB5_out_string,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1535 a2,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1536 v22,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1537 pGlobalTXT_LocalizationStrings[431],
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1538 v34,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1539 v16,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1540 v21,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1541 pGlobalTXT_LocalizationStrings[433],
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1542 v34,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1543 v16,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1544 v20,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1545 pGlobalTXT_LocalizationStrings[432],
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1546 v34,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1547 v16,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1548 v19,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1549 pGlobalTXT_LocalizationStrings[96],
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1550 v34,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1551 v16,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1552 v18,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1553 pGlobalTXT_LocalizationStrings[623],
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1554 (v17 & 0x3F) - (*(char *)v33 & 0x3F));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1555 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1556 return v23;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1557 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1558
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1559 //----- (00417FE5) --------------------------------------------------------
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1560 void CharacterUI_SkillsTab_ShowHint()
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1561 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1562 unsigned int v0; // ecx@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1563 unsigned int v1; // eax@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1564 GUIButton *i; // esi@6
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1565 const char *v3; // eax@12
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1566 unsigned int pX; // [sp+4h] [bp-8h]@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1567 unsigned int pY; // [sp+8h] [bp-4h]@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1568
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1569 pMouse->GetClickPos(&pX, &pY);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1570 v0 = pX;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1571 v1 = pY;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1572 if ( (signed int)pX < 24 || (signed int)pX > 455 || (signed int)pY < 18 || (signed int)pY > 36 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1573 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1574 for ( i = pGUIWindow_CurrentMenu->pControlsHead; i; i = i->pNext )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1575 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1576 if ( i->msg == UIMSG_SkillUp
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1577 && (signed int)v0 >= (signed int)i->uX
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1578 && (signed int)v0 <= (signed int)i->uZ
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1579 && (signed int)v1 >= (signed int)i->uY
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1580 && (signed int)v1 <= (signed int)i->uW )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1581 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1582 v3 = CharacterUI_GetSkillDescText(uActiveCharacter - 1, (PLAYER_SKILL_TYPE)i->msg_param);
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1583 CharacterUI_DrawTooltip(pSkillNames[i->msg_param], v3);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1584 v1 = pY;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1585 v0 = pX;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1586 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1587 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1588 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1589 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1590 {
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1591 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[207], pSkillPointsAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1592 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1593
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1594 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1595
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1596 //----- (00418083) --------------------------------------------------------
1458
934074e7fcc1 ModalWindow
Nomad
parents: 1393
diff changeset
1597 void CharacterUI_StatsTab_ShowHint()
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1598 {
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1599 int pStringNum; // edi@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1600 signed int pTextColor; // eax@15
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1601 char *pHourWord; // ecx@17
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1602 char *pDayWord; // eax@20
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1603 int v15; // ebx@28
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1604 int v16; // eax@33
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1605 POINT a2; // [sp+Ch] [bp-24h]@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1606 int pHour; // [sp+14h] [bp-1Ch]@15
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1607 unsigned int pDay; // [sp+24h] [bp-Ch]@15
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1608
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1609 pMouse->GetCursorPos(&a2);
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1610 for ( pStringNum = 0; pStringNum < stat_string_coord.size(); ++pStringNum )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1611 {
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1612 if (a2.x >= stat_string_coord[pStringNum].x && a2.x <= stat_string_coord[pStringNum].x + stat_string_coord[pStringNum].width )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1613 {
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1614 if (a2.y >= stat_string_coord[pStringNum].y && a2.y <= stat_string_coord[pStringNum].y + stat_string_coord[pStringNum].height )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1615 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1616 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1617 }
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1618
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1619 switch ( pStringNum )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1620 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1621 case 0:// Attributes
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1622 case 1:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1623 case 2:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1624 case 3:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1625 case 4:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1626 case 5:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1627 case 6:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1628 if ( aAttributeNames[pStringNum] && pAttributeDescriptions[pStringNum] )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1629 CharacterUI_DrawTooltip(aAttributeNames[pStringNum], pAttributeDescriptions[pStringNum]);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1630 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1631 case 7:// Health Points
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1632 if ( pGlobalTXT_LocalizationStrings[108] && pHealthPointsAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1633 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[108], pHealthPointsAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1634 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1635 case 8:// Spell Points
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1636 if ( pGlobalTXT_LocalizationStrings[212] && pSpellPointsAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1637 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[212], pSpellPointsAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1638 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1639 case 9:// Armor Class
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1640 if ( pGlobalTXT_LocalizationStrings[12] && pArmourClassAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1641 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[12], pArmourClassAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1642 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1643 case 10:// Player Condition
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1644 strcpy(pTmpBuf2.data(), pPlayerConditionAttributeDescription);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1645 strcat(pTmpBuf2.data(), "\n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1646 extern std::array<unsigned int, 18> pConditionImportancyTable;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1647 for ( uint i = 0; i < 18; ++i )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1648 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1649 if ( pPlayers[uActiveCharacter]->pConditions[pConditionImportancyTable[i]] )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1650 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1651 strcat(pTmpBuf2.data(), " \n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1652 pHour = pParty->uTimePlayed - pPlayers[uActiveCharacter]->pConditions[pConditionImportancyTable[i]];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1653 pHour = (unsigned int)((pHour * 0.234375) / 60 / 60);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1654 pDay = (unsigned int)pHour / 24;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1655 pHour %= 24i64;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1656 pTextColor = GetConditionDrawColor(pConditionImportancyTable[i]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1657 sprintfex(pTmpBuf.data(), format_4E2DE8, pTextColor, aCharacterConditionNames[pConditionImportancyTable[i]]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1658 strcat(pTmpBuf2.data(), pTmpBuf.data());
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1659 if ( pHour && pHour <= 1 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1660 pHourWord = pGlobalTXT_LocalizationStrings[109];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1661 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1662 pHourWord = pGlobalTXT_LocalizationStrings[110];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1663 if ( !pDay || (pDayWord = pGlobalTXT_LocalizationStrings[56], pDay > 1) )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1664 pDayWord = pGlobalTXT_LocalizationStrings[57];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1665 sprintfex(pTmpBuf.data(), "%lu %s, %lu %s", pDay, pDayWord, pHour, pHourWord);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1666 strcat(pTmpBuf2.data(), pTmpBuf.data());
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1667 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1668 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1669 if ( pGlobalTXT_LocalizationStrings[47] && pTmpBuf2.data() )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1670 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[47], pTmpBuf2.data());
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1671 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1672 case 11:// Fast Spell
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1673 if ( pGlobalTXT_LocalizationStrings[172] && pFastSpellAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1674 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[172], pFastSpellAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1675 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1676 case 12:// Player Age
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1677 if ( pGlobalTXT_LocalizationStrings[5] && pPlayerAgeAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1678 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[5], pPlayerAgeAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1679 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1680 case 13:// Player Level
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1681 if ( pGlobalTXT_LocalizationStrings[131] && pPlayerLevelAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1682 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[131], pPlayerLevelAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1683 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1684 case 14://Experience
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1685 v15 = pPlayers[uActiveCharacter]->uLevel;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1686 do
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1687 {
1459
2ca62c9e7b3c Function names
Nomad
parents: 1458
diff changeset
1688 if ( (signed __int64)pPlayers[uActiveCharacter]->uExperience < (unsigned int)GetExperienceRequiredForLevel(v15) )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1689 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1690 ++v15;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1691 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1692 while ( v15 <= 10000 );
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1693 pTmpBuf[0] = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1694 pTmpBuf2[0] = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1695 if ( v15 > pPlayers[uActiveCharacter]->uLevel )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1696 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[147], v15);
1459
2ca62c9e7b3c Function names
Nomad
parents: 1458
diff changeset
1697 v16 = GetExperienceRequiredForLevel(v15) - LODWORD(pPlayers[uActiveCharacter]->uExperience);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1698 sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[538], v16, v15 + 1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1699 strcat(pTmpBuf.data(), "\n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1700 strcat(pTmpBuf.data(), pTmpBuf2.data());
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1701 sprintf(pTmpBuf2.data(), "%s\n \n%s", pPlayerExperienceAttributeDescription, pTmpBuf.data());
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1702 if ( pGlobalTXT_LocalizationStrings[83] && pTmpBuf2.data() )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1703 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[83], pTmpBuf2.data());
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1704 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1705 case 15:// Attack Bonus
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1706 if ( pGlobalTXT_LocalizationStrings[587] && pAttackBonusAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1707 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[587], pAttackBonusAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1708 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1709 case 16:// Attack Damage
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1710 if ( pGlobalTXT_LocalizationStrings[588] && pAttackDamageAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1711 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[588], pAttackDamageAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1712 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1713 case 17:// Missle Bonus
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1714 if ( pGlobalTXT_LocalizationStrings[589] && pMissleBonusAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1715 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[589], pMissleBonusAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1716 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1717 case 18:// Missle Damage
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1718 if ( pGlobalTXT_LocalizationStrings[590] && pMissleDamageAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1719 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[590], pMissleDamageAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1720 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1721 case 19:// Fire Resistance
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1722 if ( pGlobalTXT_LocalizationStrings[87] && pFireResistanceAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1723 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[87], pFireResistanceAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1724 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1725 case 20:// Air Resistance
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1726 if ( pGlobalTXT_LocalizationStrings[6] && pAirResistanceAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1727 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[6], pAirResistanceAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1728 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1729 case 21:// Water Resistance
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1730 if ( pGlobalTXT_LocalizationStrings[240] && pWaterResistanceAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1731 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[240], pWaterResistanceAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1732 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1733 case 22:// Earth Resistance
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1734 if ( pGlobalTXT_LocalizationStrings[70] && pEarthResistanceAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1735 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[70], pEarthResistanceAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1736 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1737 case 23:// Mind Resistance
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1738 if ( pGlobalTXT_LocalizationStrings[142] && pMindResistanceAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1739 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[142], pMindResistanceAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1740 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1741 case 24:// Body Resistance
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1742 if ( pGlobalTXT_LocalizationStrings[29] && pBodyResistanceAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1743 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[29], pBodyResistanceAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1744 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1745 case 25: // Skill Points
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1746 if ( pGlobalTXT_LocalizationStrings[207] && pSkillPointsAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1747 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[207], pSkillPointsAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1748 break;
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1749 case 26: // Class description
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1750 {
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1751 auto v24 = pClassNames[pPlayers[uActiveCharacter]->classType];
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1752 auto v7 = pClassDescriptions[pPlayers[uActiveCharacter]->classType];
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1753 if (v7 && v24)
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1754 CharacterUI_DrawTooltip(v24, v7);
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1755 }
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1756 break;
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1757
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1758 default:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1759 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1760 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1761 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1762
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1763 //----- (00410B28) --------------------------------------------------------
1458
934074e7fcc1 ModalWindow
Nomad
parents: 1393
diff changeset
1764 void DrawSpellDescriptionPopup(int spell_index)
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1765 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1766 Player *v1; // edi@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1767 SpellInfo *v2; // esi@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1768 unsigned int v3; // eax@2
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1769 int v4; // eax@4
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1770 LONG v5; // ecx@4
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1771 int v6; // eax@10
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1772 char *v7; // ST44_4@12
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1773 unsigned __int16 v8; // ax@12
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1774 GUIWindow a1; // [sp+Ch] [bp-68h]@4
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1775 int v10; // [sp+60h] [bp-14h]@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1776 POINT a2; // [sp+64h] [bp-10h]@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1777 int v12; // [sp+6Ch] [bp-8h]@4
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1778 int v13; // [sp+70h] [bp-4h]@4
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1779
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1780 v1 = pPlayers[uActiveCharacter];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1781 v10 = spell_index;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1782 v2 = &pSpellStats->pInfos[spell_index + 11 * v1->lastOpenedSpellbookPage + 1];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1783 if ( pMouse->GetCursorPos(&a2)->y <= 250 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1784 v3 = pMouse->GetCursorPos(&a2)->y + 30;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1785 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1786 v3 = 30;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1787 a1.uFrameY = v3;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1788 a1.uFrameWidth = 328;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1789 a1.uFrameHeight = 68;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1790 a1.uFrameX = 90;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1791 a1.uFrameZ = 417;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1792 a1.uFrameW = v3 + 67;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1793 a1.Hint = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1794 a2.y = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[LOCSTR_NORMAL]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1795 v13 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[LOCSTR_MASTER]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1796 v12 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[LOCSTR_EXPERT]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1797 v4 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[LOCSTR_GRAND]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1798 v5 = a2.y;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1799 if ( v13 > a2.y )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1800 v5 = v13;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1801 if ( v12 > v5 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1802 v5 = v12;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1803 if ( v4 > v5 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1804 v5 = v4;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1805 sprintf( pTmpBuf2.data(),
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1806 "%s\n\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s",
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1807 v2->pDescription,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1808 pGlobalTXT_LocalizationStrings[LOCSTR_NORMAL],
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1809 v5 + 3, v5 + 10,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1810 v2->pBasicSkillDesc,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1811 pGlobalTXT_LocalizationStrings[LOCSTR_EXPERT],
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1812 v5 + 3, v5 + 10,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1813 v2->pExpertSkillDesc,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1814 pGlobalTXT_LocalizationStrings[LOCSTR_MASTER],
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1815 v5 + 3, v5 + 10,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1816 v2->pMasterSkillDesc,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1817 pGlobalTXT_LocalizationStrings[LOCSTR_GRAND],
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1818 v5 + 3, v5 + 10,
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1819 v2->pGrandmasterSkillDesc);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1820 v6 = pFontSmallnum->CalcTextHeight(pTmpBuf2.data(), &a1, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1821 a1.uFrameHeight += v6;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1822 if ( (signed int)a1.uFrameHeight < 150 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1823 a1.uFrameHeight = 150;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1824 a1.uFrameWidth = game_viewport_width;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1825 a1.DrawMessageBox(0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1826 a1.uFrameWidth -= 12;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1827 a1.uFrameHeight -= 12;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1828 v7 = v2->pName;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1829 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1830 a1.uFrameW = a1.uFrameHeight + a1.uFrameY - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1831 v8 = TargetColor(0xFFu, 0xFFu, 0x9Bu);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1832 a1.DrawTitleText(pFontArrus, 0x78u, 0xCu, v8, v7, 3u);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1833 a1.DrawText(pFontSmallnum, 120, 44, 0, pTmpBuf2.data(), 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1834 a1.uFrameWidth = 108;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1835 a1.uFrameZ = a1.uFrameX + 107;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1836 a1.DrawTitleText(pFontComic, 0xCu, 0x4Bu, 0, pSkillNames[v1->lastOpenedSpellbookPage + 12], 3u);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1837 sprintf( pTmpBuf.data(), "%s\n%d", pGlobalTXT_LocalizationStrings[LOCSTR_SP_COST],
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1838 pSpellDatas[spell_index + 11 * v1->lastOpenedSpellbookPage + 1].mana_per_skill[v1->pActiveSkills[v1->lastOpenedSpellbookPage + PLAYER_SKILL_FIRE]]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1839 // *(&[0].field_12 //temp_fix field_14
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1840 // + ((unsigned int)LOBYTE(v1->pActiveSkills[v1->lastOpenedSpellbookPage + 12]) >> 6)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1841 // + 10 * (int)((char *)v10 + 11 * v1->lastOpenedSpellbookPage)));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1842 a1.DrawTitleText(pFontComic, 0xCu, a1.uFrameHeight - LOBYTE(pFontComic->uFontHeight) - 16, 0, pTmpBuf.data(), 3u);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1843 dword_507B00_spell_info_to_draw_in_popup = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1844 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1845 // 507B00: using guessed type int dword_507B00_spell_info_to_draw_in_popup;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1846
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1847
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1848
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1849
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1850
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1851 //----- (00416D62) --------------------------------------------------------
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1852 void sub_416D62_ShowPopupWindow_MonsterRecord_ItemInfo_etcsub_416D62(Vec2_int_ *_this)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1853 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1854 signed int pPlayerNum; // eax@12
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1855 char *v2; // eax@32
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1856 void *v3; // ecx@52
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1857 unsigned int v4; // eax@59
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1858 int v5; // esi@62
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1859 signed int v6; // esi@64
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1860 signed int v7; // esi@69
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1861 ItemGen *v8; // ecx@70
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1862 unsigned int v9; // eax@72
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1863 unsigned int v10; // eax@76
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1864 //char v11; // zf@83
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1865 GUIButton *pButton; // esi@84
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1866 unsigned int v13; // ecx@85
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1867 char *pStr; // edi@85
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1868 //signed int pControlID; // eax@92
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1869 int v16; // eax@95
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1870 int v17; // eax@96
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1871 PLAYER_SKILL_TYPE v18; // eax@98
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1872 char *pStr2; // eax@99
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1873 unsigned int v20; // eax@108
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1874 unsigned int pSkillId; // eax@109
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1875 const char *pSkillInfo; // eax@111
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1876 //char *v23; // ebx@112
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1877 char *pHint; // edx@113
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1878 unsigned int pColor; // eax@113
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1879 GUIWindow pWindow; // [sp+4h] [bp-74h]@32
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1880 double v27; // [sp+58h] [bp-20h]@33
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1881 struct tagPOINT Point; // [sp+60h] [bp-18h]@6
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1882 char *v29; // [sp+68h] [bp-10h]@33
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1883 float v30; // [sp+6Ch] [bp-Ch]@33
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1884 unsigned int pX; // [sp+70h] [bp-8h]@3
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1885 unsigned int pY; // [sp+74h] [bp-4h]@3
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1886
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1887 if ( pCurrentScreen == SCREEN_VIDEO )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1888 return;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1889 if ( _this )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1890 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1891 pX = _this->x;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1892 pY = _this->y;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1893 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1894 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1895 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1896 pMouse->GetClickPos(&pX, &pY);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1897 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1898 if ( pRenderer->bWindowMode )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1899 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1900 GetCursorPos(&Point);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1901 ScreenToClient(hWnd, &Point);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1902 if ( Point.x < 1 || Point.y < 1 || Point.x > 638 || Point.y > 478 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1903 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1904 back_to_game();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1905 return;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1906 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1907 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1908
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1909 if ( pParty->pPickedItem.uItemID )//
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1910 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1911 //v1 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1912 //do
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1913 for ( pPlayerNum = 0; pPlayerNum < 4; ++pPlayerNum)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1914 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1915 if ( (signed int)pX > RightClickPortraitXmin[pPlayerNum] && (signed int)pX < RightClickPortraitXmax[pPlayerNum]
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1916 && (signed int)pY > 375 && (signed int)pY < 466 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1917 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1918 pPlayers[uActiveCharacter]->UseItem_DrinkPotion_etc(pPlayerNum + 1, 1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1919 return;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1920 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1921 //++v1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1922 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1923 //while ( v1 < 4 );
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1924 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1925
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1926 pEventTimer->Pause();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1927
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1928 switch(pCurrentScreen)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1929 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1930 case SCREEN_CASTING:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1931 {
1575
43d3536a20f7 OnInventoryItemRightClick
Nomad
parents: 1567
diff changeset
1932 OnInventoryItemRightClick();
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1933 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1934 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1935
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1936 case SCREEN_CHEST:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1937 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1938 if ( !pPlayers[uActiveCharacter]->CanAct() )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1939 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1940 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[427],//%s %s
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1941 pPlayers[uActiveCharacter]->pName, pGlobalTXT_LocalizationStrings[541]);//
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1942 pWindow.Hint = pTmpBuf.data();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1943 pWindow.uFrameWidth = 384;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1944 pWindow.uFrameHeight = 180;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1945 pWindow.uFrameY = 40;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1946 if ( (signed int)pX <= 320 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1947 v10 = pX + 30;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1948 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1949 v10 = pX - 414;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1950 pWindow.uFrameX = v10;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1951 pWindow.DrawMessageBox(0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1952 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1953 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1954 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1955 v9 = pX + pSRZBufferLineOffsets[pY];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1956 if ( pRenderer->pActiveZBuffer[v9] & 0xFFFF )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1957 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1958
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1959 // __debugbreak(); // invalid indexing will result in invalid object ptr
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1960 // v8 = (ItemGen *)(&pOtherOverlayList->pOverlays[49].field_4 + 2662 * (unsigned int)pChestWindow->ptr_1C + 18* *((short *)&pChests[0].igChestItems[139].uExpireTime
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1961 // + (pRenderer->pActiveZBuffer[v9] & 0xFFFF) + 2662 * (unsigned int)pChestWindow->ptr_1C + 3));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1962 v10=pChests[pChestWindow->par1C].pInventoryIndices[(pRenderer->pActiveZBuffer[v9] & 0xFFFF)-1];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1963 v8 =&pChests[pChestWindow->par1C].igChestItems[v10-1];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1964 GameUI_DrawItemInfo(v8);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1965 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1966 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1967 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1968 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1969 case SCREEN_GAME:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1970 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1971 if (GetCurrentMenuID() > 0)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1972 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1973
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1974 if ( (signed int)pY > (signed int)pViewport->uViewportBR_Y )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1975 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1976 pWindow.ptr_1C = (void *)((signed int)pX / 118);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1977 if ( (signed int)pX / 118 < 4 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1978 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1979 pWindow.Hint = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1980 pWindow.uFrameWidth = 400;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1981 pWindow.uFrameHeight = 200;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1982 pWindow.uFrameX = 38;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1983 pWindow.uFrameY = 60;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1984 pAudioPlayer->StopChannels(-1, -1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1985 GameUI_CharacterQuickRecord_Draw(&pWindow, pPlayers[(int)pWindow.ptr_1C + 1]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1986 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1987 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1988 else if ( (signed int)pX > (signed int)pViewport->uViewportBR_X )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1989 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1990 if ( (signed int)pY >= 130 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1991 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1992 if ( (signed int)pX >= 476 && (signed int)pX <= 636 && (signed int)pY >= 240 && (signed int)pY <= 300 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1993 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1994 pWindow.Hint = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1995 pWindow.uFrameWidth = 400;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1996 pWindow.uFrameHeight = 200;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1997 pWindow.uFrameX = 38;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1998 pWindow.uFrameY = 60;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1999 pAudioPlayer->StopChannels(-1, -1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2000 pWindow._41D73D_draw_buff_tooltip();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2001 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2002 else if ( (signed int)pX < 485 || (signed int)pX > 548 || (signed int)pY < 156 || (signed int)pY > 229 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2003 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2004 if (!( (signed int)pX < 566 || (signed int)pX > 629 || (signed int)pY < 156 || (signed int)pY > 229 ))
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2005 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2006 pAudioPlayer->StopChannels(-1, -1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2007 v3 = (void *)1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2008 GameUI_DrawNPCPopup(v3);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2009 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2010 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2011 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2012 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2013 pAudioPlayer->StopChannels(-1, -1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2014 v3 = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2015 GameUI_DrawNPCPopup(v3);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2016 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2017 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2018 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2019 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2020 pWindow.Hint = (char *)GameUI_GetMinimapHintText();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2021 pWindow.uFrameWidth = 256;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2022 pWindow.uFrameX = 130;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2023 pWindow.uFrameY = 140;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2024 pWindow.uFrameHeight = 64;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2025 pAudioPlayer->StopChannels(-1, -1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2026 pWindow.DrawMessageBox(0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2027 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2028 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2029 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2030 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2031 pWindow.Hint = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2032 pWindow.uFrameWidth = 320;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2033 pWindow.uFrameHeight = 320;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2034 v4 = pX - 350;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2035 if ( (signed int)pX <= 320 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2036 v4 = pX + 30;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2037 pWindow.uFrameX = v4;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2038 pWindow.uFrameY = 40;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2039 if ( pRenderer->pRenderD3D )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2040 LOWORD(v5) = pGame->pVisInstance->get_picked_object_zbuf_val();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2041 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2042 v5 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2043 v6 = (unsigned __int16)v5;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2044 if (PID_TYPE(v6) != OBJECT_Item)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2045 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2046 if (PID_TYPE(v6) == OBJECT_Actor)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2047 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2048 if ( pRenderer->uNumSceneBegins )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2049 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2050 pWindow.DrawMessageBox(1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2051 MonsterPopup_Draw(PID_ID(v6), &pWindow);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2052 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2053 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2054 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2055 pRenderer->BeginScene();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2056 pWindow.DrawMessageBox(1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2057 MonsterPopup_Draw(PID_ID(v6), &pWindow);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2058 pRenderer->EndScene();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2059 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2060 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2061 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2062 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2063 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2064 v7 = PID_ID(v6);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2065 if ( ! (pObjectList->pObjects[pSpriteObjects[v7].uObjectDescID].uFlags & 0x10 ) )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2066 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2067 v8 = &pSpriteObjects[v7].stru_24;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2068 GameUI_DrawItemInfo(v8);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2069 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2070 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2071 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2072 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2073 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2074 case SCREEN_BOOKS:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2075 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2076 if ( !dword_506364
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2077 || (signed int)pX < (signed int)pViewport->uViewportTL_X
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2078 || (signed int)pX > (signed int)pViewport->uViewportBR_X
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2079 || (signed int)pY < (signed int)pViewport->uViewportTL_Y
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2080 || (signed int)pY > (signed int)pViewport->uViewportBR_Y
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2081 || (v2 = (char *)sub_444564(), (pWindow.Hint = v2) == 0) )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2082 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2083 v30 = (double)(pFontArrus->GetLineWidth(v2) + 32);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2084 v27 = v30 + 6.7553994e15;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2085 v29 = (char *)LODWORD(v27);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2086 pWindow.uFrameWidth = LODWORD(v27);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2087 pWindow.uFrameX = pX + 5;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2088 pWindow.uFrameY = pY + 5;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2089 pWindow.uFrameHeight = 64;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2090 pAudioPlayer->StopChannels(-1, -1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2091 pWindow.DrawMessageBox(0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2092 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2093 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2094 case SCREEN_CHARACTERS:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2095 case SCREEN_E:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2096 case SCREEN_CHEST_INVENTORY:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2097 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2098 if ( (signed int)pX > 467 && pCurrentScreen != SCREEN_E )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2099 {
1575
43d3536a20f7 OnInventoryItemRightClick
Nomad
parents: 1567
diff changeset
2100 OnInventoryItemRightClick();
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2101 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2102 else if ( (signed int)pY >= 345 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2103 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2104 else if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 100 )//2DEvent - CharacerScreenStats
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2105 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2106 CharacterUI_StatsTab_ShowHint();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2107 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2108 else if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 101 )//2DEvent - CharacerScreenSkills
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2109 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2110 CharacterUI_SkillsTab_ShowHint();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2111 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2112 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2113 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2114 if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 103 )//2DEvent - CharacerScreenInventory
1575
43d3536a20f7 OnInventoryItemRightClick
Nomad
parents: 1567
diff changeset
2115 OnInventoryItemRightClick();
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2116 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2117 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2118 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2119 case SCREEN_SPELL_BOOK:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2120 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2121 if ( dword_507B00_spell_info_to_draw_in_popup )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2122 DrawSpellDescriptionPopup(dword_507B00_spell_info_to_draw_in_popup - 1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2123 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2124 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2125 case SCREEN_HOUSE:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2126 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2127 if ( (signed int)pY < 345 && (signed int)pX < 469 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2128 ShowPopupShopItem();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2129 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2130 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2131 case SCREEN_PARTY_CREATION:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2132 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2133 pWindow.Hint = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2134 pStr = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2135 for ( pButton = pGUIWindow_CurrentMenu->pControlsHead; pButton; pButton = pButton->pNext)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2136 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2137 if ( pButton->uButtonType == 1 && pButton->uButtonType != 3 && (signed int)pX > (signed int)pButton->uX && (signed int)pX < (signed int)pButton->uZ
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2138 && (signed int)pY > (signed int)pButton->uY && (signed int)pY < (signed int)pButton->uW )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2139 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2140 switch ( pButton->msg )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2141 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2142 case UIMSG_0: //stats info
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2143 pWindow.Hint = pAttributeDescriptions[(signed int)pButton->msg_param % 7];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2144 pStr = aAttributeNames[(signed int)pButton->msg_param % 7];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2145 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2146 case UIMSG_PlayerCreationClickPlus: //Plus button info
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2147 pStr = pGlobalTXT_LocalizationStrings[670];//
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2148 pWindow.Hint = pGlobalTXT_LocalizationStrings[671];//" , "
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2149 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2150 case UIMSG_PlayerCreationClickMinus: //Minus button info
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2151 pStr = pGlobalTXT_LocalizationStrings[668];//
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2152 pWindow.Hint = pGlobalTXT_LocalizationStrings[669];//" , "
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2153 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2154 case UIMSG_PlayerCreationSelectActiveSkill: //Available skill button info
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2155 v18 = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].GetSkillIdxByOrder(pButton->msg_param + 4);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2156 pStr = pSkillNames[v18];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2157 pWindow.Hint = pSkillDesc[v18];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2158 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2159 case UIMSG_PlayerCreationSelectClass: //Available Class Info
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2160 pWindow.Hint = pClassDescriptions[pButton->msg_param];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2161 pStr = pClassNames[pButton->msg_param];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2162 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2163 case UIMSG_PlayerCreationClickOK: //OK Info
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2164 pWindow.Hint = pGlobalTXT_LocalizationStrings[664];// .
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2165 pStr = pGlobalTXT_LocalizationStrings[665];//
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2166 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2167 case UIMSG_PlayerCreationClickReset: //Clear info
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2168 pWindow.Hint = pGlobalTXT_LocalizationStrings[666];// .
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2169 pStr = pGlobalTXT_LocalizationStrings[667];//
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2170 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2171 case UIMSG_PlayerCreation_SelectAttribute: // Character info
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2172 pStr = pParty->pPlayers[pButton->msg_param].pName;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2173 pWindow.Hint = pClassDescriptions[pParty->pPlayers[pButton->msg_param].classType];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2174 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2175 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2176 if ( pButton->msg > UIMSG_44 && pButton->msg <= UIMSG_PlayerCreationRemoveDownSkill ) //Sellected skills info
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2177 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2178 pSkillId = pParty->pPlayers[pButton->msg_param].GetSkillIdxByOrder(pButton->msg - UIMSG_48);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2179 pY = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2180 if ( (signed int)pSkillId < 37 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2181 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2182 pSkillInfo = CharacterUI_GetSkillDescText(pButton->msg_param, (PLAYER_SKILL_TYPE)pSkillId);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2183 strcpy(pTmpBuf2.data(), pSkillInfo);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2184 pWindow.Hint = pTmpBuf2.data();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2185 pStr = pSkillNames[pSkillId];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2186 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2187 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2188 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2189 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2190 if ( pWindow.Hint )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2191 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2192 pHint = (char*)pWindow.Hint;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2193 pWindow.Hint = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2194 pWindow.uFrameWidth = 384;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2195 pWindow.uFrameHeight = 256;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2196 pWindow.uFrameX = 128;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2197 pWindow.uFrameY = 40;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2198 pWindow.uFrameHeight = pFontSmallnum->CalcTextHeight(pHint, &pWindow, 24, 0) + 2 * LOBYTE(pFontLucida->uFontHeight) + 24;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2199 pWindow.uFrameZ = pWindow.uFrameX + pWindow.uFrameWidth - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2200 pWindow.uFrameW = pWindow.uFrameY + pWindow.uFrameHeight - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2201 pWindow.DrawMessageBox(0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2202 pWindow.uFrameX += 12;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2203 pWindow.uFrameWidth -= 24;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2204 pWindow.uFrameY += 12;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2205 pWindow.uFrameHeight -= 12;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2206 pWindow.uFrameZ = pWindow.uFrameX + pWindow.uFrameWidth - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2207 pWindow.uFrameW = pWindow.uFrameY + pWindow.uFrameHeight - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2208 pColor = TargetColor(0xFF, 0xFF, 0x9B);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2209 sprintf(pTmpBuf.data(), format_4E2D80, pColor, pStr);//"\f%05d%s\f00000\n"
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2210 pWindow.DrawTitleText(pFontCreate, 0, 0, 0, pTmpBuf.data(), 3);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2211 pWindow.DrawText(pFontSmallnum, 1, pFontLucida->uFontHeight, 0, pHint, 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2212 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2213 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2214 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2215 default:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2216 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2217 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2218 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2219 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2220 dword_507BF0_is_there_popup_onscreen = 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2221 viewparams->bRedrawGameUI = 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
2222 }