Mercurial > mm7
comparison GUIWindow.cpp @ 688:c0bfb386b15f
some ui cleanup
author | Gloval |
---|---|
date | Sat, 16 Mar 2013 01:11:39 +0400 |
parents | 59713bb36033 |
children | e0a1fccc89b1 |
comparison
equal
deleted
inserted
replaced
678:35a97ce58790 | 688:c0bfb386b15f |
---|---|
145 return v9; | 145 return v9; |
146 } | 146 } |
147 | 147 |
148 | 148 |
149 //----- (0041D3B7) -------------------------------------------------------- | 149 //----- (0041D3B7) -------------------------------------------------------- |
150 char GUIWindow::DrawQuickCharRecord() | 150 void GUIWindow::DrawQuickCharRecord() |
151 { | 151 { |
152 Player *pPlayer; // esi@1 | 152 Player *pPlayer; // esi@1 |
153 int v6; // eax@5 | 153 int v6; // eax@5 |
154 int v7; // ebx@5 | 154 int v7; // ebx@5 |
155 unsigned int v8; // ecx@5 | 155 unsigned int v8; // ecx@5 |
156 int v9; // ebx@5 | 156 int v9; // ebx@5 |
215 v13 = pTextures_PlayerFaces[(unsigned int)ptr_1C][v15->uTextureID-1]; | 215 v13 = pTextures_PlayerFaces[(unsigned int)ptr_1C][v15->uTextureID-1]; |
216 } | 216 } |
217 | 217 |
218 pRenderer->DrawTextureTransparent(uFrameX + 24, uFrameY + 24, v13); | 218 pRenderer->DrawTextureTransparent(uFrameX + 24, uFrameY + 24, v13); |
219 v16 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); | 219 v16 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); |
220 sprintf(pTmpBuf, "\xC%05d", v16); | 220 sprintf(pTmpBuf, "\f%05d", v16); |
221 sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[429], pPlayer->pName, pClassNames[pPlayer->classType]); | 221 sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[429], pPlayer->pName, pClassNames[pPlayer->classType]); |
222 strcat(pTmpBuf, pTmpBuf2); | 222 strcat(pTmpBuf, pTmpBuf2); |
223 strcat(pTmpBuf, "\xC" "00000\n"); | 223 strcat(pTmpBuf, "\f00000\n"); |
224 v20 = UI_GetHealthManaStringColor(pPlayer->sHealth, pPlayer->GetMaxHealth()); | 224 v20 = UI_GetHealthManaStringColor(pPlayer->sHealth, pPlayer->GetMaxHealth()); |
225 sprintf(pTmpBuf2, "%s : \x0C" "%05u%d\x0C" "00000 / %d\n", pGlobalTXT_LocalizationStrings[108], | 225 sprintf(pTmpBuf2, "%s : \f%05u%d\f00000 / %d\n", pGlobalTXT_LocalizationStrings[108], |
226 v20, pPlayer->sHealth, pPlayer->GetMaxHealth()); | 226 v20, pPlayer->sHealth, pPlayer->GetMaxHealth()); |
227 strcat(pTmpBuf, pTmpBuf2); | 227 strcat(pTmpBuf, pTmpBuf2); |
228 v24 = UI_GetHealthManaStringColor(pPlayer->sMana, pPlayer->GetMaxMana()); | 228 v24 = UI_GetHealthManaStringColor(pPlayer->sMana, pPlayer->GetMaxMana()); |
229 sprintf(pTmpBuf2, "%s : \x0C" "%05u%d\x0C" "00000 / %d\n", pGlobalTXT_LocalizationStrings[212], | 229 sprintf(pTmpBuf2, "%s : \f%05u%d\f00000 / %d\n", pGlobalTXT_LocalizationStrings[212], |
230 v24, pPlayer->sMana, pPlayer->GetMaxMana()); | 230 v24, pPlayer->sMana, pPlayer->GetMaxMana()); |
231 strcat(pTmpBuf, pTmpBuf2); | 231 strcat(pTmpBuf, pTmpBuf2); |
232 v25 = pPlayer->GetMajorConditionIdx(); | 232 v25 = pPlayer->GetMajorConditionIdx(); |
233 sprintf(pTmpBuf2, "%s: \x0C" "%05d%s\x0C" "00000\n", pGlobalTXT_LocalizationStrings[47], | 233 sprintf(pTmpBuf2, "%s: \f%05d%s\f00000\n", pGlobalTXT_LocalizationStrings[47], |
234 GetConditionDrawColor(v25), aCharacterConditionNames[v25]); | 234 GetConditionDrawColor(v25), aCharacterConditionNames[v25]); |
235 strcat(pTmpBuf, pTmpBuf2); | 235 strcat(pTmpBuf, pTmpBuf2); |
236 v28 = pPlayer->uQuickSpell; | 236 v28 = pPlayer->uQuickSpell; |
237 if ( v28 ) | 237 if ( v28 ) |
238 v29 = pSpellStats->pInfos[v28].pShortName; | 238 v29 = pSpellStats->pInfos[v28].pShortName; |
261 | 261 |
262 v39 = ""; | 262 v39 = ""; |
263 if ( uFramesetIDa == 0 ) | 263 if ( uFramesetIDa == 0 ) |
264 v39 = pGlobalTXT_LocalizationStrings[153]; | 264 v39 = pGlobalTXT_LocalizationStrings[153]; |
265 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[450], v39); | 265 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[450], v39); |
266 return DrawText(pFontArrus, 14, 114, 0, pTmpBuf, 0, 0, 0); | 266 DrawText(pFontArrus, 14, 114, 0, pTmpBuf, 0, 0, 0); |
267 } | 267 } |
268 | 268 |
269 //----- (0041D08F) -------------------------------------------------------- | 269 //----- (0041D08F) -------------------------------------------------------- |
270 void GUIWindow::_41D08F(int a2, int a3, int a4, int a5) | 270 void GUIWindow::_41D08F(int a2, int a3, int a4, int a5) |
271 { | 271 { |
472 v1->CreateButton(0x1DBu, 0x1BDu, 0x9Eu, 0x22u, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[79], 0); | 472 v1->CreateButton(0x1DBu, 0x1BDu, 0x9Eu, 0x22u, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[79], 0); |
473 pCurrentScreen = SCREEN_BOOKS; | 473 pCurrentScreen = SCREEN_BOOKS; |
474 awards_count2 = 0; | 474 awards_count2 = 0; |
475 dword_506528 = 0; | 475 dword_506528 = 0; |
476 dword_50651C = 0; | 476 dword_50651C = 0; |
477 awards_count = 0; | 477 awards_count = 0; |
478 if ( v1->ptr_1C == (void *)177 ) | 478 switch (v1->par1C) |
479 { | 479 { |
480 byte_506360 = 0; | 480 case 177:{ |
481 pTexture_CurrentBook = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("lb_bordr", TEXTURE_16BIT_PALETTE)]; | 481 byte_506360 = 0; |
482 pTexture_LloydBeacons[0] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbmap", TEXTURE_16BIT_PALETTE)]; | 482 pTexture_CurrentBook = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("lb_bordr", TEXTURE_16BIT_PALETTE)]; |
483 pTexture_50635C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbmap", TEXTURE_16BIT_PALETTE)]; | 483 pTexture_LloydBeacons[0] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbmap", TEXTURE_16BIT_PALETTE)]; |
484 pTex_tab_an_6b__zoom_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6b", TEXTURE_16BIT_PALETTE)]; | 484 pTexture_50635C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbmap", TEXTURE_16BIT_PALETTE)]; |
485 pTex_tab_an_6a__zoom_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6a", TEXTURE_16BIT_PALETTE)]; | 485 pTex_tab_an_6b__zoom_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6b", TEXTURE_16BIT_PALETTE)]; |
486 pBtn_Book_1 = v1->CreateButton(415, 13, 39, 36, 1, 0, 0xB2u, 0, 0, pGlobalTXT_LocalizationStrings[375], 0); | 486 pTex_tab_an_6a__zoom_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6a", TEXTURE_16BIT_PALETTE)]; |
487 pBtn_Book_2 = v1->CreateButton(415, 48, 39, 36, 1, 0, 0xB2u, 1, 0, pGlobalTXT_LocalizationStrings[523], 0); | 487 pBtn_Book_1 = v1->CreateButton(415, 13, 39, 36, 1, 0, 0xB2u, 0, 0, pGlobalTXT_LocalizationStrings[375], 0); |
488 v17 = &pParty->pPlayers[_506348_current_lloyd_playerid]; | 488 pBtn_Book_2 = v1->CreateButton(415, 48, 39, 36, 1, 0, 0xB2u, 1, 0, pGlobalTXT_LocalizationStrings[523], 0); |
489 v23 = 1; | 489 v17 = &pParty->pPlayers[_506348_current_lloyd_playerid]; |
490 v18 = v17->pActiveSkills[14]; | 490 v23 = 1; |
491 if ( HIBYTE(v18) & 1 || (v18 & 0x80u) != 0 ) | 491 v18 = v17->pActiveSkills[14]; |
492 { | 492 if ( HIBYTE(v18) & 1 || (v18 & 0x80u) != 0 ) |
493 v23 = 5; | 493 { |
494 } | 494 v23 = 5; |
495 else | 495 } |
496 { | 496 else |
497 if ( v18 & 0x40 ) | 497 { |
498 v23 = 3; | 498 if ( v18 & 0x40 ) |
499 } | 499 v23 = 3; |
500 v19 = 0; | 500 } |
501 if ( v23 > 0 ) | 501 v19 = 0; |
502 { | 502 if ( v23 > 0 ) |
503 { | |
504 do | |
505 { | |
506 v1->CreateButton(pLloydsBeaconsPreviewXs[v19], pLloydsBeaconsPreviewYs[v19], 0x5Cu, 0x44u, 1, 180, 0xB3u, v19, 0, "", 0); | |
507 ++v19; | |
508 } | |
509 while ( (signed int)v19 < v23 ); | |
510 } | |
511 v20 = 0; | |
512 v21 = v17->pInstalledBeacons; | |
503 do | 513 do |
514 { | |
515 if ( *(_QWORD *)v21 >= (signed __int64)pParty->uTimePlayed ) | |
516 LoadThumbnailLloydTexture(v20, _506348_current_lloyd_playerid + 1); | |
517 else | |
518 memset(v21, 0, 0x1Cu); | |
519 ++v20; | |
520 v21 = (char *)v21 + 28; | |
521 } | |
522 while ( (signed int)v20 < 5 ); | |
523 } | |
524 break; | |
525 case 195: | |
504 { | 526 { |
505 v1->CreateButton(pLloydsBeaconsPreviewXs[v19], pLloydsBeaconsPreviewYs[v19], 0x5Cu, 0x44u, 1, 180, 0xB3u, v19, 0, "", 0); | |
506 ++v19; | |
507 } | |
508 while ( (signed int)v19 < v23 ); | |
509 } | |
510 v20 = 0; | |
511 v21 = v17->pInstalledBeacons; | |
512 do | |
513 { | |
514 if ( *(_QWORD *)v21 >= (signed __int64)pParty->uTimePlayed ) | |
515 LoadThumbnailLloydTexture(v20, _506348_current_lloyd_playerid + 1); | |
516 else | |
517 memset(v21, 0, 0x1Cu); | |
518 ++v20; | |
519 v21 = (char *)v21 + 28; | |
520 } | |
521 while ( (signed int)v20 < 5 ); | |
522 } | |
523 else | |
524 { | |
525 if ( v1->ptr_1C == (void *)195 ) | |
526 { | |
527 pTexture_CurrentBook = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("townport", TEXTURE_16BIT_PALETTE)]; | 527 pTexture_CurrentBook = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("townport", TEXTURE_16BIT_PALETTE)]; |
528 pTexture_TownPortalHarmn = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tpharmndy", TEXTURE_16BIT_PALETTE)]; | 528 pTexture_TownPortalHarmn = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tpharmndy", TEXTURE_16BIT_PALETTE)]; |
529 pTexture_TownPortalElf = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tpelf", TEXTURE_16BIT_PALETTE)]; | 529 pTexture_TownPortalElf = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tpelf", TEXTURE_16BIT_PALETTE)]; |
530 pTexture_TownPortalWarlock = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tpwarlock", TEXTURE_16BIT_PALETTE)]; | 530 pTexture_TownPortalWarlock = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tpwarlock", TEXTURE_16BIT_PALETTE)]; |
531 pTexture_TownPortalIsland = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tpisland", TEXTURE_16BIT_PALETTE)]; | 531 pTexture_TownPortalIsland = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tpisland", TEXTURE_16BIT_PALETTE)]; |
532 pTexture_TownPortalHeaven = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tpheaven", TEXTURE_16BIT_PALETTE)]; | 532 pTexture_TownPortalHeaven = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tpheaven", TEXTURE_16BIT_PALETTE)]; |
533 v16 = 0; | 533 v16 = 0; |
534 pTexture_TownPortalHell = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture( "tphell", TEXTURE_16BIT_PALETTE)]; | 534 pTexture_TownPortalHell = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture( "tphell", TEXTURE_16BIT_PALETTE)]; |
535 do | 535 do |
536 { | |
537 v1->CreateButton(pTownPortalBook_xs[v16], pTownPortalBook_ys[v16], pTownPortalBook_ws[v16], pTownPortalBook_hs[v16], 1, 182, 0xB7u, v16, 0, "", 0); | |
538 ++v16; | |
539 } | |
540 while ( (signed int)v16 < 6 ); | |
541 } | |
542 break; | |
543 case 200: | |
536 { | 544 { |
537 v1->CreateButton(pTownPortalBook_xs[v16], pTownPortalBook_ys[v16], pTownPortalBook_ws[v16], pTownPortalBook_hs[v16], 1, 182, 0xB7u, v16, 0, "", 0); | 545 pTexture_CurrentBook = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture( "sbquiknot", TEXTURE_16BIT_PALETTE)]; |
538 ++v16; | 546 pSpellBookPagesTextr_10 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture( "divbar", TEXTURE_16BIT_PALETTE)]; |
539 } | 547 pTex_tab_an_6b__zoom_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6b", TEXTURE_16BIT_PALETTE)]; |
540 while ( (signed int)v16 < 6 ); | 548 pTex_tab_an_7b__zoot_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-7b", TEXTURE_16BIT_PALETTE)]; |
541 } | 549 pTex_tab_an_6a__zoom_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6a", TEXTURE_16BIT_PALETTE)]; |
542 else | 550 pTex_tab_an_7a__zoot_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-7a", TEXTURE_16BIT_PALETTE)]; |
543 { | 551 pBtn_Book_1 = v1->CreateButton(pViewport->uViewportX + 398, pViewport->uViewportY + 1, pTex_tab_an_6b__zoom_on->uTextureWidth, |
544 if ( v1->ptr_1C == (void *)200 ) | 552 pTex_tab_an_6b__zoom_on->uTextureHeight, 1, 0, 0x47u, 0xBu, 0, pGlobalTXT_LocalizationStrings[192],// "Scroll Up" |
545 { | 553 pTex_tab_an_6b__zoom_on, 0); |
546 pTexture_CurrentBook = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture( "sbquiknot", TEXTURE_16BIT_PALETTE)]; | 554 pBtn_Book_2 = v1->CreateButton(pViewport->uViewportX + 398, pViewport->uViewportY + 38, pTex_tab_an_7b__zoot_on->uTextureHeight, |
547 pTextures_5064A0[10] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture( "divbar", TEXTURE_16BIT_PALETTE)]; | 555 pTex_tab_an_7b__zoot_on->uTextureHeight, 1, 0, 0x47u, 0xAu, 0, pGlobalTXT_LocalizationStrings[193],// "Scroll Down" |
548 pTex_tab_an_6b__zoom_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6b", TEXTURE_16BIT_PALETTE)]; | 556 pTex_tab_an_7b__zoot_on, 0); |
549 pTex_tab_an_7b__zoot_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-7b", TEXTURE_16BIT_PALETTE)]; | 557 awards_count = 0; |
550 pTex_tab_an_6a__zoom_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6a", TEXTURE_16BIT_PALETTE)]; | 558 memset(&achievedAwardsIndex, 0, 4000); |
551 pTex_tab_an_7a__zoot_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-7a", TEXTURE_16BIT_PALETTE)]; | 559 for ( i = dword_506528; i < 512; ++i ) |
552 pBtn_Book_1 = v1->CreateButton(pViewport->uViewportX + 398, pViewport->uViewportY + 1, pTex_tab_an_6b__zoom_on->uTextureWidth, | 560 { |
553 pTex_tab_an_6b__zoom_on->uTextureHeight, 1, 0, 0x47u, 0xBu, 0, pGlobalTXT_LocalizationStrings[192],// "Scroll Up" | |
554 pTex_tab_an_6b__zoom_on, 0); | |
555 pBtn_Book_2 = v1->CreateButton(pViewport->uViewportX + 398, pViewport->uViewportY + 38, pTex_tab_an_7b__zoot_on->uTextureHeight, | |
556 pTex_tab_an_7b__zoot_on->uTextureHeight, 1, 0, 0x47u, 0xAu, 0, pGlobalTXT_LocalizationStrings[193],// "Scroll Down" | |
557 pTex_tab_an_7b__zoot_on, 0); | |
558 awards_count = 0; | |
559 memset(&achievedAwardsIndex, 0, 4000); | |
560 for ( i = dword_506528; i < 512; ++i ) | |
561 { | |
562 v14 = (char *)pQuestTable[i-1];//(&dword_722F10)[4 * i]; | 561 v14 = (char *)pQuestTable[i-1];//(&dword_722F10)[4 * i]; |
563 if ( _449B57_test_bit(pParty->_quest_bits, i) && v14 ) | 562 if ( _449B57_test_bit(pParty->_quest_bits, i) && v14 ) |
564 { | 563 { |
565 v15 = awards_count++; | 564 v15 = awards_count++; |
566 achievedAwardsIndex[v15] = i; | 565 achievedAwardsIndex[v15] = i; |
566 } | |
567 } | 567 } |
568 } | |
569 } | |
570 else | |
571 { | |
572 if ( v1->ptr_1C == (void *)201 ) | |
573 { | |
574 pTexture_AutonotesBook = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbautnot", TEXTURE_16BIT_PALETTE)]; | |
575 pTextures_5064A0[10] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("divbar", TEXTURE_16BIT_PALETTE)]; | |
576 pTex_tab_an_6b__zoom_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6b", TEXTURE_16BIT_PALETTE)]; | |
577 pTex_tab_an_7b__zoot_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-7b", TEXTURE_16BIT_PALETTE)]; | |
578 pTex_tab_an_6a__zoom_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6a", TEXTURE_16BIT_PALETTE)]; | |
579 pTex_tab_an_7a__zoot_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-7a", TEXTURE_16BIT_PALETTE)]; | |
580 pTexture_506394 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-1b", TEXTURE_16BIT_PALETTE)]; | |
581 pTexture_506390 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-1a", TEXTURE_16BIT_PALETTE)]; | |
582 pTexture_50638C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-2b", TEXTURE_16BIT_PALETTE)]; | |
583 pTexture_506388 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-2a", TEXTURE_16BIT_PALETTE)]; | |
584 pTexture_506384 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-3b", TEXTURE_16BIT_PALETTE)]; | |
585 pTexture_506380 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-3a", TEXTURE_16BIT_PALETTE)]; | |
586 pTexture_50637C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-5b", TEXTURE_16BIT_PALETTE)]; | |
587 pTexture_506378 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-5a", TEXTURE_16BIT_PALETTE)]; | |
588 pTexture_506374 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-4b", TEXTURE_16BIT_PALETTE)]; | |
589 pTexture_506370 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-4a", TEXTURE_16BIT_PALETTE)]; | |
590 pTexture_50636C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-8b", TEXTURE_16BIT_PALETTE)]; | |
591 pTexture_506368 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-8a", TEXTURE_16BIT_PALETTE)]; | |
592 pBtn_Book_1 = v1->CreateButton(pViewport->uViewportX + 398, pViewport->uViewportY + 1, 0x32u, 0x22u, 1, 0, 0x47u, 0xBu, 0, | |
593 pGlobalTXT_LocalizationStrings[193], pTex_tab_an_6b__zoom_on, 0); | |
594 pBtn_Book_2 = v1->CreateButton(pViewport->uViewportX + 398, pViewport->uViewportY + 38, 0x32u, 0x22u, 1, 0, 0x47u, 0xAu, 0, | |
595 pGlobalTXT_LocalizationStrings[192], pTex_tab_an_7b__zoot_on, 0); | |
596 pBtn_Book_3 = v1->CreateButton(pViewport->uViewportX + 398, pViewport->uViewportY + 113, 0x32u, 0x22u, 1, 0, 0x47u, 2u, 0, | |
597 pGlobalTXT_LocalizationStrings[85], pTexture_506394, 0);// "Potion Notes" | |
598 pBtn_Book_4 = v1->CreateButton(pViewport->uViewportX + 399, pViewport->uViewportY + 150, 0x32u, 0x22u, 1, 0, 0x47u, 3u, 0, | |
599 pGlobalTXT_LocalizationStrings[137], pTexture_50638C, 0);// "Fountain Notes" | |
600 pBtn_Book_5 = v1->CreateButton(pViewport->uViewportX + 397, pViewport->uViewportY + 188, 0x32u, 0x22u, 1, 0, 0x47u, 4u, 0, | |
601 pGlobalTXT_LocalizationStrings[8], pTexture_506384, 0);// "Obelisk Notes" | |
602 pBtn_Book_6 = v1->CreateButton(pViewport->uViewportX + 397, pViewport->uViewportY + 226, 0x32u, 0x22u, 1, 0, 0x47u, 5u, 0, | |
603 pGlobalTXT_LocalizationStrings[141], pTexture_50637C, 0);// "Seer Notes" | |
604 pBtn_Autonotes_Misc = v1->CreateButton(pViewport->uViewportX + 397, pViewport->uViewportY + 264, 0x32u, 0x22u, 1, 0, 0x47u, 6u, 0, | |
605 pGlobalTXT_LocalizationStrings[123], pTexture_506374, 0);// "Miscellaneous Notes" | |
606 v9 = v1->CreateButton(pViewport->uViewportX + 397, pViewport->uViewportY + 302, 0x32u, 0x22u, 1, 0, 0x47u, 7u, 0, | |
607 pGlobalTXT_LocalizationStrings[662], pTexture_50636C, 0);// "Instructors" | |
608 v10 = dword_506528; | |
609 pBtn_Autonotes_Instructors = v9; | |
610 awards_count = 0; | |
611 while ( v10 < 196 ) | |
612 { | |
613 if ( dword_506568 == pAutonoteTxt[v10-1].eType)//dword_72371C[2 * v10] ) | |
614 { | |
615 //v25 = (&dword_723718_autonote_related)[8 * (signed __int16)v10]; | |
616 v25 = (char *)pAutonoteTxt[v10-1].pText; | |
617 if ( (short)v10 ) | |
618 { | |
619 if ( _449B57_test_bit(pParty->_autonote_bits, v10) && v25 ) | |
620 { | |
621 v11 = awards_count++; | |
622 achievedAwardsIndex[v11] = (signed __int16)v10; | |
623 } | |
624 } | |
625 } | |
626 ++v10; | |
627 } | |
628 } | |
629 else | |
630 { | |
631 if ( v1->ptr_1C == (void *)202 ) | |
632 { | |
633 dword_506364 = 1; | |
634 pTextures_5064A0[12] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbmap", TEXTURE_16BIT_PALETTE)]; | |
635 pTex_tab_an_6b__zoom_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("zoom-on", TEXTURE_16BIT_PALETTE)]; | |
636 pTex_tab_an_7b__zoot_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("zoot-on", TEXTURE_16BIT_PALETTE)]; | |
637 pTex_tab_an_6a__zoom_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("zoom-off", TEXTURE_16BIT_PALETTE)]; | |
638 pTex_tab_an_7a__zoot_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("zoot-off", TEXTURE_16BIT_PALETTE)]; | |
639 pTexture_506394 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabNon", TEXTURE_16BIT_PALETTE)]; | |
640 pTexture_506390 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabNoff", TEXTURE_16BIT_PALETTE)]; | |
641 pTexture_50638C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabSon", TEXTURE_16BIT_PALETTE)]; | |
642 pTexture_506388 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabSoff", TEXTURE_16BIT_PALETTE)]; | |
643 pTexture_506384 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabEon", TEXTURE_16BIT_PALETTE)]; | |
644 pTexture_506380 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabEoff", TEXTURE_16BIT_PALETTE)]; | |
645 pTexture_50637C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabWon", TEXTURE_16BIT_PALETTE)]; | |
646 pTexture_506378 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabWoff", TEXTURE_16BIT_PALETTE)]; | |
647 pBtn_Book_1 = v1->CreateButton(pViewport->uViewportX + 398, pViewport->uViewportY + 1, 0x32u, 0x22u, 1, 0, 0x47u, 0, 0, | |
648 pGlobalTXT_LocalizationStrings[251], pTex_tab_an_6b__zoom_on, 0);// "Zoom In" | |
649 pBtn_Book_2 = v1->CreateButton(pViewport->uViewportX + 398, pViewport->uViewportY + 38, 0x32u, 0x22u, 1, 0, 0x47u, 1, 0, | |
650 pGlobalTXT_LocalizationStrings[252], pTex_tab_an_7b__zoot_on, 0);// "Zoom Out" | |
651 pBtn_Book_3 = v1->CreateButton(pViewport->uViewportX + 397, pViewport->uViewportY + 113, 0x32u, 0x22u, 1, 0, 0x47u, 2, 0, | |
652 pGlobalTXT_LocalizationStrings[192], (Texture *)"", 0);// Scroll Up | |
653 pBtn_Book_4 = v1->CreateButton(pViewport->uViewportX + 397, pViewport->uViewportY + 150, 0x32u, 0x22u, 1, 0, 0x47u, 3, 0, | |
654 pGlobalTXT_LocalizationStrings[193], (Texture *)"", 0);// Scroll Down | |
655 pBtn_Book_5 = v1->CreateButton(pViewport->uViewportX + 397, pViewport->uViewportY + 188, 0x32u, 0x22u, 1, 0, 0x47u, 4, 0, | |
656 pGlobalTXT_LocalizationStrings[573], (Texture *)"", 0);// "Scroll Right" | |
657 pBtn_Book_6 = v1->CreateButton(pViewport->uViewportX + 397, pViewport->uViewportY + 226, 0x32u, 0x22u, 1, 0, 0x47u, 5, 0, | |
658 pGlobalTXT_LocalizationStrings[572], (Texture *)"", 0);// "Scroll Left" | |
659 return; | |
660 } | |
661 if ( v1->ptr_1C == (void *)203 ) | |
662 { | |
663 pTextures_5064A0[13] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbdate-time", TEXTURE_16BIT_PALETTE)]; | |
664 pTex_moon_new = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_new", TEXTURE_16BIT_PALETTE)]; | |
665 pTex_moon_4 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_4", TEXTURE_16BIT_PALETTE)]; | |
666 pTex_moon_2 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_2", TEXTURE_16BIT_PALETTE)]; | |
667 pTex_moon_2_2 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_2", TEXTURE_16BIT_PALETTE)]; | |
668 pTex_moon_ful = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_ful", TEXTURE_16BIT_PALETTE)]; | |
669 return; | |
670 } | |
671 if ( v1->ptr_1C != (void *)224 ) | |
672 return; | |
673 pTextures_5064A0[11] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbplayrnot", TEXTURE_16BIT_PALETTE)]; | |
674 pTex_tab_an_6b__zoom_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6b", TEXTURE_16BIT_PALETTE)]; | |
675 pTex_tab_an_7b__zoot_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-7b", TEXTURE_16BIT_PALETTE)]; | |
676 pTex_tab_an_6a__zoom_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6a", TEXTURE_16BIT_PALETTE)]; | |
677 pTex_tab_an_7a__zoot_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-7a", TEXTURE_16BIT_PALETTE)]; | |
678 pBtn_Book_1 = v1->CreateButton( | |
679 pViewport->uViewportX + 398, | |
680 pViewport->uViewportY + 1, | |
681 pTex_tab_an_6b__zoom_on->uTextureWidth, | |
682 pTex_tab_an_6b__zoom_on->uTextureHeight, | |
683 1, | |
684 0, | |
685 0x47u, | |
686 0xBu, | |
687 0, | |
688 pGlobalTXT_LocalizationStrings[192], | |
689 pTex_tab_an_6b__zoom_on, | |
690 0); | |
691 pBtn_Book_2 = v1->CreateButton( | |
692 pViewport->uViewportX + 398, | |
693 pViewport->uViewportY + 38, | |
694 pTex_tab_an_7b__zoot_on->uTextureHeight, | |
695 pTex_tab_an_7b__zoot_on->uTextureHeight, | |
696 1, | |
697 0, | |
698 0x47u, | |
699 0xAu, | |
700 0, | |
701 pGlobalTXT_LocalizationStrings[193], | |
702 pTex_tab_an_7b__zoot_on, | |
703 0); | |
704 awards_count = 0; | |
705 v26.uFrameX = 48; | |
706 v26.uFrameY = 70; | |
707 v26.uFrameWidth = 360; | |
708 v26.uFrameHeight = 264; | |
709 v2 = LOBYTE(pAutonoteFont->uFontHeight) - 3; | |
710 v26.uFrameZ = 407; | |
711 v26.uFrameHeight = v2 * 264 / v2; | |
712 v26.uFrameW = v26.uFrameHeight + 69; | |
713 memset(&achievedAwardsIndex, 0, 4000); | |
714 memset(byte_5C6D50, 0, 0x64u); | |
715 if ( dword_506528 < 29 ) | |
716 { | |
717 v3 = (__int64 *)&pParty->field_3C.field_4F0[2 * dword_506528]; | |
718 for(int i=dword_506528+1;i<dword_506528+31;i++) | |
719 { | |
720 v4 = pStorylineText->StoreLine[i].pText; | |
721 if ( *v3 ) | |
722 { | |
723 if ( v4 ) | |
724 { | |
725 v5 = BuilDialogueString(v4, uActiveCharacter - 1, 0, 0, 0, v3); | |
726 v6 = pAutonoteFont->CalcTextHeight(v5, &v26, 1, 0); | |
727 v7 = (v6 - 3) / (signed int)v26.uFrameHeight; | |
728 v8 = v7 + 1; | |
729 if ( (signed int)v7 + 1 > 0 ) | |
730 { | |
731 memset32((char *)&achievedAwardsIndex + 4 * awards_count , i, v8); | |
732 do | |
733 { | |
734 LODWORD(v7) = awards_count++; | |
735 byte_5C6D50[(int)v7] = BYTE4(v7); | |
736 ++HIDWORD(v7); | |
737 } | |
738 while ( SHIDWORD(v7) < (signed int)v8 ); | |
739 } | |
740 } | |
741 } | |
742 ++i; | |
743 ++v3; | |
744 } | |
745 } | |
746 } | |
747 } | |
748 v12 = awards_count; | 568 v12 = awards_count; |
749 awards_count = 0; | 569 awards_count = 0; |
750 awards_count2 = v12; | 570 awards_count2 = v12; |
751 } | 571 } |
752 } | 572 break; |
573 case 201: | |
574 { | |
575 pTexture_AutonotesBook = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbautnot", TEXTURE_16BIT_PALETTE)]; | |
576 pSpellBookPagesTextr_10 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("divbar", TEXTURE_16BIT_PALETTE)]; | |
577 pTex_tab_an_6b__zoom_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6b", TEXTURE_16BIT_PALETTE)]; | |
578 pTex_tab_an_7b__zoot_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-7b", TEXTURE_16BIT_PALETTE)]; | |
579 pTex_tab_an_6a__zoom_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6a", TEXTURE_16BIT_PALETTE)]; | |
580 pTex_tab_an_7a__zoot_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-7a", TEXTURE_16BIT_PALETTE)]; | |
581 pTexture_506394 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-1b", TEXTURE_16BIT_PALETTE)]; | |
582 pTexture_506390 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-1a", TEXTURE_16BIT_PALETTE)]; | |
583 pTexture_50638C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-2b", TEXTURE_16BIT_PALETTE)]; | |
584 pTexture_506388 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-2a", TEXTURE_16BIT_PALETTE)]; | |
585 pTexture_506384 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-3b", TEXTURE_16BIT_PALETTE)]; | |
586 pTexture_506380 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-3a", TEXTURE_16BIT_PALETTE)]; | |
587 pTexture_50637C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-5b", TEXTURE_16BIT_PALETTE)]; | |
588 pTexture_506378 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-5a", TEXTURE_16BIT_PALETTE)]; | |
589 pTexture_506374 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-4b", TEXTURE_16BIT_PALETTE)]; | |
590 pTexture_506370 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-4a", TEXTURE_16BIT_PALETTE)]; | |
591 pTexture_50636C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-8b", TEXTURE_16BIT_PALETTE)]; | |
592 pTexture_506368 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-8a", TEXTURE_16BIT_PALETTE)]; | |
593 pBtn_Book_1 = v1->CreateButton(pViewport->uViewportX + 398, pViewport->uViewportY + 1, 0x32u, 0x22u, 1, 0, 0x47u, 0xBu, 0, | |
594 pGlobalTXT_LocalizationStrings[193], pTex_tab_an_6b__zoom_on, 0); | |
595 pBtn_Book_2 = v1->CreateButton(pViewport->uViewportX + 398, pViewport->uViewportY + 38, 0x32u, 0x22u, 1, 0, 0x47u, 0xAu, 0, | |
596 pGlobalTXT_LocalizationStrings[192], pTex_tab_an_7b__zoot_on, 0); | |
597 pBtn_Book_3 = v1->CreateButton(pViewport->uViewportX + 398, pViewport->uViewportY + 113, 0x32u, 0x22u, 1, 0, 0x47u, 2u, 0, | |
598 pGlobalTXT_LocalizationStrings[85], pTexture_506394, 0);// "Potion Notes" | |
599 pBtn_Book_4 = v1->CreateButton(pViewport->uViewportX + 399, pViewport->uViewportY + 150, 0x32u, 0x22u, 1, 0, 0x47u, 3u, 0, | |
600 pGlobalTXT_LocalizationStrings[137], pTexture_50638C, 0);// "Fountain Notes" | |
601 pBtn_Book_5 = v1->CreateButton(pViewport->uViewportX + 397, pViewport->uViewportY + 188, 0x32u, 0x22u, 1, 0, 0x47u, 4u, 0, | |
602 pGlobalTXT_LocalizationStrings[8], pTexture_506384, 0);// "Obelisk Notes" | |
603 pBtn_Book_6 = v1->CreateButton(pViewport->uViewportX + 397, pViewport->uViewportY + 226, 0x32u, 0x22u, 1, 0, 0x47u, 5u, 0, | |
604 pGlobalTXT_LocalizationStrings[141], pTexture_50637C, 0);// "Seer Notes" | |
605 pBtn_Autonotes_Misc = v1->CreateButton(pViewport->uViewportX + 397, pViewport->uViewportY + 264, 0x32u, 0x22u, 1, 0, 0x47u, 6u, 0, | |
606 pGlobalTXT_LocalizationStrings[123], pTexture_506374, 0);// "Miscellaneous Notes" | |
607 v9 = v1->CreateButton(pViewport->uViewportX + 397, pViewport->uViewportY + 302, 0x32u, 0x22u, 1, 0, 0x47u, 7u, 0, | |
608 pGlobalTXT_LocalizationStrings[662], pTexture_50636C, 0);// "Instructors" | |
609 v10 = dword_506528; | |
610 pBtn_Autonotes_Instructors = v9; | |
611 awards_count = 0; | |
612 while ( v10 < 196 ) | |
613 { | |
614 if ( dword_506568 == pAutonoteTxt[v10-1].eType)//dword_72371C[2 * v10] ) | |
615 { | |
616 //v25 = (&dword_723718_autonote_related)[8 * (signed __int16)v10]; | |
617 v25 = (char *)pAutonoteTxt[v10-1].pText; | |
618 if ( (short)v10 ) | |
619 { | |
620 if ( _449B57_test_bit(pParty->_autonote_bits, v10) && v25 ) | |
621 { | |
622 v11 = awards_count++; | |
623 achievedAwardsIndex[v11] = (signed __int16)v10; | |
624 } | |
625 } | |
626 } | |
627 ++v10; | |
628 } | |
629 } | |
630 break; | |
631 case 202: | |
632 { | |
633 dword_506364 = 1; | |
634 pSpellBookPagesTextr_12 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbmap", TEXTURE_16BIT_PALETTE)]; | |
635 pTex_tab_an_6b__zoom_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("zoom-on", TEXTURE_16BIT_PALETTE)]; | |
636 pTex_tab_an_7b__zoot_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("zoot-on", TEXTURE_16BIT_PALETTE)]; | |
637 pTex_tab_an_6a__zoom_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("zoom-off", TEXTURE_16BIT_PALETTE)]; | |
638 pTex_tab_an_7a__zoot_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("zoot-off", TEXTURE_16BIT_PALETTE)]; | |
639 pTexture_506394 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabNon", TEXTURE_16BIT_PALETTE)]; | |
640 pTexture_506390 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabNoff", TEXTURE_16BIT_PALETTE)]; | |
641 pTexture_50638C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabSon", TEXTURE_16BIT_PALETTE)]; | |
642 pTexture_506388 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabSoff", TEXTURE_16BIT_PALETTE)]; | |
643 pTexture_506384 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabEon", TEXTURE_16BIT_PALETTE)]; | |
644 pTexture_506380 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabEoff", TEXTURE_16BIT_PALETTE)]; | |
645 pTexture_50637C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabWon", TEXTURE_16BIT_PALETTE)]; | |
646 pTexture_506378 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tabWoff", TEXTURE_16BIT_PALETTE)]; | |
647 pBtn_Book_1 = v1->CreateButton(pViewport->uViewportX + 398, pViewport->uViewportY + 1, 0x32u, 0x22u, 1, 0, 0x47u, 0, 0, | |
648 pGlobalTXT_LocalizationStrings[251], pTex_tab_an_6b__zoom_on, 0);// "Zoom In" | |
649 pBtn_Book_2 = v1->CreateButton(pViewport->uViewportX + 398, pViewport->uViewportY + 38, 0x32u, 0x22u, 1, 0, 0x47u, 1, 0, | |
650 pGlobalTXT_LocalizationStrings[252], pTex_tab_an_7b__zoot_on, 0);// "Zoom Out" | |
651 pBtn_Book_3 = v1->CreateButton(pViewport->uViewportX + 397, pViewport->uViewportY + 113, 0x32u, 0x22u, 1, 0, 0x47u, 2, 0, | |
652 pGlobalTXT_LocalizationStrings[192], (Texture *)"", 0);// Scroll Up | |
653 pBtn_Book_4 = v1->CreateButton(pViewport->uViewportX + 397, pViewport->uViewportY + 150, 0x32u, 0x22u, 1, 0, 0x47u, 3, 0, | |
654 pGlobalTXT_LocalizationStrings[193], (Texture *)"", 0);// Scroll Down | |
655 pBtn_Book_5 = v1->CreateButton(pViewport->uViewportX + 397, pViewport->uViewportY + 188, 0x32u, 0x22u, 1, 0, 0x47u, 4, 0, | |
656 pGlobalTXT_LocalizationStrings[573], (Texture *)"", 0);// "Scroll Right" | |
657 pBtn_Book_6 = v1->CreateButton(pViewport->uViewportX + 397, pViewport->uViewportY + 226, 0x32u, 0x22u, 1, 0, 0x47u, 5, 0, | |
658 pGlobalTXT_LocalizationStrings[572], (Texture *)"", 0);// "Scroll Left" | |
659 } | |
660 break; | |
661 case 203: { | |
662 pSpellBookPagesTextr_13 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbdate-time", TEXTURE_16BIT_PALETTE)]; | |
663 pTex_moon_new = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_new", TEXTURE_16BIT_PALETTE)]; | |
664 pTex_moon_4 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_4", TEXTURE_16BIT_PALETTE)]; | |
665 pTex_moon_2 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_2", TEXTURE_16BIT_PALETTE)]; | |
666 pTex_moon_2_2 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_2", TEXTURE_16BIT_PALETTE)]; | |
667 pTex_moon_ful = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("moon_ful", TEXTURE_16BIT_PALETTE)]; | |
668 } | |
669 break; | |
670 case 224: | |
671 { | |
672 pSpellBookPagesTextr_11 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("sbplayrnot", TEXTURE_16BIT_PALETTE)]; | |
673 pTex_tab_an_6b__zoom_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6b", TEXTURE_16BIT_PALETTE)]; | |
674 pTex_tab_an_7b__zoot_on = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-7b", TEXTURE_16BIT_PALETTE)]; | |
675 pTex_tab_an_6a__zoom_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-6a", TEXTURE_16BIT_PALETTE)]; | |
676 pTex_tab_an_7a__zoot_off = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("tab-an-7a", TEXTURE_16BIT_PALETTE)]; | |
677 pBtn_Book_1 = v1->CreateButton( | |
678 pViewport->uViewportX + 398, | |
679 pViewport->uViewportY + 1, | |
680 pTex_tab_an_6b__zoom_on->uTextureWidth, | |
681 pTex_tab_an_6b__zoom_on->uTextureHeight, | |
682 1, | |
683 0, | |
684 0x47u, | |
685 0xBu, | |
686 0, | |
687 pGlobalTXT_LocalizationStrings[192], | |
688 pTex_tab_an_6b__zoom_on, | |
689 0); | |
690 pBtn_Book_2 = v1->CreateButton( | |
691 pViewport->uViewportX + 398, | |
692 pViewport->uViewportY + 38, | |
693 pTex_tab_an_7b__zoot_on->uTextureHeight, | |
694 pTex_tab_an_7b__zoot_on->uTextureHeight, | |
695 1, | |
696 0, | |
697 0x47u, | |
698 0xAu, | |
699 0, | |
700 pGlobalTXT_LocalizationStrings[193], | |
701 pTex_tab_an_7b__zoot_on, | |
702 0); | |
703 awards_count = 0; | |
704 v26.uFrameX = 48; | |
705 v26.uFrameY = 70; | |
706 v26.uFrameWidth = 360; | |
707 v26.uFrameHeight = 264; | |
708 v2 = LOBYTE(pAutonoteFont->uFontHeight) - 3; | |
709 v26.uFrameZ = 407; | |
710 v26.uFrameHeight = v2 * 264 / v2; | |
711 v26.uFrameW = v26.uFrameHeight + 69; | |
712 memset(&achievedAwardsIndex, 0, 4000); | |
713 memset(byte_5C6D50, 0, 0x64u); | |
714 if ( dword_506528 < 29 ) | |
715 { | |
716 v3 = (__int64 *)&pParty->field_3C.field_4F0[2 * dword_506528]; | |
717 for(int i=dword_506528+1;i<dword_506528+31;i++) | |
718 { | |
719 v4 = pStorylineText->StoreLine[i].pText; | |
720 if ( *v3 ) | |
721 { | |
722 if ( v4 ) | |
723 { | |
724 v5 = BuilDialogueString(v4, uActiveCharacter - 1, 0, 0, 0, v3); | |
725 v6 = pAutonoteFont->CalcTextHeight(v5, &v26, 1, 0); | |
726 v7 = (v6 - 3) / (signed int)v26.uFrameHeight; | |
727 v8 = v7 + 1; | |
728 if ( (signed int)v7 + 1 > 0 ) | |
729 { | |
730 memset32((char *)&achievedAwardsIndex + 4 * awards_count , i, v8); | |
731 do | |
732 { | |
733 LODWORD(v7) = awards_count++; | |
734 byte_5C6D50[(int)v7] = BYTE4(v7); | |
735 ++HIDWORD(v7); | |
736 } | |
737 while ( SHIDWORD(v7) < (signed int)v8 ); | |
738 } | |
739 } | |
740 } | |
741 ++i; | |
742 ++v3; | |
743 } | |
744 } | |
745 | |
746 } | |
747 break; | |
748 } | |
749 | |
753 } | 750 } |
754 | 751 |
755 | 752 |
756 | 753 |
757 | 754 |
877 pAudioPlayer->StopChannels(-1, -1); | 874 pAudioPlayer->StopChannels(-1, -1); |
878 ++pIcons_LOD->uTexturePacksCount; | 875 ++pIcons_LOD->uTexturePacksCount; |
879 if ( !pIcons_LOD->uNumPrevLoadedFiles ) | 876 if ( !pIcons_LOD->uNumPrevLoadedFiles ) |
880 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; | 877 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; |
881 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); | 878 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0); |
882 pTextures_5064A0[9] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("book", TEXTURE_16BIT_PALETTE)]; | 879 pSpellBookPagesTextr_9 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("book", TEXTURE_16BIT_PALETTE)]; |
883 pTexture_pagemask = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("pagemask", TEXTURE_16BIT_PALETTE)]; | 880 pTexture_pagemask = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("pagemask", TEXTURE_16BIT_PALETTE)]; |
884 pTexture_506448 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("ib-m5-u", TEXTURE_16BIT_PALETTE)]; | 881 pTexture_506448 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("ib-m5-u", TEXTURE_16BIT_PALETTE)]; |
885 ptr_506440 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("ib-m5-d", TEXTURE_16BIT_PALETTE)]; | 882 ptr_506440 = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("ib-m5-d", TEXTURE_16BIT_PALETTE)]; |
886 pTexture_50643C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("ib-m6-u",TEXTURE_16BIT_PALETTE)]; | 883 pTexture_50643C = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("ib-m6-u",TEXTURE_16BIT_PALETTE)]; |
887 //v0 = 1; | 884 //v0 = 1; |
893 }; | 890 }; |
894 | 891 |
895 pTexture_506444 = pIcons_LOD->LoadTexturePtr("ib-m6-d",TEXTURE_16BIT_PALETTE); | 892 pTexture_506444 = pIcons_LOD->LoadTexturePtr("ib-m6-d",TEXTURE_16BIT_PALETTE); |
896 for (uint i = 0; i < 8; ++i) | 893 for (uint i = 0; i < 8; ++i) |
897 { | 894 { |
898 pTextures_5064A0[i] = pIcons_LOD->LoadTexturePtr(texNames[i], TEXTURE_16BIT_PALETTE); | 895 pSpellBookPagesTextr[i] = pIcons_LOD->LoadTexturePtr(texNames[i], TEXTURE_16BIT_PALETTE); |
899 | 896 |
900 sprintf(pTmpBuf, "tab%da", i+1); | 897 sprintf(pTmpBuf, "tab%da", i+1); |
901 pTextures_tabs[i][0] = pIcons_LOD->LoadTexturePtr(pTmpBuf, TEXTURE_16BIT_PALETTE); | 898 pTextures_tabs[i][0] = pIcons_LOD->LoadTexturePtr(pTmpBuf, TEXTURE_16BIT_PALETTE); |
902 sprintf(pTmpBuf, "tab%db", i+1); | 899 sprintf(pTmpBuf, "tab%db", i+1); |
903 pTextures_tabs[i][1] = pIcons_LOD->LoadTexturePtr(pTmpBuf, TEXTURE_16BIT_PALETTE); | 900 pTextures_tabs[i][1] = pIcons_LOD->LoadTexturePtr(pTmpBuf, TEXTURE_16BIT_PALETTE); |
1286 } | 1283 } |
1287 | 1284 |
1288 | 1285 |
1289 | 1286 |
1290 //----- (0044D406) -------------------------------------------------------- | 1287 //----- (0044D406) -------------------------------------------------------- |
1291 char *GUIWindow::DrawTitleText(GUIFont *a2, unsigned int uHorizontalMargin, unsigned int uVerticalMargin, | 1288 char * GUIWindow::DrawTitleText( GUIFont *a2, signed int uHorizontalMargin, unsigned int uVerticalMargin, unsigned __int16 uDefaultColor, const char *pInString, unsigned int uLineSpacing ) |
1292 unsigned __int16 uDefaultColor, const char *pInString, unsigned int uLineSpacing) | 1289 { |
1293 { | |
1294 GUIWindow *pWindow; // esi@1 | 1290 GUIWindow *pWindow; // esi@1 |
1295 unsigned int v8; // ebx@1 | 1291 unsigned int v8; // ebx@1 |
1296 char *v9; // eax@1 | 1292 char *v9; // eax@1 |
1297 char *result; // eax@1 | 1293 char *result; // eax@1 |
1298 unsigned int v11; // edi@1 | 1294 unsigned int v11; // edi@1 |