comparison mm7_1.cpp @ 11:66319a734368

16.01.13(work)
author Ritor1
date Wed, 16 Jan 2013 17:31:56 +0600
parents 13da46a8d45d
children 0ea5768a2f0d
comparison
equal deleted inserted replaced
10:40f6ac8fbe39 11:66319a734368
5023 5023
5024 v13 = nullptr; 5024 v13 = nullptr;
5025 5025
5026 pMouse->uPointingObjectID = 0; 5026 pMouse->uPointingObjectID = 0;
5027 pMouse->GetClickPos(&pX, &pY); 5027 pMouse->GetClickPos(&pX, &pY);
5028 if ( pX || (signed int)pX > 639 || pY || (signed int)pY > 479 ) 5028 if ( pX || (signed int)pX > 639 || pY || (signed int)pY > 479 )//( (pX & 0x80000000u) != 0 || (signed int)pX > 639 || (pY & 0x80000000u) != 0 || (signed int)pY > 479 )
5029 return; 5029 return;
5030 if ( !pCurrentScreen ) 5030 if ( !pCurrentScreen )
5031 { 5031 {
5032 if ( (signed int)pX > 467 || (signed int)pY > 351 ) 5032 if ( (signed int)pX > 467 || (signed int)pY > 351 )
5033 goto _click_on_game_ui; 5033 goto _click_on_game_ui;
5644 5644
5645 //----- (00421626) -------------------------------------------------------- 5645 //----- (00421626) --------------------------------------------------------
5646 GUIWindow *GameUI_InitializeCharacterWindow(unsigned int _this) 5646 GUIWindow *GameUI_InitializeCharacterWindow(unsigned int _this)
5647 { 5647 {
5648 unsigned int v1; // edi@1 5648 unsigned int v1; // edi@1
5649 GUIWindow *v2; // edi@3 5649 GUIWindow *pWindow; // edi@3
5650 5650
5651 ++pIcons_LOD->uTexturePacksCount; 5651 ++pIcons_LOD->uTexturePacksCount;
5652 v1 = _this; 5652 v1 = _this;
5653 if ( !pIcons_LOD->uNumPrevLoadedFiles ) 5653 if ( !pIcons_LOD->uNumPrevLoadedFiles )
5654 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; 5654 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
5655 pEventTimer->Pause(); 5655 pEventTimer->Pause();
5656 pAudioPlayer->StopChannels(-1, -1); 5656 pAudioPlayer->StopChannels(-1, -1);
5657 bRingsShownInCharScreen = 0; 5657 bRingsShownInCharScreen = 0;
5658 CharacterUI_LoadPaperdollTextures(); 5658 CharacterUI_LoadPaperdollTextures();
5659 pCurrentScreen = v1; 5659 pCurrentScreen = v1;
5660 v2 = GUIWindow::Create(0, 0, 640, 480, WINDOW_CharacterRecord, uActiveCharacter, 0); 5660 pWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_CharacterRecord, uActiveCharacter, 0);
5661 pCharacterScreen_StatsBtn = v2->CreateButton( 5661 pCharacterScreen_StatsBtn = pWindow->CreateButton(pViewport->uViewportX + 12, pViewport->uViewportY + 308,
5662 pViewport->uViewportX + 12,
5663 pViewport->uViewportY + 308,
5664 (papredoll_dbrds[9] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[9]].uTextureWidth : 24), 5662 (papredoll_dbrds[9] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[9]].uTextureWidth : 24),
5665 (papredoll_dbrds[9] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[9]].uTextureHeight : 26), 5663 (papredoll_dbrds[9] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[9]].uTextureHeight : 26),
5666 1, 5664 1, 0, 0x73u, 0, 0x53u, pGlobalTXT_LocalizationStrings[216],// Stats
5667 0,
5668 0x73u,
5669 0,
5670 0x53u,
5671 pGlobalTXT_LocalizationStrings[216],
5672 (Texture *)(papredoll_dbrds[10] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[10]] : 0), 5665 (Texture *)(papredoll_dbrds[10] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[10]] : 0),
5673 papredoll_dbrds[9] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[9]] : 0, 5666 papredoll_dbrds[9] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[9]] : 0, 0);
5674 0); 5667 pCharacterScreen_SkillsBtn = pWindow->CreateButton(pViewport->uViewportX + 102, pViewport->uViewportY + 308,
5675 pCharacterScreen_SkillsBtn = v2->CreateButton(
5676 pViewport->uViewportX + 102,
5677 pViewport->uViewportY + 308,
5678 (papredoll_dbrds[7] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[7]].uTextureWidth : 24), 5668 (papredoll_dbrds[7] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[7]].uTextureWidth : 24),
5679 (papredoll_dbrds[7] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[7]].uTextureHeight : 26), 5669 (papredoll_dbrds[7] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[7]].uTextureHeight : 26),
5680 1, 5670 1, 0, 0x72u, 0, 0x4Bu, pGlobalTXT_LocalizationStrings[205],//Skills
5681 0,
5682 0x72u,
5683 0,
5684 0x4Bu,
5685 pGlobalTXT_LocalizationStrings[205],
5686 (Texture *)(papredoll_dbrds[8] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[8]] : 0), 5671 (Texture *)(papredoll_dbrds[8] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[8]] : 0),
5687 papredoll_dbrds[7] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[7]] : 0, 5672 papredoll_dbrds[7] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[7]] : 0, 0);
5688 0); 5673 pCharacterScreen_InventoryBtn = pWindow->CreateButton(pViewport->uViewportX + 192, pViewport->uViewportY + 308,
5689 pCharacterScreen_InventoryBtn = v2->CreateButton(
5690 pViewport->uViewportX + 192,
5691 pViewport->uViewportY + 308,
5692 (papredoll_dbrds[5] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[5]].uTextureWidth : 24), 5674 (papredoll_dbrds[5] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[5]].uTextureWidth : 24),
5693 (papredoll_dbrds[5] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[5]].uTextureHeight : 26), 5675 (papredoll_dbrds[5] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[5]].uTextureHeight : 26),
5694 1, 5676 1, 0, 0x74u, 0, 0x49u, pGlobalTXT_LocalizationStrings[120], //Inventory
5695 0,
5696 0x74u,
5697 0,
5698 0x49u,
5699 pGlobalTXT_LocalizationStrings[120],
5700 (Texture *)(papredoll_dbrds[6] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[6]] : 0), 5677 (Texture *)(papredoll_dbrds[6] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[6]] : 0),
5701 papredoll_dbrds[5] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[5]] : 0, 5678 papredoll_dbrds[5] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[5]] : 0, 0);
5702 0); 5679 pCharacterScreen_AwardsBtn = pWindow->CreateButton(pViewport->uViewportX + 282, pViewport->uViewportY + 308,
5703 pCharacterScreen_AwardsBtn = v2->CreateButton(
5704 pViewport->uViewportX + 282,
5705 pViewport->uViewportY + 308,
5706 (papredoll_dbrds[3] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[3]].uTextureWidth : 24), 5680 (papredoll_dbrds[3] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[3]].uTextureWidth : 24),
5707 (papredoll_dbrds[3] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[3]].uTextureHeight : 26), 5681 (papredoll_dbrds[3] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[3]].uTextureHeight : 26),
5708 1, 5682 1, 0, 0x75u, 0, 0x41u, pGlobalTXT_LocalizationStrings[22], //Awards
5709 0,
5710 0x75u,
5711 0,
5712 0x41u,
5713 pGlobalTXT_LocalizationStrings[22],
5714 (Texture *)(papredoll_dbrds[4] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[4]] : 0), 5683 (Texture *)(papredoll_dbrds[4] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[4]] : 0),
5715 papredoll_dbrds[3] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[3]] : 0, 5684 papredoll_dbrds[3] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[3]] : 0, 0);
5716 0); 5685 pCharacterScreen_ExitBtn = pWindow->CreateButton(pViewport->uViewportX + 371, pViewport->uViewportY + 308,
5717 pCharacterScreen_ExitBtn = v2->CreateButton(
5718 pViewport->uViewportX + 371,
5719 pViewport->uViewportY + 308,
5720 (papredoll_dbrds[1] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[1]].uTextureWidth : 24), 5686 (papredoll_dbrds[1] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[1]].uTextureWidth : 24),
5721 (papredoll_dbrds[1] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[1]].uTextureHeight : 26), 5687 (papredoll_dbrds[1] != -1 ? pIcons_LOD->pTextures[papredoll_dbrds[1]].uTextureHeight : 26),
5722 1, 5688 1, 0, 0xA8u, 0, 0, pGlobalTXT_LocalizationStrings[79],//Exit
5723 0,
5724 0xA8u,
5725 0,
5726 0,
5727 pGlobalTXT_LocalizationStrings[79],
5728 (Texture *)(papredoll_dbrds[2] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[2]] : 0), 5689 (Texture *)(papredoll_dbrds[2] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[2]] : 0),
5729 papredoll_dbrds[1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[1]] : 0, 5690 papredoll_dbrds[1] != -1 ? (int)&pIcons_LOD->pTextures[papredoll_dbrds[1]] : 0, 0);
5730 0); 5691 pWindow->CreateButton(0, 0, 0x1DCu, 0x159u, 1, 122, 0x78u, 0, 0, "", 0);
5731 v2->CreateButton(0, 0, 0x1DCu, 0x159u, 1, 122, 0x78u, 0, 0, "", 0); 5692 pCharacterScreen_DetalizBtn = pWindow->CreateButton(0x258u, 0x12Cu, 0x1Eu, 0x1Eu, 1, 0, 0x55u, 0, 0, pGlobalTXT_LocalizationStrings[64], 0);
5732 pCharacterScreen_DetalizBtn = v2->CreateButton( 5693 pCharacterScreen_DollBtn = pWindow->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, 1, 0, 0x85u, 0, 0, "", 0);
5733 0x258u, 5694 pWindow->CreateButton(0x3Du, 0x1A8u, 0x1Fu, 0, 2, 94, 0x6Eu, 1u, 0x31u, "", 0);
5734 0x12Cu, 5695 pWindow->CreateButton(0xB1u, 0x1A8u, 0x1Fu, 0, 2, 94, 0x6Eu, 2u, 0x32u, "", 0);
5735 0x1Eu, 5696 pWindow->CreateButton(0x124u, 0x1A8u, 0x1Fu, 0, 2, 94, 0x6Eu, 3u, 0x33u, "", 0);
5736 0x1Eu, 5697 pWindow->CreateButton(0x197u, 0x1A8u, 0x1Fu, 0, 2, 94, 0x6Eu, 4u, 0x34u, "", 0);
5737 1, 5698 pWindow->CreateButton(0, 0, 0, 0, 1, 0, 0xB0u, 0, 9u, "", 0);
5738 0,
5739 0x55u,
5740 0,
5741 0,
5742 pGlobalTXT_LocalizationStrings[64],
5743 0);
5744 pCharacterScreen_DollBtn = v2->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, 1, 0, 0x85u, 0, 0, "", 0);
5745 v2->CreateButton(0x3Du, 0x1A8u, 0x1Fu, 0, 2, 94, 0x6Eu, 1u, 0x31u, "", 0);
5746 v2->CreateButton(0xB1u, 0x1A8u, 0x1Fu, 0, 2, 94, 0x6Eu, 2u, 0x32u, "", 0);
5747 v2->CreateButton(0x124u, 0x1A8u, 0x1Fu, 0, 2, 94, 0x6Eu, 3u, 0x33u, "", 0);
5748 v2->CreateButton(0x197u, 0x1A8u, 0x1Fu, 0, 2, 94, 0x6Eu, 4u, 0x34u, "", 0);
5749 v2->CreateButton(0, 0, 0, 0, 1, 0, 0xB0u, 0, 9u, "", 0);
5750 sub_419100(); 5699 sub_419100();
5751 return v2; 5700 return pWindow;
5752 } 5701 }
5753 5702
5754 5703
5755 5704
5756 //----- (004219BE) -------------------------------------------------------- 5705 //----- (004219BE) --------------------------------------------------------
5921 LABEL_9: 5870 LABEL_9:
5922 if ( !pCurrentScreen ) 5871 if ( !pCurrentScreen )
5923 { 5872 {
5924 viewparams->bRedrawGameUI = 1; 5873 viewparams->bRedrawGameUI = 1;
5925 if ( uActiveCharacter != v1 ) 5874 if ( uActiveCharacter != v1 )
5926 goto LABEL_27; 5875 //goto LABEL_27;
5876 {
5877 if ( pPlayers[v1]->uTimeToRecovery )
5878 return;
5879 uActiveCharacter = v1;
5880 return;
5881 }
5927 v5 = 7; 5882 v5 = 7;
5928 LABEL_22: 5883 //LABEL_22:
5929 pGUIWindow_CurrentMenu = GameUI_InitializeCharacterWindow(v5); 5884 pGUIWindow_CurrentMenu = GameUI_InitializeCharacterWindow(v5);
5930 return; 5885 return;
5931 } 5886 }
5932 if ( pCurrentScreen == 8 ) 5887 if ( pCurrentScreen == 8 )
5933 return; 5888 return;
5934 if ( pCurrentScreen == 10 ) 5889 if ( pCurrentScreen == 10 )
5935 { 5890 {
5936 LABEL_23: 5891 //LABEL_23:
5937 viewparams->bRedrawGameUI = 1; 5892 viewparams->bRedrawGameUI = 1;
5938 if ( uActiveCharacter == v1 ) 5893 if ( uActiveCharacter == v1 )
5939 { 5894 {
5940 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103; 5895 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103;
5941 pCurrentScreen = 15; 5896 pCurrentScreen = 15;
5942 goto LABEL_28; 5897 //goto LABEL_28;
5943 } 5898 uActiveCharacter = v1;
5944 LABEL_27: 5899 return;
5900 }
5901 //LABEL_27:
5945 if ( pPlayers[v1]->uTimeToRecovery ) 5902 if ( pPlayers[v1]->uTimeToRecovery )
5946 return; 5903 return;
5947 goto LABEL_28; 5904 //goto LABEL_28;
5905 uActiveCharacter = v1;
5906 return;
5948 } 5907 }
5949 if ( pCurrentScreen != 13 ) 5908 if ( pCurrentScreen != 13 )
5950 { 5909 {
5951 if ( pCurrentScreen == 14 ) 5910 if ( pCurrentScreen == 14 )
5952 { 5911 {
5953 LABEL_28: 5912 //LABEL_28:
5954 uActiveCharacter = v1; 5913 uActiveCharacter = v1;
5955 return; 5914 return;
5956 } 5915 }
5957 if ( pCurrentScreen != 15 ) 5916 if ( pCurrentScreen != 15 )
5958 { 5917 {
5960 uActiveCharacter = v1; 5919 uActiveCharacter = v1;
5961 if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 102 ) 5920 if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 102 )
5962 sub_419100(); 5921 sub_419100();
5963 return; 5922 return;
5964 } 5923 }
5965 goto LABEL_23; 5924 //goto LABEL_23;
5925 viewparams->bRedrawGameUI = 1;
5926 if ( uActiveCharacter == v1 )
5927 {
5928 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103;
5929 pCurrentScreen = 15;
5930 //goto LABEL_28;
5931 uActiveCharacter = v1;
5932 return;
5933 }
5934 //LABEL_27:
5935 if ( pPlayers[v1]->uTimeToRecovery )
5936 return;
5937 //goto LABEL_28;
5938 uActiveCharacter = v1;
5939 return;
5966 } 5940 }
5967 if ( ptr_507BC0->field_40 == 1 ) 5941 if ( ptr_507BC0->field_40 == 1 )
5968 return; 5942 return;
5969 viewparams->bRedrawGameUI = 1; 5943 viewparams->bRedrawGameUI = 1;
5970 if ( uActiveCharacter != v1 ) 5944 if ( uActiveCharacter != v1 )
5971 goto LABEL_28; 5945 //goto LABEL_28;
5946 uActiveCharacter = v1;
5947 return;
5972 if ( dword_F8B19C == 2 || dword_F8B19C == 6 ) 5948 if ( dword_F8B19C == 2 || dword_F8B19C == 6 )
5973 { 5949 {
5974 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103; 5950 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103;
5975 v5 = 14; 5951 v5 = 14;
5976 goto LABEL_22; 5952 //goto LABEL_22;
5953 pGUIWindow_CurrentMenu = GameUI_InitializeCharacterWindow(v5);
5954 return;
5977 } 5955 }
5978 } 5956 }
5979 // 4E28F8: using guessed type int pCurrentScreen; 5957 // 4E28F8: using guessed type int pCurrentScreen;
5980 // F8B19C: using guessed type int dword_F8B19C; 5958 // F8B19C: using guessed type int dword_F8B19C;
5981 5959