annotate UI/Books/UINotesBooks.cpp @ 1436:883fea17dd9a

fix Sky continue
author Ritor1
date Sat, 06 Jul 2013 09:06:51 +0600
parents ae435824ac4d
children 38df78aba732
rev   line source
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
2 #ifdef _MSC_VER
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
3 #define _CRT_SECURE_NO_WARNINGS
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
4 #endif
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
5
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
6 #include <assert.h>
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
7
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
8 #include "..\..\MM7.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
9 #include "..\..\Render.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
10 #include "..\..\Mouse.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
11 #include "..\UIBooks.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
12 #include "..\..\MapInfo.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
13 #include "..\..\GUIWindow.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
14 #include "..\..\GUIFont.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
15 #include "..\..\Party.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
16 #include "..\..\AudioPlayer.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
17 //#include "..\Outdoor.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
18 #include "..\..\LOD.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
19 #include "..\..\Allocator.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
20 #include "..\..\Viewport.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
21 //#include "..\Math.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
22 #include "..\..\Awards.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
23 #include "..\..\Autonotes.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
24 #include "..\..\StorylineTextTable.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
25 #include "..\..\texts.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
26 //
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
27 #include "..\..\mm7_data.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
28
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
29
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
30
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
31
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
32 //----- (00413D3C) --------------------------------------------------------
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
33 static const char *GetDayPart()
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
34 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
35 if (pParty->uCurrentHour <= 4)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
36 return pGlobalTXT_LocalizationStrings[567]; // "Night"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
37 else if (pParty->uCurrentHour == 5)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
38 return pGlobalTXT_LocalizationStrings[55]; // "Dawn"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
39 else if (pParty->uCurrentHour == 20)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
40 return pGlobalTXT_LocalizationStrings[566]; // "Dusk"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
41 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
42 return pGlobalTXT_LocalizationStrings[56]; // "Day"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
43 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
44
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
45
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
46
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
47
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
48
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
49 //----- (00413D6F) --------------------------------------------------------
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
50 void BookUI_Calendar_Draw()
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
51 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
52 unsigned int v0; // esi@1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
53 //char *v1; // eax@5
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
54 int v2; // ecx@5
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
55 char *v3; // eax@6
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
56 GUIWindow a1; // [sp+Ch] [bp-60h]@5
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
57 unsigned int v6; // [sp+60h] [bp-Ch]@1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
58 //int v7; // [sp+64h] [bp-8h]@1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
59 //int a5; // [sp+68h] [bp-4h]@1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
60
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
61
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
62 static unsigned int pDayMoonPhase[28] = // 4E1B18
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
63 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
64 0, 0, 0,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
65 1, 1, 1, 1,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
66 2, 2, 2,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
67 3, 3, 3, 3,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
68 4, 4, 4,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
69 3, 3, 3, 3,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
70 2, 2, 2,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
71 1, 1, 1, 1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
72 };
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
73
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
74
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
75 v0 = pParty->uCurrentHour;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
76 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pSpellBookPagesTextr_13);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
77 if ( (signed int)v0 <= 12 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
78 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
79 if ( !v0 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
80 v0 = 12;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
81 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
82 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
83 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
84 v0 -= 12;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
85 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
86 a1.uFrameX = game_viewport_x;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
87 a1.uFrameY = game_viewport_y;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
88 a1.uFrameWidth = game_viewport_width;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
89 a1.uFrameHeight = game_viewport_height;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
90 a1.uFrameZ = game_viewport_z;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
91 a1.uFrameW = game_viewport_w;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
92 a1.DrawTitleText(pBook2Font, 0, 0x16u, ui_book_calendar_title_color, pGlobalTXT_LocalizationStrings[186], 3); // "Time in Erathia"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
93
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
94 v2 = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
95 if ( pParty->uCurrentHour >= 12 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
96 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
97 if ( pParty->uCurrentHour >= 24 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
98 v2=0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
99 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
100 v2=1;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
101 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
102
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
103 sprintf(pTmpBuf.data(), "%s\t100:\t110%d:%02d %s - %s",
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
104 pGlobalTXT_LocalizationStrings[526], // "Time"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
105 v0,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
106 pParty->uCurrentMinute,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
107 aAMPMNames[v2],
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
108 GetDayPart());
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
109 a1.DrawText(pBookFont, 70, 55, ui_book_calendar_time_color, pTmpBuf.data(), 0, 0, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
110
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
111 sprintf(pTmpBuf.data(), "%s\t100:\t110%d - %s",
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
112 pGlobalTXT_LocalizationStrings[56], // "Day"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
113 pParty->uDaysPlayed + 1,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
114 aDayNames[pParty->uDaysPlayed % 7]);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
115 a1.DrawText(pBookFont, 70, 2 * LOBYTE(pBookFont->uFontHeight) + 49, ui_book_calendar_day_color, pTmpBuf.data(), 0, 0, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
116
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
117 sprintf(pTmpBuf.data(), "%s\t100:\t110%d - %s",
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
118 pGlobalTXT_LocalizationStrings[146], // "Month"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
119 pParty->uCurrentMonth + 1,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
120 aMonthNames[pParty->uCurrentMonth]);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
121 a1.DrawText(pBookFont, 70, 4 * LOBYTE(pBookFont->uFontHeight) + 43, ui_book_calendar_month_color, pTmpBuf.data(), 0, 0, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
122
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
123 sprintf(pTmpBuf.data(), "%s\t100:\t110%d", pGlobalTXT_LocalizationStrings[245], pParty->uCurrentYear); // "Year"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
124 a1.DrawText(pBookFont, 70, 6 * LOBYTE(pBookFont->uFontHeight) + 37, ui_book_calendar_year_color, pTmpBuf.data(), 0, 0, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
125
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
126 sprintf(pTmpBuf.data(), "%s\t100:\t110%s", pGlobalTXT_LocalizationStrings[530], aMoonPhaseNames[pDayMoonPhase[pParty->uDaysPlayed]]); // "Moon"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
127 a1.DrawText(pBookFont, 70, 8 * LOBYTE(pBookFont->uFontHeight) + 31, ui_book_calendar_moon_color, pTmpBuf.data(), 0, 0, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
128
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
129 v6 = pMapStats->GetMapInfo(pCurrentMapName.data());
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
130 if ( v6 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
131 v3 = pMapStats->pInfos[v6].pName;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
132 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
133 v3 = "Unknown";
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
134 sprintf(pTmpBuf.data(), "%s\t100:\t110%s", pGlobalTXT_LocalizationStrings[531], v3); // "Location"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
135 a1.DrawText(pBookFont, 70, 10 * LOBYTE(pBookFont->uFontHeight) + 25, ui_book_calendar_location_color, pTmpBuf.data(), 0, 0, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
136 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
137
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
138
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
139
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
140
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
141
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
142 //----- (00413126) --------------------------------------------------------
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
143 void BookUI_Questbook_Draw()
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
144 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
145 unsigned int v0; // eax@3
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
146 unsigned int v1; // eax@7
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
147 int v2; // ecx@11
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
148 int v3; // ebx@16
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
149 int v4; // eax@19
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
150 const char *v5; // edi@19
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
151 int v6; // eax@19
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
152 unsigned int v7; // edi@19
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
153 unsigned int v8; // [sp-8h] [bp-68h]@3
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
154 unsigned int v9; // [sp-8h] [bp-68h]@7
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
155 Texture *v10; // [sp-4h] [bp-64h]@3
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
156 Texture *v11; // [sp-4h] [bp-64h]@7
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
157 GUIWindow a1; // [sp+Ch] [bp-54h]@9
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
158
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
159 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pTexture_CurrentBook);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
160 if ( BtnUp_flag || !dword_506528 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
161 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
162 v10 = pTex_tab_an_6a__zoom_off;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
163 v8 = pViewport->uViewportTL_Y + 2;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
164 v0 = pViewport->uViewportTL_X + 407;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
165 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
166 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
167 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
168 v10 = pTex_tab_an_6b__zoom_on;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
169 v8 = pViewport->uViewportTL_Y + 1;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
170 v0 = pViewport->uViewportTL_X + 398;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
171 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
172 pRenderer->DrawTextureTransparent(v0, v8, v10);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
173 if ( BtnDown_flag || dword_506528 + num_achieved_awards >= num_achieved_awards_2 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
174 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
175 v11 = pTex_tab_an_7a__zoot_off;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
176 v9 = pViewport->uViewportTL_Y + 38;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
177 v1 = pViewport->uViewportTL_X + 407;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
178 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
179 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
180 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
181 v11 = pTex_tab_an_7b__zoot_on;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
182 v9 = pViewport->uViewportTL_Y + 38;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
183 v1 = pViewport->uViewportTL_X + 398;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
184 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
185 pRenderer->DrawTextureTransparent(v1, v9, v11);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
186 a1.uFrameWidth = game_viewport_width;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
187 a1.uFrameHeight = game_viewport_height;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
188 a1.uFrameX = game_viewport_x;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
189 a1.uFrameY = game_viewport_y;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
190 a1.uFrameZ = game_viewport_z;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
191 a1.uFrameW = game_viewport_w;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
192 a1.DrawTitleText(pBook2Font, 0, 22, ui_book_quests_title_color, pGlobalTXT_LocalizationStrings[174], 3); //"Current Quests"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
193
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
194 a1.uFrameX = 48;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
195 a1.uFrameY = 70;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
196 a1.uFrameWidth = 360;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
197 a1.uFrameHeight = 264;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
198 a1.uFrameZ = 407;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
199 a1.uFrameW = 333;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
200 if ( BtnDown_flag && dword_506528 + num_achieved_awards < num_achieved_awards_2 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
201 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
202 pAudioPlayer->PlaySound(SOUND_OpenBook, 0, 0, -1, 0, 0, 0, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
203 v2 = dword_50651C++;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
204 dword_506528 += num_achieved_awards;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
205 byte_506130[v2] = num_achieved_awards;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
206 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
207 if ( BtnUp_flag && dword_50651C )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
208 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
209 pAudioPlayer->PlaySound(SOUND_OpenBook, 0, 0, -1, 0, 0, 0, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
210 --dword_50651C;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
211 dword_506528 -= (unsigned __int8)byte_506130[dword_50651C];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
212 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
213 if ( !num_achieved_awards || (v3 = dword_506528, dword_506528 < 1) )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
214 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
215 v3 = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
216 dword_50651C = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
217 dword_506528 = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
218 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
219 BtnDown_flag = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
220 BtnUp_flag = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
221 num_achieved_awards = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
222 while ( v3 < num_achieved_awards_2 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
223 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
224 v4 = achieved_awards[v3];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
225 ++num_achieved_awards;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
226 v5 = pQuestTable[v4];//(&dword_722F10)[4 * v4];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
227 a1.DrawText(pAutonoteFont, 1, 0, ui_book_quests_text_color, pQuestTable[v4], 0, 0, 0);//(&dword_722F10)[4 * v4], 0, 0, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
228 v6 = pAutonoteFont->CalcTextHeight(v5, &a1, 1, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
229 v7 = a1.uFrameY + v6;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
230 if ( (signed int)(a1.uFrameY + v6) > (signed int)a1.uFrameHeight )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
231 break;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
232 pRenderer->DrawTextureTransparent(100, v7 + 12, pSpellBookPagesTextr_10);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
233 ++v3;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
234 a1.uFrameY = v7 + 24;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
235 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
236 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
237
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
238
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
239 //----- (0041338E) --------------------------------------------------------
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
240 void BookUI_Autonotes_Draw()
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
241 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
242 unsigned int v0; // eax@3
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
243 unsigned int v1; // eax@7
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
244 signed int v2; // ebp@11
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
245 unsigned int v3; // eax@18
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
246 unsigned int v4; // eax@24
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
247 unsigned int v5; // eax@30
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
248 unsigned int v6; // eax@36
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
249 unsigned int v7; // eax@42
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
250 signed int v8; // ebp@47
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
251 int v9; // eax@52
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
252 int v10; // eax@56
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
253 int v11; // edx@57
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
254 int v12; // ebp@64
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
255 int v13; // eax@65
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
256 const char *v14; // edi@65
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
257 int v15; // eax@65
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
258 unsigned int v16; // edi@65
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
259 unsigned int v17; // [sp-8h] [bp-70h]@3
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
260 unsigned int v18; // [sp-8h] [bp-70h]@7
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
261 unsigned int v19; // [sp-8h] [bp-70h]@18
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
262 unsigned int v20; // [sp-8h] [bp-70h]@24
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
263 unsigned int v21; // [sp-8h] [bp-70h]@30
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
264 unsigned int v22; // [sp-8h] [bp-70h]@36
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
265 unsigned int v23; // [sp-8h] [bp-70h]@42
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
266 Texture *v24; // [sp-4h] [bp-6Ch]@3
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
267 Texture *v25; // [sp-4h] [bp-6Ch]@7
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
268 Texture *v26; // [sp-4h] [bp-6Ch]@18
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
269 Texture *v27; // [sp-4h] [bp-6Ch]@24
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
270 Texture *v28; // [sp-4h] [bp-6Ch]@30
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
271 Texture *v29; // [sp-4h] [bp-6Ch]@36
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
272 Texture *v30; // [sp-4h] [bp-6Ch]@42
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
273 signed __int16 v31; // [sp+10h] [bp-58h]@1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
274 char *v32; // [sp+10h] [bp-58h]@49
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
275 GUIWindow a1; // [sp+14h] [bp-54h]@46
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
276
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
277 v31 = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
278 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pTexture_AutonotesBook);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
279 if ( BtnUp_flag || !dword_506528 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
280 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
281 v24 = pTex_tab_an_6a__zoom_off;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
282 v17 = pViewport->uViewportTL_Y + 2;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
283 v0 = pViewport->uViewportTL_X + 407;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
284 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
285 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
286 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
287 v24 = pTex_tab_an_6b__zoom_on;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
288 v17 = pViewport->uViewportTL_Y + 1;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
289 v0 = pViewport->uViewportTL_X + 398;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
290 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
291 pRenderer->DrawTextureTransparent(v0, v17, v24);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
292 if ( BtnDown_flag || dword_506528 + num_achieved_awards >= num_achieved_awards_2 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
293 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
294 v25 = pTex_tab_an_7a__zoot_off;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
295 v18 = pViewport->uViewportTL_Y + 38;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
296 v1 = pViewport->uViewportTL_X + 407;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
297 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
298 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
299 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
300 v25 = pTex_tab_an_7b__zoot_on;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
301 v18 = pViewport->uViewportTL_Y + 38;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
302 v1 = pViewport->uViewportTL_X + 398;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
303 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
304 pRenderer->DrawTextureTransparent(v1, v18, v25);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
305 if ( !Book_PageBtn3_flag )//Potions_page_flag
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
306 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
307 if (_506568_autonote_type != AUTONOTE_POTION_RECEPIE)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
308 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
309 pRenderer->DrawTextureTransparent(
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
310 pViewport->uViewportTL_X + 408,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
311 pViewport->uViewportTL_Y + 113,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
312 pTexture_506390);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
313 v2 = 1;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
314 goto LABEL_16;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
315 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
316 goto LABEL_14;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
317 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
318 if (_506568_autonote_type == AUTONOTE_POTION_RECEPIE)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
319 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
320 LABEL_14:
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
321 v2 = 1;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
322 goto LABEL_15;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
323 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
324 v2 = 1;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
325 v31 = 1;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
326 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
327 LABEL_15:
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
328 _506568_autonote_type = AUTONOTE_POTION_RECEPIE;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
329 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 113, pTexture_506394);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
330 LABEL_16:
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
331 if ( Book_PageBtn4_flag )//Fontains_page_flag
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
332 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
333 if ( _506568_autonote_type != v2 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
334 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
335 v31 = v2;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
336 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
337 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
338 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
339 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
340 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
341 if ( _506568_autonote_type != v2 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
342 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
343 v26 = pTexture_506388;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
344 v19 = pViewport->uViewportTL_Y + 150;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
345 v3 = pViewport->uViewportTL_X + 408;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
346 goto LABEL_22;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
347 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
348 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
349 v26 = pTexture_50638C;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
350 _506568_autonote_type = v2;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
351 v19 = pViewport->uViewportTL_Y + 150;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
352 v3 = pViewport->uViewportTL_X + 399;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
353 LABEL_22:
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
354 pRenderer->DrawTextureTransparent(v3, v19, v26);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
355 if ( Book_PageBtn5_flag )//Autonotes_Obelisks_page_flag
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
356 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
357 if ( _506568_autonote_type != AUTONOTE_OBELISK)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
358 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
359 v31 = v2;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
360 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
361 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
362 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
363 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
364 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
365 if ( _506568_autonote_type != AUTONOTE_OBELISK)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
366 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
367 v27 = pTexture_506380;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
368 v20 = pViewport->uViewportTL_Y + 188;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
369 v4 = pViewport->uViewportTL_X + 408;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
370 goto LABEL_28;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
371 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
372 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
373 v27 = pTexture_506384;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
374 _506568_autonote_type = AUTONOTE_OBELISK;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
375 v20 = pViewport->uViewportTL_Y + 188;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
376 v4 = pViewport->uViewportTL_X + 397;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
377 LABEL_28:
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
378 pRenderer->DrawTextureTransparent(v4, v20, v27);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
379 if ( Book_PageBtn6_flag )//Autonotes_Seer_page_flag
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
380 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
381 if ( _506568_autonote_type != AUTONOTE_SEER)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
382 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
383 v31 = v2;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
384 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
385 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
386 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
387 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
388 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
389 if ( _506568_autonote_type != AUTONOTE_SEER)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
390 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
391 v28 = pTexture_506378;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
392 v21 = pViewport->uViewportTL_Y + 226;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
393 v5 = pViewport->uViewportTL_X + 408;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
394 goto LABEL_34;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
395 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
396 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
397 v28 = pTexture_50637C;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
398 _506568_autonote_type = AUTONOTE_SEER;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
399 v21 = pViewport->uViewportTL_Y + 226;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
400 v5 = pViewport->uViewportTL_X + 397;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
401 LABEL_34:
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
402 pRenderer->DrawTextureTransparent(v5, v21, v28);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
403 if ( Autonotes_Misc_page_flag )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
404 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
405 if ( _506568_autonote_type != AUTONOTE_MISC)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
406 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
407 v31 = v2;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
408 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
409 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
410 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
411 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
412 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
413 if ( _506568_autonote_type != AUTONOTE_MISC)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
414 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
415 v29 = pTexture_506370;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
416 v22 = pViewport->uViewportTL_Y + 263;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
417 v6 = pViewport->uViewportTL_X + 408;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
418 goto LABEL_40;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
419 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
420 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
421 v29 = pTexture_506374;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
422 _506568_autonote_type = AUTONOTE_MISC;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
423 v22 = pViewport->uViewportTL_Y + 264;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
424 v6 = pViewport->uViewportTL_X + 397;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
425 LABEL_40:
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
426 pRenderer->DrawTextureTransparent(v6, v22, v29);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
427 if ( Autonotes_Instructors_page_flag )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
428 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
429 if ( _506568_autonote_type != AUTONOTE_TEACHER)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
430 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
431 v31 = v2;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
432 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
433 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
434 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
435 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
436 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
437 if ( _506568_autonote_type != AUTONOTE_TEACHER)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
438 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
439 v30 = pTexture_506368;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
440 v23 = pViewport->uViewportTL_Y + 302;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
441 v7 = pViewport->uViewportTL_X + 408;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
442 goto LABEL_46;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
443 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
444 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
445 v30 = pTexture_50636C;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
446 _506568_autonote_type = AUTONOTE_TEACHER;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
447 v23 = pViewport->uViewportTL_Y + 302;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
448 v7 = pViewport->uViewportTL_X + 397;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
449 LABEL_46:
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
450 pRenderer->DrawTextureTransparent(v7, v23, v30);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
451 a1.uFrameWidth = game_viewport_width;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
452 a1.uFrameHeight = game_viewport_height;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
453 a1.uFrameX = game_viewport_x;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
454 a1.uFrameY = game_viewport_y;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
455 a1.uFrameZ = game_viewport_z;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
456 a1.uFrameW = game_viewport_w;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
457 a1.DrawTitleText(pBook2Font, 0, 22, ui_book_autonotes_title_color, pGlobalTXT_LocalizationStrings[154], 3); // "Auto notes"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
458
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
459 a1.uFrameX = 48;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
460 a1.uFrameY = 70;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
461 a1.uFrameWidth = 360;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
462 a1.uFrameHeight = 264;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
463 a1.uFrameZ = 407;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
464 a1.uFrameW = 333;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
465 if ( v31 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
466 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
467 num_achieved_awards_2 = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
468 dword_506528 = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
469 dword_50651C = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
470 num_achieved_awards = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
471 v8 = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
472 do
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
473 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
474 //if ( dword_72371C[2 * v8] == dword_506568 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
475 if ( pAutonoteTxt[v8].eType == _506568_autonote_type )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
476 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
477 //v32 = (&dword_723718_autonote_related)[8 * (signed __int16)v8];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
478 v32 = (char *)pAutonoteTxt[v8].pText;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
479 if ( (short)v8 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
480 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
481 if ( (unsigned __int16)_449B57_test_bit(pParty->_autonote_bits, v8) && v32 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
482 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
483 v9 = num_achieved_awards++;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
484 achieved_awards[v9] = (AwardType)v8;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
485 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
486 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
487 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
488 ++v8;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
489 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
490 while ( v8 < 196 );
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
491 num_achieved_awards_2 = num_achieved_awards;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
492 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
493 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
494 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
495 if ( BtnDown_flag )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
496 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
497 v10 = num_achieved_awards + dword_506528;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
498 if ( num_achieved_awards + dword_506528 < num_achieved_awards_2 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
499 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
500 v11 = dword_50651C++;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
501 byte_506130[v11] = num_achieved_awards;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
502 dword_506528 = v10;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
503 pAudioPlayer->PlaySound(SOUND_OpenBook, 0, 0, -1, 0, 0, 0, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
504 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
505 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
506 if ( BtnUp_flag && dword_50651C )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
507 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
508 --dword_50651C;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
509 dword_506528 -= (unsigned __int8)byte_506130[dword_50651C];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
510 pAudioPlayer->PlaySound(SOUND_OpenBook, 0, 0, -1, 0, 0, 0, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
511 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
512 if ( !num_achieved_awards || dword_506528 < 1 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
513 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
514 dword_506528 = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
515 dword_50651C = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
516 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
517 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
518 v12 = dword_506528;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
519 Autonotes_Instructors_page_flag = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
520 BtnDown_flag = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
521 BtnUp_flag = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
522 num_achieved_awards = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
523 Autonotes_Misc_page_flag = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
524 Book_PageBtn6_flag = 0;//Autonotes_Seer_page_flag
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
525 Book_PageBtn5_flag = 0;//Autonotes_Obelisks_page_flag
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
526 Book_PageBtn4_flag = 0;//Fontains_page_flag
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
527 Book_PageBtn3_flag = 0;//Potions_page_flag
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
528 while ( v12 < num_achieved_awards_2 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
529 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
530 v13 = achieved_awards[v12];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
531 ++num_achieved_awards;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
532 //v14 = (&dword_723718_autonote_related)[8 * v13];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
533 v14 = pAutonoteTxt[v13].pText;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
534 //a1.DrawText(pAutonoteFont, 1, 0, 0, (&dword_723718_autonote_related)[8 * v13], 0, 0, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
535 a1.DrawText(pAutonoteFont, 1, 0, ui_book_autonotes_text_color, pAutonoteTxt[v13].pText, 0, 0, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
536 v15 = pAutonoteFont->CalcTextHeight(v14, &a1, 1, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
537 v16 = a1.uFrameY + v15;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
538 if ( (signed int)(a1.uFrameY + v15) > (signed int)a1.uFrameHeight )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
539 break;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
540 pRenderer->DrawTextureTransparent(0x64u, v16 + 12, pSpellBookPagesTextr_10);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
541 ++v12;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
542 a1.uFrameY = v16 + 24;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
543 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
544 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
545
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
546 //----- (00412E85) --------------------------------------------------------
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
547 void BookUI_Journal_Draw()
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
548 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
549 unsigned int v0; // eax@3
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
550 unsigned int v1; // eax@7
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
551 int v2; // eax@10
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
552 const char *v3; // eax@10
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
553 signed int v4; // ecx@12
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
554 int v5; // ecx@14
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
555 int v6; // eax@21
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
556 int v7; // esi@21
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
557 char *v8; // eax@21
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
558 char* v9; // eax@22
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
559 unsigned int v11; // [sp-8h] [bp-64h]@3
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
560 unsigned int v12; // [sp-8h] [bp-64h]@7
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
561 Texture *v13; // [sp-4h] [bp-60h]@3
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
562 Texture *v14; // [sp-4h] [bp-60h]@7
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
563 GUIWindow a1; // [sp+8h] [bp-54h]@10
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
564
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
565 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pSpellBookPagesTextr_11);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
566 if ( BtnUp_flag || !dword_506528 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
567 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
568 v13 = pTex_tab_an_6a__zoom_off;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
569 v11 = pViewport->uViewportTL_Y + 2;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
570 v0 = pViewport->uViewportTL_X + 407;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
571 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
572 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
573 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
574 v13 = pTex_tab_an_6b__zoom_on;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
575 v11 = pViewport->uViewportTL_Y + 1;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
576 v0 = pViewport->uViewportTL_X + 398;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
577 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
578 pRenderer->DrawTextureTransparent(v0, v11, v13);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
579
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
580 if ( BtnDown_flag || dword_506528 + num_achieved_awards >= num_achieved_awards_2 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
581 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
582 v14 = pTex_tab_an_7a__zoot_off;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
583 v12 = pViewport->uViewportTL_Y + 38;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
584 v1 = pViewport->uViewportTL_X + 407;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
585 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
586 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
587 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
588 v14 = pTex_tab_an_7b__zoot_on;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
589 v12 = pViewport->uViewportTL_Y + 38;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
590 v1 = pViewport->uViewportTL_X + 398;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
591 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
592 pRenderer->DrawTextureTransparent(v1, v12, v14);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
593
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
594 if ( !byte_5C6D50[dword_506528] )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
595 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
596 v2 = achieved_awards[dword_506528];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
597 a1.uFrameWidth = game_viewport_width;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
598 a1.uFrameX = game_viewport_x;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
599 a1.uFrameY = game_viewport_y;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
600 a1.uFrameHeight = game_viewport_height;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
601 v3 = (const char *)pStorylineText->StoreLine[v2].pPageTitle;//field_4[];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
602 a1.uFrameZ = game_viewport_z;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
603 a1.uFrameW = game_viewport_w;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
604 if ( v3 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
605 a1.DrawTitleText(pBook2Font, 0, 22, ui_book_journal_title_color, v3, 3);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
606 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
607
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
608 a1.uFrameX = 48;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
609 a1.uFrameY = 70;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
610 a1.uFrameWidth = 360;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
611 a1.uFrameHeight = 264;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
612 v4 = LOBYTE(pAutonoteFont->uFontHeight) - 3;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
613 a1.uFrameZ = 407;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
614 a1.uFrameHeight = v4 * 264 / v4;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
615 a1.uFrameW = a1.uFrameHeight + 69;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
616 if ( BtnDown_flag && dword_506528 + num_achieved_awards < num_achieved_awards_2 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
617 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
618 pAudioPlayer->PlaySound(SOUND_OpenBook, 0, 0, -1, 0, 0, 0, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
619 v5 = dword_50651C++;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
620 dword_506528 += num_achieved_awards;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
621 byte_506130[v5] = num_achieved_awards;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
622 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
623 if ( BtnUp_flag && dword_50651C )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
624 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
625 pAudioPlayer->PlaySound(SOUND_OpenBook, 0, 0, -1, 0, 0, 0, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
626 --dword_50651C;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
627 dword_506528 -= (unsigned __int8)byte_506130[dword_50651C];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
628 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
629 if ( !num_achieved_awards || dword_506528 < 1 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
630 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
631 dword_506528 = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
632 dword_50651C = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
633 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
634 BtnDown_flag = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
635 v6 = achieved_awards[dword_506528];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
636 BtnUp_flag = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
637 num_achieved_awards = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
638 //v7 = *pStorylineText->StoreLine[v6].pText;//*(&pStorylineText->field_0 + 3 * v6);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
639 v7 = (int)pStorylineText->StoreLine[v6].pText;//*(&pStorylineText->field_0 + 3 * v6);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
640 v8 = BuilDialogueString(
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
641 pStorylineText->StoreLine[v6].pText,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
642 uActiveCharacter - 1,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
643 0,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
644 0,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
645 0,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
646 (__int64 *)&pParty->field_3C._s_times[ v6 + 21]);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
647 if ( v7 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
648 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
649 v9 = pAutonoteFont->_44C6C2(v8, &a1, 1u, (unsigned __int8)byte_5C6D50[dword_506528]);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
650 a1.DrawText(pAutonoteFont, 1, 0, ui_book_journal_text_color, (const char *)v9, 0, a1.uFrameY + a1.uFrameHeight, ui_book_journal_text_shadow);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
651 ++num_achieved_awards;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
652 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
653 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
654