annotate UIBooks.cpp @ 1304:9d99e7b76cdc

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