Mercurial > mm7
comparison UI/UITransition.cpp @ 1754:421c29d4ab3e
UITransition.cpp cleaning(continue)
author | Ritor1 |
---|---|
date | Mon, 30 Sep 2013 17:29:27 +0600 |
parents | b6212ecbc140 |
children | dc5d8edf629a |
comparison
equal
deleted
inserted
replaced
1753:999bf8c99514 | 1754:421c29d4ab3e |
---|---|
24 | 24 |
25 | 25 |
26 //----- (00444839) -------------------------------------------------------- | 26 //----- (00444839) -------------------------------------------------------- |
27 void TransitionUI_Load(uint anim_id, uint exit_pic_id, int x, int y, int z, int directiony, int directionx, int a8, const char *pLocationName) | 27 void TransitionUI_Load(uint anim_id, uint exit_pic_id, int x, int y, int z, int directiony, int directionx, int a8, const char *pLocationName) |
28 { | 28 { |
29 unsigned int v12; // eax@6 | |
30 const char *v13; // ST0C_4@6 | |
31 unsigned int v14; // eax@8 | |
32 const char *v15; // eax@14 | 29 const char *v15; // eax@14 |
33 unsigned int v16; // eax@16 | |
34 const char *v18; // [sp-8h] [bp-40h]@9 | |
35 char *v20; // [sp-4h] [bp-3Ch]@9 | |
36 const char *v21; // [sp-4h] [bp-3Ch]@11 | |
37 char pContainer[40]; // [sp+Ch] [bp-2Ch]@1 | 30 char pContainer[40]; // [sp+Ch] [bp-2Ch]@1 |
38 unsigned int v23; // [sp+34h] [bp-4h]@1 | 31 |
39 | |
40 v23 = IndoorLocation::GetLocationIndex(pLocationName); | |
41 dword_59117C_teleportx = x; | 32 dword_59117C_teleportx = x; |
42 dword_591178_teleporty = y; | 33 dword_591178_teleporty = y; |
43 dword_591174_teleportz = z; | 34 dword_591174_teleportz = z; |
44 dword_591170_teleport_directiony = directiony; | 35 dword_591170_teleport_directiony = directiony; |
45 dword_59116C_teleport_directionx = directionx; | 36 dword_59116C_teleport_directionx = directionx; |
55 case PartyAlignment_Neutral: sprintfex(pContainer, "evt%02d", const_2()); break; | 46 case PartyAlignment_Neutral: sprintfex(pContainer, "evt%02d", const_2()); break; |
56 case PartyAlignment_Evil: sprintfex(pContainer, "evt%02d-c", const_2()); break; | 47 case PartyAlignment_Evil: sprintfex(pContainer, "evt%02d-c", const_2()); break; |
57 default: Error("Invalid alignment: %u", pParty->alignment); | 48 default: Error("Invalid alignment: %u", pParty->alignment); |
58 } | 49 } |
59 | 50 |
60 v12 = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); | 51 pTexture_Dialogue_Background = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE)]; |
61 v13 = pHouse_ExitPictures[exit_pic_id]; | 52 pTexture_outside = pIcons_LOD->LoadTexturePtr(pHouse_ExitPictures[exit_pic_id], TEXTURE_16BIT_PALETTE); |
62 pTexture_Dialogue_Background = &pIcons_LOD->pTextures[v12]; | |
63 pTexture_outside = pIcons_LOD->LoadTexturePtr(v13, TEXTURE_16BIT_PALETTE); | |
64 if (anim_id) | 53 if (anim_id) |
65 { | 54 { |
66 if ( !v23 ) | 55 if ( !IndoorLocation::GetLocationIndex(pLocationName) ) |
67 //pVideoPlayer->OpenHouseMovie(pAnimatedRooms[p2DEvents_minus1___02[26 * v9]].field_0, 1u); | |
68 pVideoPlayer->OpenHouseMovie(pAnimatedRooms[p2DEvents[anim_id - 1].uAnimationID].video_name, 1); | 56 pVideoPlayer->OpenHouseMovie(pAnimatedRooms[p2DEvents[anim_id - 1].uAnimationID].video_name, 1); |
69 } | 57 } |
70 else if ( !v23 ) | 58 else if ( !IndoorLocation::GetLocationIndex(pLocationName) ) |
71 { | 59 { |
72 v14 = pMapStats->GetMapInfo(pCurrentMapName); | 60 if ( pMapStats->GetMapInfo(pCurrentMapName) ) |
73 if ( v14 ) | 61 { |
74 { | 62 sprintfex(sHouseName.data(), pGlobalTXT_LocalizationStrings[410], pMapStats->pInfos[pMapStats->GetMapInfo(pCurrentMapName)].pName); // "Leave %s" |
75 sprintfex(sHouseName.data(), pGlobalTXT_LocalizationStrings[410], pMapStats->pInfos[v14].pName); // "Leave %s" | 63 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_Transition, 0, sHouseName.data()); |
76 goto LABEL_20; | 64 //if ( pAnimatedRooms[p2DEvents[anim_id].uAnimationID].uRoomSoundId ) |
77 } | 65 //PlayHouseSound(anim_id, HouseSound_Greeting); |
78 v21 = pGlobalTXT_LocalizationStrings[79]; | 66 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor && uActiveCharacter && pParty->uFlags & 0x30 ) |
79 goto LABEL_19; | 67 pPlayers[uActiveCharacter]->PlaySound(SPEECH_47, 0); |
68 if ( IndoorLocation::GetLocationIndex(pLocationName) ) | |
69 uCurrentHouse_Animation = IndoorLocation::GetLocationIndex(pLocationName); | |
70 return; | |
71 } | |
72 strcpy(sHouseName.data(), pGlobalTXT_LocalizationStrings[79]); | |
73 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_Transition, 0, sHouseName.data()); | |
74 //if ( pAnimatedRooms[p2DEvents[anim_id].uAnimationID].uRoomSoundId ) | |
75 //PlayHouseSound(anim_id, HouseSound_Greeting); | |
76 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor && uActiveCharacter && pParty->uFlags & 0x30 ) | |
77 pPlayers[uActiveCharacter]->PlaySound(SPEECH_47, 0); | |
78 if ( IndoorLocation::GetLocationIndex(pLocationName) ) | |
79 uCurrentHouse_Animation = IndoorLocation::GetLocationIndex(pLocationName); | |
80 return; | |
80 } | 81 } |
81 v15 = pLocationName; | 82 v15 = pLocationName; |
82 if ( *pLocationName == 48 ) | 83 if ( *pLocationName == 48 ) |
83 v15 = pCurrentMapName; | 84 v15 = pCurrentMapName; |
84 v16 = pMapStats->GetMapInfo(v15); | 85 if ( pMapStats->GetMapInfo(v15) ) |
85 if ( v16 ) | 86 { |
86 { | 87 sprintfex(sHouseName.data(), pGlobalTXT_LocalizationStrings[411], pMapStats->pInfos[pMapStats->GetMapInfo(v15)].pName);//Войти в ^Pv[%s] |
87 sprintfex(sHouseName.data(), pGlobalTXT_LocalizationStrings[411], pMapStats->pInfos[v16].pName); | 88 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_Transition, 0, sHouseName.data()); |
88 goto LABEL_20; | 89 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor && uActiveCharacter && pParty->uFlags & 0x30 ) |
89 } | 90 pPlayers[uActiveCharacter]->PlaySound(SPEECH_47, 0); |
90 v21 = pGlobalTXT_LocalizationStrings[73]; | 91 if ( IndoorLocation::GetLocationIndex(pLocationName) ) |
91 LABEL_19: | 92 uCurrentHouse_Animation = IndoorLocation::GetLocationIndex(pLocationName); |
92 strcpy(sHouseName.data(), v21); | 93 return; |
93 LABEL_20: | 94 } |
95 strcpy(sHouseName.data(), pGlobalTXT_LocalizationStrings[73]);//Войти | |
94 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_Transition, 0, sHouseName.data()); | 96 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_Transition, 0, sHouseName.data()); |
95 //if ( BYTE1(pAnimatedRooms[p2DEvents_minus1___02[26 * v9]].field_C) ) | 97 //if ( pAnimatedRooms[p2DEvents[anim_id].uAnimationID].uRoomSoundId ) |
96 if ( pAnimatedRooms[p2DEvents[anim_id].uAnimationID].uRoomSoundId ) | 98 //PlayHouseSound(anim_id, HouseSound_Greeting); |
97 PlayHouseSound(anim_id, HouseSound_Greeting); | |
98 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor && uActiveCharacter && pParty->uFlags & 0x30 ) | 99 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor && uActiveCharacter && pParty->uFlags & 0x30 ) |
99 pPlayers[uActiveCharacter]->PlaySound(SPEECH_47, 0); | 100 pPlayers[uActiveCharacter]->PlaySound(SPEECH_47, 0); |
100 if ( v23 ) | 101 if ( IndoorLocation::GetLocationIndex(pLocationName) ) |
101 uCurrentHouse_Animation = v23; | 102 uCurrentHouse_Animation = IndoorLocation::GetLocationIndex(pLocationName); |
102 } | 103 } |
103 | 104 |
104 | 105 |
105 | 106 |
106 | 107 |
107 //----- (00444C8F) -------------------------------------------------------- | 108 //----- (00444C8F) -------------------------------------------------------- |
108 void TravelUI_Load() | 109 void TravelUI_Load() |
109 { | 110 { |
110 //signed int v0; // eax@1 | |
111 unsigned int v1; // eax@6 | 111 unsigned int v1; // eax@6 |
112 GUIWindow *result; // eax@9 | 112 GUIWindow *result; // eax@9 |
113 //const char *v3; // [sp-4h] [bp-2Ch]@2 | |
114 char pContainer[32]; // [sp+0h] [bp-28h]@1 | 113 char pContainer[32]; // [sp+0h] [bp-28h]@1 |
115 | 114 |
116 pEventTimer->Pause(); | 115 pEventTimer->Pause(); |
117 | 116 |
118 switch (pParty->alignment) | 117 switch (pParty->alignment) |