comparison UI/Books/UIMapBook.cpp @ 1393:28f87f5234a1

More hardcoded UI colors moved to varibables.
author Nomad
date Thu, 18 Jul 2013 16:11:57 +0200
parents ae435824ac4d
children 71a2cf416478 c3bfa7e7cee1
comparison
equal deleted inserted replaced
1392:e3e9c0467529 1393:28f87f5234a1
20 #include "..\..\Math.h" 20 #include "..\..\Math.h"
21 #include "..\..\texts.h" 21 #include "..\..\texts.h"
22 // 22 //
23 #include "..\..\mm7_data.h" 23 #include "..\..\mm7_data.h"
24 24
25 //__int16 word_4E1D3A[777]; // weak
26 std::array<__int16, 6> pTownPortalBook_xs = {{260, 324, 147, 385, 390, 19}}; 25 std::array<__int16, 6> pTownPortalBook_xs = {{260, 324, 147, 385, 390, 19}};
27 std::array<__int16, 6> pTownPortalBook_ys = {{206, 84, 182, 239, 17, 283}}; 26 std::array<__int16, 6> pTownPortalBook_ys = {{206, 84, 182, 239, 17, 283}};
28 std::array<__int16, 6> pTownPortalBook_ws = {{ 80, 66, 68, 72, 67, 74}};
29 std::array<__int16, 6> pTownPortalBook_hs = {{ 55, 56, 65, 67, 67, 59}};
30
31 27
32 std::array<unsigned int, 5> pLloydsBeaconsPreviewXs = {{61, 281, 61, 281, 171}}; // 004E249C 28 std::array<unsigned int, 5> pLloydsBeaconsPreviewXs = {{61, 281, 61, 281, 171}}; // 004E249C
33 std::array<unsigned int, 5> pLloydsBeaconsPreviewYs = {{84, 84, 228, 228, 155}}; 29 std::array<unsigned int, 5> pLloydsBeaconsPreviewYs = {{84, 84, 228, 228, 155}};
34 std::array<unsigned int, 5> pLloydsBeacons_SomeXs = {{59, 279, 59, 279, 169}}; 30 std::array<unsigned int, 5> pLloydsBeacons_SomeXs = {{59, 279, 59, 279, 169}};
35 std::array<unsigned int, 5> pLloydsBeacons_SomeYs = {{82, 82, 226, 226, 153}}; 31 std::array<unsigned int, 5> pLloydsBeacons_SomeYs = {{82, 82, 226, 226, 153}};
59 v6.uFrameY = game_viewport_y; 55 v6.uFrameY = game_viewport_y;
60 v6.uFrameWidth = game_viewport_width; 56 v6.uFrameWidth = game_viewport_width;
61 v6.uFrameHeight = game_viewport_height; 57 v6.uFrameHeight = game_viewport_height;
62 v6.uFrameZ = game_viewport_z; 58 v6.uFrameZ = game_viewport_z;
63 v6.uFrameW = game_viewport_w; 59 v6.uFrameW = game_viewport_w;
64 60
65 const uint fountain_bits_lut[] = {PARTY_QUEST_FOUNTAIN_HARMONDALE, 61 const uint fountain_bits_lut[] = {PARTY_QUEST_FOUNTAIN_HARMONDALE,
66 PARTY_QUEST_FOUNTAIN_PIERPONT, 62 PARTY_QUEST_FOUNTAIN_PIERPONT,
67 PARTY_QUEST_FOUNTAIN_NIGHON, 63 PARTY_QUEST_FOUNTAIN_NIGHON,
68 PARTY_QUEST_FOUNTAIN_EVENMORN_ISLE, 64 PARTY_QUEST_FOUNTAIN_EVENMORN_ISLE,
69 PARTY_QUEST_FOUNTAIN_CELESTIA, 65 PARTY_QUEST_FOUNTAIN_CELESTIA,
75 pRenderer->DrawMaskToZBuffer(pTownPortalBook_xs[i], 71 pRenderer->DrawMaskToZBuffer(pTownPortalBook_xs[i],
76 pTownPortalBook_ys[i], 72 pTownPortalBook_ys[i],
77 pTexture_TownPortalIcons[i], i + 1); 73 pTexture_TownPortalIcons[i], i + 1);
78 } 74 }
79 75
80 /* v0 = 0;
81 do
82 {
83 if ( !v0 )
84 {
85 v1 = 206;
86 LABEL_14:
87 if ( !(unsigned __int16)_449B57_test_bit(pParty->_quest_bits, v1) )
88 goto LABEL_16;
89 goto LABEL_15;
90 }
91 if ( v0 == 1 )
92 {
93 v1 = 208;
94 goto LABEL_14;
95 }
96 if ( v0 == 2 )
97 {
98 v1 = 207;
99 goto LABEL_14;
100 }
101 if ( v0 == 3 )
102 {
103 v1 = 211;
104 goto LABEL_14;
105 }
106 if ( v0 == 4 )
107 {
108 v1 = 209;
109 goto LABEL_14;
110 }
111 if ( v0 == 5 )
112 {
113 v1 = 210;
114 goto LABEL_14;
115 }
116 LABEL_15:
117 pRenderer->DrawMaskToZBuffer(
118 pTownPortalBook_xs[v0],
119 pTownPortalBook_ys[v0],
120 *(&pTexture_TownPortalHarmn + v0),
121 v0 + 1);
122 LABEL_16:
123 ++v0;
124 }
125 while ( v0 < 6 );*/
126
127 pMouse->GetCursorPos(&a2); 76 pMouse->GetCursorPos(&a2);
128 //v2 = pMouse->GetCursorPos(&a2);
129 v3 = pRenderer->pActiveZBuffer[a2.x + pSRZBufferLineOffsets[a2.y]] & 0xFFFF; 77 v3 = pRenderer->pActiveZBuffer[a2.x + pSRZBufferLineOffsets[a2.y]] & 0xFFFF;
130 78
131 if (v3) 79 if (v3)
132 { 80 {
133 if (_449B57_test_bit(pParty->_quest_bits, fountain_bits_lut[v3 - 1])) 81 if (_449B57_test_bit(pParty->_quest_bits, fountain_bits_lut[v3 - 1]))
134 pRenderer->DrawTextureIndexed(pTownPortalBook_xs[v3 - 1], pTownPortalBook_ys[v3 - 1], pTexture_TownPortalIcons[v3 - 1]); 82 pRenderer->DrawTextureIndexed(pTownPortalBook_xs[v3 - 1], pTownPortalBook_ys[v3 - 1], pTexture_TownPortalIcons[v3 - 1]);
135 } 83 }
136 v6.DrawTitleText(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u); 84 v6.DrawTitleText(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u);
137
138
139 /* if ( !v3 ) // Town Portal
140 {
141 v6.DrawTitleText(pBook2Font, 0, 22, 0, pGlobalTXT_LocalizationStrings[10], 3); // "Town Portal"
142 return;
143 }
144 if ( v3 == 1 )
145 {
146 v4 = 206;
147 LABEL_30:
148 if ( (unsigned __int16)_449B57_test_bit(pParty->_quest_bits, v4) )
149 goto LABEL_31;
150 v6.DrawTitleText(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u); // "Town Portal"
151 return;
152 }
153 if ( v3 == 2 )
154 {
155 v4 = 208;
156 goto LABEL_30;
157 }
158 if ( v3 == 3 )
159 {
160 v4 = 207;
161 goto LABEL_30;
162 }
163 if ( v3 == 4 )
164 {
165 v4 = 211;
166 goto LABEL_30;
167 }
168 if ( v3 == 5 )
169 {
170 v4 = 209;
171 goto LABEL_30;
172 }
173 if ( v3 == 6 )
174 {
175 v4 = 210;
176 goto LABEL_30;
177 }
178 LABEL_31:
179 pRenderer->DrawTextureIndexed(word_4E1D3A[v3], pTownPortalBook_xs[v3 + 5], *(&pTex_tab_an_6b__zoom_on + v3));
180 v6.DrawTitleText(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u);*/
181 } 85 }
182 // 4E1D3A: using guessed type __int16 word_4E1D3A[];
183 86
184 //----- (00410DEC) -------------------------------------------------------- 87 //----- (00410DEC) --------------------------------------------------------
185 unsigned int __cdecl DrawLloydBeaconsScreen() 88 unsigned int __cdecl DrawLloydBeaconsScreen()
186 { 89 {
187 Player *pPlayer; // esi@1 90 Player *pPlayer; // esi@1