annotate GUIWindow.cpp @ 80:a84fb3752681

28.10.12
author Ritor1
date Sun, 28 Oct 2012 22:13:23 +0600
parents 30ec77bbd018
children 2d5d13376e91
rev   line source
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1 #include "GUIWindow.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2 #include "GUIButton.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
3 #include "GUIFont.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
4 #include "Party.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
5 #include "LOD.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
6 #include "Keyboard.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
7 #include "IndoorCamera.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
8 #include "Math.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
9 #include "VideoPlayer.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
10 #include "Allocator.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
11 #include "MapInfo.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
12 #include "Time.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
13 #include "AudioPlayer.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
14 #include "Mouse.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
15 #include "Viewport.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
16 #include "Render.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
17 #include "PlayerFrameTable.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
18 #include "stru179.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
19 #include "SaveLoad.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
20 #include "FactionTable.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
21 #include "StorylineTextTable.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
22 #include "Events2D.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
25 #include "mm7_data.h"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
30 int pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[1]; // idb
3
540178ef9b18 Main menu functionality
Nomad
parents: 2
diff changeset
31 struct GUIWindow *pWindow_MainMenu;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
32 struct GUIWindow pWindowList[20];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
34 struct GUIMessageQueue *pMessageQueue_50CBD0 = new GUIMessageQueue;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
35
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
37 //----- (004356B9) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
38 void GUIMessageQueue::PopMessage(enum UIMessageType *pType, int *pParam, int *a4)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
39 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
40 signed int v4; // edx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
41 GUIMessage *v5; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
42
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
43 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
44 if ( this->uNumMessages )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
45 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
46 v5 = this->pMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
47 *pType = this->pMessages[0].eType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
48 *pParam = this->pMessages[0].param;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
49 *a4 = this->pMessages[0].field_8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
50 if ( (signed int)(this->uNumMessages - 1) > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
51 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
52 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
53 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
54 v5->eType = v5[1].eType;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
55 v5->param = v5[1].param;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
56 v5->field_8 = v5[1].field_8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
57 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
58 ++v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
59 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
60 while ( v4 < (signed int)(this->uNumMessages - 1) );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
61 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
62 --this->uNumMessages;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
63 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
64 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
67
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
68 //----- (0041D73D) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
69 char GUIWindow::_41D73D_draw_buff_tooltip()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
70 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
71 GUIFont *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
72 GUIWindow *v2; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
73 SpellBuff *v3; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
74 unsigned int v4; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
75 int v5; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
76 unsigned int v6; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
77 unsigned int v7; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
78 char *v8; // ebx@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
79 unsigned int v9; // eax@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
80 unsigned int v10; // ecx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
81 __int64 v11; // ST28_8@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
82 int v12; // esi@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
83 const char *v13; // ST0C_4@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
84 unsigned int v14; // eax@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
85 char **v16; // [sp+14h] [bp-10h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
86 GUIFont *a2; // [sp+18h] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
87 SpellBuff *v18; // [sp+1Ch] [bp-8h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
88 int v19; // [sp+20h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
89 int v20; // [sp+20h] [bp-4h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
90
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
91 v1 = pFontComic;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
92 v2 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
93 a2 = pFontComic;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
94 v19 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
95 v3 = pParty->pPartyBuffs;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
96 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
97 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
98 if ( (signed __int64)v3->uExpireTime > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
99 ++v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
100 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
101 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
102 while ( (signed int)v3 < (signed int)pParty->pPlayers );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
103 v4 = LOBYTE(pFontArrus->uFontHeight) + 72;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
104 this->uFrameHeight = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
105 v5 = v4 + (v19 - 1) * LOBYTE(pFontArrus->uFontHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
106 v6 = v2->uFrameWidth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
107 v2->uFrameHeight = v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
108 v7 = v2->uFrameHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
109 v2->uFrameZ = v6 + v2->uFrameX - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
110 v2->uFrameW = v2->uFrameY + v7 - 1;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 26
diff changeset
111 v2->DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
112 v2->DrawText2(pFontArrus, 0, 0xCu, 0, pGlobalTXT_LocalizationStrings[451], 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
113 if ( !v19 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
114 v2->DrawText2(v1, 0, 0x28u, 0, pGlobalTXT_LocalizationStrings[153], 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
115 v20 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
116 GetTickCount();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
117 v8 = &_4E2B21_buff_spell_tooltip_colors[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
118 v16 = aSpellNames;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
119 v18 = pParty->pPartyBuffs;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
120 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
121 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
122 v9 = LODWORD(v18->uExpireTime);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
123 v10 = HIDWORD(v18->uExpireTime);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
124 if ( (v10 & 0x80000000u) == 0 && ((signed int)v10 > 0 || v9) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
125 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
126 v11 = __PAIR__(v10, v9) - pParty->uTimePlayed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
127 v12 = v20 * LOBYTE(v1->uFontHeight) + 40;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
128 v13 = *v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
129 ++v20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
130 v14 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
131 (unsigned __int8)*(v8 - 1),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
132 (unsigned __int8)*v8,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
133 (unsigned __int8)v8[1]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
134 v2->DrawText(a2, 52, v12, v14, v13, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
135 LOBYTE(v9) = sub_41D20D_buff_remaining_time_string(v12, v2, v11, a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
136 v1 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
137 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
138 ++v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
139 ++v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
140 v8 += 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
141 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
142 while ( (signed int)v18 < (signed int)pParty->pPlayers );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
143 return v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
144 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
145
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
146
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
147 //----- (0041D3B7) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
148 char GUIWindow::_41D3B7()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
149 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
150 GUIWindow *v1; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
151 Player *pPlayer; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
152 int v3; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
153 SpellBuff *v4; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
154 signed int v5; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
155 int v6; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
156 int v7; // ebx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
157 unsigned int v8; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
158 int v9; // ebx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
159 unsigned int v10; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
160 int v11; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
161 unsigned int v12; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
162 Texture *v13; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
163 unsigned int v14; // eax@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
164 PlayerFrame *v15; // eax@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
165 unsigned int v16; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
166 signed int v17; // ST28_4@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
167 int v18; // ST24_4@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
168 signed int v19; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
169 unsigned int v20; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
170 int v21; // ST28_4@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
171 int v22; // ST24_4@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
172 int v23; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
173 unsigned int v24; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
174 unsigned int v25; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
175 char *v26; // ST28_4@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
176 signed int v27; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
177 unsigned __int8 v28; // al@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
178 char *v29; // eax@16
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
179 unsigned int v30; // esi@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
180 SpellBuff *v31; // edx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
181 char *v32; // edi@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
182 signed int v33; // ecx@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
183 unsigned int v34; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
184 __int64 v35; // ST38_8@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
185 int v36; // esi@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
186 const char *v37; // ST1C_4@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
187 unsigned int v38; // eax@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
188 char *v39; // eax@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
189 SpellBuff *v41; // [sp+14h] [bp-14h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
190 GUIFont *a2; // [sp+18h] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
191 GUIWindow *a1; // [sp+1Ch] [bp-Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
192 signed int uFramesetID; // [sp+20h] [bp-8h]@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
193 int uFramesetIDa; // [sp+20h] [bp-8h]@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
194 const char **v46; // [sp+24h] [bp-4h]@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
195
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
196 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
197 a2 = pFontComic;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
198 pPlayer = &pParty->pPlayers[(unsigned int)this->ptr_1C];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
199 a1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
200 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
201 v4 = pPlayer->pPlayerBuffs;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
202 v5 = 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
203 v41 = pPlayer->pPlayerBuffs;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
204 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
205 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
206 if ( (signed __int64)v4->uExpireTime > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
207 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
208 ++v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
209 --v5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
210 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
211 while ( v5 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
212 v6 = LOBYTE(pFontArrus->uFontHeight) + 162;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
213 v1->uFrameHeight = v6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
214 v7 = (v3 - 1) * LOBYTE(pFontArrus->uFontHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
215 v8 = v1->uFrameX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
216 v9 = v6 + v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
217 v10 = v1->uFrameWidth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
218 v1->uFrameHeight = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
219 v11 = v10 + v8 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
220 v12 = v1->uFrameY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
221 v1->uFrameZ = v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
222 v1->uFrameW = v9 + v12 - 1;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 26
diff changeset
223 v1->DrawMessageBox(0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
224 if ( pPlayer->pConditions[16] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
225 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
226 v13 = pTexture_PlayerFaceEradicated;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
227 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
228 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
229 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
230 if ( pPlayer->pConditions[14] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
231 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
232 v13 = pTexture_PlayerFaceDead;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
233 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
234 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
235 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
236 uFramesetID = pPlayerFrameTable->GetFrameIdBy_field0(pPlayer->uExpressionID);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
237 if ( !uFramesetID )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
238 uFramesetID = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
239 if ( pPlayer->uExpressionID == 21 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
240 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
241 v15 = pPlayerFrameTable->GetFrameBy_y(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
242 &pPlayer->field_1AA8,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
243 &pPlayer->field_1AA4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
244 pMiscTimer->uTimeElapsed);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
245 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
246 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
247 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
248 v14 = pMiscTimer->Time();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
249 v15 = pPlayerFrameTable->GetFrameBy_x(uFramesetID, v14);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
250 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
251 pPlayer->field_1AA2 = v15->uTextureID - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
252 v13 = (Texture *)A74CEC_player_faces_minus1_indexing[v15->uTextureID + 56 * (unsigned int)v1->ptr_1C];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
253 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
254 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
255 pRenderer->DrawTextureTransparent(v1->uFrameX + 24, v1->uFrameY + 24, v13);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
256 v16 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
80
a84fb3752681 28.10.12
Ritor1
parents: 60
diff changeset
257 sprintf(pTmpBuf, "\xC" "00000\n", v16);
a84fb3752681 28.10.12
Ritor1
parents: 60
diff changeset
258 sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[429], pPlayer->pName, pClassNames[pPlayer->uClass]);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
259 strcat(pTmpBuf, pTmpBuf2);
45
bcc051713d20 BLV render & seffects
Nomad
parents: 26
diff changeset
260 strcat(pTmpBuf, "\xC" "00000\n");
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
261 v17 = pPlayer->GetMaxHealth();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
262 v18 = pPlayer->sHealth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
263 v19 = pPlayer->GetMaxHealth();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
264 v20 = sub_4178FE(pPlayer->sHealth, v19);
80
a84fb3752681 28.10.12
Ritor1
parents: 60
diff changeset
265 sprintf(pTmpBuf2, "%s : ", pGlobalTXT_LocalizationStrings[108], v20, v18, v17);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
266 strcat(pTmpBuf, pTmpBuf2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
267 v21 = pPlayer->GetMaxMana();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
268 v22 = pPlayer->sMana;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
269 v23 = pPlayer->GetMaxMana();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
270 v24 = sub_4178FE(pPlayer->sMana, v23);
80
a84fb3752681 28.10.12
Ritor1
parents: 60
diff changeset
271 sprintf(pTmpBuf2, "%s : ", pGlobalTXT_LocalizationStrings[212], v24, v22, v21);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
272 strcat(pTmpBuf, pTmpBuf2);
23
509744251c8e Player-related members
Nomad
parents: 3
diff changeset
273 v25 = pPlayer->GetMajorConditionIdx();
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
274 v26 = aCharacterConditionNames[v25];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
275 v27 = GetConditionDrawColor(v25);
80
a84fb3752681 28.10.12
Ritor1
parents: 60
diff changeset
276 sprintf(pTmpBuf2, "%s: ", pGlobalTXT_LocalizationStrings[47], v27, v26);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
277 strcat(pTmpBuf, pTmpBuf2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
278 v28 = pPlayer->uQuickSpell;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
279 if ( v28 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
280 v29 = pSpellStats->pInfos[v28].pShortName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
281 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
282 v29 = pGlobalTXT_LocalizationStrings[153];
80
a84fb3752681 28.10.12
Ritor1
parents: 60
diff changeset
283 sprintf(pTmpBuf2, "%s: %s", pGlobalTXT_LocalizationStrings[172], v29);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
284 strcat(pTmpBuf, pTmpBuf2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
285 v30 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
286 a1->DrawText(pFontArrus, 120, 22, 0, pTmpBuf, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
287 v31 = v41;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
288 uFramesetIDa = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
289 v32 = &_4E2AD8_ui_colors[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
290 v46 = (const char **)&aSpellNames[20];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
291 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
292 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
293 v33 = HIDWORD(v31->uExpireTime);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
294 v34 = LODWORD(v31->uExpireTime);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
295 if ( v33 >= (signed int)v30 && (v33 > (signed int)v30 || v34 > v30) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
296 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
297 v35 = __PAIR__(v33, v34) - pParty->uTimePlayed;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
298 v36 = uFramesetIDa++ * LOBYTE(a2->uFontHeight) + 134;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
299 v37 = *v46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
300 v38 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
301 (unsigned __int8)*(v32 - 1),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
302 (unsigned __int8)*v32,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
303 (unsigned __int8)v32[1]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
304 a1->DrawText(a2, 52, v36, v38, v37, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
305 sub_41D20D_buff_remaining_time_string(v36, a1, v35, a2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
306 v31 = v41;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
307 v30 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
308 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
309 ++v46;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
310 ++v31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
311 v32 += 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
312 v41 = v31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
313 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
314 while ( (signed int)v46 < (signed int)&dword_506978 );
59
5159d2e6f559 BLV render
Nomad
parents: 49
diff changeset
315 v39 = "";
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
316 if ( uFramesetIDa == v30 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
317 v39 = pGlobalTXT_LocalizationStrings[153];
80
a84fb3752681 28.10.12
Ritor1
parents: 60
diff changeset
318 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[450], v39);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
319 return a1->DrawText(pFontArrus, 14, 114, v30, pTmpBuf, v30, v30, v30);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
320 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
321
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
322 //----- (0041D08F) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
323 void GUIWindow::_41D08F(int a2, int a3, int a4, int a5)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
324 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
325 if ( a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
326 {
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
327 this->pNumPresenceButton = a2;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
328 this->field_30 = a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
329 this->field_34 = a4;
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
330 this->pCurrentPosActiveItem = a5;
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
331 this->pStartingPosActiveItem = a5;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
332 this->field_44 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
333 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
334 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
335 {
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
336 this->pNumPresenceButton = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
337 this->field_30 = a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
338 this->field_34 = a4;
48
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
339 this->pCurrentPosActiveItem = 0;
6a62c4005f0e 23.10.12
Ritor1
parents: 44
diff changeset
340 this->pStartingPosActiveItem = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
341 this->field_44 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
342 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
343 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
344
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
345
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
346 //----- (0041C26A) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
347 void GUIWindow::Release()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
348 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
349 GUIWindow *v1; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
350 unsigned int v2; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
351 int v3; // eax@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
352 int v4; // eax@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
353 int v5; // eax@14
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
354 int v6; // eax@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
355 int i; // edi@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
356 GUIButton *v8; // eax@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
357 GUIButton *v9; // edi@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
358 int v10; // esi@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
359 int v11; // ecx@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
360 int v12; // edx@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
361
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
362 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
363 if ( !this )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
364 return;
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
365 v2 = this->eWindowType;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
366 if ( (signed int)v2 > 18 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
367 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
368 v5 = v2 - 19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
369 if ( !v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
370 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
371 pIcons_LOD->_40F9C5();
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 26
diff changeset
372 pCurrentScreen = dword_506978;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
373 pKeyActionMap->_459ED1(3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
374 goto LABEL_26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
375 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
376 v6 = v5 - 6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
377 if ( !v6 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
378 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
379 for ( i = 0; i < uNumDialogueNPCPortraits; ++i )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
380 pDialogueNPCPortraits[i]->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
381 uNumDialogueNPCPortraits = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
382 pTexture_Dialogue_Background->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
383
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
384 pIcons_LOD->_40F9C5();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
385 pIcons_LOD->_4114F2();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
386 dword_5C35D4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
387 if ( bFlipOnExit )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
388 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
389 pIndoorCamera->sRotationY = (stru_5C6E00->uIntegerDoublePi - 1) & (stru_5C6E00->uIntegerPi
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
390 + pIndoorCamera->sRotationY);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
391 pParty->sRotationY = pIndoorCamera->sRotationY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
392 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
393 pParty->uFlags |= 2u;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
394 goto LABEL_26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
395 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
396 if ( v6 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
397 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
398 pVideoPlayer->Unload();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
399 goto LABEL_18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
400 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
401 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
402 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
403 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
404 if ( v2 == 18 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
405 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
406 sub_41140B();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
407 sub_411473();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
408 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
409 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
410 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
411 if ( !v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
412 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
413 v3 = v2 - 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
414 if ( v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
415 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
416 v4 = v3 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
417 if ( !v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
418 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
419 if ( !dword_591084 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
420 pDialogueNPCPortraits[0]->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
421 uNumDialogueNPCPortraits = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
422 pTexture_Dialogue_Background->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
423
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
424 pIcons_LOD->_40F9C5();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
425 goto LABEL_19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
426 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
427 if ( v4 != 7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
428 goto LABEL_26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
429 LABEL_18:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
430 pTexture_outside->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
431 pTexture_Dialogue_Background->Release();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
432 pIcons_LOD->_40F9C5();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
433 LABEL_19:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 26
diff changeset
434 pCurrentScreen = dword_506978;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
435 goto LABEL_26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
436 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
437 OnCloseSpellook();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
438 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
439 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
440 LABEL_26:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
441 v8 = v1->pControlsHead;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
442 if ( v8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
443 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
444 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
445 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
446 v9 = v8->pNext;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
447 pAllocator->FreeChunk(v8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
448 v8 = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
449 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
450 while ( v9 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
451 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
452 v1->pControlsHead = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
453 v1->pControlsTail = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
454 v1->uNumControls = 0;
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
455 v1->eWindowType = WINDOW_null;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
456 v10 = v1->field_3C;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
457 v11 = uNumVisibleWindows;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
458 while ( v10 < v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
459 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
460 v12 = pVisibleWindowsIdxs[v10 + 1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
461 pVisibleWindowsIdxs[v10] = v12;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 26
diff changeset
462 --*((int *)&pTexture_PCX.field_18 + 21 * v12);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
463 ++v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
464 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
465 pVisibleWindowsIdxs[v11] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
466 uNumVisibleWindows = v11 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
467 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
468
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
469
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
470
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
471
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
472
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
473
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
474 //----- (0041CD3B) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
475 GUIButton *GUIWindow::GetControl(unsigned int uID)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
476 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
477 GUIButton *result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
478 unsigned int v3; // ecx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
479
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
480 result = this->pControlsHead;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
481 v3 = uID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
482 if ( (signed int)uID > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
483 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
484 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
485 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
486 result = result->pNext;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
487 --v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
488 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
489 while ( v3 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
490 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
491 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
492 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
493
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
494 //----- (00411BFC) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
495 void GUIWindow::InitializeBookView()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
496 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
497 GUIWindow *v1; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
498 signed int v2; // ecx@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
499 __int64 *v3; // ebp@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
500 char *v4; // ecx@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
501 char *v5; // eax@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
502 int v6; // eax@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
503 __int64 v7; // qax@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
504 unsigned int v8; // esi@12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
505 GUIButton *v9; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
506 signed int v10; // esi@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
507 int v11; // eax@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
508 int v12; // eax@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
509 int i; // esi@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
510 char *v14; // ebp@29
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
511 int v15; // eax@31
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
512 unsigned int v16; // esi@35
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
513 Player *v17; // esi@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
514 unsigned __int16 v18; // ax@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
515 unsigned int v19; // edi@43
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
516 unsigned int v20; // edi@45
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
517 void *v21; // esi@45
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
518 char *v22; // [sp+10h] [bp-5Ch]@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
519 signed int v23; // [sp+10h] [bp-5Ch]@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
520 int v24; // [sp+14h] [bp-58h]@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
521 char *v25; // [sp+14h] [bp-58h]@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
522 GUIWindow v26; // [sp+18h] [bp-54h]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
523
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
524 v1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
525 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
526 InitializeBookFonts();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
527 v1->CreateButton(0x1DBu, 0x1BDu, 0x9Eu, 0x22u, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[79], 0);
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 26
diff changeset
528 pCurrentScreen = 3;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
529 dword_506524 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
530 dword_506528 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
531 dword_50651C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
532 dword_506520 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
533 if ( v1->ptr_1C == (void *)177 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
534 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
535 byte_506360 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
536 pTexture_CurrentBook = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("lb_bordr", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
537 pTexture_LloydBeacons[0] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbmap", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
538 pTexture_50635C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbmap", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
539 pTex_tab_an_6b__zoom_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6b", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
540 pTex_tab_an_6a__zoom_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6a", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
541 pBtn_Book_1 = v1->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
542 415u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
543 13u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
544 39u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
545 36u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
546 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
547 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
548 0xB2u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
549 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
550 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
551 pGlobalTXT_LocalizationStrings[375],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
552 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
553 pBtn_Book_2 = v1->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
554 415u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
555 48u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
556 39u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
557 36u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
558 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
559 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
560 0xB2u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
561 1u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
562 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
563 pGlobalTXT_LocalizationStrings[523],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
564 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
565 v17 = &pParty->pPlayers[_506348_current_lloyd_playerid];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
566 v23 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
567 v18 = v17->pActiveSkills[14];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
568 if ( HIBYTE(v18) & 1 || (v18 & 0x80u) != 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
569 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
570 v23 = 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
571 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
572 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
573 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
574 if ( v18 & 0x40 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
575 v23 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
576 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
577 v19 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
578 if ( v23 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
579 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
580 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
581 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
582 v1->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
583 pLloydsBeaconsPreviewXs[v19],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
584 pLloydsBeaconsPreviewYs[v19],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
585 0x5Cu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
586 0x44u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
587 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
588 180,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
589 0xB3u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
590 v19,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
591 0,
59
5159d2e6f559 BLV render
Nomad
parents: 49
diff changeset
592 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
593 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
594 ++v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
595 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
596 while ( (signed int)v19 < v23 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
597 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
598 v20 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
599 v21 = v17->pInstalledBeacons;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
600 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
601 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
602 if ( *(_QWORD *)v21 >= (signed __int64)pParty->uTimePlayed )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
603 LoadThumbnailLloydTexture(v20, _506348_current_lloyd_playerid + 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
604 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
605 memset(v21, 0, 0x1Cu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
606 ++v20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
607 v21 = (char *)v21 + 28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
608 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
609 while ( (signed int)v20 < 5 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
610 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
611 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
612 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
613 if ( v1->ptr_1C == (void *)195 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
614 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
615 pTexture_CurrentBook = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("townport", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
616 pTexture_TownPortalHarmn = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tpharmndy", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
617 pTexture_TownPortalElf = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tpelf", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
618 pTexture_TownPortalWarlock = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tpwarlock", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
619 pTexture_TownPortalIsland = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tpisland", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
620 pTexture_TownPortalHeaven = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tpheaven", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
621 v16 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
622 pTexture_TownPortalHell = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture( "tphell", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
623 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
624 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
625 v1->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
626 pTownPortalBook_xs[v16],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
627 pTownPortalBook_ys[v16],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
628 pTownPortalBook_ws[v16],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
629 pTownPortalBook_hs[v16],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
630 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
631 182,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
632 0xB7u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
633 v16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
634 0,
59
5159d2e6f559 BLV render
Nomad
parents: 49
diff changeset
635 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
636 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
637 ++v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
638 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
639 while ( (signed int)v16 < 6 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
640 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
641 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
642 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
643 if ( v1->ptr_1C == (void *)200 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
644 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
645 pTexture_CurrentBook = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture( "sbquiknot", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
646 pTextures_5064A0[10] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture( "divbar", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
647 pTex_tab_an_6b__zoom_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6b", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
648 pTex_tab_an_7b__zoot_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-7b", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
649 pTex_tab_an_6a__zoom_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6a", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
650 pTex_tab_an_7a__zoot_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-7a", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
651 pBtn_Book_1 = v1->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
652 pViewport->uViewportX + 398,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
653 pViewport->uViewportY + 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
654 pTex_tab_an_6b__zoom_on->uTextureWidth,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
655 pTex_tab_an_6b__zoom_on->uTextureHeight,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
656 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
657 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
658 0x47u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
659 0xBu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
660 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
661 pGlobalTXT_LocalizationStrings[192],// "Scroll Up"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
662 pTex_tab_an_6b__zoom_on,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
663 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
664 pBtn_Book_2 = v1->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
665 pViewport->uViewportX + 398,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
666 pViewport->uViewportY + 38,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
667 pTex_tab_an_7b__zoot_on->uTextureHeight,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
668 pTex_tab_an_7b__zoot_on->uTextureHeight,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
669 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
670 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
671 0x47u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
672 0xAu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
673 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
674 pGlobalTXT_LocalizationStrings[193],// "Scroll Down"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
675 pTex_tab_an_7b__zoot_on,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
676 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
677 dword_506520 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
678 memset(&pStru179, 0, 0xFA0u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
679 for ( i = dword_506528; i < 512; ++i )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
680 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
681 v14 = (&dword_722F10)[4 * i];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
682 if ( (unsigned __int16)_449B57_test_bit(pParty->_award_bits, i) && v14 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
683 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
684 v15 = dword_506520++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
685 pStru179->field_0[v15] = i;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
686 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
687 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
688 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
689 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
690 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
691 if ( v1->ptr_1C == (void *)201 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
692 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
693 pTexture_AutonotesBook = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbautnot", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
694 pTextures_5064A0[10] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("divbar", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
695 pTex_tab_an_6b__zoom_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6b", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
696 pTex_tab_an_7b__zoot_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-7b", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
697 pTex_tab_an_6a__zoom_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6a", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
698 pTex_tab_an_7a__zoot_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-7a", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
699 pTexture_506394 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-1b", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
700 pTexture_506390 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-1a", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
701 pTexture_50638C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-2b", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
702 pTexture_506388 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-2a", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
703 pTexture_506384 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-3b", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
704 pTexture_506380 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-3a", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
705 pTexture_50637C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-5b", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
706 pTexture_506378 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-5a", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
707 pTexture_506374 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-4b", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
708 pTexture_506370 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-4a", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
709 pTexture_50636C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-8b", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
710 pTexture_506368 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-8a", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
711 pBtn_Book_1 = v1->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
712 pViewport->uViewportX + 398,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
713 pViewport->uViewportY + 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
714 0x32u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
715 0x22u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
716 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
717 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
718 0x47u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
719 0xBu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
720 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
721 pGlobalTXT_LocalizationStrings[193],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
722 pTex_tab_an_6b__zoom_on,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
723 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
724 pBtn_Book_2 = v1->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
725 pViewport->uViewportX + 398,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
726 pViewport->uViewportY + 38,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
727 0x32u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
728 0x22u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
729 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
730 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
731 0x47u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
732 0xAu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
733 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
734 pGlobalTXT_LocalizationStrings[192],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
735 pTex_tab_an_7b__zoot_on,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
736 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
737 pBtn_Book_3 = v1->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
738 pViewport->uViewportX + 398,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
739 pViewport->uViewportY + 113,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
740 0x32u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
741 0x22u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
742 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
743 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
744 0x47u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
745 2u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
746 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
747 pGlobalTXT_LocalizationStrings[85],// "Potion Notes"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
748 pTexture_506394,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
749 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
750 pBtn_Book_4 = v1->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
751 pViewport->uViewportX + 399,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
752 pViewport->uViewportY + 150,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
753 0x32u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
754 0x22u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
755 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
756 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
757 0x47u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
758 3u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
759 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
760 pGlobalTXT_LocalizationStrings[137],// "Fountain Notes"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
761 pTexture_50638C,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
762 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
763 pBtn_Book_5 = v1->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
764 pViewport->uViewportX + 397,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
765 pViewport->uViewportY + 188,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
766 0x32u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
767 0x22u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
768 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
769 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
770 0x47u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
771 4u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
772 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
773 pGlobalTXT_LocalizationStrings[8],// "Obelisk Notes"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
774 pTexture_506384,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
775 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
776 pBtn_Book_6 = v1->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
777 pViewport->uViewportX + 397,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
778 pViewport->uViewportY + 226,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
779 0x32u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
780 0x22u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
781 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
782 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
783 0x47u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
784 5u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
785 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
786 pGlobalTXT_LocalizationStrings[141],// "Seer Notes"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
787 pTexture_50637C,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
788 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
789 pBtn_Autonotes_Misc = v1->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
790 pViewport->uViewportX + 397,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
791 pViewport->uViewportY + 264,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
792 0x32u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
793 0x22u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
794 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
795 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
796 0x47u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
797 6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
798 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
799 pGlobalTXT_LocalizationStrings[123],// "Miscellaneous Notes"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
800 pTexture_506374,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
801 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
802 v9 = v1->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
803 pViewport->uViewportX + 397,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
804 pViewport->uViewportY + 302,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
805 0x32u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
806 0x22u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
807 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
808 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
809 0x47u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
810 7u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
811 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
812 pGlobalTXT_LocalizationStrings[662],// "Instructors"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
813 pTexture_50636C,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
814 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
815 v10 = dword_506528;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
816 pBtn_Autonotes_Instructors = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
817 dword_506520 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
818 while ( v10 < 196 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
819 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
820 if ( dword_506568 == dword_72371C[2 * v10] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
821 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
822 v25 = (&dword_723718_autonote_related)[8 * (signed __int16)v10];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
823 if ( (short)v10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
824 {
26
93bf1d5f6a6d Game loading.
Nomad
parents: 23
diff changeset
825 if ( (unsigned __int16)_449B57_test_bit(pParty->_autonote_bits, v10) && v25 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
826 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
827 v11 = dword_506520++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
828 pStru179->field_0[v11] = (signed __int16)v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
829 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
830 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
831 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
832 ++v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
833 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
834 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
835 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
836 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
837 if ( v1->ptr_1C == (void *)202 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
838 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
839 dword_506364 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
840 pTextures_5064A0[12] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbmap", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
841 pTex_tab_an_6b__zoom_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("zoom-on", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
842 pTex_tab_an_7b__zoot_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("zoot-on", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
843 pTex_tab_an_6a__zoom_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("zoom-off", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
844 pTex_tab_an_7a__zoot_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("zoot-off", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
845 pTexture_506394 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabNon", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
846 pTexture_506390 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabNoff", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
847 pTexture_50638C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabSon", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
848 pTexture_506388 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabSoff", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
849 pTexture_506384 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabEon", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
850 pTexture_506380 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabEoff", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
851 pTexture_50637C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabWon", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
852 pTexture_506378 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabWoff", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
853 pBtn_Book_1 = v1->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
854 pViewport->uViewportX + 398,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
855 pViewport->uViewportY + 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
856 0x32u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
857 0x22u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
858 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
859 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
860 0x47u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
861 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
862 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
863 pGlobalTXT_LocalizationStrings[251],// "Zoom In"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
864 pTex_tab_an_6b__zoom_on,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
865 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
866 pBtn_Book_2 = v1->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
867 pViewport->uViewportX + 398,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
868 pViewport->uViewportY + 38,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
869 0x32u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
870 0x22u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
871 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
872 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
873 0x47u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
874 1u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
875 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
876 pGlobalTXT_LocalizationStrings[252],// "Zoom Out"
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
877 pTex_tab_an_7b__zoot_on,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
878 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
879 pBtn_Book_3 = v1->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
880 pViewport->uViewportX + 397,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
881 pViewport->uViewportY + 113,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
882 0x32u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
883 0x22u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
884 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
885 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
886 0x47u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
887 2u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
888 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
889 pGlobalTXT_LocalizationStrings[192],// Scroll Up
59
5159d2e6f559 BLV render
Nomad
parents: 49
diff changeset
890 (Texture *)"",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
891 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
892 pBtn_Book_4 = v1->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
893 pViewport->uViewportX + 397,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
894 pViewport->uViewportY + 150,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
895 0x32u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
896 0x22u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
897 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
898 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
899 0x47u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
900 3u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
901 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
902 pGlobalTXT_LocalizationStrings[193],// Scroll Down
59
5159d2e6f559 BLV render
Nomad
parents: 49
diff changeset
903 (Texture *)"",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
904 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
905 pBtn_Book_5 = v1->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
906 pViewport->uViewportX + 397,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
907 pViewport->uViewportY + 188,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
908 0x32u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
909 0x22u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
910 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
911 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
912 0x47u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
913 4u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
914 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
915 pGlobalTXT_LocalizationStrings[573],// "Scroll Right"
59
5159d2e6f559 BLV render
Nomad
parents: 49
diff changeset
916 (Texture *)"",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
917 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
918 pBtn_Book_6 = v1->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
919 pViewport->uViewportX + 397,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
920 pViewport->uViewportY + 226,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
921 0x32u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
922 0x22u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
923 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
924 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
925 0x47u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
926 5u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
927 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
928 pGlobalTXT_LocalizationStrings[572],// "Scroll Left"
59
5159d2e6f559 BLV render
Nomad
parents: 49
diff changeset
929 (Texture *)"",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
930 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
931 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
932 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
933 if ( v1->ptr_1C == (void *)203 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
934 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
935 pTextures_5064A0[13] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbdate-time", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
936 pTex_moon_new = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_new", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
937 pTex_moon_4 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_4", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
938 pTex_moon_2 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_2", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
939 pTex_moon_2_2 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_2", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
940 pTex_moon_ful = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_ful", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
941 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
942 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
943 if ( v1->ptr_1C != (void *)224 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
944 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
945 pTextures_5064A0[11] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbplayrnot", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
946 pTex_tab_an_6b__zoom_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6b", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
947 pTex_tab_an_7b__zoot_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-7b", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
948 pTex_tab_an_6a__zoom_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6a", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
949 pTex_tab_an_7a__zoot_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-7a", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
950 pBtn_Book_1 = v1->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
951 pViewport->uViewportX + 398,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
952 pViewport->uViewportY + 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
953 pTex_tab_an_6b__zoom_on->uTextureWidth,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
954 pTex_tab_an_6b__zoom_on->uTextureHeight,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
955 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
956 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
957 0x47u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
958 0xBu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
959 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
960 pGlobalTXT_LocalizationStrings[192],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
961 pTex_tab_an_6b__zoom_on,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
962 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
963 pBtn_Book_2 = v1->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
964 pViewport->uViewportX + 398,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
965 pViewport->uViewportY + 38,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
966 pTex_tab_an_7b__zoot_on->uTextureHeight,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
967 pTex_tab_an_7b__zoot_on->uTextureHeight,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
968 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
969 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
970 0x47u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
971 0xAu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
972 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
973 pGlobalTXT_LocalizationStrings[193],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
974 pTex_tab_an_7b__zoot_on,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
975 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
976 dword_506520 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
977 v26.uFrameX = 48;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
978 v26.uFrameY = 70;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
979 v26.uFrameWidth = 360;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
980 v26.uFrameHeight = 264;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
981 v2 = LOBYTE(pAutonoteFont->uFontHeight) - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
982 v26.uFrameZ = 407;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
983 v26.uFrameHeight = v2 * 264 / v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
984 v26.uFrameW = v26.uFrameHeight + 69;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
985 memset(&pStru179, 0, 0xFA0u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
986 memset(byte_5C6D50, 0, 0x64u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
987 if ( dword_506528 < 29 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
988 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
989 v3 = (__int64 *)&pParty->field_3C.field_4F0[2 * dword_506528];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
990 v24 = dword_506528 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
991 v22 = (char *)&pStorylineText->field_4[3 * dword_506528 + 2];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
992 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
993 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
994 v4 = *(char **)v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
995 if ( *v3 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
996 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
997 if ( v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
998 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
999 v5 = sub_495461(v4, uActiveCharacter - 1, 0, 0, 0, v3);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1000 v6 = pAutonoteFont->CalcTextHeight(v5, &v26, 1, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1001 v7 = (v6 - 3) / (signed int)v26.uFrameHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1002 v8 = v7 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1003 if ( (signed int)v7 + 1 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1004 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1005 memset32((void *)(4 * dword_506520 + 6043152), v24, v8);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1006 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1007 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1008 LODWORD(v7) = dword_506520++;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1009 byte_5C6D50[(int)v7] = BYTE4(v7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1010 ++HIDWORD(v7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1011 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1012 while ( SHIDWORD(v7) < (signed int)v8 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1013 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1014 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1015 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1016 v22 += 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1017 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1018 ++v24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1019 __debugbreak(); // fix condition
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1020 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1021 while ( (signed int)v22 < (signed int)&pFactionTable->relations + 8 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1022 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1023 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1024 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1025 v12 = dword_506520;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1026 dword_506520 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1027 dword_506524 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1028 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1029 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1030 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1031
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1032
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1033
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1034
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1035 //----- (00415551) --------------------------------------------------------
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 26
diff changeset
1036 void GUIWindow::DrawMessageBox(int arg0)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1037 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1038 unsigned int v2; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1039 GUIWindow *v3; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1040 signed int v4; // esi@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1041 unsigned int v5; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1042 unsigned int v6; // edx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1043 unsigned int v7; // ecx@6
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1044 unsigned int v8; // eax@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1045 __int32 v9; // eax@10
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1046 unsigned int v10; // eax@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1047 LONG v11; // ecx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1048 unsigned int v12; // edx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1049 unsigned int v13; // eax@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1050 const char *v14; // ecx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1051 int v15; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1052 unsigned int v16; // esi@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1053 const char *v17; // ebx@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1054 int v18; // eax@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1055 GUIWindow v19; // [sp+Ch] [bp-60h]@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1056 POINT a2; // [sp+60h] [bp-Ch]@8
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1057 unsigned int v21; // [sp+68h] [bp-4h]@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1058 unsigned int v22; // [sp+74h] [bp+8h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1059 unsigned int v23; // [sp+74h] [bp+8h]@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1060
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1061 v2 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1062 v3 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1063 if ( arg0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1064 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1065 v4 = pViewport->uViewportX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1066 v5 = pViewport->uViewportZ;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1067 v2 = pViewport->uViewportY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1068 v22 = pViewport->uViewportW;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1069 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1070 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1071 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1072 v4 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1073 v5 = 640;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1074 v22 = 480;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1075 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1076 v6 = this->uFrameX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1077 if ( (signed int)this->uFrameX >= v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1078 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1079 v7 = this->uFrameWidth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1080 if ( (signed int)(v7 + v6) <= (signed int)v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1081 goto LABEL_9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1082 v3->uFrameX = v5 - v7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1083 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1084 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1085 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1086 this->uFrameX = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1087 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1088 v3->uFrameY = pMouse->GetCursorPos(&a2)->y + 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1089 LABEL_9:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1090 v8 = v3->uFrameY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1091 if ( (signed int)v8 >= (signed int)v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1092 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1093 if ( (signed int)(v8 + v3->uFrameHeight) <= (signed int)v22 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1094 goto LABEL_14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1095 v9 = pMouse->GetCursorPos(&a2)->y - v3->uFrameHeight - 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1096 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1097 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1098 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1099 v9 = pMouse->GetCursorPos(&a2)->y + 30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1100 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1101 v3->uFrameY = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1102 LABEL_14:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1103 if ( (signed int)v3->uFrameY < (signed int)v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1104 v3->uFrameY = v2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1105 if ( (signed int)v3->uFrameX < v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1106 v3->uFrameX = v4;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1107 v10 = v3->uFrameWidth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1108 v11 = v3->uFrameX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1109 v12 = v3->uFrameY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1110 v21 = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1111 a2.y = v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1112 v3->uFrameZ = v10 + v11 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1113 v13 = v3->uFrameHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1114 v3->uFrameW = v13 + v12 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1115 memcpy(&v19, v3, sizeof(v19));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1116 v19.uFrameX += 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1117 v19.uFrameWidth -= 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1118 v19.uFrameY += 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1119 v19.uFrameHeight -= 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1120 v19.uFrameZ = v19.uFrameWidth + v19.uFrameX - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1121 v23 = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1122 v19.uFrameW = v19.uFrameHeight + v19.uFrameY - 1;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 26
diff changeset
1123 v14 = v3->Hint;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1124 if ( v14 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1125 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1126 v15 = pFontLucida->CalcTextHeight(v14, &v19, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1127 v12 = v23;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1128 v16 = v15 + 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1129 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1130 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1131 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1132 v16 = v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1133 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1134 if ( (signed int)v16 < 64 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1135 v16 = 64;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1136 if ( (signed int)(v16 + v12) > 479 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1137 v16 = 479 - v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1138 DrawPopupWindow(a2.y, v12, v21, v16);
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 26
diff changeset
1139 v17 = v3->Hint;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1140 if ( v17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1141 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1142 v18 = pFontLucida->CalcTextHeight(v17, &v19, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1143 v19.DrawText2(pFontLucida, 0, (signed int)(v16 - v18) / 2 - 14, 0, v17, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1144 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1145 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1146
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1147
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1148 //----- (0041192C) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1149 void __cdecl InitializeBookTextures()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1150 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1151 signed int v0; // ebp@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1152 Texture **v1; // ebx@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1153
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1154 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1155 ++pIcons_LOD->uTexturePacksCount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1156 if ( !pIcons_LOD->uNumPrevLoadedFiles )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1157 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1158 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1159 pTextures_5064A0[9] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("book", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1160 pTexture_pagemask = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("pagemask", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1161 pTexture_506448 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("ib-m5-u", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1162 ptr_506440 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("ib-m5-d", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1163 pTexture_50643C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("ib-m6-u",TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1164 v0 = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1165 v1 = (Texture **)&pTextures_tabs[0][0].pName[4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1166 pTexture_506444 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("ib-m6-d",TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1167 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1168 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1169 *(&pTexture_pagemask + v0) = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1170 (const char *)pLloydsBeacons_SomeYs[v0 + 4],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1171 TEXTURE_16BIT_PALETTE)];
80
a84fb3752681 28.10.12
Ritor1
parents: 60
diff changeset
1172 sprintf(pTmpBuf, "tab%da", v0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1173 *(v1 - 1) = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pTmpBuf, TEXTURE_16BIT_PALETTE)];
80
a84fb3752681 28.10.12
Ritor1
parents: 60
diff changeset
1174 sprintf(pTmpBuf, "tab%db", v0++);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1175 *v1 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pTmpBuf, TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1176 v1 += 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1177 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1178 while ( (signed int)v1 <= (signed int)&unk_506494 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1179 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1180
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1181 //----- (00411AAA) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1182 void __cdecl InitializeBookFonts()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1183 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1184 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1185 ++pIcons_LOD->uTexturePacksCount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1186 if ( !pIcons_LOD->uNumPrevLoadedFiles )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1187 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1188 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1189 pTexture_mapbordr = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("mapbordr", TEXTURE_16BIT_PALETTE)];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1190 pBookFont = LoadFont("book.fnt", "FONTPAL", 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1191 pBook2Font = LoadFont("book2.fnt", "FONTPAL", 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1192 pAutonoteFont = LoadFont("autonote.fnt", "FONTPAL", 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1193 pSpellFont = LoadFont("spell.fnt", "FONTPAL", 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1194 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1195
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1196 //----- (00411B59) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1197 void __fastcall LoadThumbnailLloydTexture(unsigned int uSlot, unsigned int uPlayer)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1198 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1199 unsigned int v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1200 unsigned int v3; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1201 FILE *v4; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1202 FILE *v5; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1203 char pContainerName[64]; // [sp+Ch] [bp-44h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1204 unsigned int v7; // [sp+4Ch] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1205
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1206 v2 = uSlot;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1207 v7 = uPlayer;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1208 v3 = uSlot + 1;
80
a84fb3752681 28.10.12
Ritor1
parents: 60
diff changeset
1209 sprintf(pContainerName, "data\\lloyd%d%d.pcx", uPlayer, uSlot + 1);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1210 v4 = fopen(pContainerName, "rb");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1211 if ( v4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1212 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1213 pSavegameThumbnails[v2].LoadFromFILE(v4, 0, 1u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1214 fclose(v4);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1215 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1216 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1217 {
80
a84fb3752681 28.10.12
Ritor1
parents: 60
diff changeset
1218 sprintf(pContainerName, "lloyd%d%d.pcx", v7, v3);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1219 v5 = pNew_LOD->FindContainer(pContainerName, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1220 if ( v5 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1221 pSavegameThumbnails[v2].LoadFromFILE(v5, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1222 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1223 *((int *)&pSavegameThumbnails->pPixels + 10 * v2) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1224 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1225 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1226
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1227
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1228 //----- (00411621) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1229 GUIButton *GUIWindow::_411621()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1230 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1231 Player *v1; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1232 GUIWindow *v2; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1233 unsigned int v3; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1234 int v4; // eax@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1235 GUIButton *result; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1236 int a2; // [sp+10h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1237 int v7; // [sp+14h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1238
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1239 v1 = pPlayers[uActiveCharacter];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1240 v2 = this;
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
1241 LoadSpellbook(v1->pNumSpellBookPage);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1242 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1243 a2 = 0;
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
1244 v7 = (int)(&v1->spellbook.pFireSpellbook + v1->pNumSpellBookPage);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1245 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1246 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1247 if ( *(char *)(v7 + v3) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1248 {
54
c28452924144 PLAYER_CLASS_TYPE
Ritor1
parents: 49
diff changeset
1249 v4 = 2 * (12 * v1->pNumSpellBookPage + (unsigned __int8)*(&byte_4E2431[12 * v1->pNumSpellBookPage] + v3));
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1250 v2->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1251 pViewport->uViewportX + dword_4E20D0[v4],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1252 pViewport->uViewportY + dword_4E20D0[v4 + 1],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1253 *(short *)(dword_50640C[v3] + 24),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1254 *(short *)(dword_50640C[v3] + 26),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1255 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1256 79,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1257 0x56u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1258 v3,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1259 0,
59
5159d2e6f559 BLV render
Nomad
parents: 49
diff changeset
1260 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1261 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1262 ++a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1263 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1264 ++v3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1265 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1266 while ( (signed int)v3 < 11 );
59
5159d2e6f559 BLV render
Nomad
parents: 49
diff changeset
1267 v2->CreateButton(0, 0, 0, 0, 1, 0, 0x33u, 0, 9u, "", 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1268 if ( a2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1269 v2->_41D08F(a2, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1270 if ( v1->pActiveSkills[12] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1271 v2->CreateButton(0x18Fu, 0xAu, 0x32u, 0x24u, 1, 0, 0x57u, 0, 0, aSpellSchoolNames[0], 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1272 if ( v1->pActiveSkills[13] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1273 v2->CreateButton(0x18Fu, 0x2Eu, 0x32u, 0x24u, 1, 0, 0x57u, 1u, 0, aSpellSchoolNames[1], 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1274 if ( v1->pActiveSkills[14] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1275 v2->CreateButton(0x18Fu, 0x53u, 0x32u, 0x24u, 1, 0, 0x57u, 2u, 0, aSpellSchoolNames[2], 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1276 if ( v1->pActiveSkills[15] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1277 v2->CreateButton(0x18Fu, 0x79u, 0x32u, 0x24u, 1, 0, 0x57u, 3u, 0, aSpellSchoolNames[3], 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1278 if ( v1->pActiveSkills[16] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1279 v2->CreateButton(0x18Fu, 0x9Eu, 0x32u, 0x24u, 1, 0, 0x57u, 4u, 0, aSpellSchoolNames[4], 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1280 if ( v1->pActiveSkills[17] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1281 v2->CreateButton(0x190u, 0xC4u, 0x32u, 0x24u, 1, 0, 0x57u, 5u, 0, aSpellSchoolNames[5], 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1282 if ( v1->pActiveSkills[18] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1283 v2->CreateButton(0x190u, 0xEAu, 0x32u, 0x24u, 1, 0, 0x57u, 6u, 0, aSpellSchoolNames[6], 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1284 if ( v1->pActiveSkills[19] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1285 v2->CreateButton(0x190u, 0x10Fu, 0x32u, 0x24u, 1, 0, 0x57u, 7u, 0, aSpellSchoolNames[7], 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1286 if ( v1->pActiveSkills[20] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1287 v2->CreateButton(0x190u, 0x133u, 0x32u, 0x24u, 1, 0, 0x57u, 8u, 0, aSpellSchoolNames[8], 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1288 v2->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1289 0x1DCu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1290 0x1C2u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1291 pTexture_506444->uTextureWidth,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1292 pTexture_506444->uTextureHeight,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1293 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1294 78,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1295 0x58u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1296 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1297 0,
59
5159d2e6f559 BLV render
Nomad
parents: 49
diff changeset
1298 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1299 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1300 ptr_5064F8 = v2->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1301 0x1DCu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1302 0x1C2u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1303 0x30u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1304 0x20u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1305 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1306 78,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1307 0x58u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1308 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1309 0,
59
5159d2e6f559 BLV render
Nomad
parents: 49
diff changeset
1310 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1311 pTexture_506444,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1312 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1313 v2->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1314 0x231u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1315 0x1C2u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1316 ptr_506440->uTextureWidth,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1317 ptr_506440->uTextureHeight,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1318 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1319 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1320 0x71u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1321 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1322 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1323 pGlobalTXT_LocalizationStrings[79],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1324 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1325 result = v2->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1326 0x231u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1327 0x1C2u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1328 0x30u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1329 0x20u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1330 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1331 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1332 0x71u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1333 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1334 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1335 pGlobalTXT_LocalizationStrings[79],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1336 ptr_506440,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1337 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1338 ptr_5064F4 = result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1339 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1340 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1341 // 50640C: using guessed type int dword_50640C[];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1342
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1343
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1344 //----- (004B3157) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1345 void GUIWindow::_4B3157()
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1346 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1347 unsigned __int16 v1; // di@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1348 const char *v2; // edx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1349 signed int v3; // edx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1350 char *v4; // edi@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1351 int v5; // eax@45
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1352 int v6; // edi@45
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1353 char *v7; // eax@45
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1354 int v8; // edi@46
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1355 int v9; // eax@50
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1356 unsigned int v10; // [sp-10h] [bp-C8h]@53
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1357 unsigned __int16 v11; // [sp-Ch] [bp-C4h]@53
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1358 unsigned int v12; // [sp-Ch] [bp-C4h]@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1359 char *v13; // [sp-8h] [bp-C0h]@50
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1360 unsigned int v14; // [sp-8h] [bp-C0h]@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1361 unsigned int v15; // [sp-4h] [bp-BCh]@50
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1362 Texture *v16; // [sp-4h] [bp-BCh]@60
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1363 GUIWindow w; // [sp+Ch] [bp-ACh]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1364 GUIWindow v18; // [sp+60h] [bp-58h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1365 int v19; // [sp+B4h] [bp-4h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1366
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1367 if ( !ptr_507BC0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1368 return;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1369 memcpy(&v18, this, sizeof(v18));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1370 v18.uFrameWidth -= 18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1371 v18.uFrameZ -= 18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1372 v1 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1373 v19 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0x15u, 0x99u, 0xE9u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1374 pRenderer->DrawTextureIndexed(0x1DDu, 0, pTexture_Dialogue_Background);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1375 pRenderer->DrawTextureTransparent(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1376 0x1D4u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1377 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1378 (Texture *)(uTextureID_507B04 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507B04] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1379 if ( array_5913D8[6] != (NPCData *)uNumDialogueNPCPortraits || !uHouse_ExitPic )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1380 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1381 w.uFrameWidth = 130;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1382 w.uFrameHeight = 2 * LOBYTE(pFontCreate->uFontHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1383
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1384 //v2 = (const char *)p2DEvents_minus1_::04[13 * (unsigned int)ptr_507BC0->ptr_1C];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1385 v2 = p2DEvents[(unsigned int)ptr_507BC0->ptr_1C - 1].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1386
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1387 if ( v2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1388 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1389 v3 = 2 * LOBYTE(pFontCreate->uFontHeight) - 6 - pFontCreate->CalcTextHeight(v2, &w, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1390 if ( v3 < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1391 v3 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1392 v18.DrawText2(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1393 pFontCreate,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1394 0x1EAu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1395 v3 / 2 + 4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1396 v1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1397 //(const char *)p2DEvents_minus1_::04[13 * (unsigned int)ptr_507BC0->ptr_1C],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1398 p2DEvents[(unsigned int)ptr_507BC0->ptr_1C - 1].pName,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1399 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1400 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1401 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1402 v18.uFrameWidth += 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1403 v18.uFrameZ += 8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1404 if ( !array_5913D8[6] )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1405 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1406 if ( dword_F8B198 == 31 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1407 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1408 LABEL_36:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1409 sub_4B4F4F();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1410 goto LABEL_58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1411 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1412 if ( ptr_F8B1E8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1413 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1414 w.uFrameWidth = 458;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1415 w.uFrameZ = 457;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1416 v5 = pFontArrus->CalcTextHeight(ptr_F8B1E8, &w, 13, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1417 v6 = v5 + 7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1418 pRenderer->_4A6A68(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1419 8u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1420 352 - (v5 + 7),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1421 (Texture *)(uTextureID_Leather != -1 ? &pIcons_LOD->pTextures[uTextureID_Leather] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1422 (uTextureID_Leather != -1 ? pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight : 26) - (v5 + 7));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1423 pRenderer->DrawTextureIndexed(8u, 347 - v6, pTexture_591428);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1424 v7 = FitTextInAWindow(ptr_F8B1E8, pFontArrus, &w, 0xDu, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1425 ptr_507BC0->DrawText(pFontArrus, 13, 354 - v6, 0, v7, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1426 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1427 v8 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1428 if ( uNumDialogueNPCPortraits <= 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1429 goto LABEL_58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1430 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1431 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1432 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1433 *(&_4E5E50_transui_x + v8 + 6 * uNumDialogueNPCPortraits - 6) - 4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1434 *(&_4E5EE0_transui_y + v8 + 6 * uNumDialogueNPCPortraits - 6) - 4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1435 (Texture *)(uTextureID_50795C != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_50795C] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1436 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1437 *(&_4E5E50_transui_x + v8 + 6 * uNumDialogueNPCPortraits - 6),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1438 *(&_4E5EE0_transui_y + v8 + 6 * uNumDialogueNPCPortraits - 6),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1439 pDialogueNPCPortraits[v8]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1440 if ( uNumDialogueNPCPortraits < 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1441 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1442 LABEL_57:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1443 ++v8;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1444 if ( v8 >= uNumDialogueNPCPortraits )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1445 goto LABEL_58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1446 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1447 if ( v8 + 1 == uNumDialogueNPCPortraits && uHouse_ExitPic )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1448 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1449 v15 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1450 v13 = pMapStats->pInfos[uHouse_ExitPic].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1451 v9 = 94 * v8 + 113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1452 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1453 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1454 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1455 if ( !v8 && dword_591080 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1456 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1457 v15 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1458 //v13 = (char *)p2DEvents_minus1__10[13 * (unsigned int)ptr_507BC0->ptr_1C];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1459 v13 = (char *)p2DEvents[(unsigned int)ptr_507BC0->ptr_1C - 1].pProprieterTitle;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1460 v11 = v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1461 v10 = 113;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1462 LABEL_56:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1463 v18.DrawText2(pFontCreate, 0x1E3u, v10, v11, v13, v15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1464 goto LABEL_57;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1465 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1466 v15 = 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1467 v13 = array_5913D8[v8 - (dword_591080 != 0)]->pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1468 v9 = dword_4E5EC8[v8 + 6 * uNumDialogueNPCPortraits] + pDialogueNPCPortraits[v8]->uTextureHeight + 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1469 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1470 v11 = v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1471 v10 = v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1472 goto LABEL_56;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1473 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1474 v4 = (char *)array_5913D8[6] - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1475 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1476 _4E5E50_transui_x - 4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1477 _4E5EE0_transui_y - 4,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1478 (Texture *)(uTextureID_50795C != -1 ? &pIcons_LOD->pTextures[uTextureID_50795C] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1479 pRenderer->DrawTextureIndexed(_4E5E50_transui_x, _4E5EE0_transui_y, pDialogueNPCPortraits[(signed int)v4]);
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 26
diff changeset
1480 if ( pCurrentScreen == 14 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1481 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1482 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1483 goto LABEL_58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1484 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1485 if ( v4 || !dword_591080 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1486 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1487 sub_4B2A74();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1488 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1489 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1490 {
80
a84fb3752681 28.10.12
Ritor1
parents: 60
diff changeset
1491 sprintf(
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1492 pTmpBuf,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1493 pGlobalTXT_LocalizationStrings[429],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1494 //p2DEvents_minus1_::08[13 * (unsigned int)ptr_507BC0->ptr_1C],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1495 p2DEvents[(unsigned int)ptr_507BC0->ptr_1C - 1].pProprieterName,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1496 //p2DEvents_minus1__10[13 * (unsigned int)ptr_507BC0->ptr_1C]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1497 p2DEvents[(unsigned int)ptr_507BC0->ptr_1C - 1].pProprieterTitle);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1498 v18.DrawText2(pFontCreate, 0x1E3u, 0x71u, v19, pTmpBuf, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1499 if ( dword_F8B198 <= 18 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1500 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1501 switch ( dword_F8B198 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1502 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1503 case 18:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1504 sub_4B6478();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1505 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1506 case 1:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1507 sub_4B910F();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1508 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1509 case 2:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1510 sub_4BA928();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1511 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1512 case 3:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1513 ui_shop_teachers();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1514 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1515 case 4:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1516 sub_4B9CC6();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1517 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1518 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1519 if ( dword_F8B198 > 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1520 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1521 if ( dword_F8B198 <= 16 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1522 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1523 sub_4B5D7C();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1524 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1525 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1526 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1527 if ( dword_F8B198 == 17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1528 sub_4B7911();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1529 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1530 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1531 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1532 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1533 goto LABEL_58;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1534 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1535 switch ( dword_F8B198 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1536 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1537 case 21:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1538 sub_4B8285_prolly_draw_arcomage_result();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1539 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1540 case 22:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1541 _4B7D7E_bank();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1542 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1543 case 23:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1544 sub_4B705E();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1545 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1546 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1547 if ( dword_F8B198 <= 26 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1548 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1549 if ( dword_F8B198 <= 28 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1550 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1551 TravelByTransport();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1552 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1553 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1554 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1555 if ( dword_F8B198 != 30 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1556 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1557 if ( dword_F8B198 != 31 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1558 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1559 goto LABEL_36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1560 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1561 ui_training();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1562 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1563 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1564 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1565 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1566 LABEL_58:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1567 if ( array_5913D8[6] == (NPCData *)uNumDialogueNPCPortraits && uHouse_ExitPic )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1568 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1569 pRenderer->DrawTextureIndexed(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1570 0x22Cu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1571 0x1C3u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1572 (Texture *)(uTextureID_x_x_u != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_x_x_u] : 0));
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1573 v16 = (Texture *)(uTextureID_x_ok_u != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_x_ok_u] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1574 v14 = 451;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1575 v12 = 476;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1576 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1577 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1578 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1579 v16 = (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1580 v14 = 445;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1581 v12 = 471;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1582 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1583 pRenderer->DrawTextureIndexed(v12, v14, v16);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1584 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1585
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1586
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1587 //----- (004B1854) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1588 char *GUIWindow::_4B1854(__int64 a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1589 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1590 unsigned int v2; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1591 unsigned int v3; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1592 unsigned int v4; // ebp@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1593 unsigned int v5; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1594 signed __int64 v6; // ST2C_8@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1595 signed __int64 v7; // kr00_8@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1596 char *v8; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1597 char *v9; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1598 char *v10; // eax@13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1599 char *v11; // eax@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1600 unsigned __int16 v12; // ST0C_2@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1601 int v13; // eax@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1602 GUIWindow *v15; // [sp+0h] [bp-1Ch]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1603 signed __int64 v16; // [sp+Ch] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1604 signed __int64 v17; // [sp+14h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1605 unsigned int v18; // [sp+20h] [bp+4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1606
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1607 v15 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1608 v2 = (unsigned __int64)(signed __int64)((double)a2 * 0.234375) >> 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1609 v3 = (signed __int64)((double)a2 * 0.234375);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1610 v4 = (unsigned __int64)((signed __int64)((double)a2 * 0.234375) / 60) >> 32;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1611 v5 = (signed __int64)((double)a2 * 0.234375) / 60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1612 v6 = (signed __int64)((double)a2 * 0.234375) / 60 / 60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1613 v18 = (unsigned int)v6 / 0x18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1614 v17 = (signed __int64)__PAIR__(v2, v3) % 60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1615 v16 = (signed __int64)__PAIR__(v4, v5) % 60;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1616 v7 = v6 % 24;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1617 strcpy(pTmpBuf, pGlobalTXT_LocalizationStrings[532]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1618 if ( (unsigned int)v6 / 0x18 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1619 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1620 v8 = pGlobalTXT_LocalizationStrings[57];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1621 if ( v18 <= 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1622 v8 = pGlobalTXT_LocalizationStrings[56];
80
a84fb3752681 28.10.12
Ritor1
parents: 60
diff changeset
1623 sprintf(pTmpBuf2, "%d %s ", v18, v8);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1624 strcat(pTmpBuf, pTmpBuf2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1625 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1626 if ( v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1627 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1628 if ( v7 <= 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1629 v9 = pGlobalTXT_LocalizationStrings[109];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1630 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1631 v9 = pGlobalTXT_LocalizationStrings[110];
80
a84fb3752681 28.10.12
Ritor1
parents: 60
diff changeset
1632 sprintf(pTmpBuf2, "%d %s ", v7, v9);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1633 strcat(pTmpBuf, pTmpBuf2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1634 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1635 if ( v16 && !v18 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1636 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1637 if ( v16 <= 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1638 v10 = pGlobalTXT_LocalizationStrings[437];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1639 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1640 v10 = pGlobalTXT_LocalizationStrings[436];
80
a84fb3752681 28.10.12
Ritor1
parents: 60
diff changeset
1641 sprintf(pTmpBuf2, "%d %s ", v16, v10);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1642 strcat(pTmpBuf, pTmpBuf2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1643 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1644 if ( v17 && !v7 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1645 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1646 if ( v17 <= 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1647 v11 = pGlobalTXT_LocalizationStrings[439];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1648 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1649 v11 = pGlobalTXT_LocalizationStrings[438];
80
a84fb3752681 28.10.12
Ritor1
parents: 60
diff changeset
1650 sprintf(pTmpBuf2, "%d %s ", v17, v11);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1651 strcat(pTmpBuf, pTmpBuf2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1652 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1653 v12 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1654 v13 = pFontArrus->CalcTextHeight(pTmpBuf, v15, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1655 return v15->DrawText2(pFontArrus, 0, (212 - v13) / 2 + 101, v12, pTmpBuf, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1656 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1657
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1658
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1659
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1660 //----- (0044D406) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1661 char *GUIWindow::DrawText2(GUIFont *a2, unsigned int uHorizontalMargin, unsigned int uVerticalMargin, unsigned __int16 uDefaultColor, const char *pInString, unsigned int uLineSpacing)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1662 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1663 GUIWindow *v7; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1664 unsigned int v8; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1665 char *v9; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1666 char *result; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1667 unsigned int v11; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1668 signed int v12; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1669 int v13; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1670 GUIFont *v14; // [sp+Ch] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1671 const char *Stra; // [sp+24h] [bp+14h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1672
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1673 v7 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1674 v14 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1675 v8 = this->uFrameWidth - uHorizontalMargin;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1676 ui_current_text_color = uDefaultColor;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1677 v9 = FitTextInAWindow(pInString, a2, this, uHorizontalMargin, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1678 result = strtok(v9, "\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1679 v11 = uHorizontalMargin + v7->uFrameX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1680 v12 = uVerticalMargin + v7->uFrameY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1681 while ( 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1682 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1683 Stra = result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1684 if ( !result )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1685 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1686 v13 = (signed int)(v8 - v14->GetLineWidth(result)) >> 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1687 if ( v13 < 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1688 v13 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1689 v14->DrawTextLine(uDefaultColor, v11 + v13, v12, Stra, 640);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1690 v12 += LOBYTE(v14->uFontHeight) - uLineSpacing;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1691 result = strtok(0, "\n");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1692 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1693 return result;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1694 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1695 // 5C6DB4: using guessed type int ui_current_text_color;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1696
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1697
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1698
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1699 //----- (0044CE08) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1700 char GUIWindow::DrawText(GUIFont *a2, signed int uX, int uY, unsigned int uFontColor, const char *Str, int a7, int a8, unsigned int uFontShadowColor)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1701 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1702 GUIWindow *v9; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1703 GUIFont *v10; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1704 int v11; // eax@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1705 signed int v12; // esi@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1706 signed int v13; // edi@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1707 int v14; // edx@9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1708 int v15; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1709 unsigned int v16; // ecx@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1710 int v17; // eax@27
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1711 int v18; // edi@32
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1712 int v19; // esi@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1713 std::string v21; // [sp-18h] [bp-50h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1714 const char *v22; // [sp-8h] [bp-40h]@2
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1715 int v23; // [sp-4h] [bp-3Ch]@2
23
509744251c8e Player-related members
Nomad
parents: 3
diff changeset
1716 char Dest[6]; // [sp+Ch] [bp-2Ch]@32
509744251c8e Player-related members
Nomad
parents: 3
diff changeset
1717 //char v25; // [sp+Fh] [bp-29h]@32
509744251c8e Player-related members
Nomad
parents: 3
diff changeset
1718 //char v26; // [sp+11h] [bp-27h]@34
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1719 const char *v27; // [sp+20h] [bp-18h]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1720 int v28; // [sp+24h] [bp-14h]@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1721 int v29; // [sp+28h] [bp-10h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1722 size_t v30; // [sp+2Ch] [bp-Ch]@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1723 GUIWindow *v31; // [sp+30h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1724 const char *v32; // [sp+34h] [bp-4h]@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1725 size_t pInString; // [sp+4Ch] [bp+14h]@11
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1726
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1727 auto a1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1728 v29 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1729 v9 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1730 v10 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1731 v31 = a1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1732 if ( !Str )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1733 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1734 MessageBoxW(nullptr, L"Invalid string passed!", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Font.cpp:859", 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1735 return v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1736 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1737 v11 = strcmp(Str, "null");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1738 if ( v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1739 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1740 v30 = strlen(Str);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1741 LOBYTE(v11) = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1742 if ( !uX )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1743 uX = 12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1744 if ( a8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1745 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1746 v32 = Str;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1747 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1748 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1749 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1750 v11 = (int)FitTextInAWindow(Str, v10, v9, uX, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1751 v32 = (const char *)v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1752 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1753 v12 = uX + v9->uFrameX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1754 v13 = uY + v9->uFrameY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1755 v14 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1756 if ( !a8 || (v11 = v13 + LOBYTE(v10->uFontHeight), v11 <= a8) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1757 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1758 pInString = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1759 if ( (signed int)v30 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1760 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1761 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1762 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1763 LOBYTE(v11) = v32[v14];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1764 if ( (unsigned __int8)v11 >= v10->cFirstChar && (unsigned __int8)v11 <= v10->cLastChar
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1765 || (char)v11 == 12
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1766 || (char)v11 == 13
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1767 || (char)v11 == 9
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1768 || (char)v11 == 10 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1769 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1770 switch ( (unsigned __int8)v11 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1771 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1772 case 9u:
23
509744251c8e Player-related members
Nomad
parents: 3
diff changeset
1773 strncpy(Dest, &v32[v14 + 1], 3u);
509744251c8e Player-related members
Nomad
parents: 3
diff changeset
1774 Dest[3] = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1775 pInString += 3;
23
509744251c8e Player-related members
Nomad
parents: 3
diff changeset
1776 v29 = atoi(Dest);
509744251c8e Player-related members
Nomad
parents: 3
diff changeset
1777 v19 = atoi(Dest);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1778 LOBYTE(v11) = (char)v31;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1779 v12 = uX + v31->uFrameX + v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1780 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1781 case 0xAu:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1782 v11 = LOBYTE(v10->uFontHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1783 uY = uY + v11 - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1784 v13 = uY + v31->uFrameY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1785 v12 = uX + v29 + v31->uFrameX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1786 if ( a8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1787 goto LABEL_36;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1788 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1789 case 0xCu:
23
509744251c8e Player-related members
Nomad
parents: 3
diff changeset
1790 strncpy(Dest, &v32[v14 + 1], 5u);
509744251c8e Player-related members
Nomad
parents: 3
diff changeset
1791 Dest[5] = 0;
509744251c8e Player-related members
Nomad
parents: 3
diff changeset
1792 v11 = atoi(Dest);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1793 pInString += 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1794 uFontColor = v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1795 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1796 case 0xDu:
23
509744251c8e Player-related members
Nomad
parents: 3
diff changeset
1797 strncpy(Dest, &v32[v14 + 1], 3u);
509744251c8e Player-related members
Nomad
parents: 3
diff changeset
1798 Dest[3] = 0;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1799 pInString += 3;
23
509744251c8e Player-related members
Nomad
parents: 3
diff changeset
1800 v18 = atoi(Dest);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1801 v11 = v10->GetLineWidth(&v32[pInString]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1802 v12 = v31->uFrameZ - v11 - v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1803 v13 = uY + v31->uFrameY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1804 if ( a8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1805 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1806 v11 = LOBYTE(v10->uFontHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1807 LABEL_36:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1808 v11 = v11 + v13 - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1809 if ( v11 > a8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1810 return v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1811 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1812 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1813 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1814 default:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1815 if ( (char)v11 == 34 && v32[v14 + 1] == 34 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1816 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1817 ++v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1818 pInString = v14;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1819 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1820 v27 = &v32[v14];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1821 v15 = (unsigned __int8)v32[v14];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1822 v16 = *((int *)&v10->cFirstChar + 3 * v15 + 9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1823 v28 = *((int *)&v10->cFirstChar + 3 * v15 + 9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1824 if ( v14 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1825 v12 += v10->pMetrics[v15].uLeftSpacing;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1826 v17 = (int)((char *)&v10[1] + v10->field_C20[v15]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1827 if ( (short)uFontColor )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1828 pRenderer->DrawText(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1829 v12,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1830 v13,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1831 (unsigned __int8 *)v17,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1832 v16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1833 LOBYTE(v10->uFontHeight),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1834 v10->pFontPalettes[0],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1835 uFontColor,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1836 uFontShadowColor);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1837 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1838 pRenderer->DrawTextPalette(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1839 v12,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1840 v13,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1841 v17,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1842 v16,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1843 LOBYTE(v10->uFontHeight),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1844 v10->pFontPalettes[0],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1845 a7);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1846 LOBYTE(v11) = v30;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1847 v12 += v28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1848 if ( (signed int)pInString < (signed int)v30 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1849 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1850 LOBYTE(v11) = 3 * *v27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1851 v12 += v10->pMetrics[(unsigned __int8)*v27].uRightSpacing;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1852 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1853 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1854 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1855 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1856 v14 = pInString++ + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1857 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1858 while ( (signed int)pInString < (signed int)v30 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1859 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1860 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1861 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1862 return v11;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1863 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1864
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1865
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1866 //----- (0044CB4F) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1867 int GUIWindow::DrawTextInRect(GUIFont *a2, unsigned int uX, unsigned int uY, unsigned int uColor, const char *Str1, int Source, int a8)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1868 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1869 GUIFont *v8; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1870 int v9; // ebx@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1871 int v11; // esi@3
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1872 unsigned __int8 v12; // cl@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1873 signed int v13; // esi@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1874 signed int v14; // ebx@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1875 unsigned __int8 v15; // cl@21
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1876 int v16; // eax@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1877 int v17; // ecx@22
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1878 int v18; // ecx@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1879 int v19; // ecx@24
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1880 unsigned int v20; // ecx@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1881 int v21; // eax@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1882 int v22; // ebx@34
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1883 int v23; // eax@34
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1884 int v24; // ebx@36
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1885 char Str; // [sp+Ch] [bp-20h]@34
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1886 char v26; // [sp+Fh] [bp-1Dh]@34
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1887 char v27; // [sp+11h] [bp-1Bh]@35
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1888 int v28; // [sp+20h] [bp-Ch]@17
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1889 GUIWindow *a1; // [sp+24h] [bp-8h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1890 size_t v30; // [sp+28h] [bp-4h]@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1891 size_t Str1a; // [sp+40h] [bp+14h]@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1892 size_t Str1b; // [sp+40h] [bp+14h]@19
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1893 const char *Sourcea; // [sp+44h] [bp+18h]@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1894 int v34; // [sp+48h] [bp+1Ch]@26
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1895
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1896 v8 = a2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1897 a1 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1898 v30 = strlen(Str1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1899 v9 = v8->GetLineWidth(Str1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1900 if ( v9 < Source )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1901 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1902 a1->DrawText(v8, uX, uY, uColor, Str1, 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1903 return v9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1904 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1905 strcpy(pTmpBuf2, Str1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1906 v11 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1907 if ( a8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1908 _strrev(pTmpBuf2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1909 Str1a = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1910 if ( (signed int)v30 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1911 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1912 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1913 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1914 if ( v11 >= Source )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1915 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1916 if ( v8->IsCharValid(pTmpBuf2[Str1a]) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1917 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1918 if ( v12 < 9u )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1919 goto LABEL_12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1920 if ( v12 > 0xAu )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1921 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1922 if ( v12 == 12 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1923 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1924 Str1a += 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1925 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1926 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1927 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1928 if ( v12 != 13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1929 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1930 LABEL_12:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1931 if ( (signed int)Str1a > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1932 v11 += v8->pMetrics[v12].uLeftSpacing;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1933 v11 += *((int *)&v8->cFirstChar + 3 * v12 + 9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1934 if ( (signed int)Str1a < (signed int)v30 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1935 v11 += v8->pMetrics[v12].uRightSpacing;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1936 goto LABEL_16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1937 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1938 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1939 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1940 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1941 LABEL_16:
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1942 ++Str1a;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1943 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1944 while ( (signed int)Str1a < (signed int)v30 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1945 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1946 pTmpBuf[Str1a + 1999] = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1947 v30 = strlen(pTmpBuf2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1948 v28 = v8->GetLineWidth(pTmpBuf2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1949 if ( a8 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1950 _strrev(pTmpBuf2);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1951 Str1b = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1952 v13 = uX + a1->uFrameX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1953 v14 = uY + a1->uFrameY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1954 if ( (signed int)v30 > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1955 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1956 Sourcea = &pTmpBuf2[1];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1957 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1958 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1959 if ( v8->IsCharValid(pTmpBuf2[Str1b]) )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1960 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1961 v16 = v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1962 v17 = v15 - 9;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1963 if ( v17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1964 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1965 v18 = v17 - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1966 if ( v18 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1967 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1968 v19 = v18 - 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1969 if ( v19 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1970 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1971 if ( v19 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1972 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1973 strncpy(&Str, Sourcea, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1974 v26 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1975 Str1b += 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1976 Sourcea += 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1977 v22 = atoi(&Str);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1978 v23 = v8->GetLineWidth(&pTmpBuf2[Str1b]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1979 v13 = a1->uFrameZ - v23 - v22;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1980 v14 = uY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1981 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1982 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1983 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1984 v20 = *((int *)&v8->cFirstChar + 3 * v16 + 9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1985 v34 = *((int *)&v8->cFirstChar + 3 * v16 + 9);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1986 if ( (signed int)Str1b > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1987 v13 += v8->pMetrics[v16].uLeftSpacing;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1988 v21 = (int)((char *)&v8[1] + v8->field_C20[v16]);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1989 if ( (short)uColor )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1990 pRenderer->DrawText(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1991 v13,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1992 v14,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1993 (unsigned __int8 *)v21,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1994 v20,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1995 LOBYTE(v8->uFontHeight),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1996 v8->pFontPalettes[0],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1997 uColor,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1998 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
1999 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2000 pRenderer->DrawTextPalette(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2001 v13,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2002 v14,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2003 v21,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2004 v20,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2005 LOBYTE(v8->uFontHeight),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2006 v8->pFontPalettes[0],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2007 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2008 v13 += v34;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2009 if ( (signed int)Str1b < (signed int)v30 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2010 v13 += v8->pMetrics[(unsigned __int8)pTmpBuf2[Str1b]].uRightSpacing;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2011 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2012 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2013 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2014 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2015 strncpy(&Str, Sourcea, 5u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2016 v27 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2017 Str1b += 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2018 Sourcea += 5;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2019 uColor = atoi(&Str);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2020 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2021 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2022 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2023 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2024 v24 = LOBYTE(v8->uFontHeight);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2025 v13 = uX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2026 uY = uY + v24 - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2027 v14 = v24 + uY - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2028 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2029 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2030 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2031 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2032 strncpy(&Str, Sourcea, 3u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2033 v26 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2034 atoi(&Str);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2035 Str1b += 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2036 Sourcea += 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2037 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2038 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2039 ++Str1b;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2040 ++Sourcea;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2041 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2042 while ( (signed int)Str1b < (signed int)v30 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2043 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2044 return v28;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2045 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2046
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2047 //----- (0041D12F) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2048 GUIButton *GUIWindow::CreateButton(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight, int a6, int a7, unsigned int uControlID, unsigned int uControlParam, unsigned __int8 uHotkey, const char *pName, Texture *pTextures, ...)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2049 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2050 GUIButton *v12; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2051 unsigned int v13; // eax@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2052 unsigned int v14; // ebx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2053 unsigned int v15; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2054 unsigned int v16; // ebx@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2055 unsigned int v17; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2056 Texture *v18; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2057 Texture **v19; // ecx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2058 Texture **v20; // edx@5
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2059 GUIButton *v21; // eax@7
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2060
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2061 v12 = (GUIButton *)pAllocator->AllocNamedChunk(0, 0xBCu, "BUTTON");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2062 v12->pParent = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2063 v12->uX = uX + this->uFrameX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2064 v13 = uY + this->uFrameY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2065 v12->uHeight = uHeight;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2066 v12->uY = v13;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2067 v12->uWidth = uWidth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2068 if ( a6 == 2 && !uHeight )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2069 v12->uHeight = uWidth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2070 v14 = v12->uX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2071 v12->uButtonType = a6;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2072 v15 = v14 + uWidth - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2073 v16 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2074 v12->uZ = v15;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2075 v17 = v12->uY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2076 v12->field_2C = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2077 v12->uW = v17 + uHeight - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2078 v12->field_1C = a7;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2079 v12->uControlID = uControlID;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2080 v12->uControlParam = uControlParam;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2081 v12->uHotkey = uHotkey;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2082 strlen(pName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2083 strcpy(v12->pButtonName, pName);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2084 v18 = pTextures;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2085 if ( pTextures )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2086 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2087 v19 = &pTextures;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2088 v20 = v12->pTextures;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2089 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2090 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2091 ++v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2092 *v20 = v18;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2093 ++v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2094 ++v20;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2095 v18 = *v19;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2096 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2097 while ( *v19 );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2098 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2099 v12->uNumTextures = v16;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2100 v21 = this->pControlsTail;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2101 if ( v21 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2102 v21->pNext = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2103 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2104 this->pControlsHead = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2105 v12->pPrev = this->pControlsTail;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2106 this->pControlsTail = v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2107 v12->pNext = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2108 ++this->uNumControls;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2109 return v12;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2110 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2111
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2112 //----- (00459C2B) --------------------------------------------------------
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2113 void GUIWindow::DrawFlashingInputCursor(signed int a3, int a4, GUIFont *a2)
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2114 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2115 signed int v4; // esi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2116 GUIWindow *v5; // edi@1
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2117
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2118 v4 = a3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2119 v5 = this;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2120 if ( GetTickCount() % 1000 > 500 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2121 DrawText(a2, v4, a4, 0, "_", 0, 0, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2122 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2123
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2124
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2125 //----- (0041C432) --------------------------------------------------------
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2126 GUIWindow *GUIWindow::Create(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight, WindowType eWindowType, int a4, int a5)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2127 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2128 unsigned int uNextFreeWindowID; // ebp@1
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2129 //int *v8; // eax@1
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2130 //GUIWindow *pWindow; // esi@4
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2131 int v10; // eax@4
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2132 unsigned int v11; // ebx@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2133 NPCData *v12; // ebp@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2134 void *v13; // ecx@18
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2135 bool v14; // eax@20
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2136 void *v15; // ecx@23
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2137 bool v16; // eax@25
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2138 void *v17; // ecx@28
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2139 bool v18; // eax@30
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2140 void *v19; // ecx@33
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2141 bool v20; // eax@35
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2142 void *v21; // ecx@38
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2143 bool v22; // eax@40
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2144 void *v23; // ecx@43
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2145 bool v24; // eax@45
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2146 int v25; // eax@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2147 unsigned int v26; // ebx@65
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2148 char *v27; // eax@71
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2149 const char *v29; // [sp-8h] [bp-18h]@68
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2150 char *v30; // [sp-4h] [bp-14h]@68
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2151 int uWidtha; // [sp+14h] [bp+4h]@66
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2152 int a4a; // [sp+20h] [bp+10h]@15
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2153
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2154 uNextFreeWindowID = 0;
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2155 for (uNextFreeWindowID = 0; uNextFreeWindowID < 20; ++uNextFreeWindowID)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2156 {
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2157 if (pWindowList[uNextFreeWindowID].eWindowType == WINDOW_null)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2158 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2159 }
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2160
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2161
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2162 auto pWindow = &pWindowList[uNextFreeWindowID];
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2163 pWindow->uFrameWidth = uWidth;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2164 pWindow->uFrameZ = uX + uWidth - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2165 pWindow->uFrameW = uY + uHeight - 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2166 pWindow->ptr_1C = (void *)a4;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 26
diff changeset
2167 pWindow->Hint = (char *)a5;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2168 v10 = uNumVisibleWindows;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2169 pWindow->uFrameX = uX;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2170 ++v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2171 pWindow->uFrameY = uY;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2172 pWindow->uFrameHeight = uHeight;
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2173 pWindow->eWindowType = eWindowType;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2174 pWindow->field_44 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2175 uNumVisibleWindows = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2176 pWindow->field_3C = v10;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2177 pVisibleWindowsIdxs[v10] = uNextFreeWindowID + 1;
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2178 if ( (signed int)eWindowType <= 20 )
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2179 {
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2180 if (eWindowType != WINDOW_Chest)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2181 {
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2182 switch (eWindowType)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2183 {
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2184 case WINDOW_Book:
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2185 pWindow->InitializeBookView();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2186 break;
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2187 case WINDOW_A:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 26
diff changeset
2188 dword_506978 = pCurrentScreen;
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 26
diff changeset
2189 pCurrentScreen = 4;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2190 ptr_5076F4 = pWindow->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2191 0x1D7u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2192 0x1BDu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2193 0xA9u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2194 0x23u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2195 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2196 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2197 0x71u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2198 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2199 0,
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2200 pGlobalTXT_LocalizationStrings[79], //"Exit"
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2201 (Texture *)(uTextureID_506438 != -1 ? &pIcons_LOD->pTextures[uTextureID_506438] : 0),
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2202 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2203 if ( pWindow->ptr_1C != (void *)1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2204 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2205 a4a = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2206 v11 = LOBYTE(pFontArrus->uFontHeight) - 3;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2207 v12 = GetNPCData(uDialogue_SpeakingActorNPC_ID);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2208 if ( sub_445C8B(uDialogue_SpeakingActorNPC_ID) == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2209 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2210 if ( v12->joins )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2211 {
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2212 pWindow->CreateButton(0x1E0u, 0x82u, 0x8Cu, v11, 1, 0, 0x88u, 0xDu, 0, "", 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2213 a4a = 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2214 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2215 v13 = (void *)v12->bDrawSomeAnim;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2216 if ( v13 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2217 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2218 if ( a4a < 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2219 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2220 v14 = sub_4466C4(v13);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2221 if ( v14 == 1 || v14 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2222 pWindow->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2223 0x1E0u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2224 a4a++ * v11 + 130,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2225 0x8Cu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2226 v11,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2227 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2228 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2229 0x88u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2230 0x13u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2231 0,
59
5159d2e6f559 BLV render
Nomad
parents: 49
diff changeset
2232 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2233 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2234 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2235 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2236 v15 = (void *)v12->evtb;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2237 if ( v15 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2238 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2239 if ( a4a < 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2240 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2241 v16 = sub_4466C4(v15);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2242 if ( v16 == 1 || v16 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2243 pWindow->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2244 0x1E0u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2245 a4a++ * v11 + 130,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2246 0x8Cu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2247 v11,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2248 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2249 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2250 0x88u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2251 0x14u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2252 0,
59
5159d2e6f559 BLV render
Nomad
parents: 49
diff changeset
2253 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2254 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2255 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2256 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2257 v17 = (void *)v12->evtc;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2258 if ( v17 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2259 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2260 if ( a4a < 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2261 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2262 v18 = sub_4466C4(v17);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2263 if ( v18 == 1 || v18 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2264 pWindow->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2265 0x1E0u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2266 a4a++ * v11 + 130,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2267 0x8Cu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2268 v11,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2269 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2270 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2271 0x88u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2272 0x15u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2273 0,
59
5159d2e6f559 BLV render
Nomad
parents: 49
diff changeset
2274 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2275 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2276 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2277 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2278 v19 = (void *)v12->evtd;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2279 if ( v19 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2280 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2281 if ( a4a < 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2282 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2283 v20 = sub_4466C4(v19);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2284 if ( v20 == 1 || v20 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2285 pWindow->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2286 0x1E0u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2287 a4a++ * v11 + 130,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2288 0x8Cu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2289 v11,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2290 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2291 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2292 0x88u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2293 0x16u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2294 0,
59
5159d2e6f559 BLV render
Nomad
parents: 49
diff changeset
2295 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2296 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2297 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2298 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2299 v21 = (void *)v12->evte;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2300 if ( v21 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2301 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2302 if ( a4a < 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2303 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2304 v22 = sub_4466C4(v21);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2305 if ( v22 == 1 || v22 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2306 pWindow->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2307 0x1E0u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2308 a4a++ * v11 + 130,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2309 0x8Cu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2310 v11,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2311 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2312 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2313 0x88u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2314 0x17u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2315 0,
59
5159d2e6f559 BLV render
Nomad
parents: 49
diff changeset
2316 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2317 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2318 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2319 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2320 v23 = (void *)v12->evtf;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2321 if ( v23 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2322 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2323 if ( a4a < 4 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2324 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2325 v24 = sub_4466C4(v23);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2326 if ( v24 == 1 || v24 == 2 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2327 pWindow->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2328 0x1E0u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2329 a4a++ * v11 + 130,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2330 0x8Cu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2331 v11,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2332 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2333 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2334 0x88u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2335 0x18u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2336 0,
59
5159d2e6f559 BLV render
Nomad
parents: 49
diff changeset
2337 "",
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2338 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2339 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2340 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2341 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2342 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2343 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2344 if ( v12->joins )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2345 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2346 pWindow->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2347 0x1E0u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2348 0x82u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2349 0x8Cu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2350 v11,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2351 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2352 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2353 0x88u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2354 0x4Du,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2355 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2356 pGlobalTXT_LocalizationStrings[407],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2357 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2358 if ( v12->uFlags & 0x80 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2359 {
80
a84fb3752681 28.10.12
Ritor1
parents: 60
diff changeset
2360 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[408], v12->pName);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2361 pWindow->CreateButton(0x1E0u, v11 + 130, 0x8Cu, v11, 1, 0, 0x88u, 0x4Cu, 0, pTmpBuf, 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2362 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2363 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2364 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2365 pWindow->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2366 0x1E0u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2367 v11 + 130,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2368 0x8Cu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2369 v11,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2370 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2371 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2372 0x88u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2373 0x4Cu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2374 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2375 pGlobalTXT_LocalizationStrings[406],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2376 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2377 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2378 a4a = 2;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2379 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2380 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2381 pWindow->_41D08F(a4a, 1, 0, 1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2382 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2383 break;
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2384 case WINDOW_11:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 26
diff changeset
2385 dword_506978 = pCurrentScreen;
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 26
diff changeset
2386 pCurrentScreen = 17;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2387 ptr_5076F4 = pWindow->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2388 0x236u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2389 0x1BDu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2390 0x4Bu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2391 0x21u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2392 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2393 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2394 0x5Bu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2395 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2396 0x4Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2397 pGlobalTXT_LocalizationStrings[156],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2398 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2399 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2400 ptr_5076FC = pWindow->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2401 0x1E6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2402 0x1BDu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2403 0x4Bu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2404 0x21u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2405 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2406 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2407 0x5Au,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2408 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2409 0x59u,
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 26
diff changeset
2410 pWindow->Hint,
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2411 (Texture *)(uTextureID_BUTTYES2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTYES2] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2412 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2413 pWindow->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2414 _4E5E50_transui_x,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2415 _4E5EE0_transui_y,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2416 0x3Fu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2417 0x49u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2418 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2419 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2420 0x5Au,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2421 1u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2422 0x20u,
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 26
diff changeset
2423 pWindow->Hint,
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2424 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2425 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2426 0);
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 26
diff changeset
2427 pWindow->CreateButton(8u, 8u, 0x1CCu, 0x158u, 1, 0, 0x5Au, 1u, 0, pWindow->Hint, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2428 break;
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2429 case WINDOW_12:
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2430 InitializeBookTextures();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2431 pWindow->_411621();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2432 break;
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2433 case WINDOW_13:
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 26
diff changeset
2434 dword_506978 = pCurrentScreen;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2435 pKeyActionMap->_459E5A(0, 15, pWindow);
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 26
diff changeset
2436 pCurrentScreen = 19;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2437 break;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2438 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2439 return pWindow;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2440 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2441 LABEL_62:
59
5159d2e6f559 BLV render
Nomad
parents: 49
diff changeset
2442 pWindow->CreateButton(0x3Du, 0x1A8u, 0x1Fu, 0, 2, 94, 0x6Eu, 1u, 0x31u, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 49
diff changeset
2443 pWindow->CreateButton(0xB1u, 0x1A8u, 0x1Fu, 0, 2, 94, 0x6Eu, 2u, 0x32u, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 49
diff changeset
2444 pWindow->CreateButton(0x124u, 0x1A8u, 0x1Fu, 0, 2, 94, 0x6Eu, 3u, 0x33u, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 49
diff changeset
2445 pWindow->CreateButton(0x197u, 0x1A8u, 0x1Fu, 0, 2, 94, 0x6Eu, 4u, 0x34u, "", 0);
5159d2e6f559 BLV render
Nomad
parents: 49
diff changeset
2446 pWindow->CreateButton(0, 0, 0, 0, 1, 0, 0xB0u, 0, 9u, "", 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2447 return pWindow;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2448 }
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2449 if (eWindowType == WINDOW_HouseInterior)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2450 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 26
diff changeset
2451 pCurrentScreen = 13;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2452 ptr_5076F4 = pWindow->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2453 0x1D7u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2454 0x1BDu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2455 0xA9u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2456 0x23u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2457 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2458 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2459 0x71u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2460 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2461 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2462 pGlobalTXT_LocalizationStrings[80],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2463 (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2464 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2465 v25 = uNumDialogueNPCPortraits;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2466 v26 = 0;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2467 if ( uNumDialogueNPCPortraits > 0 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2468 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2469 do
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2470 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2471 uWidtha = v26 + 1;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2472 if ( v26 + 1 == v25 && uHouse_ExitPic )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2473 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2474 v30 = pMapStats->pInfos[uHouse_ExitPic].pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2475 v29 = pGlobalTXT_LocalizationStrings[411];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2476 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2477 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2478 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2479 if ( v26 || !dword_591080 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2480 v27 = array_5913D8[v26 - (dword_591080 != 0)]->pName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2481 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2482 //v27 = (char *)p2DEvents_minus1_::08[13 * a4];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2483 v27 = (char *)p2DEvents[a4 - 1].pProprieterName;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2484 v30 = v27;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2485 v29 = pGlobalTXT_LocalizationStrings[435];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2486 }
80
a84fb3752681 28.10.12
Ritor1
parents: 60
diff changeset
2487 sprintf(&byte_591180[100 * v26], v29, v30);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2488 array_5913D8[v26 + 7] = (NPCData *)pWindow->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2489 *(&_4E5E50_transui_x + v26 + 6 * uNumDialogueNPCPortraits - 6),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2490 *(&_4E5EE0_transui_y + v26 + 6 * uNumDialogueNPCPortraits - 6),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2491 0x3Fu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2492 0x49u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2493 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2494 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2495 0x19Au,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2496 v26,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2497 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2498 &byte_591180[100 * v26],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2499 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2500 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2501 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2502 ++v26;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2503 v25 = uNumDialogueNPCPortraits;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2504 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2505 while ( uWidtha < uNumDialogueNPCPortraits );
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2506 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2507 if ( v25 == 1 )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2508 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2509 ptr_507BC0 = &pWindowList[uNextFreeWindowID];
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2510 _4B4224_UpdateNPCTopics(0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2511 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2512 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2513 else
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2514 {
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2515 if (eWindowType == WINDOW_1A)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2516 {
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 26
diff changeset
2517 dword_506978 = pCurrentScreen;
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 26
diff changeset
2518 pCurrentScreen = 18;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2519 ptr_5076F4 = pWindow->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2520 0x236u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2521 0x1BDu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2522 0x4Bu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2523 0x21u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2524 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2525 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2526 0x19Cu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2527 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2528 0x4Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2529 pGlobalTXT_LocalizationStrings[34],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2530 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2531 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2532 ptr_5076FC = pWindow->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2533 0x1E6u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2534 0x1BDu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2535 0x4Bu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2536 0x21u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2537 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2538 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2539 0x19Bu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2540 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2541 0x59u,
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 26
diff changeset
2542 pWindow->Hint,
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2543 (Texture *)(uTextureID_BUTTYES2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTYES2] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2544 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2545 pWindow->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2546 _4E5E50_transui_x,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2547 _4E5EE0_transui_y,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2548 0x3Fu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2549 0x49u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2550 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2551 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2552 0x19Bu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2553 1u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2554 0x20u,
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 26
diff changeset
2555 pWindow->Hint,
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2556 0);
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 26
diff changeset
2557 pWindow->CreateButton(8u, 8u, 0x1CCu, 0x158u, 1, 0, 0x19Bu, 1u, 0, pWindow->Hint, 0);
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2558 return pWindow;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2559 }
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2560 if (eWindowType == WINDOW_1B)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2561 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2562 pEventTimer->Pause();
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2563 pAudioPlayer->StopChannels(-1, -1);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2564 pMouse->SetCursorBitmap("MICON2");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2565 ShowStatusBarString(pGlobalTXT_LocalizationStrings[39], 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2566 return pWindow;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2567 }
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2568 if (eWindowType == WINDOW_1E)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2569 goto LABEL_62;
2
2ca04ccb612a NoCD, main menu, various
Nomad
parents: 0
diff changeset
2570 if (eWindowType == WINDOW_1F)
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2571 {
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2572 pMouse->SetCursorBitmap("MICON2");
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2573 ptr_5076F4 = pWindow->CreateButton(
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2574 0x188u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2575 0x13Eu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2576 0x4Bu,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2577 0x21u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2578 1,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2579 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2580 0x71u,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2581 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2582 0,
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2583 pGlobalTXT_LocalizationStrings[34],
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2584 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0),
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2585 0);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2586 ShowStatusBarString(pGlobalTXT_LocalizationStrings[39], 2u);
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2587 ++pIcons_LOD->uTexturePacksCount;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2588 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103;
44
916bec351934 22.10.12(pCurrentScreen)
Ritor1
parents: 26
diff changeset
2589 pCurrentScreen = 23;
0
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2590 if ( !pIcons_LOD->uNumPrevLoadedFiles )
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2591 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2592 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2593 }
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2594 return pWindow;
8b8875f5b359 Initial commit
Nomad
parents:
diff changeset
2595 }