comparison mm7_4.cpp @ 480:d4ea191229ff

BildingType
author Ritor1
date Tue, 26 Feb 2013 15:23:15 +0600
parents 77430756f06a
children 5b6e2021c6fe
comparison
equal deleted inserted replaced
479:89f6107c3362 480:d4ea191229ff
9080 int v18; // [sp+48h] [bp-4h]@5 9080 int v18; // [sp+48h] [bp-4h]@5
9081 9081
9082 //v0 = pPlayers[uActiveCharacter]; 9082 //v0 = pPlayers[uActiveCharacter];
9083 if ( in_current_bilding_type <= 0 ) 9083 if ( in_current_bilding_type <= 0 )
9084 return; 9084 return;
9085 if ( in_current_bilding_type <= 4 ) 9085 if ( in_current_bilding_type <= BildingType_AlchemistShop )
9086 { 9086 {
9087 if ( dword_F8B19C != 2 ) 9087 if ( dword_F8B19C != 2 )
9088 { 9088 {
9089 if ( dword_F8B19C <= 2 ) 9089 if ( dword_F8B19C <= 2 )
9090 return; 9090 return;
9114 if ( dword_F8B19C != 2 ) 9114 if ( dword_F8B19C != 2 )
9115 // v7 = (ItemGen *)&pParty->field_C59C[v6 + 715]; 9115 // v7 = (ItemGen *)&pParty->field_C59C[v6 + 715];
9116 v7 =&pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v5]; 9116 v7 =&pParty->SpecialItemsInShops[(unsigned int)window_SpeakInHouse->ptr_1C][v5];
9117 goto LABEL_15; 9117 goto LABEL_15;
9118 } 9118 }
9119 if ( in_current_bilding_type <= 16 && dword_F8B19C == 18 ) 9119 if ( in_current_bilding_type <= BildingType_16 && dword_F8B19C == BildingType_18 )
9120 { 9120 {
9121 v1 = pMouse->GetCursorPos(&a2); 9121 v1 = pMouse->GetCursorPos(&a2);
9122 v2 = v1->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v16)->y]; 9122 v2 = v1->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v16)->y];
9123 v3 = pRenderer->pActiveZBuffer[v2] & 0xFFFF; 9123 v3 = pRenderer->pActiveZBuffer[v2] & 0xFFFF;
9124 v18 = pRenderer->pActiveZBuffer[v2] & 0xFFFF; 9124 v18 = pRenderer->pActiveZBuffer[v2] & 0xFFFF;
9181 int v7[4]; // [sp+Ch] [bp-10h]@12 9181 int v7[4]; // [sp+Ch] [bp-10h]@12
9182 9182
9183 if ( in_current_bilding_type > 0 ) 9183 if ( in_current_bilding_type > 0 )
9184 { 9184 {
9185 v0 = 3; 9185 v0 = 3;
9186 if ( in_current_bilding_type > 3 ) 9186 if ( in_current_bilding_type > BildingType_MagicShop )
9187 { 9187 {
9188 if ( in_current_bilding_type == 22 ) 9188 if ( in_current_bilding_type == BildingType_Bank )
9189 { 9189 {
9190 if ( !dword_F8B1E4 ) 9190 if ( !dword_F8B1E4 )
9191 return; 9191 return;
9192 } 9192 }
9193 else 9193 else
9194 { 9194 {
9195 if ( in_current_bilding_type != 23 ) 9195 if ( in_current_bilding_type != BildingType_Tample )
9196 return; 9196 return;
9197 } 9197 }
9198 v1 = (unsigned int)window_SpeakInHouse->ptr_1C; 9198 v1 = (unsigned int)window_SpeakInHouse->ptr_1C;
9199 LABEL_28: 9199 LABEL_28:
9200 HousePlaySomeSound(v1, v0); 9200 HousePlaySomeSound(v1, v0);
9635 v22 = pParty->pHireling1Name; 9635 v22 = pParty->pHireling1Name;
9636 } 9636 }
9637 strcpy(v22, v24); 9637 strcpy(v22, v24);
9638 pParty->field_709 = 0; 9638 pParty->field_709 = 0;
9639 sub_44A56A(); 9639 sub_44A56A();
9640 PrepareHouse((HOUSE_TYPE)(int)window_SpeakInHouse->ptr_1C); 9640 PrepareHouse((HOUSE_ID)(int)window_SpeakInHouse->ptr_1C);
9641 dword_F8B19C = 1; 9641 dword_F8B19C = 1;
9642 9642
9643 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); 9643 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0);
9644 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) 9644 /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
9645 { 9645 {
13131 ++pMessageQueue_50CBD0->uNumMessages; 13131 ++pMessageQueue_50CBD0->uNumMessages;
13132 }*/ 13132 }*/
13133 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, v5); 13133 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, v5);
13134 return result; // void func 13134 return result; // void func
13135 } 13135 }
13136 if ( !(unsigned __int16)_449B57_test_bit( 13136 if ( !(unsigned __int16)_449B57_test_bit((unsigned __int8 *)v1->field_152, word_4F0754[2 * (unsigned int)window_SpeakInHouse->ptr_1C]) )
13137 (unsigned __int8 *)v1->field_152,
13138 word_4F0754[2 * (unsigned int)window_SpeakInHouse->ptr_1C]) )
13139 { 13137 {
13140 v24 = pNPCTopics[171].pText; 13138 v24 = pNPCTopics[171].pText;
13141 v25 = v31; 13139 v25 = v31;
13142 v26 = pFontArrus->CalcTextHeight(pNPCTopics[171].pText, &v28, 0, 0); 13140 v26 = pFontArrus->CalcTextHeight(pNPCTopics[171].pText, &v28, 0, 0);
13143 v28.DrawTitleText(pFontArrus, 0, (212 - v26) / 2 + 101, v25, v24, 3u); 13141 v28.DrawTitleText(pFontArrus, 0, (212 - v26) / 2 + 101, v25, v24, 3u);
14208 uCurrentHouse_Animation = v23; 14206 uCurrentHouse_Animation = v23;
14209 return result; 14207 return result;
14210 } 14208 }
14211 14209
14212 //----- (0044606A) -------------------------------------------------------- 14210 //----- (0044606A) --------------------------------------------------------
14213 void PrepareHouse(HOUSE_TYPE house) 14211 void PrepareHouse(HOUSE_ID house)
14214 { 14212 {
14215 //unsigned int v1; // ebx@1 14213 //unsigned int v1; // ebx@1
14216 //signed int v2; // esi@1 14214 //signed int v2; // esi@1
14217 //int uExitPic; // edi@1 14215 //int uExitPic; // edi@1
14218 __int16 uExitMapID; // ax@2 14216 __int16 uExitMapID; // ax@2
14331 } 14329 }
14332 14330
14333 14331
14334 14332
14335 //----- (0044622E) -------------------------------------------------------- 14333 //----- (0044622E) --------------------------------------------------------
14336 bool __fastcall EnterHouse(HOUSE_TYPE uHouseID) 14334 bool __fastcall EnterHouse(HOUSE_ID uHouseID)
14337 { 14335 {
14338 //enum HOUSE_TYPE v1; // edi@1 14336 //enum HOUSE_ID v1; // edi@1
14339 //int v2; // edi@5 14337 //int v2; // edi@5
14340 unsigned int uOpenTime; // eax@5 14338 unsigned int uOpenTime; // eax@5
14341 int uCloseTime; // esi@5 14339 int uCloseTime; // esi@5
14342 unsigned int v5; // esi@5 14340 unsigned int v5; // esi@5
14343 int v6; // edx@5 14341 int v6; // edx@5
14356 signed int v19; // edi@41 14354 signed int v19; // edi@41
14357 //unsigned int v20; // ecx@41 14355 //unsigned int v20; // ecx@41
14358 //const char *v22; // [sp-4h] [bp-40h]@33 14356 //const char *v22; // [sp-4h] [bp-40h]@33
14359 char pContainer[40]; // [sp+Ch] [bp-30h]@32 14357 char pContainer[40]; // [sp+Ch] [bp-30h]@32
14360 unsigned int v24; // [sp+34h] [bp-8h]@5 14358 unsigned int v24; // [sp+34h] [bp-8h]@5
14361 //enum HOUSE_TYPE v25; // [sp+38h] [bp-4h]@1 14359 //enum HOUSE_ID v25; // [sp+38h] [bp-4h]@1
14362 14360
14363 //v1 = uHouseID; 14361 //v1 = uHouseID;
14364 //v25 = uHouseID; 14362 //v25 = uHouseID;
14365 GameUI_StatusBar_TimedString[0] = 0; 14363 GameUI_StatusBar_TimedString[0] = 0;
14366 pStatusBarString[0] = 0; 14364 pStatusBarString[0] = 0;
14436 if ( !start_event_seq_number ) 14434 if ( !start_event_seq_number )
14437 pAudioPlayer->StopChannels(-1, -1); 14435 pAudioPlayer->StopChannels(-1, -1);
14438 //uCurrentHouse_Animation = p2DEvents_minus1___02[v2]; 14436 //uCurrentHouse_Animation = p2DEvents_minus1___02[v2];
14439 uCurrentHouse_Animation = p2DEvents[uHouseID - 1].uAnimationID; 14437 uCurrentHouse_Animation = p2DEvents[uHouseID - 1].uAnimationID;
14440 in_current_bilding_type = LOBYTE(pAnimatedRooms[uCurrentHouse_Animation].field_C); 14438 in_current_bilding_type = LOBYTE(pAnimatedRooms[uCurrentHouse_Animation].field_C);
14441 if ( in_current_bilding_type == 20 && pParty->uFine ) // going 2 jail 14439 if ( in_current_bilding_type == BildingType_20 && pParty->uFine ) // going 2 jail
14442 { 14440 {
14443 uCurrentHouse_Animation = (signed __int16)p2DEvents[186].uAnimationID; 14441 uCurrentHouse_Animation = (signed __int16)p2DEvents[186].uAnimationID;
14444 //v25 = HOUSE_187; 14442 //v25 = HOUSE_187;
14445 uHouseID = HOUSE_JAIL; 14443 uHouseID = HOUSE_JAIL;
14446 v12 = LODWORD(pParty->uTimePlayed); 14444 v12 = LODWORD(pParty->uTimePlayed);