Mercurial > mm7
comparison UIHouses.cpp @ 778:64cef5a0782a
Merge
author | Nomad |
---|---|
date | Sun, 24 Mar 2013 00:33:27 +0200 |
parents | b9f6dd6f1444 3dc4a9b13c1b |
children | c47efaf23642 b27dd658ea77 |
comparison
equal
deleted
inserted
replaced
777:b9f6dd6f1444 | 778:64cef5a0782a |
---|---|
40 #pragma pack(push, 1) | 40 #pragma pack(push, 1) |
41 struct stru365_travel_info | 41 struct stru365_travel_info |
42 { | 42 { |
43 unsigned char uMapInfoID; | 43 unsigned char uMapInfoID; |
44 unsigned char pSchedule[7]; | 44 unsigned char pSchedule[7]; |
45 unsigned char uTravelTime; | 45 unsigned int uTravelTime; |
46 unsigned char field_9[3]; | |
47 int arrival_x; | 46 int arrival_x; |
48 int arrival_y; | 47 int arrival_y; |
49 int arrival_z; | 48 int arrival_z; |
50 int arrival_rot_y; | 49 int arrival_rot_y; |
51 unsigned int uQuestBit; // quest bit required to set for this travel option to be enabled; otherwise 0 | 50 unsigned int uQuestBit; // quest bit required to set for this travel option to be enabled; otherwise 0 |
52 }; | 51 }; |
53 #pragma pack(pop) | 52 #pragma pack(pop) |
54 stru365_travel_info transport_schedule[35] = // 004F09B0 | 53 stru365_travel_info transport_schedule[35] = // 004F09B0 |
55 { | 54 { |
56 {MAP_STEADWICK, {1, 0, 1, 0, 1, 0, 0}, 2, {0, 0, 0}, -18048, 4636, 833, 1536, 0}, | 55 {MAP_STEADWICK, {1, 0, 1, 0, 1, 0, 0}, 2, -18048, 4636, 833, 1536, 0}, |
57 {MAP_PIERPONT, {0, 1, 0, 1, 0, 1, 0}, 2, {0, 0, 0}, -2527, -6773, 1153, 896, 0}, | 56 {MAP_PIERPONT, {0, 1, 0, 1, 0, 1, 0}, 2, -2527, -6773, 1153, 896, 0}, |
58 {MAP_TATALIA, {1, 0, 1, 0, 1, 0, 0}, 2, {0, 0, 0}, 4730, -10580, 320, 1024, 0}, | 57 {MAP_TATALIA, {1, 0, 1, 0, 1, 0, 0}, 2, 4730, -10580, 320, 1024, 0}, |
59 {MAP_HARMONDALE, {0, 1, 0, 1, 0, 1, 0}, 2, {0, 0, 0}, -5692, 11137, 1, 1024, 0}, | 58 {MAP_HARMONDALE, {0, 1, 0, 1, 0, 1, 0}, 2, -5692, 11137, 1, 1024, 0}, |
60 {MAP_DEYJA, {1, 0, 0, 1, 0, 0, 0}, 3, {0, 0, 0}, 7227, -16007, 2625, 640, 0}, | 59 {MAP_DEYJA, {1, 0, 0, 1, 0, 0, 0}, 3, 7227, -16007, 2625, 640, 0}, |
61 {MAP_BRAKADA_DESERT, {0, 0, 1, 0, 0, 1, 0}, 3, {0, 0, 0}, 8923, 17191, 1, 512, 0}, | 60 {MAP_BRAKADA_DESERT, {0, 0, 1, 0, 0, 1, 0}, 3, 8923, 17191, 1, 512, 0}, |
62 {MAP_AVLEE, {1, 0, 1, 0, 1, 0, 0}, 3, {0, 0, 0}, 17059, 12331, 512, 1152, 0}, | 61 {MAP_AVLEE, {1, 0, 1, 0, 1, 0, 0}, 3, 17059, 12331, 512, 1152, 0}, |
63 {MAP_DEYJA, {0, 1, 0, 0, 1, 0, 1}, 2, {0, 0, 0}, 7227, -16007, 2625, 640, 0}, | 62 {MAP_DEYJA, {0, 1, 0, 0, 1, 0, 1}, 2, 7227, -16007, 2625, 640, 0}, |
64 {MAP_HARMONDALE, {0, 1, 0, 1, 0, 1, 0}, 2, {0, 0, 0}, -5692, 11137, 1, 1024, 0}, | 63 {MAP_HARMONDALE, {0, 1, 0, 1, 0, 1, 0}, 2, -5692, 11137, 1, 1024, 0}, |
65 {MAP_STEADWICK, {1, 0, 1, 0, 1, 0, 0}, 3, {0, 0, 0}, -18048, 4636, 833, 1536, 0}, | 64 {MAP_STEADWICK, {1, 0, 1, 0, 1, 0, 0}, 3, -18048, 4636, 833, 1536, 0}, |
66 {MAP_PIERPONT, {0, 1, 0, 1, 0, 1, 0}, 2, {0, 0, 0}, -2527, -6773, 1153, 896, 0}, | 65 {MAP_PIERPONT, {0, 1, 0, 1, 0, 1, 0}, 2, -2527, -6773, 1153, 896, 0}, |
67 {MAP_STEADWICK, {1, 0, 1, 0, 1, 0, 1}, 3, {0, 0, 0}, -18048, 4636, 833, 1536, 0}, | 66 {MAP_STEADWICK, {1, 0, 1, 0, 1, 0, 1}, 3, -18048, 4636, 833, 1536, 0}, |
68 {MAP_HARMONDALE, {0, 1, 0, 0, 0, 1, 0}, 5, {0, 0, 0}, -5692, 11137, 1, 1024, 0}, | 67 {MAP_HARMONDALE, {0, 1, 0, 0, 0, 1, 0}, 5, -5692, 11137, 1, 1024, 0}, |
69 {MAP_STEADWICK, {0, 1, 0, 1, 0, 1, 0}, 2, {0, 0, 0}, 0xFFFFB980, 4636, 833, 1536, 0}, | 68 {MAP_STEADWICK, {0, 1, 0, 1, 0, 1, 0}, 2, -18048, 4636, 833, 1536, 0}, |
70 {MAP_PIERPONT, {0, 1, 0, 1, 0, 1, 0}, 3, {0, 0, 0}, 0xFFFFF621, 4294960523, 1153, 896, 0}, | 69 {MAP_PIERPONT, {0, 1, 0, 1, 0, 1, 0}, 3, -2527, -16007, 1153, 896, 0}, |
71 {MAP_DEYJA, {0, 0, 1, 0, 0, 0, 1}, 5, {0, 0, 0}, 0x1C3B, 4294951289, 2625, 640, 0}, | 70 {MAP_DEYJA, {0, 0, 1, 0, 0, 0, 1}, 5, 7227, -16007, 2625, 640, 0}, |
72 {MAP_TATALIA, {0, 1, 0, 1, 0, 1, 0}, 2, {0, 0, 0}, 0xFFFFF779, 4294960355, 97, 0, 0}, | 71 {MAP_TATALIA, {0, 1, 0, 1, 0, 1, 0}, 2, -2183, -6941, 97, 0, 0}, |
73 {MAP_AVLEE, {1, 0, 0, 0, 1, 0, 0}, 4, {0, 0, 0}, 0x1EE9, 9476, 193, 0, 0}, | 72 {MAP_AVLEE, {1, 0, 0, 0, 1, 0, 0}, 4, 7913, 9476, 193, 0, 0}, |
74 {MAP_EVENMORN_ISLE, {0, 0, 0, 0, 0, 0, 1}, 7, {0, 0, 0}, 0x3D00, 6390, 193, 1536, 64}, | 73 {MAP_EVENMORN_ISLE, {0, 0, 0, 0, 0, 0, 1}, 7, 15616, 6390, 193, 1536, PARTY_QUEST_EVENMORN_MAP_FOUND}, |
75 {MAP_BRAKADA_DESERT, {0, 0, 1, 0, 0, 0, 0}, 6, {0, 0, 0}, 0x4AE3, 4294947574, 193, 1024, 0}, | 74 {MAP_BRAKADA_DESERT, {0, 0, 1, 0, 0, 0, 0}, 6, 19171, -19722, 193, 1024, 0}, |
76 {MAP_AVLEE, {0, 1, 0, 1, 0, 1, 0}, 3, {0, 0, 0}, 0x1EE9, 9476, 193, 0, 0}, | 75 {MAP_AVLEE, {0, 1, 0, 1, 0, 1, 0}, 3, 7913, 9476, 193, 0, 0}, |
77 {MAP_BRAKADA_DESERT, {1, 0, 1, 0, 0, 0, 0}, 6, {0, 0, 0}, 0x4AE3, 4294947574, 193, 1024, 0}, | 76 {MAP_BRAKADA_DESERT, {1, 0, 1, 0, 0, 0, 0}, 6, 19171, -19722, 193, 1024, 0}, |
78 {MAP_TATALIA, {1, 0, 1, 0, 1, 0, 0}, 4, {0, 0, 0}, 0xFFFFF779, 4294960355, 97, 0, 0}, | 77 {MAP_TATALIA, {1, 0, 1, 0, 1, 0, 0}, 4, -2183, -6941, 97, 0, 0}, |
79 {MAP_PIERPONT, {0, 0, 0, 0, 0, 1, 0}, 6, {0, 0, 0}, 0xFFFFFD3B, 4294953209, 193, 1024, 0}, | 78 {MAP_PIERPONT, {0, 0, 0, 0, 0, 1, 0}, 6, -709, -14087, 193, 1024, 0}, |
80 {MAP_STEADWICK, {0, 0, 0, 0, 0, 0, 1}, 6, {0, 0, 0}, 0xFFFFD719, 13497, 193, 1536, 0}, | 79 {MAP_STEADWICK, {0, 0, 0, 0, 0, 0, 1}, 6, -10471, 13497, 193, 1536, 0}, |
81 {MAP_EVENMORN_ISLE, {0, 1, 0, 1, 0, 0, 0}, 1, {0, 0, 0}, 15616, 6390, 193, 1536, 64}, | 80 {MAP_EVENMORN_ISLE, {0, 1, 0, 1, 0, 0, 0}, 1, 15616, 6390, 193, 1536, PARTY_QUEST_EVENMORN_MAP_FOUND}, |
82 {MAP_BRAKADA_DESERT, {0, 1, 0, 1, 0, 0, 0}, 1, {0, 0, 0}, 19171, 4294947574, 193, 1024, 0}, | 81 {MAP_BRAKADA_DESERT, {0, 1, 0, 1, 0, 0, 0}, 1, 19171, -19722, 193, 1024, 0}, |
83 {MAP_STEADWICK, {0, 1, 0, 1, 0, 1, 0}, 2, {0, 0, 0}, 4294956825, 13497, 193, 1536, 0}, | 82 {MAP_STEADWICK, {0, 1, 0, 1, 0, 1, 0}, 2, -10471, 13497, 193, 1536, 0}, |
84 {MAP_BRAKADA_DESERT, {1, 0, 1, 0, 0, 0, 0}, 4, {0, 0, 0}, 19171, 4294947574, 193, 1024, 0}, | 83 {MAP_BRAKADA_DESERT, {1, 0, 1, 0, 0, 0, 0}, 4, 19171, -19722, 193, 1024, 0}, |
85 {MAP_EVENMORN_ISLE, {0, 0, 0, 0, 0, 0, 1}, 5, {0, 0, 0}, 15616, 6390, 193, 1536, 64}, | 84 {MAP_EVENMORN_ISLE, {0, 0, 0, 0, 0, 0, 1}, 5, 15616, 6390, 193, 1536, PARTY_QUEST_EVENMORN_MAP_FOUND}, |
86 {MAP_AVLEE, {0, 0, 0, 0, 1, 0, 0}, 5, {0, 0, 0}, 7913, 9476, 193, 0, 0}, | 85 {MAP_AVLEE, {0, 0, 0, 0, 1, 0, 0}, 5, 7913, 9476, 193, 0, 0}, |
87 {MAP_STEADWICK, {0, 1, 0, 0, 0, 1, 0}, 4, {0, 0, 0}, 4294956825, 13497, 193, 1536, 0}, | 86 {MAP_STEADWICK, {0, 1, 0, 0, 0, 1, 0}, 4, -10471, 13497, 193, 1536, 0}, |
88 {MAP_PIERPONT, {1, 0, 1, 0, 1, 0, 0}, 3, {0, 0, 0}, 4294966587, 4294953209, 193, 1024, 0}, | 87 {MAP_PIERPONT, {1, 0, 1, 0, 1, 0, 0}, 3, -709, -14087, 193, 1024, 0}, |
89 {MAP_TATALIA, {0, 0, 0, 1, 0, 0, 0}, 5, {0, 0, 0}, 4294965113, 4294960355, 97, 0, 0}, | 88 {MAP_TATALIA, {0, 0, 0, 1, 0, 0, 0}, 5, -2183, -6941, 97, 0, 0}, |
90 {MAP_ARENA, {0, 0, 0, 0, 0, 0, 1}, 4, {0, 0, 0}, 3844, 2906, 193, 512, 0} | 89 {MAP_ARENA, {0, 0, 0, 0, 0, 0, 1}, 4, 3844, 2906, 193, 512, 0} |
91 }; | 90 }; |
92 | 91 |
93 unsigned char transport_routes[20][4] = | 92 unsigned char transport_routes[20][4] = |
94 { | 93 { |
95 { 0, 1, 1, 34}, // HOUSE_STABLES_HARMONDALE | 94 { 0, 1, 1, 34}, // HOUSE_STABLES_HARMONDALE |
117 | 116 |
118 | 117 |
119 | 118 |
120 | 119 |
121 const stru159 pAnimatedRooms[196] = //0x4E5F70 | 120 const stru159 pAnimatedRooms[196] = //0x4E5F70 |
122 { | 121 { |
123 {"", 0x4, 0x1F4, 0, 0, 0}, | 122 {"", 0x4, 0x1F4, 0, 0, 0}, |
124 {"Human Armor01", 0x20, 0x2C0, 2, 58, 0}, | 123 {"Human Armor01", 0x20, 0x2C0, 2, 58, 0}, |
125 {"Necromancer Armor01", 0x20, 0x2D7, 2, 70, 0 }, | 124 {"Necromancer Armor01", 0x20, 0x2D7, 2, 70, 0 }, |
126 {"Dwarven Armor01", 0x20, 0x2EE, 2, 5, 0 }, | 125 {"Dwarven Armor01", 0x20, 0x2EE, 2, 5, 0 }, |
127 {"Wizard Armor", 0x20, 0x3BD, 2, 19, 0 }, | 126 {"Wizard Armor", 0x20, 0x3BD, 2, 19, 0 }, |
314 {"Arbiter Room Neutral", 0x24, 0, 29, 0, 0 }, | 313 {"Arbiter Room Neutral", 0x24, 0, 29, 0, 0 }, |
315 {"Out02 Castle Harmondy Abandoned", 0x24, 0, 25, 0, 0 }, | 314 {"Out02 Castle Harmondy Abandoned", 0x24, 0, 25, 0, 0 }, |
316 {"Human Temple02", 0x24, 0x3AB, 23, 27, 0 }, | 315 {"Human Temple02", 0x24, 0x3AB, 23, 27, 0 }, |
317 {"Player Castle Good", 0x24, 0, 25, 0, 0 }, | 316 {"Player Castle Good", 0x24, 0, 25, 0, 0 }, |
318 {"Player Castle Bad", 0x24, 0, 25, 0, 0} | 317 {"Player Castle Bad", 0x24, 0, 25, 0, 0} |
319 }; | 318 }; |
320 | |
321 | 319 |
322 | 320 |
323 | 321 |
324 //----- (0044606A) -------------------------------------------------------- | 322 //----- (0044606A) -------------------------------------------------------- |
325 void PrepareHouse(HOUSE_ID house) | 323 void PrepareHouse(HOUSE_ID house) |
1944 { | 1942 { |
1945 if ( pParty->uNumGold < s1 ) | 1943 if ( pParty->uNumGold < s1 ) |
1946 { | 1944 { |
1947 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2u); | 1945 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2u); |
1948 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_Greeting_2); | 1946 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_Greeting_2); |
1949 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 ) | |
1950 return; | |
1951 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113; | |
1952 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 1; | |
1953 goto LABEL_33;*/ | |
1954 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); | 1947 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); |
1955 } | 1948 return; |
1949 } | |
1950 | |
1956 Party::TakeGold(s1); | 1951 Party::TakeGold(s1); |
1957 //v47[1] = (const char *)7; | 1952 |
1958 v5 = &transport_schedule[transport_routes[(unsigned int)window_SpeakInHouse->ptr_1C - HOUSE_STABLES_HARMONDALE][dialog_menu_id - HOUSE_DIALOGUE_TRANSPORT_SCHEDULE_1]]; | 1953 v5 = &transport_schedule[transport_routes[(unsigned int)window_SpeakInHouse->ptr_1C - HOUSE_STABLES_HARMONDALE][dialog_menu_id - HOUSE_DIALOGUE_TRANSPORT_SCHEDULE_1]]; |
1959 if ( v5->pSchedule[pParty->uDaysPlayed % 7] ) | 1954 if ( v5->pSchedule[pParty->uDaysPlayed % 7] ) |
1960 { | 1955 { |
1961 if ( _strcmpi(pCurrentMapName, pMapStats->pInfos[v5->uMapInfoID].pFilename) ) | 1956 if ( _strcmpi(pCurrentMapName, pMapStats->pInfos[v5->uMapInfoID].pFilename) ) |
1962 { | 1957 { |
2021 while ( GetTickCount() < v15 ) | 2016 while ( GetTickCount() < v15 ) |
2022 sqrt(3.1415926); | 2017 sqrt(3.1415926); |
2023 while ( sub_4BD8B5() ) | 2018 while ( sub_4BD8B5() ) |
2024 ; | 2019 ; |
2025 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); | 2020 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 0, 0); |
2026 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) | 2021 return; |
2027 { | |
2028 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)113; | |
2029 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0; | |
2030 LABEL_33: | |
2031 *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0; | |
2032 ++pMessageQueue_50CBD0->uNumMessages; | |
2033 return; | |
2034 }*/ | |
2035 } | 2022 } |
2036 else | 2023 else |
2037 { | 2024 { |
2038 dialog_menu_id = HOUSE_DIALOGUE_MAIN; | 2025 dialog_menu_id = HOUSE_DIALOGUE_MAIN; |
2039 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); | 2026 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); |