Mercurial > mm7
comparison UI/UIGuilds.cpp @ 2069:259df09dfb50
32bits almost there
author | Nomad |
---|---|
date | Tue, 03 Dec 2013 20:18:17 +0200 |
parents | 05b433b8cb37 |
children | aff7a7b072b7 |
comparison
equal
deleted
inserted
replaced
2061:b2a434d65344 | 2069:259df09dfb50 |
---|---|
50 { | 50 { |
51 if ( !(unsigned __int16)_449B57_test_bit((unsigned __int8 *)pPlayers[uActiveCharacter]->_achieved_awards_bits, | 51 if ( !(unsigned __int16)_449B57_test_bit((unsigned __int8 *)pPlayers[uActiveCharacter]->_achieved_awards_bits, |
52 guild_mambership_flags[(unsigned int)window_SpeakInHouse->ptr_1C - 139]) ) | 52 guild_mambership_flags[(unsigned int)window_SpeakInHouse->ptr_1C - 139]) ) |
53 { //you must me member | 53 { //you must me member |
54 pTextHeight = pFontArrus->CalcTextHeight(pNPCTopics[121].pText, &working_window, 0, 0); | 54 pTextHeight = pFontArrus->CalcTextHeight(pNPCTopics[121].pText, &working_window, 0, 0); |
55 working_window.DrawTitleText(pFontArrus, 0, (212 - pTextHeight) / 2 + 101, TargetColor(0xFFu, 0xFFu, 0x9Bu), pNPCTopics[121].pText, 3); | 55 working_window.DrawTitleText(pFontArrus, 0, (212 - pTextHeight) / 2 + 101, Color16(0xFFu, 0xFFu, 0x9Bu), pNPCTopics[121].pText, 3); |
56 pDialogueWindow->pNumPresenceButton = 0; | 56 pDialogueWindow->pNumPresenceButton = 0; |
57 return; | 57 return; |
58 } | 58 } |
59 if ( !HouseUI_CheckIfPlayerCanInteract() ) | 59 if ( !HouseUI_CheckIfPlayerCanInteract() ) |
60 return; | 60 return; |
62 { | 62 { |
63 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[544], pPlayers[uActiveCharacter]->pName, pClassNames[pPlayers[uActiveCharacter]->classType]); // "Seek knowledge elsewhere %s the %s" | 63 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[544], pPlayers[uActiveCharacter]->pName, pClassNames[pPlayers[uActiveCharacter]->classType]); // "Seek knowledge elsewhere %s the %s" |
64 strcat(pTmpBuf.data(), "\n \n"); | 64 strcat(pTmpBuf.data(), "\n \n"); |
65 strcat(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[528]); //"I can offer you nothing further." | 65 strcat(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[528]); //"I can offer you nothing further." |
66 pTextHeight = pFontArrus->CalcTextHeight(pTmpBuf.data(), &working_window, 0, 0); | 66 pTextHeight = pFontArrus->CalcTextHeight(pTmpBuf.data(), &working_window, 0, 0); |
67 working_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, TargetColor(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); | 67 working_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, Color16(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); |
68 return; | 68 return; |
69 } | 69 } |
70 v61 = 0; | 70 v61 = 0; |
71 pSkillFlag = false; | 71 pSkillFlag = false; |
72 all_text_height = 0; | 72 all_text_height = 0; |
93 { | 93 { |
94 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[544], pPlayers[uActiveCharacter]->pName, pClassNames[pPlayers[uActiveCharacter]->classType]); // "Seek knowledge elsewhere %s the %s" | 94 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[544], pPlayers[uActiveCharacter]->pName, pClassNames[pPlayers[uActiveCharacter]->classType]); // "Seek knowledge elsewhere %s the %s" |
95 strcat(pTmpBuf.data(), "\n \n"); | 95 strcat(pTmpBuf.data(), "\n \n"); |
96 strcat(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[528]); //"I can offer you nothing further." | 96 strcat(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[528]); //"I can offer you nothing further." |
97 pTextHeight = pFontArrus->CalcTextHeight(pTmpBuf.data(), &working_window, 0, 0); | 97 pTextHeight = pFontArrus->CalcTextHeight(pTmpBuf.data(), &working_window, 0, 0); |
98 working_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, TargetColor(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); | 98 working_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, Color16(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3); |
99 return; | 99 return; |
100 } | 100 } |
101 if ( pSkillFlag ) | 101 if ( pSkillFlag ) |
102 { | 102 { |
103 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[401], pPrice); //"Skill Cost: %lu" | 103 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[401], pPrice); //"Skill Cost: %lu" |
116 pButton->uY = v58 + v26; | 116 pButton->uY = v58 + v26; |
117 pTextHeight = pFontArrus->CalcTextHeight(pGlobalTXT_LocalizationStrings[400], &working_window, 0, 0); | 117 pTextHeight = pFontArrus->CalcTextHeight(pGlobalTXT_LocalizationStrings[400], &working_window, 0, 0); |
118 pButton->uHeight = pTextHeight; | 118 pButton->uHeight = pTextHeight; |
119 v26 = pButton->uY + pTextHeight - 1; | 119 v26 = pButton->uY + pTextHeight - 1; |
120 pButton->uW = v26; | 120 pButton->uW = v26; |
121 pTextColor = TargetColor(0xFFu, 0xFFu, 0x9Bu); | 121 pTextColor = Color16(0xFFu, 0xFFu, 0x9Bu); |
122 if ( pDialogueWindow->pCurrentPosActiveItem != i ) | 122 if ( pDialogueWindow->pCurrentPosActiveItem != i ) |
123 pTextColor = TargetColor(0xFFu, 0xFFu, 0xFFu); | 123 pTextColor = Color16(0xFFu, 0xFFu, 0xFFu); |
124 working_window.DrawTitleText(pFontArrus, 0, pButton->uY, pTextColor, pGlobalTXT_LocalizationStrings[400], 3);//"Buy Spells" | 124 working_window.DrawTitleText(pFontArrus, 0, pButton->uY, pTextColor, pGlobalTXT_LocalizationStrings[400], 3);//"Buy Spells" |
125 } | 125 } |
126 else | 126 else |
127 { | 127 { |
128 if ( byte_4ED970_skill_learn_ability_by_class_table[pPlayers[uActiveCharacter]->classType][pButton->msg_param - 36] | 128 if ( byte_4ED970_skill_learn_ability_by_class_table[pPlayers[uActiveCharacter]->classType][pButton->msg_param - 36] |
131 pButton->uY = v58 + v26; | 131 pButton->uY = v58 + v26; |
132 pTextHeight = pFontArrus->CalcTextHeight(pSkillNames[pButton->msg_param - 36], &working_window, 0, 0); | 132 pTextHeight = pFontArrus->CalcTextHeight(pSkillNames[pButton->msg_param - 36], &working_window, 0, 0); |
133 pButton->uHeight = pTextHeight; | 133 pButton->uHeight = pTextHeight; |
134 v26 = pButton->uY + pTextHeight - 1; | 134 v26 = pButton->uY + pTextHeight - 1; |
135 pButton->uW = v26; | 135 pButton->uW = v26; |
136 pTextColor = TargetColor(0xFFu, 0xFFu, 0x9Bu); | 136 pTextColor = Color16(0xFFu, 0xFFu, 0x9Bu); |
137 if ( pDialogueWindow->pCurrentPosActiveItem != i ) | 137 if ( pDialogueWindow->pCurrentPosActiveItem != i ) |
138 pTextColor = TargetColor(0xFFu, 0xFFu, 0xFFu); | 138 pTextColor = Color16(0xFFu, 0xFFu, 0xFFu); |
139 working_window.DrawTitleText(pFontArrus, 0, pButton->uY, pTextColor, pSkillNames[pButton->msg_param - 36], 3); | 139 working_window.DrawTitleText(pFontArrus, 0, pButton->uY, pTextColor, pSkillNames[pButton->msg_param - 36], 3); |
140 } | 140 } |
141 else | 141 else |
142 { | 142 { |
143 pButton->uW = 0; | 143 pButton->uW = 0; |
196 { | 196 { |
197 v15 = (ItemGen *)(&pParty->pPlayers[1].uExpressionTimeLength + 18 * (v13 + 12 * (int)window_SpeakInHouse->ptr_1C)); | 197 v15 = (ItemGen *)(&pParty->pPlayers[1].uExpressionTimeLength + 18 * (v13 + 12 * (int)window_SpeakInHouse->ptr_1C)); |
198 v17 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction( (ItemGen *)&pParty->pPlayers[1].uExpressionTimeLength + v13 + 12 * (int)window_SpeakInHouse->ptr_1C, BuildingType_MagicShop, (int)window_SpeakInHouse->ptr_1C, 2); | 198 v17 = pPlayers[uActiveCharacter]->SelectPhrasesTransaction( (ItemGen *)&pParty->pPlayers[1].uExpressionTimeLength + v13 + 12 * (int)window_SpeakInHouse->ptr_1C, BuildingType_MagicShop, (int)window_SpeakInHouse->ptr_1C, 2); |
199 v18 = BuildDialogueString(pMerchantsBuyPhrases[v17], uActiveCharacter - 1, v15, (char *)window_SpeakInHouse->ptr_1C, 2, 0); | 199 v18 = BuildDialogueString(pMerchantsBuyPhrases[v17], uActiveCharacter - 1, v15, (char *)window_SpeakInHouse->ptr_1C, 2, 0); |
200 pTextHeight = pFontArrus->CalcTextHeight(v18, &working_window, 0, 0); | 200 pTextHeight = pFontArrus->CalcTextHeight(v18, &working_window, 0, 0); |
201 working_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, TargetColor(0xFFu, 0xFFu, 0xFFu), v18, 3); | 201 working_window.DrawTitleText(pFontArrus, 0, (174 - pTextHeight) / 2 + 138, Color16(0xFFu, 0xFFu, 0xFFu), v18, 3); |
202 return; | 202 return; |
203 } | 203 } |
204 } | 204 } |
205 return; | 205 return; |
206 } | 206 } |