annotate UIPopup.cpp @ 1167:15ad868d972f

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