comparison UIBooks.cpp @ 1038:39f42990698f

Cleanings
author Nomad
date Thu, 23 May 2013 03:29:29 +0200
parents 9ac94d00012e
children f17cfb070f7a
comparison
equal deleted inserted replaced
1035:306ec23b37df 1038:39f42990698f
25 25
26 26
27 27
28 28
29 29
30 //----- (00411150) --------------------------------------------------------
31 void BookUI_DrawTownPortalMap()
32 {
33 //signed int v0; // edi@1
34 //__int16 v1; // dx@8
35 //POINT *v2; // edi@17
36 int v3; // edi@17
37 //__int16 v4; // dx@24
38 GUIWindow v6; // [sp+Ch] [bp-64h]@1
39 //POINT v7; // [sp+60h] [bp-10h]@17
40 POINT a2; // [sp+68h] [bp-8h]@17
41
42 pRenderer->ClearZBuffer(0, 479);
43 pRenderer->DrawTextureTransparent(8, 8, pTexture_CurrentBook);
44 pRenderer->DrawTextureTransparent(471, 445, pIcons_LOD->GetTexture(uExitCancelTextureId));
45
46 v6.uFrameX = game_viewport_x;
47 v6.uFrameY = game_viewport_y;
48 v6.uFrameWidth = game_viewport_width;
49 v6.uFrameHeight = game_viewport_height;
50 v6.uFrameZ = game_viewport_z;
51 v6.uFrameW = game_viewport_w;
52
53 const uint fountain_bits_lut[] = {PARTY_QUEST_FOUNTAIN_HARMONDALE,
54 PARTY_QUEST_FOUNTAIN_PIERPONT,
55 PARTY_QUEST_FOUNTAIN_NIGHON,
56 PARTY_QUEST_FOUNTAIN_EVENMORN_ISLE,
57 PARTY_QUEST_FOUNTAIN_CELESTIA,
58 PARTY_QUEST_FOUNTAIN_THE_PIT};
59 for (uint i = 0; i < 6; ++i)
60 {
61
62 if (_449B57_test_bit(pParty->_quest_bits, fountain_bits_lut[i]))
63 pRenderer->DrawMaskToZBuffer(pTownPortalBook_xs[i],
64 pTownPortalBook_ys[i],
65 pTexture_TownPortalIcons[i], i + 1);
66 }
67
68 /* v0 = 0;
69 do
70 {
71 if ( !v0 )
72 {
73 v1 = 206;
74 LABEL_14:
75 if ( !(unsigned __int16)_449B57_test_bit(pParty->_quest_bits, v1) )
76 goto LABEL_16;
77 goto LABEL_15;
78 }
79 if ( v0 == 1 )
80 {
81 v1 = 208;
82 goto LABEL_14;
83 }
84 if ( v0 == 2 )
85 {
86 v1 = 207;
87 goto LABEL_14;
88 }
89 if ( v0 == 3 )
90 {
91 v1 = 211;
92 goto LABEL_14;
93 }
94 if ( v0 == 4 )
95 {
96 v1 = 209;
97 goto LABEL_14;
98 }
99 if ( v0 == 5 )
100 {
101 v1 = 210;
102 goto LABEL_14;
103 }
104 LABEL_15:
105 pRenderer->DrawMaskToZBuffer(
106 pTownPortalBook_xs[v0],
107 pTownPortalBook_ys[v0],
108 *(&pTexture_TownPortalHarmn + v0),
109 v0 + 1);
110 LABEL_16:
111 ++v0;
112 }
113 while ( v0 < 6 );*/
114
115 pMouse->GetCursorPos(&a2);
116 //v2 = pMouse->GetCursorPos(&a2);
117 v3 = pRenderer->pActiveZBuffer[a2.x + pSRZBufferLineOffsets[a2.y]] & 0xFFFF;
118
119 if (v3)
120 {
121 if (_449B57_test_bit(pParty->_quest_bits, fountain_bits_lut[v3 - 1]))
122 pRenderer->DrawTextureIndexed(pTownPortalBook_xs[v3 - 1], pTownPortalBook_ys[v3 - 1], pTexture_TownPortalIcons[v3 - 1]);
123 }
124 v6.DrawTitleText(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u);
125
126
127 /* if ( !v3 ) // Town Portal
128 {
129 v6.DrawTitleText(pBook2Font, 0, 22, 0, pGlobalTXT_LocalizationStrings[10], 3); // "Town Portal"
130 return;
131 }
132 if ( v3 == 1 )
133 {
134 v4 = 206;
135 LABEL_30:
136 if ( (unsigned __int16)_449B57_test_bit(pParty->_quest_bits, v4) )
137 goto LABEL_31;
138 v6.DrawTitleText(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u); // "Town Portal"
139 return;
140 }
141 if ( v3 == 2 )
142 {
143 v4 = 208;
144 goto LABEL_30;
145 }
146 if ( v3 == 3 )
147 {
148 v4 = 207;
149 goto LABEL_30;
150 }
151 if ( v3 == 4 )
152 {
153 v4 = 211;
154 goto LABEL_30;
155 }
156 if ( v3 == 5 )
157 {
158 v4 = 209;
159 goto LABEL_30;
160 }
161 if ( v3 == 6 )
162 {
163 v4 = 210;
164 goto LABEL_30;
165 }
166 LABEL_31:
167 pRenderer->DrawTextureIndexed(word_4E1D3A[v3], pTownPortalBook_xs[v3 + 5], *(&pTex_tab_an_6b__zoom_on + v3));
168 v6.DrawTitleText(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u);*/
169 }
170 // 4E1D3A: using guessed type __int16 word_4E1D3A[];
171
172
173
174
30 //----- (00413CC6) -------------------------------------------------------- 175 //----- (00413CC6) --------------------------------------------------------
31 void BookUI_Draw(WindowType book) 176 void BookUI_Draw(WindowType book)
32 { 177 {
33 pRenderer->DrawTextureIndexed(471, 445, pIcons_LOD->GetTexture(uExitCancelTextureId)); 178 pRenderer->DrawTextureIndexed(471, 445, pIcons_LOD->GetTexture(uExitCancelTextureId));
34 switch (book) 179 switch (book)
38 case WINDOW_MapsBook: BookUI_Map_Draw(); break; 183 case WINDOW_MapsBook: BookUI_Map_Draw(); break;
39 case WINDOW_CalendarBook: BookUI_Calendar_Draw(); break; 184 case WINDOW_CalendarBook: BookUI_Calendar_Draw(); break;
40 case WINDOW_JournalBook: BookUI_Journal_Draw(); break; 185 case WINDOW_JournalBook: BookUI_Journal_Draw(); break;
41 186
42 case WINDOW_LloydsBeacon: DrawLloydBeaconsScreen(); break; 187 case WINDOW_LloydsBeacon: DrawLloydBeaconsScreen(); break;
43 case WINDOW_TownPortal: DrawTownPortalScreen(); break; 188 case WINDOW_TownPortal: BookUI_DrawTownPortalMap(); break;
44 } 189 }
45 } 190 }
46 191
47 192
48 193