Mercurial > mm7
comparison UIPartyCreation.cpp @ 977:ac85898f5903
Слияние
author | Ritor1 |
---|---|
date | Thu, 09 May 2013 01:33:54 +0600 |
parents | 15c6b80caa3a c8a0f6d89c70 |
children | 08fd1436ef35 |
comparison
equal
deleted
inserted
replaced
976:15c6b80caa3a | 977:ac85898f5903 |
---|---|
130 } | 130 } |
131 while ( v5 < 56 ); | 131 while ( v5 < 56 ); |
132 return result; | 132 return result; |
133 } | 133 } |
134 //----- (00495B39) -------------------------------------------------------- | 134 //----- (00495B39) -------------------------------------------------------- |
135 void __cdecl PlayerCreationUI_Draw() | 135 void PlayerCreationUI_Draw() |
136 { | 136 { |
137 int pTextCenter; // eax@3 | 137 int pTextCenter; // eax@3 |
138 IconFrame *pFrame; // eax@3 | 138 IconFrame *pFrame; // eax@3 |
139 int pX; // ecx@7 | 139 int pX; // ecx@7 |
140 GUIButton *uPosActiveItem; // edi@12 | 140 GUIButton *uPosActiveItem; // edi@12 |
183 pRenderer->DrawTextureRGB(0, 0, &pTexture_PCX); | 183 pRenderer->DrawTextureRGB(0, 0, &pTexture_PCX); |
184 uPlayerCreationUI_SkySliderPos = (GetTickCount() % 12800) / 20; | 184 uPlayerCreationUI_SkySliderPos = (GetTickCount() % 12800) / 20; |
185 pRenderer->DrawTextureIndexed(uPlayerCreationUI_SkySliderPos, 2, pTexture_MAKESKY); | 185 pRenderer->DrawTextureIndexed(uPlayerCreationUI_SkySliderPos, 2, pTexture_MAKESKY); |
186 pRenderer->DrawTextureIndexed(uPlayerCreationUI_SkySliderPos - 640, 2, pTexture_MAKESKY); | 186 pRenderer->DrawTextureIndexed(uPlayerCreationUI_SkySliderPos - 640, 2, pTexture_MAKESKY); |
187 pRenderer->DrawTextureTransparent(0, 0, pTexture_MAKETOP); | 187 pRenderer->DrawTextureTransparent(0, 0, pTexture_MAKETOP); |
188 | |
188 uPlayerCreationUI_SelectedCharacter = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) / 7; | 189 uPlayerCreationUI_SelectedCharacter = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) / 7; |
190 switch (uPlayerCreationUI_SelectedCharacter) | |
191 { | |
192 case 0: pX = 12; break; | |
193 case 1: pX = 171; break; | |
194 case 2: pX = 329; break; | |
195 case 3: pX = 488; break; | |
196 default: | |
197 assert(false && "Invalid selected character"); | |
198 } | |
199 | |
189 pTextCenter = pFontCChar->AlignText_Center(640, pGlobalTXT_LocalizationStrings[51]); | 200 pTextCenter = pFontCChar->AlignText_Center(640, pGlobalTXT_LocalizationStrings[51]); |
190 pGUIWindow_CurrentMenu->DrawText(pFontCChar, pTextCenter + 1, 0, 0, pGlobalTXT_LocalizationStrings[51], 0, 0, 0); | 201 pGUIWindow_CurrentMenu->DrawText(pFontCChar, pTextCenter + 1, 0, 0, pGlobalTXT_LocalizationStrings[51], 0, 0, 0); |
191 pRenderer->DrawTextureTransparent(17, 35, pPlayerPortraits[pParty->pPlayers[0].uFace]); | 202 pRenderer->DrawTextureTransparent(17, 35, pPlayerPortraits[pParty->pPlayers[0].uFace]); |
192 pRenderer->DrawTextureTransparent(176, 35, pPlayerPortraits[pParty->pPlayers[1].uFace]); | 203 pRenderer->DrawTextureTransparent(176, 35, pPlayerPortraits[pParty->pPlayers[1].uFace]); |
193 pRenderer->DrawTextureTransparent(335, 35, pPlayerPortraits[pParty->pPlayers[2].uFace]); | 204 pRenderer->DrawTextureTransparent(335, 35, pPlayerPortraits[pParty->pPlayers[2].uFace]); |
194 pRenderer->DrawTextureTransparent(494, 35, pPlayerPortraits[pParty->pPlayers[3].uFace]); | 205 pRenderer->DrawTextureTransparent(494, 35, pPlayerPortraits[pParty->pPlayers[3].uFace]); |
195 pFrame = pIconsFrameTable->GetFrame(uIconID_CharacterFrame, pEventTimer->uStartTime); | 206 pFrame = pIconsFrameTable->GetFrame(uIconID_CharacterFrame, pEventTimer->uStartTime); |
196 switch ( uPlayerCreationUI_SelectedCharacter ) | 207 |
197 { | |
198 case 0: | |
199 pX = 12; | |
200 break; | |
201 case 1: | |
202 pX = 171; | |
203 break; | |
204 case 2: | |
205 pX = 329; | |
206 break; | |
207 case 3: | |
208 pX = 488; | |
209 break; | |
210 default: | |
211 assert(false);//if click "Knight" crash | |
212 //pX = v123; | |
213 break; | |
214 } | |
215 | 208 |
216 pRenderer->DrawTextureTransparent(pX, 29, &pIcons_LOD->pTextures[pFrame->uTextureID]); | 209 pRenderer->DrawTextureTransparent(pX, 29, &pIcons_LOD->pTextures[pFrame->uTextureID]); |
217 uPosActiveItem = pGUIWindow_CurrentMenu->GetControl(pGUIWindow_CurrentMenu->pCurrentPosActiveItem); | 210 uPosActiveItem = pGUIWindow_CurrentMenu->GetControl(pGUIWindow_CurrentMenu->pCurrentPosActiveItem); |
218 uPlayerCreationUI_ArrowAnim = 19 - (GetTickCount() % 500) / 25; | 211 uPlayerCreationUI_ArrowAnim = 19 - (GetTickCount() % 500) / 25; |
219 pRenderer->DrawTextureTransparent(uPosActiveItem->uZ - 4, uPosActiveItem->uY, pTextures_arrowl[uPlayerCreationUI_ArrowAnim]); | 212 pRenderer->DrawTextureTransparent(uPosActiveItem->uZ - 4, uPosActiveItem->uY, pTextures_arrowl[uPlayerCreationUI_ArrowAnim]); |
220 pRenderer->DrawTextureTransparent(uPosActiveItem->uX - 12, uPosActiveItem->uY, pTextures_arrowr[uPlayerCreationUI_ArrowAnim]); | 213 pRenderer->DrawTextureTransparent(uPosActiveItem->uX - 12, uPosActiveItem->uY, pTextures_arrowr[uPlayerCreationUI_ArrowAnim]); |
214 | |
221 memset(pText, 0, 200); | 215 memset(pText, 0, 200); |
222 strcpy(pText, pGlobalTXT_LocalizationStrings[205]);// "Skills" | 216 strcpy(pText, pGlobalTXT_LocalizationStrings[205]);// "Skills" |
223 uNumLet = strlen(pText) - 1; | 217 uNumLet = strlen(pText) - 1; |
224 pOrder = uNumLet; | 218 pOrder = uNumLet; |
225 if ( uNumLet >= 0 ) | 219 if ( uNumLet >= 0 ) |
603 uXb += 158; | 597 uXb += 158; |
604 ++uControlParamb; | 598 ++uControlParamb; |
605 } | 599 } |
606 while ( (signed int)uXb < 640 ); | 600 while ( (signed int)uXb < 640 ); |
607 | 601 |
608 pGUIWindow_CurrentMenu->CreateButton( 5, 21, 153, 365, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 0, 0x31u, "", 0); | 602 pGUIWindow_CurrentMenu->CreateButton( 5, 21, 153, 365, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 0, '1', "", 0); |
609 pGUIWindow_CurrentMenu->CreateButton(163, 21, 153, 365, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 1, 0x32u, "", 0); | 603 pGUIWindow_CurrentMenu->CreateButton(163, 21, 153, 365, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 1, '2', "", 0); |
610 pGUIWindow_CurrentMenu->CreateButton(321, 21, 153, 365, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 2, 0x33u, "", 0); | 604 pGUIWindow_CurrentMenu->CreateButton(321, 21, 153, 365, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 2, '3', "", 0); |
611 pGUIWindow_CurrentMenu->CreateButton(479, 21, 153, 365, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 3, 0x34u, "", 0); | 605 pGUIWindow_CurrentMenu->CreateButton(479, 21, 153, 365, 1, 0, UIMSG_PlayerCreation_SelectAttribute, 3, '4', "", 0); |
612 | 606 |
613 uXc = 23; | 607 uXc = 23; |
614 uControlParamc = 2; | 608 uControlParamc = 2; |
615 do | 609 do |
616 { | 610 { |
623 pGUIWindow_CurrentMenu->CreateButton(uXc, 6 * v0 + 169, 120, 20, 1, 0, UIMSG_0, uControlParamc + 4, 0, "", 0); | 617 pGUIWindow_CurrentMenu->CreateButton(uXc, 6 * v0 + 169, 120, 20, 1, 0, UIMSG_0, uControlParamc + 4, 0, "", 0); |
624 uControlParamc += 7; | 618 uControlParamc += 7; |
625 uXc += 158; | 619 uXc += 158; |
626 } | 620 } |
627 while ( (signed int)uControlParamc < 30 ); | 621 while ( (signed int)uControlParamc < 30 ); |
628 pGUIWindow_CurrentMenu->_41D08F(28, 0, 7, 40); | 622 pGUIWindow_CurrentMenu->_41D08F_set_keyboard_control_group(28, 0, 7, 40); |
623 | |
629 pGUIWindow_CurrentMenu->CreateButton(323, 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0, 0, "", 0); | 624 pGUIWindow_CurrentMenu->CreateButton(323, 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0, 0, "", 0); |
630 pGUIWindow_CurrentMenu->CreateButton(323, v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0xC, 0, "", 0); | 625 pGUIWindow_CurrentMenu->CreateButton(323, v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0xC, 0, "", 0); |
631 pGUIWindow_CurrentMenu->CreateButton(323, 2 * v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0x14, 0, "", 0); | 626 pGUIWindow_CurrentMenu->CreateButton(323, 2 * v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0x14, 0, "", 0); |
632 pGUIWindow_CurrentMenu->CreateButton(388, 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0x18, 0, "", 0); | 627 pGUIWindow_CurrentMenu->CreateButton(388, 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0x18, 0, "", 0); |
633 pGUIWindow_CurrentMenu->CreateButton(388, v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0x1C, 0, "", 0); | 628 pGUIWindow_CurrentMenu->CreateButton(388, v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0x1C, 0, "", 0); |
634 pGUIWindow_CurrentMenu->CreateButton(388, 2 * v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0x20, 0, "", 0); | 629 pGUIWindow_CurrentMenu->CreateButton(388, 2 * v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0x20, 0, "", 0); |
635 pGUIWindow_CurrentMenu->CreateButton(453, 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0x10, 0, "", 0); | 630 pGUIWindow_CurrentMenu->CreateButton(453, 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 0x10, 0, "", 0); |
636 pGUIWindow_CurrentMenu->CreateButton(453, v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 8, 0, "", 0); | 631 pGUIWindow_CurrentMenu->CreateButton(453, v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 8, 0, "", 0); |
637 pGUIWindow_CurrentMenu->CreateButton(453, 2 * v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 4, 0, "", 0); | 632 pGUIWindow_CurrentMenu->CreateButton(453, 2 * v0 + 417, 65, v0, 1, 0, UIMSG_PlayerCreationSelectClass, 4, 0, "", 0); |
633 | |
638 uControlParamd = 0; | 634 uControlParamd = 0; |
639 do | 635 do |
640 { | 636 { |
641 uXd = -5; | 637 uXd = -5; |
642 if ( uControlParamd <= 3 ) | 638 if ( uControlParamd <= 3 ) |
644 pGUIWindow_CurrentMenu->CreateButton(100 * (uControlParamd / 3) + uXd + 17, v0 * (uControlParamd % 3) + 417, 100, v0, 1, 0, UIMSG_PlayerCreationSelectActiveSkill, | 640 pGUIWindow_CurrentMenu->CreateButton(100 * (uControlParamd / 3) + uXd + 17, v0 * (uControlParamd % 3) + 417, 100, v0, 1, 0, UIMSG_PlayerCreationSelectActiveSkill, |
645 uControlParamd, 0, "", 0); | 641 uControlParamd, 0, "", 0); |
646 ++uControlParamd; | 642 ++uControlParamd; |
647 } | 643 } |
648 while ( uControlParamd < 9 ); | 644 while ( uControlParamd < 9 ); |
645 | |
649 pPlayerCreationUI_BtnOK = pGUIWindow_CurrentMenu->CreateButton(580, 431, 51, 39, 1, 0, UIMSG_PlayerCreationClickOK, 0, 0xD, "", pIcons_LOD->GetTexture(uTextureID_BUTTMAKE), 0); | 646 pPlayerCreationUI_BtnOK = pGUIWindow_CurrentMenu->CreateButton(580, 431, 51, 39, 1, 0, UIMSG_PlayerCreationClickOK, 0, 0xD, "", pIcons_LOD->GetTexture(uTextureID_BUTTMAKE), 0); |
650 pPlayerCreationUI_BtnReset = pGUIWindow_CurrentMenu->CreateButton(527, 431, 51, 39, 1, 0, UIMSG_PlayerCreationClickReset, 0, 0x43, "", pIcons_LOD->GetTexture(uTextureID_BUTTMAKE2), 0); | 647 pPlayerCreationUI_BtnReset = pGUIWindow_CurrentMenu->CreateButton(527, 431, 51, 39, 1, 0, UIMSG_PlayerCreationClickReset, 0, 0x43, "", pIcons_LOD->GetTexture(uTextureID_BUTTMAKE2), 0); |
651 pPlayerCreationUI_BtnMinus = pGUIWindow_CurrentMenu->CreateButton(523, 393, 20, 35, 1, 0, UIMSG_PlayerCreationClickMinus, 0, 0x2D, "", pTexture_buttminu, 0); | 648 pPlayerCreationUI_BtnMinus = pGUIWindow_CurrentMenu->CreateButton(523, 393, 20, 35, 1, 0, UIMSG_PlayerCreationClickMinus, 0, 0x2D, "", pTexture_buttminu, 0); |
652 pPlayerCreationUI_BtnPlus = pGUIWindow_CurrentMenu->CreateButton(613, 393, 20, 35, 1, 0, UIMSG_PlayerCreationClickPlus, 1, 0x2B, "", pTexture_buttplus, 0); | 649 pPlayerCreationUI_BtnPlus = pGUIWindow_CurrentMenu->CreateButton(613, 393, 20, 35, 1, 0, UIMSG_PlayerCreationClickPlus, 1, 0x2B, "", pTexture_buttplus, 0); |
653 | 650 |