annotate UIBooks.cpp @ 1048:d36681a9e4f8

Слияние
author Ritor1
date Thu, 23 May 2013 11:17:01 +0600
parents 39f42990698f
children f17cfb070f7a
rev   line source
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1 #include <assert.h>
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
2
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
3 #include "MM7.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
4
1016
c45d51b3f4f4 Included header files cleanup
Grumpy7
parents: 995
diff changeset
5 #include "Mouse.h"
c45d51b3f4f4 Included header files cleanup
Grumpy7
parents: 995
diff changeset
6
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
7 #include "MapInfo.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
8 #include "GUIWindow.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
9 #include "GUIFont.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
10 #include "Party.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
11 #include "AudioPlayer.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
12 #include "Outdoor.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
13 #include "LOD.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
14 #include "Allocator.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
15 #include "Viewport.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
16 #include "Math.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
17 #include "Awards.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
18 #include "Autonotes.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
19 #include "StorylineTextTable.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
20 #include "texts.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
22 #include "mm7_data.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
24
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
25
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
26
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
27
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
28
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
29
1038
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
30 //----- (00411150) --------------------------------------------------------
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
31 void BookUI_DrawTownPortalMap()
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
32 {
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
33 //signed int v0; // edi@1
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
34 //__int16 v1; // dx@8
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
35 //POINT *v2; // edi@17
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
36 int v3; // edi@17
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
37 //__int16 v4; // dx@24
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
38 GUIWindow v6; // [sp+Ch] [bp-64h]@1
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
39 //POINT v7; // [sp+60h] [bp-10h]@17
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
40 POINT a2; // [sp+68h] [bp-8h]@17
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
41
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
42 pRenderer->ClearZBuffer(0, 479);
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
43 pRenderer->DrawTextureTransparent(8, 8, pTexture_CurrentBook);
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
44 pRenderer->DrawTextureTransparent(471, 445, pIcons_LOD->GetTexture(uExitCancelTextureId));
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
45
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
46 v6.uFrameX = game_viewport_x;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
47 v6.uFrameY = game_viewport_y;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
48 v6.uFrameWidth = game_viewport_width;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
49 v6.uFrameHeight = game_viewport_height;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
50 v6.uFrameZ = game_viewport_z;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
51 v6.uFrameW = game_viewport_w;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
52
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
53 const uint fountain_bits_lut[] = {PARTY_QUEST_FOUNTAIN_HARMONDALE,
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
54 PARTY_QUEST_FOUNTAIN_PIERPONT,
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
55 PARTY_QUEST_FOUNTAIN_NIGHON,
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
56 PARTY_QUEST_FOUNTAIN_EVENMORN_ISLE,
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
57 PARTY_QUEST_FOUNTAIN_CELESTIA,
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
58 PARTY_QUEST_FOUNTAIN_THE_PIT};
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
59 for (uint i = 0; i < 6; ++i)
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
60 {
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
61
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
62 if (_449B57_test_bit(pParty->_quest_bits, fountain_bits_lut[i]))
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
63 pRenderer->DrawMaskToZBuffer(pTownPortalBook_xs[i],
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
64 pTownPortalBook_ys[i],
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
65 pTexture_TownPortalIcons[i], i + 1);
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
66 }
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
67
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
68 /* v0 = 0;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
69 do
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
70 {
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
71 if ( !v0 )
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
72 {
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
73 v1 = 206;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
74 LABEL_14:
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
75 if ( !(unsigned __int16)_449B57_test_bit(pParty->_quest_bits, v1) )
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
76 goto LABEL_16;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
77 goto LABEL_15;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
78 }
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
79 if ( v0 == 1 )
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
80 {
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
81 v1 = 208;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
82 goto LABEL_14;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
83 }
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
84 if ( v0 == 2 )
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
85 {
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
86 v1 = 207;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
87 goto LABEL_14;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
88 }
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
89 if ( v0 == 3 )
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
90 {
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
91 v1 = 211;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
92 goto LABEL_14;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
93 }
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
94 if ( v0 == 4 )
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
95 {
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
96 v1 = 209;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
97 goto LABEL_14;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
98 }
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
99 if ( v0 == 5 )
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
100 {
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
101 v1 = 210;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
102 goto LABEL_14;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
103 }
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
104 LABEL_15:
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
105 pRenderer->DrawMaskToZBuffer(
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
106 pTownPortalBook_xs[v0],
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
107 pTownPortalBook_ys[v0],
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
108 *(&pTexture_TownPortalHarmn + v0),
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
109 v0 + 1);
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
110 LABEL_16:
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
111 ++v0;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
112 }
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
113 while ( v0 < 6 );*/
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
114
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
115 pMouse->GetCursorPos(&a2);
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
116 //v2 = pMouse->GetCursorPos(&a2);
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
117 v3 = pRenderer->pActiveZBuffer[a2.x + pSRZBufferLineOffsets[a2.y]] & 0xFFFF;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
118
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
119 if (v3)
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
120 {
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
121 if (_449B57_test_bit(pParty->_quest_bits, fountain_bits_lut[v3 - 1]))
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
122 pRenderer->DrawTextureIndexed(pTownPortalBook_xs[v3 - 1], pTownPortalBook_ys[v3 - 1], pTexture_TownPortalIcons[v3 - 1]);
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
123 }
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
124 v6.DrawTitleText(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u);
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
125
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
126
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
127 /* if ( !v3 ) // Town Portal
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
128 {
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
129 v6.DrawTitleText(pBook2Font, 0, 22, 0, pGlobalTXT_LocalizationStrings[10], 3); // "Town Portal"
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
130 return;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
131 }
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
132 if ( v3 == 1 )
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
133 {
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
134 v4 = 206;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
135 LABEL_30:
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
136 if ( (unsigned __int16)_449B57_test_bit(pParty->_quest_bits, v4) )
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
137 goto LABEL_31;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
138 v6.DrawTitleText(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u); // "Town Portal"
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
139 return;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
140 }
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
141 if ( v3 == 2 )
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
142 {
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
143 v4 = 208;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
144 goto LABEL_30;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
145 }
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
146 if ( v3 == 3 )
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
147 {
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
148 v4 = 207;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
149 goto LABEL_30;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
150 }
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
151 if ( v3 == 4 )
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
152 {
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
153 v4 = 211;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
154 goto LABEL_30;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
155 }
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
156 if ( v3 == 5 )
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
157 {
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
158 v4 = 209;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
159 goto LABEL_30;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
160 }
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
161 if ( v3 == 6 )
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
162 {
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
163 v4 = 210;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
164 goto LABEL_30;
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
165 }
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
166 LABEL_31:
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
167 pRenderer->DrawTextureIndexed(word_4E1D3A[v3], pTownPortalBook_xs[v3 + 5], *(&pTex_tab_an_6b__zoom_on + v3));
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
168 v6.DrawTitleText(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u);*/
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
169 }
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
170 // 4E1D3A: using guessed type __int16 word_4E1D3A[];
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
171
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
172
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
173
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
174
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
175 //----- (00413CC6) --------------------------------------------------------
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
176 void BookUI_Draw(WindowType book)
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
177 {
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
178 pRenderer->DrawTextureIndexed(471, 445, pIcons_LOD->GetTexture(uExitCancelTextureId));
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
179 switch (book)
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
180 {
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
181 case WINDOW_QuestBook: BookUI_Questbook_Draw(); break;
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
182 case WINDOW_AutonotesBook: BookUI_Autonotes_Draw(); break;
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
183 case WINDOW_MapsBook: BookUI_Map_Draw(); break;
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
184 case WINDOW_CalendarBook: BookUI_Calendar_Draw(); break;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
185 case WINDOW_JournalBook: BookUI_Journal_Draw(); break;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
186
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
187 case WINDOW_LloydsBeacon: DrawLloydBeaconsScreen(); break;
1038
39f42990698f Cleanings
Nomad
parents: 1018
diff changeset
188 case WINDOW_TownPortal: BookUI_DrawTownPortalMap(); break;
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
189 }
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
190 }
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
191
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
192
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
193
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
194 //----- (00413D3C) --------------------------------------------------------
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
195 static const char *GetDayPart()
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
196 {
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
197 if (pParty->uCurrentHour <= 4)
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
198 return pGlobalTXT_LocalizationStrings[567]; // "Night"
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
199 else if (pParty->uCurrentHour == 5)
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
200 return pGlobalTXT_LocalizationStrings[55]; // "Dawn"
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
201 else if (pParty->uCurrentHour == 20)
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
202 return pGlobalTXT_LocalizationStrings[566]; // "Dusk"
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
203 else
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
204 return pGlobalTXT_LocalizationStrings[56]; // "Day"
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
205 }
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
206
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
207
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
208
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
209 //----- (00413D6F) --------------------------------------------------------
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
210 void BookUI_Calendar_Draw()
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
211 {
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
212 unsigned int v0; // esi@1
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
213 //char *v1; // eax@5
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
214 int v2; // ecx@5
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
215 char *v3; // eax@6
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
216 GUIWindow a1; // [sp+Ch] [bp-60h]@5
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
217 unsigned int v6; // [sp+60h] [bp-Ch]@1
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
218 //int v7; // [sp+64h] [bp-8h]@1
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
219 //int a5; // [sp+68h] [bp-4h]@1
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
220
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
221
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
222 static unsigned int pDayMoonPhase[28] = // 4E1B18
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
223 {
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
224 0, 0, 0,
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
225 1, 1, 1, 1,
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
226 2, 2, 2,
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
227 3, 3, 3, 3,
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
228 4, 4, 4,
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
229 3, 3, 3, 3,
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
230 2, 2, 2,
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
231 1, 1, 1, 1
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
232 };
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
233
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
234
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
235 v0 = pParty->uCurrentHour;
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
236 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pSpellBookPagesTextr_13);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
237 if ( (signed int)v0 <= 12 )
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
238 {
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
239 if ( !v0 )
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
240 v0 = 12;
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
241 }
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
242 else
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
243 {
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
244 v0 -= 12;
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
245 }
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
246 a1.uFrameX = game_viewport_x;
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
247 a1.uFrameY = game_viewport_y;
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
248 a1.uFrameWidth = game_viewport_width;
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
249 a1.uFrameHeight = game_viewport_height;
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
250 a1.uFrameZ = game_viewport_z;
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
251 a1.uFrameW = game_viewport_w;
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
252 a1.DrawTitleText(pBook2Font, 0, 0x16u, ui_book_calendar_title_color, pGlobalTXT_LocalizationStrings[186], 3); // "Time in Erathia"
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
253
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
254 v2 = 0;
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
255 if ( pParty->uCurrentHour >= 12 )
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
256 {
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
257 if ( pParty->uCurrentHour >= 24 )
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
258 v2=0;
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
259 else
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
260 v2=1;
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
261 }
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
262
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
263 sprintf(pTmpBuf, "%s\t100:\t110%d:%02d %s - %s",
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
264 pGlobalTXT_LocalizationStrings[526], // "Time"
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
265 v0,
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
266 pParty->uCurrentMinute,
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
267 aAMPMNames[v2],
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
268 GetDayPart());
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
269 a1.DrawText(pBookFont, 70, 55, ui_book_calendar_time_color, pTmpBuf, 0, 0, 0);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
270
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
271 sprintf(pTmpBuf, "%s\t100:\t110%d - %s",
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
272 pGlobalTXT_LocalizationStrings[56], // "Day"
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
273 pParty->uDaysPlayed + 1,
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
274 aDayNames[pParty->uDaysPlayed % 7]);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
275 a1.DrawText(pBookFont, 70, 2 * LOBYTE(pBookFont->uFontHeight) + 49, ui_book_calendar_day_color, pTmpBuf, 0, 0, 0);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
276
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
277 sprintf(pTmpBuf, "%s\t100:\t110%d - %s",
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
278 pGlobalTXT_LocalizationStrings[146], // "Month"
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
279 pParty->uCurrentMonth + 1,
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
280 aMonthNames[pParty->uCurrentMonth]);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
281 a1.DrawText(pBookFont, 70, 4 * LOBYTE(pBookFont->uFontHeight) + 43, ui_book_calendar_month_color, pTmpBuf, 0, 0, 0);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
282
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
283 sprintf(pTmpBuf, "%s\t100:\t110%d", pGlobalTXT_LocalizationStrings[245], pParty->uCurrentYear); // "Year"
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
284 a1.DrawText(pBookFont, 70, 6 * LOBYTE(pBookFont->uFontHeight) + 37, ui_book_calendar_year_color, pTmpBuf, 0, 0, 0);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
285
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
286 sprintf(pTmpBuf, "%s\t100:\t110%s", pGlobalTXT_LocalizationStrings[530], aMoonPhaseNames[pDayMoonPhase[pParty->uDaysPlayed]]); // "Moon"
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
287 a1.DrawText(pBookFont, 70, 8 * LOBYTE(pBookFont->uFontHeight) + 31, ui_book_calendar_moon_color, pTmpBuf, 0, 0, 0);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
288
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
289 v6 = pMapStats->GetMapInfo(pCurrentMapName);
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
290 if ( v6 )
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
291 v3 = pMapStats->pInfos[v6].pName;
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
292 else
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
293 v3 = "Unknown";
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
294 sprintf(pTmpBuf, "%s\t100:\t110%s", pGlobalTXT_LocalizationStrings[531], v3); // "Location"
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
295 a1.DrawText(pBookFont, 70, 10 * LOBYTE(pBookFont->uFontHeight) + 25, ui_book_calendar_location_color, pTmpBuf, 0, 0, 0);
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
296 }
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
297
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
298
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
299
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
300 //----- (0041192C) --------------------------------------------------------
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
301 void InitializeBookTextures()
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
302 {
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
303 //signed int v0; // ebp@3
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
304 //Texture **v1; // ebx@3
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
305
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
306 pAudioPlayer->StopChannels(-1, -1);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
307
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
308 ++pIcons_LOD->uTexturePacksCount;
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
309 if ( !pIcons_LOD->uNumPrevLoadedFiles )
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
310 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
311
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
312 pAudioPlayer->PlaySound(SOUND_OpenBook, 0, 0, -1, 0, 0, 0, 0);
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
313 pSpellBookPagesTextr_9 = pIcons_LOD->LoadTexturePtr("book", TEXTURE_16BIT_PALETTE);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
314 pTexture_pagemask = pIcons_LOD->LoadTexturePtr("pagemask", TEXTURE_16BIT_PALETTE);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
315 pTexture_506448 = pIcons_LOD->LoadTexturePtr("ib-m5-u", TEXTURE_16BIT_PALETTE);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
316 ptr_506440 = pIcons_LOD->LoadTexturePtr("ib-m5-d", TEXTURE_16BIT_PALETTE);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
317 pTexture_50643C = pIcons_LOD->LoadTexturePtr("ib-m6-u",TEXTURE_16BIT_PALETTE);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
318 //v0 = 1;
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
319
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
320 static const char *texNames[9] = // 004E24EC
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
321 {
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
322 "SBFB00", "SBAB00", "SBWB00", "SBEB00",
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
323 "SBSB00", "SBMB00", "SBBB00", "SBLB00",
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
324 };
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
325
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
326 pTexture_506444 = pIcons_LOD->LoadTexturePtr("ib-m6-d",TEXTURE_16BIT_PALETTE);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
327 for (uint i = 0; i < 8; ++i)
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
328 {
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
329 pSpellBookPagesTextr[i] = pIcons_LOD->LoadTexturePtr(texNames[i], TEXTURE_16BIT_PALETTE);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
330
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
331 sprintf(pTmpBuf, "tab%da", i+1);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
332 pTextures_tabs[i][0] = pIcons_LOD->LoadTexturePtr(pTmpBuf, TEXTURE_16BIT_PALETTE);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
333 sprintf(pTmpBuf, "tab%db", i+1);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
334 pTextures_tabs[i][1] = pIcons_LOD->LoadTexturePtr(pTmpBuf, TEXTURE_16BIT_PALETTE);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
335 }
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
336 }
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
337
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
338
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
339
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
340 //----- (00411AAA) --------------------------------------------------------
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
341 void InitializeBookFonts()
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
342 {
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
343 pAudioPlayer->StopChannels(-1, -1);
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
344
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
345 ++pIcons_LOD->uTexturePacksCount;
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
346 if ( !pIcons_LOD->uNumPrevLoadedFiles )
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
347 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
348
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
349 pAudioPlayer->PlaySound(SOUND_OpenBook, 0, 0, -1, 0, 0, 0, 0);
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
350 pTexture_mapbordr = pIcons_LOD->LoadTexturePtr("mapbordr", TEXTURE_16BIT_PALETTE);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
351 pBookFont = LoadFont("book.fnt", "FONTPAL", NULL);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
352 pBook2Font = LoadFont("book2.fnt", "FONTPAL", NULL);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
353 pAutonoteFont = LoadFont("autonote.fnt", "FONTPAL", NULL);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
354 pSpellFont = LoadFont("spell.fnt", "FONTPAL", NULL);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
355 }
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
356
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
357
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
358
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
359 //----- (00411300) --------------------------------------------------------
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
360 void LoadSpellbook(unsigned int spell_school)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
361 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
362 //unsigned int v1; // esi@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
363 Player *pPlayer; // ecx@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
364 char v3; // al@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
365 //int v4; // edi@5
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
366 //Texture *result; // eax@6
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
367 //unsigned char *v6; // edi@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
368 //unsigned int v7; // eax@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
369 //unsigned __int8 v8; // sf@8
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
370 //unsigned __int8 v9; // of@8
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
371 char pContainer[20]; // [sp+Ch] [bp-1Ch]@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
372 //Texture *v11; // [sp+20h] [bp-8h]@5
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
373 //int v12; // [sp+24h] [bp-4h]@5
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
374
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
375 byte_506550 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
376 //v1 = uID;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
377 pPlayer = pPlayers[uActiveCharacter];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
378 v3 = pPlayer->uQuickSpell;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
379 if ( v3 && (unsigned __int8)v3 / 11 == spell_school )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
380 quick_spell_at_page = (unsigned __int8)v3 - 11 * spell_school;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
381 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
382 quick_spell_at_page = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
383
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
384 for (uint i = 1; i < 12; ++i)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
385 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
386 if (pPlayer->spellbook.pChapters[spell_school].bIsSpellAvailable[i - 1])
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
387 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
388 sprintf(pContainer, "SB%sS%02d", spellbook_texture_filename_suffices[spell_school], pSpellbookSpellIndices[spell_school][i]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
389 dword_506408[i] = pIcons_LOD->LoadTexturePtr(pContainer, TEXTURE_16BIT_PALETTE);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
390
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
391 sprintf(pContainer, "SB%sC%02d", spellbook_texture_filename_suffices[spell_school], pSpellbookSpellIndices[spell_school][i]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
392 dword_5063D8[i] = pIcons_LOD->LoadTexturePtr(pContainer, TEXTURE_16BIT_PALETTE);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
393 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
394 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
395 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
396
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
397 //----- (0041140B) --------------------------------------------------------
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
398 void sub_41140B()
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
399 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
400 signed int v0; // esi@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
401 GUIButton *v1; // eax@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
402 GUIButton *v2; // esi@4
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
403
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
404 v0 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
405 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
406 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
407 dword_5063D8[11+v0]->Release();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
408 dword_506408[11+v0]->Release();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
409 --v0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
410 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
411 while ( v0 >= -11 );
1006
e865f349aa41 ui cleanup
Gloval
parents: 1004
diff changeset
412 pIcons_LOD->SyncLoadedFilesCount();
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
413 v1 = pGUIWindow_CurrentMenu->pControlsHead;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
414 if ( v1 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
415 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
416 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
417 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
418 v2 = v1->pNext;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
419 pAllocator->FreeChunk(v1);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
420 v1 = v2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
421 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
422 while ( v2 );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
423 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
424 pGUIWindow_CurrentMenu->pControlsHead = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
425 pGUIWindow_CurrentMenu->pControlsTail = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
426 pGUIWindow_CurrentMenu->uNumControls = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
427 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
428
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
429 //----- (00411473) --------------------------------------------------------
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
430 void sub_411473()
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
431 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
432 pTexture_pagemask->Release();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
433 pTexture_506448->Release();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
434 pTexture_50643C->Release();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
435 for (uint i = 0; i < 8; ++i)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
436 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
437 pSpellBookPagesTextr[i]->Release();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
438 pTextures_tabs[i][0]->Release();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
439 pTextures_tabs[i][1]->Release();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
440 }
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
441 pAudioPlayer->PlaySound(SOUND_CloseBook, 0, 0, -1, 0, 0, 0, 0);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
442 pIcons_LOD->_4114F2();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
443 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
444
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
445
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
446 //----- (00411597) --------------------------------------------------------
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
447 void OnCloseSpellBook()
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
448 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
449 pAllocator->FreeChunk(pSpellFont);
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
450 pSpellFont = nullptr;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
451 pAllocator->FreeChunk(pBookFont);
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
452 pBookFont = nullptr;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
453 pAllocator->FreeChunk(pBook2Font);
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
454 pBook2Font = nullptr;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
455 pAllocator->FreeChunk(pAutonoteFont);
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
456 pAutonoteFont = nullptr;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
457 pTexture_mapbordr->Release();
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
458 pAudioPlayer->PlaySound(SOUND_CloseBook, 0, 0, -1, 0, 0, 0, 0);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
459 pIcons_LOD->_4114F2();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
460 dword_506364 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
461 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
462
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
463
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
464
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
465
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
466
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
467
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
468
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
469 //----- (00412E85) --------------------------------------------------------
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
470 void BookUI_Journal_Draw()
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
471 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
472 unsigned int v0; // eax@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
473 unsigned int v1; // eax@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
474 int v2; // eax@10
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
475 const char *v3; // eax@10
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
476 signed int v4; // ecx@12
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
477 int v5; // ecx@14
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
478 int v6; // eax@21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
479 int v7; // esi@21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
480 char *v8; // eax@21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
481 int v9; // eax@22
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
482 unsigned int v11; // [sp-8h] [bp-64h]@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
483 unsigned int v12; // [sp-8h] [bp-64h]@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
484 Texture *v13; // [sp-4h] [bp-60h]@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
485 Texture *v14; // [sp-4h] [bp-60h]@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
486 GUIWindow a1; // [sp+8h] [bp-54h]@10
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
487
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
488 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pSpellBookPagesTextr_11);
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
489 if ( BtnUp_flag || !dword_506528 )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
490 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
491 v13 = pTex_tab_an_6a__zoom_off;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
492 v11 = pViewport->uViewportTL_Y + 2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
493 v0 = pViewport->uViewportTL_X + 407;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
494 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
495 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
496 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
497 v13 = pTex_tab_an_6b__zoom_on;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
498 v11 = pViewport->uViewportTL_Y + 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
499 v0 = pViewport->uViewportTL_X + 398;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
500 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
501 pRenderer->DrawTextureTransparent(v0, v11, v13);
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
502
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
503 if ( BtnDown_flag || dword_506528 + num_achieved_awards >= num_achieved_awards_2 )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
504 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
505 v14 = pTex_tab_an_7a__zoot_off;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
506 v12 = pViewport->uViewportTL_Y + 38;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
507 v1 = pViewport->uViewportTL_X + 407;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
508 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
509 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
510 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
511 v14 = pTex_tab_an_7b__zoot_on;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
512 v12 = pViewport->uViewportTL_Y + 38;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
513 v1 = pViewport->uViewportTL_X + 398;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
514 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
515 pRenderer->DrawTextureTransparent(v1, v12, v14);
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
516
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
517 if ( !byte_5C6D50[dword_506528] )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
518 {
949
Nomad
parents: 948
diff changeset
519 v2 = achieved_awards[dword_506528];
819
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
520 a1.uFrameWidth = game_viewport_width;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
521 a1.uFrameX = game_viewport_x;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
522 a1.uFrameY = game_viewport_y;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
523 a1.uFrameHeight = game_viewport_height;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
524 v3 = (const char *)pStorylineText->StoreLine[v2].pPageTitle;//field_4[];
819
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
525 a1.uFrameZ = game_viewport_z;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
526 a1.uFrameW = game_viewport_w;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
527 if ( v3 )
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
528 a1.DrawTitleText(pBook2Font, 0, 22, ui_book_journal_title_color, v3, 3);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
529 }
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
530
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
531 a1.uFrameX = 48;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
532 a1.uFrameY = 70;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
533 a1.uFrameWidth = 360;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
534 a1.uFrameHeight = 264;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
535 v4 = LOBYTE(pAutonoteFont->uFontHeight) - 3;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
536 a1.uFrameZ = 407;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
537 a1.uFrameHeight = v4 * 264 / v4;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
538 a1.uFrameW = a1.uFrameHeight + 69;
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
539 if ( BtnDown_flag && dword_506528 + num_achieved_awards < num_achieved_awards_2 )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
540 {
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
541 pAudioPlayer->PlaySound(SOUND_OpenBook, 0, 0, -1, 0, 0, 0, 0);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
542 v5 = dword_50651C++;
949
Nomad
parents: 948
diff changeset
543 dword_506528 += num_achieved_awards;
Nomad
parents: 948
diff changeset
544 byte_506130[v5] = num_achieved_awards;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
545 }
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
546 if ( BtnUp_flag && dword_50651C )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
547 {
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
548 pAudioPlayer->PlaySound(SOUND_OpenBook, 0, 0, -1, 0, 0, 0, 0);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
549 --dword_50651C;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
550 dword_506528 -= (unsigned __int8)byte_506130[dword_50651C];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
551 }
949
Nomad
parents: 948
diff changeset
552 if ( !num_achieved_awards || dword_506528 < 1 )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
553 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
554 dword_506528 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
555 dword_50651C = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
556 }
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
557 BtnDown_flag = 0;
949
Nomad
parents: 948
diff changeset
558 v6 = achieved_awards[dword_506528];
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
559 BtnUp_flag = 0;
949
Nomad
parents: 948
diff changeset
560 num_achieved_awards = 0;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
561 //v7 = *pStorylineText->StoreLine[v6].pText;//*(&pStorylineText->field_0 + 3 * v6);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
562 v7 = (int)pStorylineText->StoreLine[v6].pText;//*(&pStorylineText->field_0 + 3 * v6);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
563 v8 = BuilDialogueString(
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
564 pStorylineText->StoreLine[v6].pText,
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
565 uActiveCharacter - 1,
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
566 0,
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
567 0,
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
568 0,
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
569 (__int64 *)&pParty->field_3C._s_times[ v6 + 21]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
570 if ( v7 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
571 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
572 v9 = pAutonoteFont->_44C6C2(v8, &a1, 1u, (unsigned __int8)byte_5C6D50[dword_506528]);
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
573 a1.DrawText(pAutonoteFont, 1, 0, ui_book_journal_text_color, (const char *)v9, 0, a1.uFrameY + a1.uFrameHeight, ui_book_journal_text_shadow);
949
Nomad
parents: 948
diff changeset
574 ++num_achieved_awards;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
575 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
576 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
577
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
578
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
579 //----- (00413126) --------------------------------------------------------
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
580 void BookUI_Questbook_Draw()
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
581 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
582 unsigned int v0; // eax@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
583 unsigned int v1; // eax@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
584 int v2; // ecx@11
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
585 int v3; // ebx@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
586 int v4; // eax@19
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
587 const char *v5; // edi@19
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
588 int v6; // eax@19
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
589 unsigned int v7; // edi@19
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
590 unsigned int v8; // [sp-8h] [bp-68h]@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
591 unsigned int v9; // [sp-8h] [bp-68h]@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
592 Texture *v10; // [sp-4h] [bp-64h]@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
593 Texture *v11; // [sp-4h] [bp-64h]@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
594 GUIWindow a1; // [sp+Ch] [bp-54h]@9
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
595
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
596 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pTexture_CurrentBook);
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
597 if ( BtnUp_flag || !dword_506528 )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
598 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
599 v10 = pTex_tab_an_6a__zoom_off;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
600 v8 = pViewport->uViewportTL_Y + 2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
601 v0 = pViewport->uViewportTL_X + 407;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
602 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
603 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
604 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
605 v10 = pTex_tab_an_6b__zoom_on;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
606 v8 = pViewport->uViewportTL_Y + 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
607 v0 = pViewport->uViewportTL_X + 398;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
608 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
609 pRenderer->DrawTextureTransparent(v0, v8, v10);
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
610 if ( BtnDown_flag || dword_506528 + num_achieved_awards >= num_achieved_awards_2 )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
611 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
612 v11 = pTex_tab_an_7a__zoot_off;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
613 v9 = pViewport->uViewportTL_Y + 38;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
614 v1 = pViewport->uViewportTL_X + 407;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
615 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
616 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
617 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
618 v11 = pTex_tab_an_7b__zoot_on;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
619 v9 = pViewport->uViewportTL_Y + 38;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
620 v1 = pViewport->uViewportTL_X + 398;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
621 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
622 pRenderer->DrawTextureTransparent(v1, v9, v11);
819
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
623 a1.uFrameWidth = game_viewport_width;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
624 a1.uFrameHeight = game_viewport_height;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
625 a1.uFrameX = game_viewport_x;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
626 a1.uFrameY = game_viewport_y;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
627 a1.uFrameZ = game_viewport_z;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
628 a1.uFrameW = game_viewport_w;
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
629 a1.DrawTitleText(pBook2Font, 0, 22, ui_book_quests_title_color, pGlobalTXT_LocalizationStrings[174], 3); //"Current Quests"
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
630
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
631 a1.uFrameX = 48;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
632 a1.uFrameY = 70;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
633 a1.uFrameWidth = 360;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
634 a1.uFrameHeight = 264;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
635 a1.uFrameZ = 407;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
636 a1.uFrameW = 333;
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
637 if ( BtnDown_flag && dword_506528 + num_achieved_awards < num_achieved_awards_2 )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
638 {
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
639 pAudioPlayer->PlaySound(SOUND_OpenBook, 0, 0, -1, 0, 0, 0, 0);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
640 v2 = dword_50651C++;
949
Nomad
parents: 948
diff changeset
641 dword_506528 += num_achieved_awards;
Nomad
parents: 948
diff changeset
642 byte_506130[v2] = num_achieved_awards;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
643 }
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
644 if ( BtnUp_flag && dword_50651C )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
645 {
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
646 pAudioPlayer->PlaySound(SOUND_OpenBook, 0, 0, -1, 0, 0, 0, 0);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
647 --dword_50651C;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
648 dword_506528 -= (unsigned __int8)byte_506130[dword_50651C];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
649 }
949
Nomad
parents: 948
diff changeset
650 if ( !num_achieved_awards || (v3 = dword_506528, dword_506528 < 1) )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
651 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
652 v3 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
653 dword_50651C = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
654 dword_506528 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
655 }
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
656 BtnDown_flag = 0;
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
657 BtnUp_flag = 0;
949
Nomad
parents: 948
diff changeset
658 num_achieved_awards = 0;
Nomad
parents: 948
diff changeset
659 while ( v3 < num_achieved_awards_2 )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
660 {
949
Nomad
parents: 948
diff changeset
661 v4 = achieved_awards[v3];
Nomad
parents: 948
diff changeset
662 ++num_achieved_awards;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
663 v5 = pQuestTable[v4-1];//(&dword_722F10)[4 * v4];
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
664 a1.DrawText(pAutonoteFont, 1, 0, ui_book_quests_text_color, pQuestTable[v4-1], 0, 0, 0);//(&dword_722F10)[4 * v4], 0, 0, 0);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
665 v6 = pAutonoteFont->CalcTextHeight(v5, &a1, 1, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
666 v7 = a1.uFrameY + v6;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
667 if ( (signed int)(a1.uFrameY + v6) > (signed int)a1.uFrameHeight )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
668 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
669 pRenderer->DrawTextureTransparent(100, v7 + 12, pSpellBookPagesTextr_10);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
670 ++v3;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
671 a1.uFrameY = v7 + 24;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
672 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
673 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
674
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
675
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
676 //----- (0041338E) --------------------------------------------------------
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
677 void BookUI_Autonotes_Draw()
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
678 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
679 unsigned int v0; // eax@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
680 unsigned int v1; // eax@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
681 signed int v2; // ebp@11
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
682 unsigned int v3; // eax@18
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
683 unsigned int v4; // eax@24
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
684 unsigned int v5; // eax@30
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
685 unsigned int v6; // eax@36
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
686 unsigned int v7; // eax@42
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
687 signed int v8; // ebp@47
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
688 int v9; // eax@52
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
689 int v10; // eax@56
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
690 int v11; // edx@57
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
691 int v12; // ebp@64
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
692 int v13; // eax@65
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
693 const char *v14; // edi@65
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
694 int v15; // eax@65
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
695 unsigned int v16; // edi@65
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
696 unsigned int v17; // [sp-8h] [bp-70h]@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
697 unsigned int v18; // [sp-8h] [bp-70h]@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
698 unsigned int v19; // [sp-8h] [bp-70h]@18
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
699 unsigned int v20; // [sp-8h] [bp-70h]@24
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
700 unsigned int v21; // [sp-8h] [bp-70h]@30
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
701 unsigned int v22; // [sp-8h] [bp-70h]@36
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
702 unsigned int v23; // [sp-8h] [bp-70h]@42
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
703 Texture *v24; // [sp-4h] [bp-6Ch]@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
704 Texture *v25; // [sp-4h] [bp-6Ch]@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
705 Texture *v26; // [sp-4h] [bp-6Ch]@18
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
706 Texture *v27; // [sp-4h] [bp-6Ch]@24
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
707 Texture *v28; // [sp-4h] [bp-6Ch]@30
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
708 Texture *v29; // [sp-4h] [bp-6Ch]@36
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
709 Texture *v30; // [sp-4h] [bp-6Ch]@42
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
710 signed __int16 v31; // [sp+10h] [bp-58h]@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
711 char *v32; // [sp+10h] [bp-58h]@49
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
712 GUIWindow a1; // [sp+14h] [bp-54h]@46
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
713
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
714 v31 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
715 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pTexture_AutonotesBook);
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
716 if ( BtnUp_flag || !dword_506528 )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
717 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
718 v24 = pTex_tab_an_6a__zoom_off;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
719 v17 = pViewport->uViewportTL_Y + 2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
720 v0 = pViewport->uViewportTL_X + 407;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
721 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
722 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
723 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
724 v24 = pTex_tab_an_6b__zoom_on;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
725 v17 = pViewport->uViewportTL_Y + 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
726 v0 = pViewport->uViewportTL_X + 398;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
727 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
728 pRenderer->DrawTextureTransparent(v0, v17, v24);
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
729 if ( BtnDown_flag || dword_506528 + num_achieved_awards >= num_achieved_awards_2 )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
730 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
731 v25 = pTex_tab_an_7a__zoot_off;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
732 v18 = pViewport->uViewportTL_Y + 38;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
733 v1 = pViewport->uViewportTL_X + 407;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
734 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
735 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
736 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
737 v25 = pTex_tab_an_7b__zoot_on;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
738 v18 = pViewport->uViewportTL_Y + 38;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
739 v1 = pViewport->uViewportTL_X + 398;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
740 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
741 pRenderer->DrawTextureTransparent(v1, v18, v25);
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
742 if ( !Book_PageBtn3_flag )//Potions_page_flag
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
743 {
981
a6ef7125f6e4 Autonotes & GameState
Nomad
parents: 973
diff changeset
744 if (_506568_autonote_type != AUTONOTE_POTION_RECEPIE)
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
745 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
746 pRenderer->DrawTextureTransparent(
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
747 pViewport->uViewportTL_X + 408,
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
748 pViewport->uViewportTL_Y + 113,
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
749 pTexture_506390);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
750 v2 = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
751 goto LABEL_16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
752 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
753 goto LABEL_14;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
754 }
981
a6ef7125f6e4 Autonotes & GameState
Nomad
parents: 973
diff changeset
755 if (_506568_autonote_type == AUTONOTE_POTION_RECEPIE)
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
756 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
757 LABEL_14:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
758 v2 = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
759 goto LABEL_15;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
760 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
761 v2 = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
762 v31 = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
763 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
764 LABEL_15:
981
a6ef7125f6e4 Autonotes & GameState
Nomad
parents: 973
diff changeset
765 _506568_autonote_type = AUTONOTE_POTION_RECEPIE;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
766 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 113, pTexture_506394);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
767 LABEL_16:
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
768 if ( Book_PageBtn4_flag )//Fontains_page_flag
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
769 {
981
a6ef7125f6e4 Autonotes & GameState
Nomad
parents: 973
diff changeset
770 if ( _506568_autonote_type != v2 )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
771 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
772 v31 = v2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
773 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
774 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
775 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
776 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
777 {
981
a6ef7125f6e4 Autonotes & GameState
Nomad
parents: 973
diff changeset
778 if ( _506568_autonote_type != v2 )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
779 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
780 v26 = pTexture_506388;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
781 v19 = pViewport->uViewportTL_Y + 150;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
782 v3 = pViewport->uViewportTL_X + 408;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
783 goto LABEL_22;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
784 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
785 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
786 v26 = pTexture_50638C;
981
a6ef7125f6e4 Autonotes & GameState
Nomad
parents: 973
diff changeset
787 _506568_autonote_type = v2;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
788 v19 = pViewport->uViewportTL_Y + 150;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
789 v3 = pViewport->uViewportTL_X + 399;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
790 LABEL_22:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
791 pRenderer->DrawTextureTransparent(v3, v19, v26);
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
792 if ( Book_PageBtn5_flag )//Autonotes_Obelisks_page_flag
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
793 {
981
a6ef7125f6e4 Autonotes & GameState
Nomad
parents: 973
diff changeset
794 if ( _506568_autonote_type != AUTONOTE_OBELISK)
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
795 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
796 v31 = v2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
797 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
798 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
799 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
800 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
801 {
981
a6ef7125f6e4 Autonotes & GameState
Nomad
parents: 973
diff changeset
802 if ( _506568_autonote_type != AUTONOTE_OBELISK)
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
803 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
804 v27 = pTexture_506380;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
805 v20 = pViewport->uViewportTL_Y + 188;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
806 v4 = pViewport->uViewportTL_X + 408;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
807 goto LABEL_28;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
808 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
809 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
810 v27 = pTexture_506384;
981
a6ef7125f6e4 Autonotes & GameState
Nomad
parents: 973
diff changeset
811 _506568_autonote_type = AUTONOTE_OBELISK;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
812 v20 = pViewport->uViewportTL_Y + 188;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
813 v4 = pViewport->uViewportTL_X + 397;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
814 LABEL_28:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
815 pRenderer->DrawTextureTransparent(v4, v20, v27);
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
816 if ( Book_PageBtn6_flag )//Autonotes_Seer_page_flag
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
817 {
981
a6ef7125f6e4 Autonotes & GameState
Nomad
parents: 973
diff changeset
818 if ( _506568_autonote_type != AUTONOTE_SEER)
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
819 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
820 v31 = v2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
821 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
822 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
823 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
824 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
825 {
981
a6ef7125f6e4 Autonotes & GameState
Nomad
parents: 973
diff changeset
826 if ( _506568_autonote_type != AUTONOTE_SEER)
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
827 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
828 v28 = pTexture_506378;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
829 v21 = pViewport->uViewportTL_Y + 226;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
830 v5 = pViewport->uViewportTL_X + 408;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
831 goto LABEL_34;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
832 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
833 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
834 v28 = pTexture_50637C;
981
a6ef7125f6e4 Autonotes & GameState
Nomad
parents: 973
diff changeset
835 _506568_autonote_type = AUTONOTE_SEER;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
836 v21 = pViewport->uViewportTL_Y + 226;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
837 v5 = pViewport->uViewportTL_X + 397;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
838 LABEL_34:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
839 pRenderer->DrawTextureTransparent(v5, v21, v28);
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
840 if ( Autonotes_Misc_page_flag )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
841 {
981
a6ef7125f6e4 Autonotes & GameState
Nomad
parents: 973
diff changeset
842 if ( _506568_autonote_type != AUTONOTE_MISC)
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
843 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
844 v31 = v2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
845 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
846 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
847 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
848 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
849 {
981
a6ef7125f6e4 Autonotes & GameState
Nomad
parents: 973
diff changeset
850 if ( _506568_autonote_type != AUTONOTE_MISC)
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
851 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
852 v29 = pTexture_506370;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
853 v22 = pViewport->uViewportTL_Y + 263;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
854 v6 = pViewport->uViewportTL_X + 408;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
855 goto LABEL_40;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
856 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
857 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
858 v29 = pTexture_506374;
981
a6ef7125f6e4 Autonotes & GameState
Nomad
parents: 973
diff changeset
859 _506568_autonote_type = AUTONOTE_MISC;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
860 v22 = pViewport->uViewportTL_Y + 264;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
861 v6 = pViewport->uViewportTL_X + 397;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
862 LABEL_40:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
863 pRenderer->DrawTextureTransparent(v6, v22, v29);
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
864 if ( Autonotes_Instructors_page_flag )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
865 {
981
a6ef7125f6e4 Autonotes & GameState
Nomad
parents: 973
diff changeset
866 if ( _506568_autonote_type != AUTONOTE_TEACHER)
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
867 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
868 v31 = v2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
869 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
870 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
871 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
872 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
873 {
981
a6ef7125f6e4 Autonotes & GameState
Nomad
parents: 973
diff changeset
874 if ( _506568_autonote_type != AUTONOTE_TEACHER)
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
875 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
876 v30 = pTexture_506368;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
877 v23 = pViewport->uViewportTL_Y + 302;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
878 v7 = pViewport->uViewportTL_X + 408;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
879 goto LABEL_46;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
880 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
881 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
882 v30 = pTexture_50636C;
981
a6ef7125f6e4 Autonotes & GameState
Nomad
parents: 973
diff changeset
883 _506568_autonote_type = AUTONOTE_TEACHER;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
884 v23 = pViewport->uViewportTL_Y + 302;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
885 v7 = pViewport->uViewportTL_X + 397;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
886 LABEL_46:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
887 pRenderer->DrawTextureTransparent(v7, v23, v30);
819
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
888 a1.uFrameWidth = game_viewport_width;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
889 a1.uFrameHeight = game_viewport_height;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
890 a1.uFrameX = game_viewport_x;
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
891 a1.uFrameY = game_viewport_y;
819
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
892 a1.uFrameZ = game_viewport_z;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
893 a1.uFrameW = game_viewport_w;
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
894 a1.DrawTitleText(pBook2Font, 0, 22, ui_book_autonotes_title_color, pGlobalTXT_LocalizationStrings[154], 3); // "Auto notes"
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
895
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
896 a1.uFrameX = 48;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
897 a1.uFrameY = 70;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
898 a1.uFrameWidth = 360;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
899 a1.uFrameHeight = 264;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
900 a1.uFrameZ = 407;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
901 a1.uFrameW = 333;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
902 if ( v31 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
903 {
949
Nomad
parents: 948
diff changeset
904 num_achieved_awards_2 = 0;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
905 dword_506528 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
906 dword_50651C = 0;
949
Nomad
parents: 948
diff changeset
907 num_achieved_awards = 0;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
908 v8 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
909 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
910 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
911 //if ( dword_72371C[2 * v8] == dword_506568 )
981
a6ef7125f6e4 Autonotes & GameState
Nomad
parents: 973
diff changeset
912 if ( pAutonoteTxt[v8-1].eType == _506568_autonote_type )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
913 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
914 //v32 = (&dword_723718_autonote_related)[8 * (signed __int16)v8];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
915 v32 = (char *)pAutonoteTxt[v8-1].pText;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
916 if ( (short)v8 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
917 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
918 if ( (unsigned __int16)_449B57_test_bit(pParty->_autonote_bits, v8) && v32 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
919 {
949
Nomad
parents: 948
diff changeset
920 v9 = num_achieved_awards++;
Nomad
parents: 948
diff changeset
921 achieved_awards[v9] = (AwardType)v8;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
922 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
923 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
924 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
925 ++v8;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
926 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
927 while ( v8 < 196 );
949
Nomad
parents: 948
diff changeset
928 num_achieved_awards_2 = num_achieved_awards;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
929 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
930 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
931 {
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
932 if ( BtnDown_flag )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
933 {
949
Nomad
parents: 948
diff changeset
934 v10 = num_achieved_awards + dword_506528;
Nomad
parents: 948
diff changeset
935 if ( num_achieved_awards + dword_506528 < num_achieved_awards_2 )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
936 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
937 v11 = dword_50651C++;
949
Nomad
parents: 948
diff changeset
938 byte_506130[v11] = num_achieved_awards;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
939 dword_506528 = v10;
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
940 pAudioPlayer->PlaySound(SOUND_OpenBook, 0, 0, -1, 0, 0, 0, 0);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
941 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
942 }
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
943 if ( BtnUp_flag && dword_50651C )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
944 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
945 --dword_50651C;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
946 dword_506528 -= (unsigned __int8)byte_506130[dword_50651C];
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
947 pAudioPlayer->PlaySound(SOUND_OpenBook, 0, 0, -1, 0, 0, 0, 0);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
948 }
949
Nomad
parents: 948
diff changeset
949 if ( !num_achieved_awards || dword_506528 < 1 )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
950 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
951 dword_506528 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
952 dword_50651C = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
953 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
954 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
955 v12 = dword_506528;
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
956 Autonotes_Instructors_page_flag = 0;
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
957 BtnDown_flag = 0;
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
958 BtnUp_flag = 0;
949
Nomad
parents: 948
diff changeset
959 num_achieved_awards = 0;
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
960 Autonotes_Misc_page_flag = 0;
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
961 Book_PageBtn6_flag = 0;//Autonotes_Seer_page_flag
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
962 Book_PageBtn5_flag = 0;//Autonotes_Obelisks_page_flag
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
963 Book_PageBtn4_flag = 0;//Fontains_page_flag
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
964 Book_PageBtn3_flag = 0;//Potions_page_flag
949
Nomad
parents: 948
diff changeset
965 while ( v12 < num_achieved_awards_2 )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
966 {
949
Nomad
parents: 948
diff changeset
967 v13 = achieved_awards[v12];
Nomad
parents: 948
diff changeset
968 ++num_achieved_awards;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
969 //v14 = (&dword_723718_autonote_related)[8 * v13];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
970 v14 = pAutonoteTxt[v13-1].pText;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
971 //a1.DrawText(pAutonoteFont, 1, 0, 0, (&dword_723718_autonote_related)[8 * v13], 0, 0, 0);
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
972 a1.DrawText(pAutonoteFont, 1, 0, ui_book_autonotes_text_color, pAutonoteTxt[v13-1].pText, 0, 0, 0);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
973 v15 = pAutonoteFont->CalcTextHeight(v14, &a1, 1, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
974 v16 = a1.uFrameY + v15;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
975 if ( (signed int)(a1.uFrameY + v15) > (signed int)a1.uFrameHeight )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
976 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
977 pRenderer->DrawTextureTransparent(0x64u, v16 + 12, pSpellBookPagesTextr_10);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
978 ++v12;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
979 a1.uFrameY = v16 + 24;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
980 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
981 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
982
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
983
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
984 //----- (00413980) --------------------------------------------------------
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
985 void BookUI_Map_Draw()
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
986 {
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
987 int v6; // eax@31
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
988 unsigned int map_id; // eax@35
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
989 Texture *buttnTxtr; // [sp-4h] [bp-DCh]@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
990 char party_coord[120]; // [sp+Ch] [bp-CCh]@37
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
991 GUIWindow map_window; // [sp+84h] [bp-54h]@35
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
992 unsigned int textrX, textrY;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
993
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
994 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pSpellBookPagesTextr_12);
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
995 if ( BtnUp_flag || viewparams->field_2C / 128 >= 12 )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
996 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
997 buttnTxtr = pTex_tab_an_6a__zoom_off;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
998 textrY = pViewport->uViewportTL_Y + 2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
999 textrX = pViewport->uViewportTL_X + 408;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1000 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1001 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1002 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1003 buttnTxtr = pTex_tab_an_6b__zoom_on;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1004 textrY = pViewport->uViewportTL_Y + 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1005 textrX = pViewport->uViewportTL_X + 398;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1006 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1007 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
1008 if ( BtnDown_flag || viewparams->field_2C / 128 <= 3 )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1009 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1010 buttnTxtr = pTex_tab_an_7a__zoot_off;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1011 textrY = pViewport->uViewportTL_Y + 38;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1012 textrX = pViewport->uViewportTL_X + 408;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1013 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1014 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1015 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1016 buttnTxtr = pTex_tab_an_7b__zoot_on;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1017 textrY = pViewport->uViewportTL_Y + 38;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1018 textrX = pViewport->uViewportTL_X + 398;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1019 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1020 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
1021 if ( Book_PageBtn3_flag )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1022 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1023 buttnTxtr = pTexture_506390;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1024 textrY = pViewport->uViewportTL_Y + 113;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1025 textrX = pViewport->uViewportTL_X + 408;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1026 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1027 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1028 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1029 buttnTxtr = pTexture_506394;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1030 textrY = pViewport->uViewportTL_Y + 113;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1031 textrX = pViewport->uViewportTL_X + 398;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1032 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1033 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
1034 if ( Book_PageBtn4_flag )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1035 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1036 buttnTxtr = pTexture_506388;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1037 textrY = pViewport->uViewportTL_X + 150;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1038 textrX = pViewport->uViewportTL_Y + 408;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1039 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1040 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1041 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1042 buttnTxtr = pTexture_50638C;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1043 textrY = pViewport->uViewportTL_X + 150;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1044 textrX = pViewport->uViewportTL_Y + 399;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1045 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1046 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
1047 if ( Book_PageBtn5_flag )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1048 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1049 buttnTxtr = pTexture_506380;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1050 textrY = pViewport->uViewportTL_Y + 188;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1051 textrX = pViewport->uViewportTL_X + 408;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1052 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1053 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1054 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1055 buttnTxtr = pTexture_506384;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1056 textrY = pViewport->uViewportTL_Y + 188;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1057 textrX = pViewport->uViewportTL_X + 397;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1058 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1059 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
1060 if ( Book_PageBtn6_flag )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1061 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1062 buttnTxtr = pTexture_506378;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1063 textrY = pViewport->uViewportTL_Y + 226;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1064 textrX = pViewport->uViewportTL_X + 408;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1065 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1066 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1067 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1068 buttnTxtr = pTexture_50637C;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1069 textrY = pViewport->uViewportTL_Y + 226;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1070 textrX = pViewport->uViewportTL_X + 397;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1071 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1072 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
1073 if ( BtnDown_flag )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1074 viewparams->CenterOnParty2();
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
1075 if ( BtnUp_flag )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1076 viewparams->CenterOnParty();
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
1077 if ( Book_PageBtn3_flag )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1078 viewparams->_443219();
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
1079 if ( Book_PageBtn4_flag )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1080 viewparams->_443231();
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
1081 if ( Book_PageBtn5_flag )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1082 viewparams->_44323D();
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
1083 if ( Book_PageBtn6_flag )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1084 viewparams->_443225();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1085
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
1086 if ( BtnUp_flag | BtnDown_flag | Book_PageBtn3_flag | Book_PageBtn4_flag | Book_PageBtn5_flag | Book_PageBtn6_flag )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1087 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
990
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
1088 BtnUp_flag = 0;
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
1089 BtnDown_flag = 0;
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
1090 Book_PageBtn6_flag = 0;
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
1091 Book_PageBtn5_flag = 0;
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
1092 Book_PageBtn4_flag = 0;
087a9af8e0ec MessageParam
Ritor1
parents: 981
diff changeset
1093 Book_PageBtn3_flag = 0;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1094 DrawBook_Map_sub(97, 49, 361, 313, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1095 pRenderer->DrawTextureTransparent(75, 22, pTexture_mapbordr);
819
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
1096 map_window.uFrameWidth = game_viewport_width;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
1097 map_window.uFrameHeight = game_viewport_height;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
1098 map_window.uFrameX = game_viewport_x;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
1099 map_window.uFrameY = game_viewport_y;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
1100 map_window.uFrameZ = game_viewport_z;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
1101 map_window.uFrameW = game_viewport_w;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1102 map_id = pMapStats->GetMapInfo(pCurrentMapName);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1103 if ( map_id )
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
1104 map_window.DrawTitleText(pBook2Font, -14, 12, ui_book_map_title_color, pMapStats->pInfos[map_id].pName, 3);
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
1105
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1106 map_window.uFrameX = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1107 sprintf(party_coord, pGlobalTXT_LocalizationStrings[659], pParty->vPosition.x, pParty->vPosition.y); //"x: %d y: %d"
995
5876a9cafa3e Various UIs, autonotes title fixed
Nomad
parents: 990
diff changeset
1108 map_window.DrawTitleText(pFontComic, 0, 320, ui_book_map_coordinates_color, party_coord, 0);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1109 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1110
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1111 //----- (00442955) --------------------------------------------------------
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1112 void DrawBook_Map_sub( unsigned int tl_x, unsigned int tl_y, unsigned int br_x, int br_y, int _48074 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1113 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1114 int v5; // ebx@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1115 int v6; // edi@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1116 BLVMapOutlines *v7; // eax@8
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1117 unsigned __int8 v8; // zf@8
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1118 unsigned __int8 v9; // sf@8
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1119 int v10; // esi@10
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1120 unsigned int v11; // edx@11
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1121 __int16 v12; // cx@12
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1122 signed int v13; // eax@15
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1123 int v14; // eax@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1124 Vec3_short_ *v15; // ecx@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1125 int v16; // edx@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1126 int v17; // ecx@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1127 Vec3_short_ *v18; // eax@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1128 int v19; // ecx@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1129 int v20; // eax@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1130 signed int v21; // esi@18
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1131 int v22; // ecx@21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1132 BLVMapOutline *v23; // ecx@21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1133 Vec3_short_ *v24; // edx@21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1134 Vec3_short_ *v25; // eax@21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1135 int v26; // ecx@21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1136 unsigned __int16 *v27; // edi@21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1137 int v28; // edx@21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1138 int v29; // eax@21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1139 double v30; // st7@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1140 signed __int64 v31; // qax@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1141 unsigned short *v32; // edx@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1142 int textr_width; // esi@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1143 signed int v34; // eax@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1144 signed int v35; // ecx@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1145 int v36; // esi@27
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1146 int v37; // ecx@27
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1147 int v38; // edx@31
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1148 unsigned int v39; // eax@33
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1149 short *v40; // esi@33
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1150 short *v41; // edi@33
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1151 unsigned __int8 v42; // cf@33
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1152 unsigned int v43; // ecx@33
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1153 short *v44; // edi@33
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1154 short *v45; // esi@33
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1155 int v46; // ecx@33
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1156 signed int v47; // esi@38
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1157 signed int v48; // ecx@38
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1158 int v49; // eax@38
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1159 signed int v50; // edx@55
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1160 unsigned int v51; // ecx@55
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1161 int result; // eax@72
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1162 int v53; // eax@75
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1163 int v54; // esi@75
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1164 int v55; // eax@75
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1165 __int16 v56; // si@85
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1166 double v57; // st7@85
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1167 int v58; // ebx@85
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1168 signed __int64 v59; // qax@85
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1169 signed int v60; // edi@85
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1170 signed __int64 v61; // qax@85
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1171 signed int v62; // ebx@85
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1172 signed int v63; // esi@85
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1173 int v64; // eax@87
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1174 unsigned int v65; // ebx@95
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1175 unsigned short *v66; // edx@95
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1176 unsigned __int16 *v67; // esi@96
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1177 int v68; // edi@98
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1178 unsigned __int16 v69; // cx@99
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1179 unsigned int v70; // [sp-10h] [bp-48074h]@80
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1180 unsigned int v71; // [sp-Ch] [bp-48070h]@80
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1181 unsigned int v72; // [sp-8h] [bp-4806Ch]@80
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1182 signed int v73; // [sp-4h] [bp-48068h]@59
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1183 unsigned __int16 v74; // [sp-4h] [bp-48068h]@79
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1184 unsigned short map_texture_16[147456]; // [sp+Ch] [bp-48058h]@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1185 int v76; // [sp+4800Ch] [bp-58h]@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1186 unsigned __int16 *v77; // [sp+48010h] [bp-54h]@27
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1187 unsigned __int16 *pPalette_16; // [sp+48014h] [bp-50h]@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1188 unsigned int surfPitch; // [sp+48018h] [bp-4Ch]@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1189
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1190 int v81; // [sp+48020h] [bp-44h]@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1191 unsigned __int16* render16_data;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1192 unsigned char* texture8_data;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1193 unsigned char* curr_line;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1194 int scale_increment;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1195 int scaled_posX;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1196 int scaled_posY;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1197 int stepX_r;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1198 int stepY_r;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1199
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1200
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1201 unsigned int teal; // [sp+48028h] [bp-3Ch]@8
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1202 int v84; // [sp+4802Ch] [bp-38h]@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1203 int screenCenter_X; // [sp+48030h] [bp-34h]@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1204 int v86; // [sp+48034h] [bp-30h]@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1205 int v87; // [sp+48038h] [bp-2Ch]@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1206 unsigned int v88; // [sp+4803Ch] [bp-28h]@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1207 int black; // [sp+48040h] [bp-24h]@8
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1208 int screenCenterY; // [sp+48044h] [bp-20h]@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1209 unsigned int i; // [sp+48048h] [bp-1Ch]@9
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1210 unsigned int screenHeight; // [sp+4804Ch] [bp-18h]@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1211 unsigned __int16 *v93; // [sp+48050h] [bp-14h]@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1212 signed int screenWidth; // [sp+48054h] [bp-10h]@8
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1213 unsigned int v95; // [sp+48058h] [bp-Ch]@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1214 int v96; // [sp+4805Ch] [bp-8h]@10
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1215 const void *v97; // [sp+48060h] [bp-4h]@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1216 unsigned short *a4a; // [sp+4806Ch] [bp+8h]@85
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1217 int a5a; // [sp+48070h] [bp+Ch]@86
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1218
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1219 tl_x = tl_x;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1220 tl_y = tl_y;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1221 screenCenter_X = (signed int)(tl_x + br_x) >> 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1222 screenCenterY = (signed int)(tl_y + br_y) >> 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1223 surfPitch = pRenderer->uTargetSurfacePitch;
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1224 pRenderer->SetRasterClipRect(tl_x, tl_y, br_x, br_y);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1225 v5 = viewparams->field_2C;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1226 v6 = viewparams->sViewCenterX;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1227 v86 = viewparams->sViewCenterX;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1228 v84 = viewparams->sViewCenterY;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1229 if ( viewparams->field_2C != 384 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1230 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1231 if ( viewparams->field_2C == 768 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1232 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1233 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1234 v5 = 680;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1235 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1236 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1237 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1238 {
711
a5e587c8e30e some cleaning
Gloval
parents: 709
diff changeset
1239 v6 = viewparams->indoor_center_x;
a5e587c8e30e some cleaning
Gloval
parents: 709
diff changeset
1240 v86 = viewparams->indoor_center_x;
a5e587c8e30e some cleaning
Gloval
parents: 709
diff changeset
1241 v84 = viewparams->indoor_center_y;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1242 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1243 v5 = viewparams->field_2C - 34;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1244 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1245 if ( uCurrentlyLoadedLevelType != LEVEL_Indoor)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1246 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1247 screenWidth = br_x - tl_x + 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1248 screenHeight = br_y - tl_y + 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1249 render16_data = &pRenderer->pTargetSurface[tl_x + tl_y * surfPitch];
710
735dab8d3c9a Town portal screen + misc gui const replacements
Nomad
parents: 709
diff changeset
1250 texture8_data = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].pLevelOfDetail0_prolly_alpha_mask;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1251 pPalette_16 = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].pPalette16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1252 scale_increment = (1 << (pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2 + 16)) / v5;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1253
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1254 v30 = (double)(1 << (16 - pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2));
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1255
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1256
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1257 teal = (unsigned int)(signed __int64)((double)(v6 - 22528 / (v5 / 384) + 32768) / v30) << 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1258 v97 = (const void *)((unsigned int)(signed __int64)((double)(v6 - 22528 / (v5 / 384) + 32768) / v30) << 16);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1259
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1260 v32 = map_texture_16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1261 textr_width = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uTextureWidth;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1262 stepY_r = (int)(signed __int64)((double)(- v84 - 22528 / (v5 / 384)+ 32768) / v30) << 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1263 v81 = (signed __int16)(signed __int64)((double)(v6 - 22528 / (v5 / 384) + 32768) / v30);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1264 black = (signed __int16)(signed __int64)((double)(v6 - 22528 / (v5 / 384) + 32768) / v30);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1265
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1266 v76 = textr_width;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1267 scaled_posY = stepY_r >> 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1268 //nearest neiborhood scaling
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1269 if ( texture8_data)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1270 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1271 for(uint i=0; i<screenHeight;++i)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1272 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1273 curr_line=&texture8_data[scaled_posY*textr_width];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1274 stepX_r=teal;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1275 for(uint j=0; j<screenWidth;++j)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1276 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1277 scaled_posX=stepX_r>>16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1278 map_texture_16[i*screenWidth+j]=pPalette_16[*(curr_line+scaled_posX)];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1279 stepX_r+=scale_increment;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1280 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1281 stepY_r+=scale_increment;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1282 scaled_posY=stepY_r>>16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1283 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1284 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1285 //move visible square to render
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1286 for(uint i=0; i<screenHeight;++i)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1287 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1288 if ( screenWidth > 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1289 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1290 memcpy((void*)&render16_data[surfPitch*i],(void*)&map_texture_16[i*screenWidth], screenWidth*2);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1291 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1292 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1293 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1294 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1295 {
949
Nomad
parents: 948
diff changeset
1296 black = TargetColor(0, 0, 0);
Nomad
parents: 948
diff changeset
1297 teal = TargetColor(0, 0xFFu, 0xFFu);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1298 v7 = pIndoor->pMapOutlines;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1299 uNumBlueFacesInBLVMinimap = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1300 v8 = pIndoor->pMapOutlines->uNumOutlines == 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1301 v9 = pIndoor->pMapOutlines->uNumOutlines < 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1302 screenWidth = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1303 if ( !(v9 | v8) )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1304 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1305 i = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1306 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1307 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1308 v10 = (int)((char *)v7 + i + 4);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1309 v96 = pIndoor->pFaces[*(short *)((char *)v7 + i + 8)].uAttributes;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1310 if ( !(BYTE1(v96) & 0x20 || (v11 = pIndoor->pFaces[*(short *)((char *)v7 + i + 10)].uAttributes, BYTE1(v11) & 0x20) ))
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1311 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1312 v12 = *(short *)((char *)v7 + i + 14);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1313 if ( !(v12 & 1) )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1314 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1315 if ( !(!(v96 & 0x80) && (v11 & 0x80u) == 0 ))
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1316 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1317 v96 = (signed int)screenWidth >> 3;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1318 v13 = screenWidth;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1319 *(short *)(v10 + 10) = v12 | 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1320 pIndoor->_visible_outlines[v96] |= 1 << (7 - v13 % 8);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1321 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1322 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1323 if ( (!(v12 & 1) && !(!(v96 & 0x80) && (v11 & 0x80u) == 0 )) || v12 & 1)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1324 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1325 v14 = *(short *)v10;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1326 v88 = v5;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1327 v15 = &pIndoor->pVertices[v14];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1328 v16 = v15->x;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1329 v17 = v15->y - v84;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1330 v93 = (unsigned __int16 *)(v16 - v6);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1331 screenHeight = v17;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1332 v18 = &pIndoor->pVertices[*(short *)(v10 + 2)];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1333 v19 = v18->x;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1334 v20 = v18->y - v84;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1335 v95 = v19 - v6;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1336 v97 = (const void *)v20;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1337 v88 = (unsigned __int64)((v16 - v6) * (signed __int64)v5) >> 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1338 v87 = (unsigned __int64)((signed int)screenHeight * (signed __int64)v5) >> 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1339 v93 = (unsigned __int16 *)((unsigned __int64)((v19 - v6) * (signed __int64)v5) >> 16);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1340 screenHeight = (unsigned __int64)(v20 * (signed __int64)v5) >> 16;
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1341 pRenderer->RasterLine2D(
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1342 screenCenter_X + v88,
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1343 screenCenterY - v87,
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1344 screenCenter_X + ((unsigned __int64)((v19 - v6) * (signed __int64)v5) >> 16),
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1345 screenCenterY - screenHeight,
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1346 black);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1347 v7 = pIndoor->pMapOutlines;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1348 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1349 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1350 ++screenWidth;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1351 i += 12;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1352 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1353 while ( screenWidth < (signed int)v7->uNumOutlines );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1354 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1355 v21 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1356 if ( (signed int)uNumBlueFacesInBLVMinimap > 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1357 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1358 while ( 1 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1359 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1360 v22 = pBlueFacesInBLVMinimapIDs[v21];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1361 v87 = v5;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1362 v23 = &v7->pOutlines[v22];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1363 v24 = &pIndoor->pVertices[v23->uVertex1ID];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1364 v25 = &pIndoor->pVertices[v23->uVertex2ID];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1365 v26 = v25->x;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1366 v27 = (unsigned __int16 *)(v24->x - v86);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1367 v28 = v24->y - v84;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1368 v29 = v25->y - v84;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1369 v93 = v27;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1370 screenHeight = v28;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1371 v97 = (const void *)v29;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1372 v87 = (unsigned __int64)((signed int)v27 * (signed __int64)v5) >> 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1373 v88 = (unsigned __int64)(v28 * (signed __int64)v5) >> 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1374 i = (unsigned __int64)((v26 - v86) * (signed __int64)v5) >> 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1375 v95 = (unsigned __int64)(v29 * (signed __int64)v5) >> 16;
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1376 pRenderer->RasterLine2D(
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1377 screenCenter_X + ((unsigned __int64)((signed int)v27 * (signed __int64)v5) >> 16),
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1378 screenCenterY - v88,
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1379 screenCenter_X + ((unsigned __int64)((v26 - v86) * (signed __int64)v5) >> 16),
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1380 screenCenterY - v95,
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1381 teal);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1382 ++v21;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1383 if ( v21 >= (signed int)uNumBlueFacesInBLVMinimap )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1384 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1385 v7 = pIndoor->pMapOutlines;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1386 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1387 v6 = v86;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1388 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1389 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1390 v47 = ((unsigned __int64)((pParty->vPosition.x - v6) * (signed __int64)v5) >> 16) + screenCenter_X - 3;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1391 v81 = pParty->vPosition.y - v84;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1392 v97 = (const void *)((unsigned __int64)((pParty->vPosition.y - v84) * (signed __int64)v5) >> 16);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1393 v48 = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1394 v49 = screenCenterY - (int)v97 - 3;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1395 if ( v47 >= (signed int)tl_x )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1396 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1397 if ( v47 > (signed int)br_x )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1398 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1399 if ( (signed int)(((unsigned __int64)((pParty->vPosition.x - v6) * (signed __int64)v5) >> 16) + screenCenter_X - 6) > (signed int)br_x )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1400 v48 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1401 v47 = br_x;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1402 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1403 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1404 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1405 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1406 if ( (signed int)(((unsigned __int64)((pParty->vPosition.x - v6) * (signed __int64)v5) >> 16) + screenCenter_X) < (signed int)tl_x )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1407 v48 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1408 v47 = tl_x;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1409 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1410 if ( v49 >= (signed int)tl_y )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1411 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1412 if ( v49 > br_y )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1413 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1414 if ( screenCenterY - (signed int)v97 - 6 > br_y )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1415 v48 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1416 v49 = br_y;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1417 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1418 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1419 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1420 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1421 if ( screenCenterY - (signed int)v97 < (signed int)tl_y )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1422 v48 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1423 v49 = tl_y;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1424 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1425 if ( v48 == 1 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1426 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1427 v50 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1428 v51 = pParty->sRotationY & stru_5C6E00->uDoublePiMask;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1429 if ( (signed int)(pParty->sRotationY & stru_5C6E00->uDoublePiMask) >= 128 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1430 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1431 if ( (signed int)v51 > 384 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1432 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1433 if ( (signed int)v51 >= 640 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1434 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1435 if ( (signed int)v51 > 896 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1436 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1437 if ( (signed int)v51 >= 1152 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1438 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1439 if ( (signed int)v51 > 1408 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1440 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1441 if ( (signed int)v51 >= 1664 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1442 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1443 if ( (signed int)v51 <= 1920 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1444 v73 = 7;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1445 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1446 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1447 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1448 v73 = 6;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1449 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1450 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1451 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1452 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1453 v73 = 5;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1454 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1455 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1456 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1457 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1458 v73 = 4;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1459 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1460 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1461 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1462 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1463 v73 = 3;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1464 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1465 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1466 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1467 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1468 v73 = 2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1469 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1470 if( (signed int)v51 <=1920)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1471 v50 = v73;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1472 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1473 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1474 v50 = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1475 }
973
ec7568e13b24 Minor code cleaning.
Nomad
parents: 961
diff changeset
1476 pRenderer->DrawTransparentRedShade(v47, v49, pIcons_LOD->GetTexture(pTextureIDs_pMapDirs[v50]));
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1477 }
949
Nomad
parents: 948
diff changeset
1478 result = TargetColor(0xFFu, 0xFFu, 0xFFu);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1479 v95 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1480 v86 = result;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1481 if ( (signed int)uNumLevelDecorations > 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1482 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1483 screenWidth = (unsigned int)&pLevelDecorations[0].vPosition;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1484 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1485 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1486 if ( *(char *)(screenWidth - 2) & 8 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1487 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1488 v53 = *(int *)(screenWidth + 4) - v84;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1489 v93 = (unsigned __int16 *)(*(int *)screenWidth - v6);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1490 screenHeight = v53;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1491 v54 = ((unsigned __int64)((signed int)v93 * (signed __int64)v5) >> 16) + screenCenter_X;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1492 v97 = (const void *)((unsigned __int64)(v53 * (signed __int64)v5) >> 16);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1493 v55 = screenCenterY - (int)v97;
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1494 if ( v54 >= pRenderer->raster_clip_x )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1495 {
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1496 if ( v54 <= pRenderer->raster_clip_z && v55 >= pRenderer->raster_clip_y && v55 <= pRenderer->raster_clip_w )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1497 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1498 v74 = v86;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1499 if ( v5 > 512 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1500 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1501 v96 = v55 + 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1502 black = v55 - 1;
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1503 pRenderer->RasterLine2D(v54 - 1, v55 - 1, v54 - 1, v55 + 1, v86);
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1504 pRenderer->RasterLine2D(v54, black, v54, v96, v86);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1505 ++v54;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1506 v74 = v86;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1507 v72 = v96;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1508 v71 = v54;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1509 v70 = black;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1510 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1511 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1512 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1513 v72 = screenCenterY - (int)v97;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1514 v71 = ((unsigned __int64)((signed int)v93 * (signed __int64)v5) >> 16) + screenCenter_X;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1515 v70 = screenCenterY - (int)v97;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1516 }
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1517 pRenderer->RasterLine2D(v54, v70, v71, v72, v74);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1518 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1519 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1520 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1521 ++v95;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1522 result = v95;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1523 screenWidth += 32;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1524 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1525 while ( (signed int)v95 < (signed int)uNumLevelDecorations );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1526 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1527 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1528 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1529 screenCenterY = br_x - tl_x + 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1530 v95 = br_y - tl_y + 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1531 v77 = &pRenderer->pTargetSurface[tl_x + tl_y * surfPitch];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1532 v56 = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1533 black = (1 << (v56 + 16)) / v5;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1534 v57 = (double)(1 << (16 - v56));
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1535 v58 = 22528 / (v5 / 384);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1536 v59 = (signed __int64)((double)(v6 - v58 + 32768) / v57);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1537 v60 = (int)v59 << 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1538 v97 = (const void *)((int)v59 << 16);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1539 v61 = (signed __int64)((double)(32768 - v58 - v84) / v57);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1540 pPalette_16 = (unsigned __int16 *)(v60 >> 16);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1541 v62 = (int)v61 << 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1542 teal = v60 >> 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1543 v63 = (signed __int16)v61;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1544 a4a = map_texture_16;
949
Nomad
parents: 948
diff changeset
1545 result = TargetColor(0xCu, 0xCu, 0xCu);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1546 screenCenter_X = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1547 for ( i = result; screenCenter_X < (signed int)v95; result = screenCenter_X )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1548 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1549 a5a = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1550 if ( screenCenterY > 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1551 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1552 v96 = (v63 - 80) / 4;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1553 v64 = teal;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1554 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1555 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1556 v81 = (v64 - 80) / 4;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1557 if ( !pOutdoor->_47F04C(v81, v96) )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1558 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1559 if ( pOutdoor->_47F097(v81, v96) )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1560 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1561 if ( !((a5a + screenCenter_X) % 2) )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1562 *a4a = i;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1563 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1564 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1565 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1566 *a4a = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1567 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1568 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1569 ++a4a;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1570 v97 = (char *)v97 + black;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1571 v64 = (signed int)v97 >> 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1572 ++a5a;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1573 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1574 while ( a5a < screenCenterY );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1575 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1576 v62 += black;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1577 v97 = (const void *)v60;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1578 a4a += screenCenterY - a5a;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1579 v63 = v62 >> 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1580 ++screenCenter_X;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1581 teal = (unsigned int)pPalette_16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1582 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1583 v65 = v95;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1584 v66 = map_texture_16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1585 if ( (signed int)v95 > 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1586 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1587 v67 = v77;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1588 result = 2 * (surfPitch - screenCenterY);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1589 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1590 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1591 if ( screenCenterY > 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1592 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1593 v68 = screenCenterY;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1594 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1595 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1596 v69 = *(short *)v66;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1597 if ( !*(short *)v66 || v69 == (short)i )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1598 *v67 = v69;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1599 ++v66;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1600 ++v67;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1601 --v68;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1602 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1603 while ( v68 );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1604 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1605 v67 = (unsigned __int16 *)((char *)v67 + result);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1606 --v65;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1607 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1608 while ( v65 );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1609 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1610 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1611 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1612
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1613
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1614
1004
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1615
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1616
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1617 //----- (00412AF9) --------------------------------------------------------
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1618 static void BookUI_Spellbook_DrawCurrentSchoolBackground()
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1619 {
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1620 int v0; // ecx@1
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1621
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1622 v0 = 0;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1623 if ( uActiveCharacter )
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1624 v0 = pParty->pPlayers[uActiveCharacter - 1].lastOpenedSpellbookPage;//*((char *)&pParty->pPartyBuffs[5].uExpireTime + 6972 * uActiveCharacter + 2);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1625 pRenderer->DrawTextureIndexed(8, 8, pSpellBookPagesTextr[v0]);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1626 pRenderer->DrawTextureIndexed(0x1DCu, 0x1C2u, pTexture_50643C);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1627 pRenderer->DrawTextureIndexed(0x231u, 0x1C2u, pTexture_506448);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1628 }
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1629
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1630
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1631
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1632
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1633
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1634 //----- (00412B58) --------------------------------------------------------
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1635 void DrawSpellBookContent(Player *player)
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1636 {
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1637 //Player *v0; // ebx@1
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1638 int v1; // ebp@1
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1639 //unsigned int v2; // eax@1
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1640 Texture *v3; // edi@1
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1641 int v4; // esi@1
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1642 Texture *v5; // eax@3
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1643 Texture *v6; // edx@5
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1644 int v7; // eax@8
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1645 int v8; // eax@11
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1646 POINT *v9; // esi@13
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1647 int v10; // eax@13
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1648 Texture *v11; // edx@14
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1649 int v12; // eax@15
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1650 signed int v13; // ecx@18
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1651 unsigned int v14; // esi@18
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1652 unsigned int v15; // edi@18
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1653 Texture *pPageTexture; // eax@21
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1654 unsigned int v17; // [sp-Ch] [bp-2Ch]@8
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1655 unsigned int v18; // [sp-Ch] [bp-2Ch]@15
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1656 unsigned int v19; // [sp-8h] [bp-28h]@8
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1657 unsigned int v20; // [sp-8h] [bp-28h]@15
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1658 Texture *v21; // [sp-4h] [bp-24h]@15
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1659 signed int v22; // [sp-4h] [bp-24h]@22
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1660 Texture *v23; // [sp+10h] [bp-10h]@5
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1661 POINT a2; // [sp+18h] [bp-8h]@13
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1662 POINT v24;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1663 int v25;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1664
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1665 BookUI_Spellbook_DrawCurrentSchoolBackground();
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1666
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1667 //v0 = pPlayers[uActiveCharacter];
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1668 v1 = 11 * player->lastOpenedSpellbookPage;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1669 //v2 = pIcons_LOD->FindTextureByName("Pending");
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1670 v3 = pIcons_LOD->GetTexture(pIcons_LOD->FindTextureByName("Pending"));
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1671 pRenderer->ClearZBuffer(0, 479);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1672 v4 = 1;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1673 if ( __OFSUB__(v1, v1 + 11) ^ 1 )
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1674 {
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1675 do
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1676 {
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1677 if ( *(&player->_guilds_member_bits[v1 + 63] + v4) )
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1678 {
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1679 v5 = (Texture *)dword_506408[v4];
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1680 if ( v5 != v3 )
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1681 {
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1682 if ( quick_spell_at_page == v4 )
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1683 {
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1684 v6 = dword_5063D8[v4];
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1685 v23 = dword_5063D8[v4];
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1686 }
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1687 else
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1688 {
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1689 v23 = dword_506408[v4];
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1690 v6 = v5;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1691 }
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1692 if ( v6->pLevelOfDetail0_prolly_alpha_mask )
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1693 {
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1694 v7 = player->lastOpenedSpellbookPage;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1695 // v7 = (12 * v0->lastOpenedSpellbookPage + pSpellbookSpellIndices[v0->lastOpenedSpellbookPage][v4]);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1696 v19 = pViewport->uViewportTL_Y + pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Ypos;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1697 v17 = pViewport->uViewportTL_X + pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Xpos;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1698 if ( BYTE1(v6->pBits) & 2 )
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1699 pRenderer->DrawTextureTransparent(v17, v19, v6);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1700 else
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1701 pRenderer->DrawTextureIndexed(v17, v19, v6);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1702 pRenderer->DrawMaskToZBuffer(pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Xpos,
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1703 pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Ypos, v23, v4);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1704 }
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1705 }
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1706 }
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1707 ++v4;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1708 }
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1709 while ( v4 + v1 - 1 < v1 + 11 );
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1710 }
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1711
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1712
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1713 v9 = pMouse->GetCursorPos(&a2);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1714 v10 = pRenderer->pActiveZBuffer[v9->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v24)->y]] & 0xFFFF;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1715 if ( v10 )
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1716 {
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1717 v11 = dword_5063D8[v10];
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1718 if ( v11->pLevelOfDetail0_prolly_alpha_mask )
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1719 {
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1720 v21 = dword_5063D8[v10];
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1721 v12 = player->lastOpenedSpellbookPage;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1722 // v12 = (12 * v0->lastOpenedSpellbookPage + pSpellbookSpellIndices[v0->lastOpenedSpellbookPage][v10]);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1723 v20 = pViewport->uViewportTL_Y + pIconPos[v12][pSpellbookSpellIndices[v12][v10]].Ypos;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1724 v18 = pViewport->uViewportTL_X + pIconPos[v12][pSpellbookSpellIndices[v12][v10]].Xpos;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1725 if ( BYTE1(v11->pBits) & 2 )
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1726 pRenderer->DrawTextureTransparent(v18, v20, v21);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1727 else
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1728 pRenderer->DrawTextureIndexed(v18, v20, v21);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1729 }
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1730 }
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1731 v13 = 0;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1732 a2.x = (LONG)&player->pActiveSkills[12];
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1733 v14 = (unsigned int)&player->pActiveSkills[12];
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1734 v15 = (unsigned int)&player->pActiveSkills[12];
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1735 v25 = 0;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1736 do
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1737 {
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1738 if ( *(short *)a2.x )
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1739 {
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1740 if ( player->lastOpenedSpellbookPage == v13 )
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1741 {
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1742 pPageTexture = pTextures_tabs[v13][1];
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1743 switch ( v13 )
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1744 {
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1745 case 0:
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1746 v14 = 406;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1747 v22 = 9;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1748 goto LABEL_27;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1749 case 1:
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1750 v14 = 406;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1751 goto LABEL_38;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1752 case 2:
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1753 v14 = 406;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1754 v22 = 84;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1755 goto LABEL_27;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1756 case 3:
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1757 v14 = 406;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1758 goto LABEL_26;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1759 case 4:
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1760 v14 = 407;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1761 goto LABEL_29;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1762 case 5:
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1763 v15 = 196;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1764 goto LABEL_34;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1765 case 6:
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1766 v15 = 234;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1767 goto LABEL_34;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1768 case 7:
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1769 v15 = 272;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1770 goto LABEL_34;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1771 case 8:
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1772 v15 = 309;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1773 LABEL_34:
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1774 v14 = 405;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1775 break;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1776 default:
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1777 break;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1778 }
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1779 }
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1780 else
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1781 {
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1782 pPageTexture = pTextures_tabs[v13][0];
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1783 switch ( v13 )
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1784 {
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1785 case 0:
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1786 v14 = 415;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1787 v22 = 10;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1788 goto LABEL_27;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1789 case 1:
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1790 v14 = 415;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1791 LABEL_38:
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1792 v22 = 46;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1793 goto LABEL_27;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1794 case 2:
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1795 v14 = 415;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1796 v22 = 83;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1797 goto LABEL_27;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1798 case 3:
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1799 v14 = 415;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1800 LABEL_26:
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1801 v22 = 121;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1802 LABEL_27:
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1803 v15 = v22;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1804 break;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1805 case 4:
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1806 v14 = 415;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1807 LABEL_29:
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1808 v15 = 158;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1809 break;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1810 case 5:
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1811 v15 = 196;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1812 goto LABEL_46;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1813 case 6:
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1814 v15 = 234;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1815 goto LABEL_46;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1816 case 7:
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1817 v15 = 271;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1818 goto LABEL_46;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1819 case 8:
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1820 v15 = 307;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1821 LABEL_46:
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1822 v14 = 416;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1823 break;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1824 default:
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1825 break;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1826 }
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1827 }
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1828 pRenderer->DrawTextureTransparent(v14, v15, pPageTexture);
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1829 v13 = v25;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1830 }
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1831 a2.x += 2;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1832 ++v13;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1833 v25 = v13;
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1834 }
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1835 while ( v13 < 9 );
eac5af72b614 UI cleans
Nomad
parents: 995
diff changeset
1836 }