Mercurial > mm7
comparison mm7_3.cpp @ 189:038a4d09406f
new texts file, fix text rendender error
author | Gloval |
---|---|
date | Sat, 16 Feb 2013 00:33:21 +0400 |
parents | 16d257ffc802 |
children | 9b77686e2239 |
comparison
equal
deleted
inserted
replaced
185:16d257ffc802 | 189:038a4d09406f |
---|---|
39 #include "stru220.h" | 39 #include "stru220.h" |
40 #include "Events2D.h" | 40 #include "Events2D.h" |
41 #include "stru176.h" | 41 #include "stru176.h" |
42 #include "stru159.h" | 42 #include "stru159.h" |
43 #include "stru298.h" | 43 #include "stru298.h" |
44 #include "texts.h" | |
44 #include "Log.h" | 45 #include "Log.h" |
45 | 46 |
46 #include "mm7_data.h" | 47 #include "mm7_data.h" |
47 | 48 |
48 | 49 |
16506 } | 16507 } |
16507 if ( uDialogueType == DIALOGUE_ARENA_REWARD ) | 16508 if ( uDialogueType == DIALOGUE_ARENA_REWARD ) |
16508 { | 16509 { |
16509 sprintf(v4, pGlobalTXT_LocalizationStrings[576], dword_F8B1B4);// "Congratulations on your win: here's your stuff: %u gold." | 16510 sprintf(v4, pGlobalTXT_LocalizationStrings[576], dword_F8B1B4);// "Congratulations on your win: here's your stuff: %u gold." |
16510 pInString = v4; | 16511 pInString = v4; |
16511 v8 = 0; | |
16512 pWindow.uFrameWidth = 460; | 16512 pWindow.uFrameWidth = 460; |
16513 pWindow.uFrameZ = 452; | 16513 pWindow.uFrameZ = 452; |
16514 pOutString = pFontArrus; | 16514 pOutString = pFontArrus; |
16515 v12 = pFontArrus->CalcTextHeight(pInString, &pWindow, 13, v8) + 7; | 16515 v12 = pFontArrus->CalcTextHeight(pInString, &pWindow, 13, 0) + 7; |
16516 if ( 352 - v12 < 8 ) | 16516 if ( 352 - v12 < 8 ) |
16517 { | 16517 { |
16518 pOutString = pFontCreate; | 16518 pOutString = pFontCreate; |
16519 v12 = pFontCreate->CalcTextHeight(pInString, &pWindow, 13, v8) + 7; | 16519 v12 = pFontCreate->CalcTextHeight(pInString, &pWindow, 13, 0) + 7; |
16520 } | 16520 } |
16521 pRenderer->_4A6A68(8, 352 - v12, (Texture *)(uTextureID_Leather != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Leather] : 0), | 16521 pRenderer->_4A6A68(8, 352 - v12, (Texture *)(uTextureID_Leather != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Leather] : 0), |
16522 (uTextureID_Leather != -1 ? pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight : 26) - v12); | 16522 (uTextureID_Leather != -1 ? pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight : 26) - v12); |
16523 pRenderer->DrawTextureIndexed(8u, 347 - v12, pTexture_591428); | 16523 pRenderer->DrawTextureIndexed(8u, 347 - v12, pTexture_591428); |
16524 v13 = FitTextInAWindow(pInString, pOutString, &pWindow, 0xDu, v8); | 16524 v13 = FitTextInAWindow(pInString, pOutString, &pWindow, 0xDu, 0); |
16525 pDialogueWindow->DrawText(pOutString, 13, 354 - v12, v8, v13, v8, v8, v8); | 16525 pDialogueWindow->DrawText(pOutString, 13, 354 - v12, 0, v13, 0, 0, 0); |
16526 goto LABEL_42; | 16526 goto LABEL_42; |
16527 } | 16527 } |
16528 if ( uDialogueType == DIALOGUE_ARENA_ALREADY_WON ) | 16528 if ( uDialogueType == DIALOGUE_ARENA_ALREADY_WON ) |
16529 { | 16529 { |
16530 v7 = pGlobalTXT_LocalizationStrings[582]; // "You already won this trip to the Arena:" | 16530 pInString = pGlobalTXT_LocalizationStrings[582]; // "You already won this trip to the Arena:" |
16531 v8 = 0; | 16531 pWindow.uFrameWidth = 460; |
16532 pWindow.uFrameZ = 452; | |
16533 pOutString = pFontArrus; | |
16534 v12 = pFontArrus->CalcTextHeight(pInString, &pWindow, 13, 0) + 7; | |
16535 if ( 352 - v12 < 8 ) | |
16536 { | |
16537 pOutString = pFontCreate; | |
16538 v12 = pFontCreate->CalcTextHeight(pInString, &pWindow, 13, 0) + 7; | |
16539 } | |
16540 pRenderer->_4A6A68(8, 352 - v12, (Texture *)(uTextureID_Leather != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Leather] : 0), | |
16541 (uTextureID_Leather != -1 ? pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight : 26) - v12); | |
16542 pRenderer->DrawTextureIndexed(8u, 347 - v12, pTexture_591428); | |
16543 v13 = FitTextInAWindow(pInString, pOutString, &pWindow, 0xDu, 0); | |
16544 pDialogueWindow->DrawText(pOutString, 13, 354 - v12, 0, v13, 0, 0, 0); | |
16545 goto LABEL_42; | |
16546 } | |
16547 } | |
16548 else | |
16549 { | |
16550 if ( uDialogueType == DIALOGUE_ARENA_WELCOME ) | |
16551 { | |
16552 v7 = pGlobalTXT_LocalizationStrings[574]; // "Welcome to the Arena of Life and Death. Remember, you are only allowed one arena combat per visit. To fight an arena battle, select the option that best describes your abilities and return to me- if you survive:" | |
16532 pInString = v7; | 16553 pInString = v7; |
16533 pWindow.uFrameWidth = 460; | 16554 pWindow.uFrameWidth = 460; |
16534 pWindow.uFrameZ = 452; | 16555 pWindow.uFrameZ = 452; |
16535 pOutString = pFontArrus; | 16556 pOutString = pFontArrus; |
16536 v12 = pFontArrus->CalcTextHeight(pInString, &pWindow, 13, v8) + 7; | 16557 v12 = pFontArrus->CalcTextHeight(pInString, &pWindow, 13, 0) + 7; |
16537 if ( 352 - v12 < 8 ) | 16558 if ( 352 - v12 < 8 ) |
16538 { | 16559 { |
16539 pOutString = pFontCreate; | 16560 pOutString = pFontCreate; |
16540 v12 = pFontCreate->CalcTextHeight(pInString, &pWindow, 13, v8) + 7; | 16561 v12 = pFontCreate->CalcTextHeight(pInString, &pWindow, 13, 0) + 7; |
16541 } | 16562 } |
16542 pRenderer->_4A6A68(8, 352 - v12, (Texture *)(uTextureID_Leather != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Leather] : 0), | 16563 pRenderer->_4A6A68(8, 352 - v12, (Texture *)(uTextureID_Leather != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Leather] : 0), |
16543 (uTextureID_Leather != -1 ? pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight : 26) - v12); | 16564 (uTextureID_Leather != -1 ? pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight : 26) - v12); |
16544 pRenderer->DrawTextureIndexed(8u, 347 - v12, pTexture_591428); | 16565 pRenderer->DrawTextureIndexed(8u, 347 - v12, pTexture_591428); |
16545 v13 = FitTextInAWindow(pInString, pOutString, &pWindow, 0xDu, v8); | 16566 v13 = FitTextInAWindow(pInString, pOutString, &pWindow, 0xDu, 0); |
16546 pDialogueWindow->DrawText(pOutString, 13, 354 - v12, v8, v13, v8, v8, v8); | 16567 pDialogueWindow->DrawText(pOutString, 13, 354 - v12, 0, v13, 0, 0, 0); |
16547 goto LABEL_42; | |
16548 } | |
16549 } | |
16550 else | |
16551 { | |
16552 if ( uDialogueType == DIALOGUE_ARENA_WELCOME ) | |
16553 { | |
16554 v7 = pGlobalTXT_LocalizationStrings[574]; // "Welcome to the Arena of Life and Death. Remember, you are only allowed one arena combat per visit. To fight an arena battle, select the option that best describes your abilities and return to me- if you survive:" | |
16555 v8 = 0; | |
16556 pInString = v7; | |
16557 pWindow.uFrameWidth = 460; | |
16558 pWindow.uFrameZ = 452; | |
16559 pOutString = pFontArrus; | |
16560 v12 = pFontArrus->CalcTextHeight(pInString, &pWindow, 13, v8) + 7; | |
16561 if ( 352 - v12 < 8 ) | |
16562 { | |
16563 pOutString = pFontCreate; | |
16564 v12 = pFontCreate->CalcTextHeight(pInString, &pWindow, 13, v8) + 7; | |
16565 } | |
16566 pRenderer->_4A6A68(8, 352 - v12, (Texture *)(uTextureID_Leather != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Leather] : 0), | |
16567 (uTextureID_Leather != -1 ? pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight : 26) - v12); | |
16568 pRenderer->DrawTextureIndexed(8u, 347 - v12, pTexture_591428); | |
16569 v13 = FitTextInAWindow(pInString, pOutString, &pWindow, 0xDu, v8); | |
16570 pDialogueWindow->DrawText(pOutString, 13, 354 - v12, v8, v13, v8, v8, v8); | |
16571 goto LABEL_42; | 16568 goto LABEL_42; |
16572 } | 16569 } |
16573 if ( uDialogueType == DIALOGUE_13 ) | 16570 if ( uDialogueType == DIALOGUE_13 ) |
16574 { | 16571 { |
16575 v5 = 5 * pNPC->uProfession; | 16572 v5 = 5 * pNPC->uProfession; |
16576 v6 = (char *)*(&pNPCStats->field_13A64 + v5); | 16573 v6 = (char *)*(&pNPCStats->field_13A64 + v5); |
16577 v8 = 0; | |
16578 v7 = sub_495461(v6, uActiveCharacter - 1, 0, 0, 0, 0); | 16574 v7 = sub_495461(v6, uActiveCharacter - 1, 0, 0, 0, 0); |
16579 pInString = v7; | 16575 pInString = v7; |
16580 pWindow.uFrameWidth = 460; | 16576 pWindow.uFrameWidth = 460; |
16581 pWindow.uFrameZ = 452; | 16577 pWindow.uFrameZ = 452; |
16582 pOutString = pFontArrus; | 16578 pOutString = pFontArrus; |
16583 v12 = pFontArrus->CalcTextHeight(pInString, &pWindow, 13, v8) + 7; | 16579 v12 = pFontArrus->CalcTextHeight(pInString, &pWindow, 13, 0) + 7; |
16584 if ( 352 - v12 < 8 ) | 16580 if ( 352 - v12 < 8 ) |
16585 { | 16581 { |
16586 pOutString = pFontCreate; | 16582 pOutString = pFontCreate; |
16587 v12 = pFontCreate->CalcTextHeight(pInString, &pWindow, 13, v8) + 7; | 16583 v12 = pFontCreate->CalcTextHeight(pInString, &pWindow, 13, 0) + 7; |
16588 } | 16584 } |
16589 pRenderer->_4A6A68(8, 352 - v12, (Texture *)(uTextureID_Leather != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Leather] : 0), | 16585 pRenderer->_4A6A68(8, 352 - v12, (Texture *)(uTextureID_Leather != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Leather] : 0), |
16590 (uTextureID_Leather != -1 ? pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight : 26) - v12); | 16586 (uTextureID_Leather != -1 ? pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight : 26) - v12); |
16591 pRenderer->DrawTextureIndexed(8u, 347 - v12, pTexture_591428); | 16587 pRenderer->DrawTextureIndexed(8u, 347 - v12, pTexture_591428); |
16592 v13 = FitTextInAWindow(pInString, pOutString, &pWindow, 0xDu, v8); | 16588 v13 = FitTextInAWindow(pInString, pOutString, &pWindow, 0xDu, 0); |
16593 pDialogueWindow->DrawText(pOutString, 13, 354 - v12, v8, v13, v8, v8, v8); | 16589 pDialogueWindow->DrawText(pOutString, 13, 354 - v12, 0, v13, 0, 0, 0); |
16594 goto LABEL_42; | 16590 goto LABEL_42; |
16595 } | 16591 } |
16596 if ( (signed int)uDialogueType > DIALOGUE_18 ) | 16592 if ( (signed int)uDialogueType > DIALOGUE_18 ) |
16597 { | 16593 { |
16598 if ( (signed int)uDialogueType > DIALOGUE_24 ) | 16594 if ( (signed int)uDialogueType > DIALOGUE_24 ) |
16601 { | 16597 { |
16602 v5 = 5 * pNPC->uProfession; | 16598 v5 = 5 * pNPC->uProfession; |
16603 if ( byte_F8B1EC ) | 16599 if ( byte_F8B1EC ) |
16604 { | 16600 { |
16605 v6 = (char *)*(&pNPCStats->field_13A5C + 5 * pNPC->uProfession); | 16601 v6 = (char *)*(&pNPCStats->field_13A5C + 5 * pNPC->uProfession); |
16606 v8 = 0; | |
16607 v7 = sub_495461(v6, uActiveCharacter - 1, 0, 0, 0, 0); | 16602 v7 = sub_495461(v6, uActiveCharacter - 1, 0, 0, 0, 0); |
16608 pInString = v7; | 16603 pInString = v7; |
16609 pWindow.uFrameWidth = 460; | 16604 pWindow.uFrameWidth = 460; |
16610 pWindow.uFrameZ = 452; | 16605 pWindow.uFrameZ = 452; |
16611 pOutString = pFontArrus; | 16606 pOutString = pFontArrus; |
16612 v12 = pFontArrus->CalcTextHeight(pInString, &pWindow, 13, v8) + 7; | 16607 v12 = pFontArrus->CalcTextHeight(pInString, &pWindow, 13, 0) + 7; |
16613 if ( 352 - v12 < 8 ) | 16608 if ( 352 - v12 < 8 ) |
16614 { | 16609 { |
16615 pOutString = pFontCreate; | 16610 pOutString = pFontCreate; |
16616 v12 = pFontCreate->CalcTextHeight(pInString, &pWindow, 13, v8) + 7; | 16611 v12 = pFontCreate->CalcTextHeight(pInString, &pWindow, 13, 0) + 7; |
16617 } | 16612 } |
16618 pRenderer->_4A6A68(8, 352 - v12, (Texture *)(uTextureID_Leather != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Leather] : 0), | 16613 pRenderer->_4A6A68(8, 352 - v12, (Texture *)(uTextureID_Leather != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Leather] : 0), |
16619 (uTextureID_Leather != -1 ? pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight : 26) - v12); | 16614 (uTextureID_Leather != -1 ? pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight : 26) - v12); |
16620 pRenderer->DrawTextureIndexed(8u, 347 - v12, pTexture_591428); | 16615 pRenderer->DrawTextureIndexed(8u, 347 - v12, pTexture_591428); |
16621 v13 = FitTextInAWindow(pInString, pOutString, &pWindow, 0xDu, v8); | 16616 v13 = FitTextInAWindow(pInString, pOutString, &pWindow, 0xDu, 0); |
16622 pDialogueWindow->DrawText(pOutString, 13, 354 - v12, v8, v13, v8, v8, v8); | 16617 pDialogueWindow->DrawText(pOutString, 13, 354 - v12, 0, v13, 0, 0, 0); |
16623 goto LABEL_42; | 16618 goto LABEL_42; |
16624 } | 16619 } |
16625 if ( pNPC->uFlags & 0x80 ) | 16620 if ( pNPC->uFlags & 0x80 ) |
16626 { | 16621 { |
16627 v6 = (char *)*(&pNPCStats->field_13A68 + 5 * pNPC->uProfession); | 16622 v6 = (char *)*(&pNPCStats->field_13A68 + 5 * pNPC->uProfession); |
16628 v8 = 0; | |
16629 v7 = sub_495461(v6, uActiveCharacter - 1, 0, 0, 0, 0); | 16623 v7 = sub_495461(v6, uActiveCharacter - 1, 0, 0, 0, 0); |
16630 pInString = v7; | 16624 pInString = v7; |
16631 pWindow.uFrameWidth = 460; | 16625 pWindow.uFrameWidth = 460; |
16632 pWindow.uFrameZ = 452; | 16626 pWindow.uFrameZ = 452; |
16633 pOutString = pFontArrus; | 16627 pOutString = pFontArrus; |
16634 v12 = pFontArrus->CalcTextHeight(pInString, &pWindow, 13, v8) + 7; | 16628 v12 = pFontArrus->CalcTextHeight(pInString, &pWindow, 13, 0) + 7; |
16635 if ( 352 - v12 < 8 ) | 16629 if ( 352 - v12 < 8 ) |
16636 { | 16630 { |
16637 pOutString = pFontCreate; | 16631 pOutString = pFontCreate; |
16638 v12 = pFontCreate->CalcTextHeight(pInString, &pWindow, 13, v8) + 7; | 16632 v12 = pFontCreate->CalcTextHeight(pInString, &pWindow, 13, 0) + 7; |
16639 } | 16633 } |
16640 pRenderer->_4A6A68(8, 352 - v12, (Texture *)(uTextureID_Leather != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Leather] : 0), | 16634 pRenderer->_4A6A68(8, 352 - v12, (Texture *)(uTextureID_Leather != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Leather] : 0), |
16641 (uTextureID_Leather != -1 ? pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight : 26) - v12); | 16635 (uTextureID_Leather != -1 ? pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight : 26) - v12); |
16642 pRenderer->DrawTextureIndexed(8u, 347 - v12, pTexture_591428); | 16636 pRenderer->DrawTextureIndexed(8u, 347 - v12, pTexture_591428); |
16643 v13 = FitTextInAWindow(pInString, pOutString, &pWindow, 0xDu, v8); | 16637 v13 = FitTextInAWindow(pInString, pOutString, &pWindow, 0xDu, 0); |
16644 pDialogueWindow->DrawText(pOutString, 13, 354 - v12, v8, v13, v8, v8, v8); | 16638 pDialogueWindow->DrawText(pOutString, 13, 354 - v12, 0, v13, 0, 0, 0); |
16645 goto LABEL_42; | 16639 goto LABEL_42; |
16646 } | 16640 } |
16647 v6 = (char *)*(&pNPCStats->field_13A64 + v5); | 16641 v6 = (char *)*(&pNPCStats->field_13A64 + v5); |
16648 v8 = 0; | |
16649 v7 = sub_495461(v6, uActiveCharacter - 1, 0, 0, 0, 0); | 16642 v7 = sub_495461(v6, uActiveCharacter - 1, 0, 0, 0, 0); |
16650 pInString = v7; | 16643 pInString = v7; |
16651 pWindow.uFrameWidth = 460; | 16644 pWindow.uFrameWidth = 460; |
16652 pWindow.uFrameZ = 452; | 16645 pWindow.uFrameZ = 452; |
16653 pOutString = pFontArrus; | 16646 pOutString = pFontArrus; |
16654 v12 = pFontArrus->CalcTextHeight(pInString, &pWindow, 13, v8) + 7; | 16647 v12 = pFontArrus->CalcTextHeight(pInString, &pWindow, 13, 0) + 7; |
16655 if ( 352 - v12 < 8 ) | 16648 if ( 352 - v12 < 8 ) |
16656 { | 16649 { |
16657 pOutString = pFontCreate; | 16650 pOutString = pFontCreate; |
16658 v12 = pFontCreate->CalcTextHeight(pInString, &pWindow, 13, v8) + 7; | 16651 v12 = pFontCreate->CalcTextHeight(pInString, &pWindow, 13, 0) + 7; |
16659 } | 16652 } |
16660 pRenderer->_4A6A68(8, 352 - v12, (Texture *)(uTextureID_Leather != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Leather] : 0), | 16653 pRenderer->_4A6A68(8, 352 - v12, (Texture *)(uTextureID_Leather != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Leather] : 0), |
16661 (uTextureID_Leather != -1 ? pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight : 26) - v12); | 16654 (uTextureID_Leather != -1 ? pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight : 26) - v12); |
16662 pRenderer->DrawTextureIndexed(8u, 347 - v12, pTexture_591428); | 16655 pRenderer->DrawTextureIndexed(8u, 347 - v12, pTexture_591428); |
16663 v13 = FitTextInAWindow(pInString, pOutString, &pWindow, 0xDu, v8); | 16656 v13 = FitTextInAWindow(pInString, pOutString, &pWindow, 0xDu, 0); |
16664 pDialogueWindow->DrawText(pOutString, 13, 354 - v12, v8, v13, v8, v8, v8); | 16657 pDialogueWindow->DrawText(pOutString, 13, 354 - v12, 0, v13, 0, 0, 0); |
16665 goto LABEL_42; | 16658 goto LABEL_42; |
16666 } | 16659 } |
16667 goto LABEL_24; | 16660 goto LABEL_24; |
16668 } | 16661 } |
16669 if ( byte_5B0938[0] ) | 16662 if ( byte_5B0938[0] ) |
16670 goto LABEL_24; | 16663 goto LABEL_24; |
16671 v7 = (char *)ptr_F8B1E8; | 16664 v7 = (char *)ptr_F8B1E8; |
16672 v8 = 0; | |
16673 pInString = v7; | 16665 pInString = v7; |
16674 pWindow.uFrameWidth = 460; | 16666 pWindow.uFrameWidth = 460; |
16675 pWindow.uFrameZ = 452; | 16667 pWindow.uFrameZ = 452; |
16676 pOutString = pFontArrus; | 16668 pOutString = pFontArrus; |
16677 v12 = pFontArrus->CalcTextHeight(pInString, &pWindow, 13, v8) + 7; | 16669 v12 = pFontArrus->CalcTextHeight(pInString, &pWindow, 13, 0) + 7; |
16678 if ( 352 - v12 < 8 ) | 16670 if ( 352 - v12 < 8 ) |
16679 { | 16671 { |
16680 pOutString = pFontCreate; | 16672 pOutString = pFontCreate; |
16681 v12 = pFontCreate->CalcTextHeight(pInString, &pWindow, 13, v8) + 7; | 16673 v12 = pFontCreate->CalcTextHeight(pInString, &pWindow, 13, 0) + 7; |
16682 } | 16674 } |
16683 pRenderer->_4A6A68(8, 352 - v12, (Texture *)(uTextureID_Leather != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Leather] : 0), | 16675 pRenderer->_4A6A68(8, 352 - v12, (Texture *)(uTextureID_Leather != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Leather] : 0), |
16684 (uTextureID_Leather != -1 ? pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight : 26) - v12); | 16676 (uTextureID_Leather != -1 ? pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight : 26) - v12); |
16685 pRenderer->DrawTextureIndexed(8u, 347 - v12, pTexture_591428); | 16677 pRenderer->DrawTextureIndexed(8u, 347 - v12, pTexture_591428); |
16686 v13 = FitTextInAWindow(pInString, pOutString, &pWindow, 0xDu, v8); | 16678 v13 = FitTextInAWindow(pInString, pOutString, &pWindow, 0xDu, 0); |
16687 pDialogueWindow->DrawText(pOutString, 13, 354 - v12, v8, v13, v8, v8, v8); | 16679 pDialogueWindow->DrawText(pOutString, 13, 354 - v12, 0, v13, 0, 0, 0); |
16688 goto LABEL_42; | 16680 goto LABEL_42; |
16689 } | 16681 } |
16690 } | 16682 } |
16691 LABEL_24: | 16683 LABEL_24: |
16692 if ( *(int *)v54 == 1 ) | 16684 if ( *(int *)v54 == 1 ) |
16701 } | 16693 } |
16702 else | 16694 else |
16703 { | 16695 { |
16704 if ( *(int *)v54 == 2 ) | 16696 if ( *(int *)v54 == 2 ) |
16705 { | 16697 { |
16706 v8 = 0; | |
16707 if ( pNPC->uFlags & 0x80 ) | 16698 if ( pNPC->uFlags & 0x80 ) |
16708 v9 = (char *)pNPCStats->pProfessions[pNPC->uProfession].pDismissText; | 16699 v9 = (char *)pNPCStats->pProfessions[pNPC->uProfession].pDismissText; |
16709 else | 16700 else |
16710 v9 = (char *)pNPCStats->pProfessions[pNPC->uProfession].pJoinText; //"Invalid String Passed" | 16701 v9 = (char *)pNPCStats->pProfessions[pNPC->uProfession].pJoinText; //"Invalid String Passed" |
16711 v10 = sub_495461(v9, uActiveCharacter - 1, 0, 0, 0, 0); | 16702 pInString = sub_495461(v9, uActiveCharacter - 1, 0, 0, 0, 0); |
16712 LABEL_32: | 16703 LABEL_32: |
16713 pInString = v10; | 16704 |
16714 if ( v10 == (char *)v8 ) | 16705 if ( pInString == NULL ) |
16715 goto LABEL_42; | 16706 goto LABEL_42; |
16716 pWindow.uFrameWidth = 460; | 16707 pWindow.uFrameWidth = 460; |
16717 pWindow.uFrameZ = 452; | 16708 pWindow.uFrameZ = 452; |
16718 pOutString = pFontArrus; | 16709 pOutString = pFontArrus; |
16719 v12 = pFontArrus->CalcTextHeight(pInString, &pWindow, 13, v8) + 7; | 16710 v12 = pFontArrus->CalcTextHeight(pInString, &pWindow, 13, 0) + 7; |
16720 if ( 352 - v12 < 8 ) | 16711 if ( 352 - v12 < 8 ) |
16721 { | 16712 { |
16722 pOutString = pFontCreate; | 16713 pOutString = pFontCreate; |
16723 v12 = pFontCreate->CalcTextHeight(pInString, &pWindow, 13, v8) + 7; | 16714 v12 = pFontCreate->CalcTextHeight(pInString, &pWindow, 13, 0) + 7; |
16724 } | 16715 } |
16725 pRenderer->_4A6A68(8, 352 - v12, (Texture *)(uTextureID_Leather != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Leather] : 0), | 16716 pRenderer->_4A6A68(8, 352 - v12, (Texture *)(uTextureID_Leather != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_Leather] : 0), |
16726 (uTextureID_Leather != -1 ? pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight : 26) - v12); | 16717 (uTextureID_Leather != -1 ? pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight : 26) - v12); |
16727 pRenderer->DrawTextureIndexed(8u, 347 - v12, pTexture_591428); | 16718 pRenderer->DrawTextureIndexed(8u, 347 - v12, pTexture_591428); |
16728 v13 = FitTextInAWindow(pInString, pOutString, &pWindow, 0xDu, v8); | 16719 v13 = FitTextInAWindow(pInString, pOutString, &pWindow, 0xDu, 0); |
16729 pDialogueWindow->DrawText(pOutString, 13, 354 - v12, v8, v13, v8, v8, v8); | 16720 pDialogueWindow->DrawText(pOutString, 13, 354 - v12, 0, v13, 0, 0, 0); |
16730 goto LABEL_42; | 16721 goto LABEL_42; |
16731 } | 16722 } |
16732 } | 16723 } |
16733 LABEL_42: | 16724 LABEL_42: |
16734 memcpy(&v52, pDialogueWindow, sizeof(v52)); | 16725 memcpy(&v52, pDialogueWindow, sizeof(v52)); |
16790 } | 16781 } |
16791 else | 16782 else |
16792 { | 16783 { |
16793 if ( pNPC->uFlags & 0x80 ) | 16784 if ( pNPC->uFlags & 0x80 ) |
16794 { | 16785 { |
16795 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[408], pNPC->pName); | 16786 sprintf(pTmpBuf, (const char*)pGlobalTXT_LocalizationStrings[408], pNPC->pName); |
16796 v24 = pTmpBuf; | 16787 v24 = pTmpBuf; |
16797 goto LABEL_79; | 16788 goto LABEL_79; |
16798 } | 16789 } |
16799 v24 = pGlobalTXT_LocalizationStrings[406]; | 16790 v24 = pGlobalTXT_LocalizationStrings[406]; |
16800 } | 16791 } |