27 {
"f",
"a",
"w",
"e",
"s",
"m",
"b",
"l",
"d"}};
29 std::array<std::array<unsigned char, 12>, 9>
32 {0, 3, 1, 8, 11, 7, 4, 10, 6, 2, 5, 9},
33 {0, 11, 2, 9, 6, 8, 5, 10, 3, 7, 1, 4},
34 {0, 4, 8, 9, 1, 10, 3, 11, 7, 6, 2, 5},
35 {0, 7, 10, 8, 2, 11, 1, 5, 3, 6, 4, 9},
36 {0, 5, 10, 11, 7, 2, 8, 1, 4, 9, 3, 6},
37 {0, 5, 9, 8, 3, 7, 6, 4, 1, 11, 2, 10},
38 {0, 1, 6, 9, 3, 5, 8, 11, 7, 10, 4, 2},
39 {0, 1, 10, 11, 9, 4, 3, 6, 5, 7, 8, 2},
40 {0, 9, 3, 7, 1, 5, 2, 10, 11, 8, 6, 4}}};
89 for (
uint i = 0; i < 11; ++i) {
151 {{ui_spellbook_btn_close_click}});
159 unsigned int pX_coord;
160 unsigned int pY_coord;
162 static unsigned int texture_tab_coord1[9][2] = {
163 {406, 9}, {406, 46}, {406, 84}, {406, 121}, {407, 158},
164 {405, 196}, {405, 234}, {405, 272}, {405, 309}};
166 static unsigned int texture_tab_coord0[9][2] = {
167 {415, 10}, {415, 46}, {415, 83}, {415, 121}, {415, 158},
168 {416, 196}, {416, 234}, {416, 271}, {416, 307}};
172 render->ClearZBuffer(0, 479);
174 for (
unsigned int i = 0; i < 9; i++) {
177 if (player->lastOpenedSpellbookPage == i) {
179 pX_coord = texture_tab_coord1[i][0];
180 pY_coord = texture_tab_coord1[i][1];
183 pX_coord = texture_tab_coord0[i][0];
184 pY_coord = texture_tab_coord0[i][1];
186 render->DrawTextureAlphaNew(pX_coord / 640.0
f, pY_coord / 480.0
f,
190 &player->spellbook.pChapters[player->lastOpenedSpellbookPage];
191 for (
unsigned int i = 0; i < 11; ++i) {
202 pIconPos[player->lastOpenedSpellbookPage]
204 [player->lastOpenedSpellbookPage]
209 pIconPos[player->lastOpenedSpellbookPage]
211 [player->lastOpenedSpellbookPage]
215 render->DrawTextureAlphaNew(
216 pX_coord / 640.0
f, pY_coord / 480.0
f, pTexture);
220 render->ZDrawTextureAlpha(
221 pIconPos[player->lastOpenedSpellbookPage]
223 [player->lastOpenedSpellbookPage]
227 pIconPos[player->lastOpenedSpellbookPage]
229 [player->lastOpenedSpellbookPage]
248 if (pt.
x < 640 && pt.
y < 480) {
254 pIconPos[player->lastOpenedSpellbookPage]
260 pIconPos[player->lastOpenedSpellbookPage]
265 render->DrawTextureAlphaNew(pX_coord / 640.0
f, pY_coord / 480.0
f,
290 for (
unsigned int i = 1; i <= 11; ++i) {
292 engine->config->debug_all_magic) {
294 sprintf(pContainer,
"SB%sS%02d",
299 sprintf(pContainer,
"SB%sC%02d",
312 render->DrawTextureAlphaNew(8 / 640.0
f, 8 / 480.0
f,
315 render->DrawTextureAlphaNew(476 / 640.0
f, 450 / 480.0
f,
317 render->DrawTextureAlphaNew(561 / 640.0
f, 450 / 480.0
f,
330 static const char *texNames[9] = {
"SBFB00",
"SBAB00",
"SBWB00",
331 "SBEB00",
"SBSB00",
"SBMB00",
332 "SBBB00",
"SBLB00",
"SBDB00"};
334 for (
unsigned int i = 0; i < 9; ++i) {
363 for (
uint i = 0; i < 9; ++i) {
383 for (
unsigned int i = 1; i <= 11; i++) {