Mercurial > mm7
comparison mm7_4.cpp @ 454:5e5dfedcc0ad
Слияние
author | Ritor1 |
---|---|
date | Sun, 24 Feb 2013 09:18:17 +0600 |
parents | f56c98a2ab52 4f451a616d3d |
children | 20d96ec810c8 |
comparison
equal
deleted
inserted
replaced
453:eaadcb39312f | 454:5e5dfedcc0ad |
---|---|
258 int v21; // eax@27 | 258 int v21; // eax@27 |
259 int v22; // ecx@29 | 259 int v22; // ecx@29 |
260 //BLVFace *v23; // eax@33 | 260 //BLVFace *v23; // eax@33 |
261 //int v24; // esi@39 | 261 //int v24; // esi@39 |
262 //int v25; // edi@39 | 262 //int v25; // edi@39 |
263 int v26; // esi@41 | 263 //int v26; // esi@41 |
264 int v27; // ecx@43 | 264 int v27; // ecx@43 |
265 signed int v28; // eax@45 | 265 signed int v28; // eax@45 |
266 int v29; // ebx@47 | 266 int v29; // ebx@47 |
267 int v30; // edx@49 | 267 int v30; // edx@49 |
268 int v31; // ST10_4@49 | 268 int v31; // ST10_4@49 |
444 word_721460[2 * portal->uNumVertices] = word_721460[0]; | 444 word_721460[2 * portal->uNumVertices] = word_721460[0]; |
445 word_721390[2 * portal->uNumVertices] = word_721390[0]; | 445 word_721390[2 * portal->uNumVertices] = word_721390[0]; |
446 v54 = 0; | 446 v54 = 0; |
447 v51 = 0; | 447 v51 = 0; |
448 v49 = word_721390[0] >= y; | 448 v49 = word_721390[0] >= y; |
449 if ( v26 > 0 ) | 449 if ( portal->uNumVertices > 0 ) |
450 { | 450 { |
451 do | 451 do |
452 { | 452 { |
453 if ( v54 >= 2 ) | 453 if ( v54 >= 2 ) |
454 break; | 454 break; |
478 } | 478 } |
479 } | 479 } |
480 ++v51; | 480 ++v51; |
481 v49 = v47; | 481 v49 = v47; |
482 } | 482 } |
483 while ( v51 < v26 ); | 483 while ( v51 < 2 * portal->uNumVertices ); |
484 | |
484 if ( v54 == 1 ) | 485 if ( v54 == 1 ) |
485 { | 486 { |
486 if ( v55 >= 50 ) | 487 if ( v55 >= 50 ) |
487 break; | 488 break; |
488 v34 = v55++; | 489 v34 = v55++; |
1010 side2_dy = (double)(x2z2_y - x1z2_y); | 1011 side2_dy = (double)(x2z2_y - x1z2_y); |
1011 side2_dx = (double)(grid_pos_x2 - grid_pos_x1); | 1012 side2_dx = (double)(grid_pos_x2 - grid_pos_x1); |
1012 side1_dx = (double)(grid_pos_x1 - grid_pos_x1); | 1013 side1_dx = (double)(grid_pos_x1 - grid_pos_x1); |
1013 side2_dz = (double)(grid_pos_z2 - grid_pos_z2); // bug? z2 - z2 | 1014 side2_dz = (double)(grid_pos_z2 - grid_pos_z2); // bug? z2 - z2 |
1014 side1_dz = (double)(grid_pos_z2 - grid_pos_z2); // z1 - z2 | 1015 side1_dz = (double)(grid_pos_z2 - grid_pos_z2); // z1 - z2 |
1015 Log::Warning(L"%s %s %u\n", __FILE__, __FUNCTION__, __LINE__); | 1016 Log::Warning(L"%S %S %u\n", __FILE__, __FUNCTION__, __LINE__); |
1016 /* |\ | 1017 /* |\ |
1017 side1 | \ | 1018 side1 | \ |
1018 |____\ | 1019 |____\ |
1019 side 2 */ | 1020 side 2 */ |
1020 } | 1021 } |
10105 a1.uFrameZ = 366; | 10106 a1.uFrameZ = 366; |
10106 a1.DrawTitleText(pFontCreate, 0, 2u, 0, v1, 3u); | 10107 a1.DrawTitleText(pFontCreate, 0, 2u, 0, v1, 3u); |
10107 a1.uFrameX = 483; | 10108 a1.uFrameX = 483; |
10108 a1.uFrameWidth = 148; | 10109 a1.uFrameWidth = 148; |
10109 a1.uFrameZ = 334; | 10110 a1.uFrameZ = 334; |
10110 v2 = (&off_4EB080)[4 * uHouse_ExitPic]; | 10111 v2 = pTransitionStrings[uHouse_ExitPic]; |
10111 if ( !v2 ) | 10112 if ( !v2 ) |
10112 { | 10113 { |
10113 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[411], v0); | 10114 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[411], v0); |
10114 v2 = pTmpBuf; | 10115 v2 = pTmpBuf; |
10115 } | 10116 } |
11185 dword_F8B19C = -1; | 11186 dword_F8B19C = -1; |
11186 } | 11187 } |
11187 | 11188 |
11188 | 11189 |
11189 //----- (004B4224) -------------------------------------------------------- | 11190 //----- (004B4224) -------------------------------------------------------- |
11190 GUIButton *_4B4224_UpdateNPCTopics(int _this) | 11191 void _4B4224_UpdateNPCTopics( int _this ) |
11191 { | 11192 { |
11192 int v1; // ebx@1 | 11193 int num_menu_buttons; // ebx@1 |
11193 GUIButton *result; // eax@3 | |
11194 int i; // ebp@5 | 11194 int i; // ebp@5 |
11195 signed int v4; // ebp@9 | 11195 // signed int v4; // ebp@9 |
11196 void *v5; // ecx@14 | 11196 int v6; // eax@16 |
11197 bool v6; // eax@16 | 11197 int v8; // eax@21 |
11198 void *v7; // ecx@19 | 11198 int v10; // eax@26 |
11199 bool v8; // eax@21 | 11199 int v12; // eax@31 |
11200 void *v9; // ecx@24 | 11200 int v14; // eax@36 |
11201 bool v10; // eax@26 | 11201 int v16; // eax@41 |
11202 void *v11; // ecx@29 | |
11203 bool v12; // eax@31 | |
11204 void *v13; // ecx@34 | |
11205 bool v14; // eax@36 | |
11206 void *v15; // ecx@39 | |
11207 bool v16; // eax@41 | |
11208 NPCData *v17; // [sp+10h] [bp-4h]@4 | 11202 NPCData *v17; // [sp+10h] [bp-4h]@4 |
11209 | 11203 |
11210 v1 = 0; | 11204 num_menu_buttons = 0; |
11211 array_5913D8[6] = (NPCData *)(_this + 1); | 11205 array_5913D8[6] = (NPCData *)(_this + 1); |
11212 if ( _this + 1 == uNumDialogueNPCPortraits && uHouse_ExitPic ) | 11206 if ( _this + 1 == uNumDialogueNPCPortraits && uHouse_ExitPic ) |
11213 { | 11207 { |
11214 pDialogueWindow->Release(); | 11208 pDialogueWindow->Release(); |
11215 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, 0); | 11209 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, 0); |
11216 sprintf(byte_591098, pGlobalTXT_LocalizationStrings[411], pMapStats->pInfos[uHouse_ExitPic].pName); | 11210 sprintf(sHouseName, pGlobalTXT_LocalizationStrings[LOCSTR_ENTER_S], pMapStats->pInfos[uHouse_ExitPic].pName); |
11217 pBtn_ExitCancel = pDialogueWindow->CreateButton( | 11211 pBtn_ExitCancel = pDialogueWindow->CreateButton( 566, 445, 75, 33, 1, 0, 0x71u, 0, 0x4Eu, |
11218 0x236u, | |
11219 0x1BDu, | |
11220 0x4Bu, | |
11221 0x21u, | |
11222 1, | |
11223 0, | |
11224 0x71u, | |
11225 0, | |
11226 0x4Eu, | |
11227 pGlobalTXT_LocalizationStrings[34],// "Cancel" | 11212 pGlobalTXT_LocalizationStrings[34],// "Cancel" |
11228 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), | 11213 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0),0); |
11229 0); | 11214 pBtn_YES = pDialogueWindow->CreateButton( 486u, 445u, 75u, 33u, 1, 0, 0xBFu, 1u, 0x59u, |
11230 pBtn_YES = pDialogueWindow->CreateButton( | 11215 sHouseName, |
11231 486u, | 11216 (Texture *)(uTextureID_BUTTYES2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTYES2] : 0), 0); |
11232 445u, | 11217 pDialogueWindow->CreateButton( pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], 63u, 73u, 1, 0, 0xBFu, 1u, 0x20u, sHouseName, 0); |
11233 75u, | 11218 pDialogueWindow->CreateButton(8u, 8u, 460u, 344u, 1, 0, 0xBFu, 1u, 0x59u, sHouseName, 0); |
11234 33u, | |
11235 1, | |
11236 0, | |
11237 0xBFu, | |
11238 1u, | |
11239 0x59u, | |
11240 byte_591098, | |
11241 (Texture *)(uTextureID_BUTTYES2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTYES2] : 0), | |
11242 0); | |
11243 pDialogueWindow->CreateButton( | |
11244 pNPCPortraits_x[0][0], | |
11245 pNPCPortraits_y[0][0], | |
11246 63u, | |
11247 73u, | |
11248 1, | |
11249 0, | |
11250 0xBFu, | |
11251 1u, | |
11252 0x20u, | |
11253 byte_591098, | |
11254 0); | |
11255 result = pDialogueWindow->CreateButton(8u, 8u, 460u, 344u, 1, 0, 0xBFu, 1u, 0x59u, byte_591098, 0); | |
11256 } | 11219 } |
11257 else | 11220 else |
11258 { | 11221 { |
11259 v17 = array_5913D8[_this + 1 - ((dword_591080 != 0) + 1)]; | 11222 v17 = array_5913D8[_this + 1 - ((dword_591080 != 0) + 1)]; |
11260 if ( dword_F8B19C == -1 ) | 11223 if ( dword_F8B19C == -1 ) |
11264 else | 11227 else |
11265 { | 11228 { |
11266 for ( i = 0; i < uNumDialogueNPCPortraits; ++i ) | 11229 for ( i = 0; i < uNumDialogueNPCPortraits; ++i ) |
11267 GUIButton::_41D0D8((GUIButton *)array_5913D8[i + 7]); | 11230 GUIButton::_41D0D8((GUIButton *)array_5913D8[i + 7]); |
11268 } | 11231 } |
11269 v4 = 1; | |
11270 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x159u, WINDOW_MainMenu, 0, 0); | 11232 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x159u, WINDOW_MainMenu, 0, 0); |
11271 pBtn_ExitCancel = pDialogueWindow->CreateButton( | 11233 pBtn_ExitCancel = pDialogueWindow->CreateButton( 471u, 445u, 169u, 35u, 1, 0, 0x71u, 0, 0, |
11272 471u, | |
11273 445u, | |
11274 169u, | |
11275 35u, | |
11276 1, | |
11277 0, | |
11278 0x71u, | |
11279 0, | |
11280 0, | |
11281 pGlobalTXT_LocalizationStrings[74],// "End Conversation" | 11234 pGlobalTXT_LocalizationStrings[74],// "End Conversation" |
11282 (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0), | 11235 (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0), 0); |
11283 0); | |
11284 pDialogueWindow->CreateButton(8u, 8u, 0x1C2u, 0x140u, 1, 0, 0x51u, 0, 0, "", 0); | 11236 pDialogueWindow->CreateButton(8u, 8u, 0x1C2u, 0x140u, 1, 0, 0x51u, 0, 0, "", 0); |
11285 if ( array_5913D8[6] == (NPCData *)1 && dword_591080 ) | 11237 if ( array_5913D8[6] == (NPCData *)1 && dword_591080 ) |
11286 { | 11238 { |
11287 result = (GUIButton *)sub_4B3B42(dword_F8B198); | 11239 sub_4B3B42(dword_F8B198); |
11288 } | 11240 } |
11289 else | 11241 else |
11290 { | 11242 { |
11291 if ( v17->joins ) | 11243 if ( v17->joins ) |
11292 { | 11244 { |
11293 v1 = 1; | 11245 num_menu_buttons = 1; |
11294 pDialogueWindow->CreateButton(480u, 160u, 140u, 30u, 1, 0, 0xAFu, 0xDu, 0, "", 0); | 11246 pDialogueWindow->CreateButton(480u, 160u, 140u, 30u, 1, 0, 0xAFu, 0xDu, 0, "", 0); |
11295 } | 11247 } |
11296 v5 = (void *)v17->evt_A; | 11248 if ( v17->evt_A) |
11297 if ( v5 ) | 11249 { |
11298 { | 11250 if ( num_menu_buttons < 4 ) |
11299 if ( v1 < 4 ) | 11251 { |
11300 { | 11252 v6 = NPC_EventProcessor(v17->evt_A); |
11301 v6 = sub_4466C4(v5); | |
11302 if ( v6 == 1 || v6 == 2 ) | 11253 if ( v6 == 1 || v6 == 2 ) |
11303 pDialogueWindow->CreateButton( | 11254 pDialogueWindow->CreateButton( 480u, 30 * num_menu_buttons++ + 160, 140u, 30u, 1, 0, 0xAFu, 0x13u, 0, "", 0); |
11304 480u, | 11255 } |
11305 30 * v1++ + 160, | 11256 } |
11306 140u, | 11257 if ( v17->evt_B ) |
11307 30u, | 11258 { |
11308 1, | 11259 if ( num_menu_buttons < 4 ) |
11309 0, | 11260 { |
11310 0xAFu, | 11261 v8 = NPC_EventProcessor(v17->evt_B); |
11311 0x13u, | |
11312 0, | |
11313 "", | |
11314 0); | |
11315 } | |
11316 } | |
11317 v7 = (void *)v17->evt_B; | |
11318 if ( v7 ) | |
11319 { | |
11320 if ( v1 < 4 ) | |
11321 { | |
11322 v8 = sub_4466C4(v7); | |
11323 if ( v8 == 1 || v8 == 2 ) | 11262 if ( v8 == 1 || v8 == 2 ) |
11324 pDialogueWindow->CreateButton( | 11263 pDialogueWindow->CreateButton( 480u, 30 * num_menu_buttons++ + 160, 140u, 30u, 1, 0, 0xAFu, 0x14u, 0, "", 0); |
11325 480u, | 11264 } |
11326 30 * v1++ + 160, | 11265 } |
11327 140u, | 11266 if ( v17->evt_C ) |
11328 30u, | 11267 { |
11329 1, | 11268 if ( num_menu_buttons < 4 ) |
11330 0, | 11269 { |
11331 0xAFu, | 11270 v10 = NPC_EventProcessor(v17->evt_C); |
11332 0x14u, | |
11333 0, | |
11334 "", | |
11335 0); | |
11336 } | |
11337 } | |
11338 v9 = (void *)v17->evt_C; | |
11339 if ( v9 ) | |
11340 { | |
11341 if ( v1 < 4 ) | |
11342 { | |
11343 v10 = sub_4466C4(v9); | |
11344 if ( v10 == 1 || v10 == 2 ) | 11271 if ( v10 == 1 || v10 == 2 ) |
11345 pDialogueWindow->CreateButton( | 11272 pDialogueWindow->CreateButton( 480u, 30 * num_menu_buttons++ + 160, 140u, 30u, 1, 0, 0xAFu, 0x15u, 0, "", 0); |
11346 480u, | 11273 } |
11347 30 * v1++ + 160, | 11274 } |
11348 140u, | 11275 |
11349 30u, | 11276 if ( v17->evt_D ) |
11350 1, | 11277 { |
11351 0, | 11278 if ( num_menu_buttons < 4 ) |
11352 0xAFu, | 11279 { |
11353 0x15u, | 11280 v12 = NPC_EventProcessor(v17->evt_D); |
11354 0, | |
11355 "", | |
11356 0); | |
11357 } | |
11358 } | |
11359 v11 = (void *)v17->evt_D; | |
11360 if ( v11 ) | |
11361 { | |
11362 if ( v1 < 4 ) | |
11363 { | |
11364 v12 = sub_4466C4(v11); | |
11365 if ( v12 == 1 || v12 == 2 ) | 11281 if ( v12 == 1 || v12 == 2 ) |
11366 pDialogueWindow->CreateButton( | 11282 pDialogueWindow->CreateButton( 0x1E0u, 30 * num_menu_buttons++ + 160, 0x8Cu, 0x1Eu, 1, 0, 0xAFu, 0x16u, 0, "", 0); |
11367 0x1E0u, | 11283 } |
11368 30 * v1++ + 160, | 11284 } |
11369 0x8Cu, | 11285 if ( v17->evt_E ) |
11370 0x1Eu, | 11286 { |
11371 1, | 11287 if ( num_menu_buttons < 4 ) |
11372 0, | 11288 { |
11373 0xAFu, | 11289 v14 = NPC_EventProcessor(v17->evt_E); |
11374 0x16u, | |
11375 0, | |
11376 "", | |
11377 0); | |
11378 } | |
11379 } | |
11380 v13 = (void *)v17->evt_E; | |
11381 if ( v13 ) | |
11382 { | |
11383 if ( v1 < 4 ) | |
11384 { | |
11385 v14 = sub_4466C4(v13); | |
11386 if ( v14 == 1 || v14 == 2 ) | 11290 if ( v14 == 1 || v14 == 2 ) |
11387 pDialogueWindow->CreateButton( | 11291 pDialogueWindow->CreateButton( 0x1E0u, 30 * num_menu_buttons++ + 160, 0x8Cu, 0x1Eu, 1, 0, 0xAFu, 0x17u, 0, "", 0); |
11388 0x1E0u, | 11292 } |
11389 30 * v1++ + 160, | 11293 } |
11390 0x8Cu, | 11294 if ( v17->evt_F ) |
11391 0x1Eu, | 11295 { |
11392 1, | 11296 if ( num_menu_buttons < 4 ) |
11393 0, | 11297 { |
11394 0xAFu, | 11298 v16 = NPC_EventProcessor(v17->evt_F); |
11395 0x17u, | |
11396 0, | |
11397 "", | |
11398 0); | |
11399 } | |
11400 } | |
11401 v15 = (void *)v17->evt_F; | |
11402 if ( v15 ) | |
11403 { | |
11404 if ( v1 < 4 ) | |
11405 { | |
11406 v16 = sub_4466C4(v15); | |
11407 if ( v16 == 1 || v16 == 2 ) | 11299 if ( v16 == 1 || v16 == 2 ) |
11408 pDialogueWindow->CreateButton( | 11300 pDialogueWindow->CreateButton( 0x1E0u, 30 * num_menu_buttons++ + 160, 0x8Cu, 0x1Eu, 1, 0, 0xAFu, 0x18u, 0, "", 0); |
11409 0x1E0u, | 11301 } |
11410 30 * v1++ + 160, | 11302 } |
11411 0x8Cu, | 11303 pDialogueWindow->_41D08F(num_menu_buttons, 1, 0, 2); |
11412 0x1Eu, | |
11413 1, | |
11414 0, | |
11415 0xAFu, | |
11416 0x18u, | |
11417 0, | |
11418 "", | |
11419 0); | |
11420 } | |
11421 } | |
11422 pDialogueWindow->_41D08F(v1, 1, 0, 2); | |
11423 v4 = 1; | |
11424 result = (GUIButton *)pDialogueWindow->pNumPresenceButton; | |
11425 dword_F8B1E0 = pDialogueWindow->pNumPresenceButton; | 11304 dword_F8B1E0 = pDialogueWindow->pNumPresenceButton; |
11426 } | 11305 } |
11427 dword_F8B19C = v4; | 11306 dword_F8B19C = 1; |
11428 } | 11307 } |
11429 return result; | 11308 |
11430 } | 11309 } |
11431 | 11310 |
11432 | 11311 |
11433 | 11312 |
11434 //----- (004B46A5) -------------------------------------------------------- | 11313 //----- (004B46A5) -------------------------------------------------------- |
14656 goto LABEL_44; | 14535 goto LABEL_44; |
14657 } | 14536 } |
14658 } | 14537 } |
14659 LABEL_44: | 14538 LABEL_44: |
14660 HIWORD(v25) = HIWORD(x); | 14539 HIWORD(v25) = HIWORD(x); |
14661 v0->some_x = a1a; | 14540 v0->world_x = a1a; |
14662 v0->some_y = a2; | 14541 v0->world_y = a2; |
14663 v0->some_z = a3; | 14542 v0->world_z = a3; |
14664 v0->uScreenSpaceX = v43; | 14543 v0->uScreenSpaceX = v43; |
14665 v0->uScreenSpaceY = a6; | 14544 v0->uScreenSpaceY = a6; |
14666 LOWORD(v25) = 0; | 14545 LOWORD(v25) = 0; |
14667 LOBYTE(v26) = v41; | 14546 LOBYTE(v26) = v41; |
14668 | 14547 |
14689 | 14568 |
14690 | 14569 |
14691 | 14570 |
14692 | 14571 |
14693 //----- (00444732) -------------------------------------------------------- | 14572 //----- (00444732) -------------------------------------------------------- |
14694 char *_444732_GetEventHintString(unsigned int uEventID) | 14573 char *GetEventHintString(unsigned int uEventID) |
14695 { | 14574 { |
14696 signed int v1; // edx@1 | 14575 signed int event_index; // edx@1 |
14697 char *v2; // eax@2 | 14576 int event_pos; // esi@4 |
14698 int v3; // ebx@4 | |
14699 int v4; // esi@4 | |
14700 char *result; // eax@6 | 14577 char *result; // eax@6 |
14701 int v6; // eax@9 | 14578 unsigned int str_index; // eax@9 |
14702 char *i; // esi@11 | 14579 int i; // esi@11 |
14703 int v8; // edx@12 | 14580 _evt_raw* test_evt; |
14704 | 14581 _evt_raw* last_evt; |
14705 v1 = 0; | 14582 |
14706 if ( (signed int)uLevelEVT_NumEvents <= 0 ) | 14583 event_index = 0; |
14707 { | 14584 if ( uLevelEVT_NumEvents <= 0 ) |
14708 LABEL_6: | 14585 return NULL; |
14709 result = 0; | 14586 |
14710 } | 14587 //v2 = (char *)&pLevelEVT_Index[0].uEventOffsetInEVT; |
14711 else | |
14712 { | |
14713 v2 = (char *)&pLevelEVT_Index[0].uEventOffsetInEVT; | |
14714 while ( 1 ) | 14588 while ( 1 ) |
14715 { | 14589 { |
14716 if ( *((int *)v2 - 2) == uEventID ) | 14590 if ( pLevelEVT_Index[event_index].uEventID == uEventID ) |
14717 { | 14591 { |
14718 v3 = *(int *)v2; | 14592 test_evt=(_evt_raw*)&pLevelEVT[pLevelEVT_Index[event_index].uEventOffsetInEVT]; |
14719 v4 = *((int *)v2 + 3); | 14593 last_evt=test_evt; |
14720 if ( pLevelEVT[*(int *)v2 + 4] == 4 ) | 14594 event_pos = pLevelEVT_Index[event_index+1].uEventOffsetInEVT; |
14595 if ( test_evt->_e_type == EVENT_MouseOver ) | |
14721 break; | 14596 break; |
14722 } | 14597 } |
14723 ++v1; | 14598 ++event_index; |
14724 v2 += 12; | 14599 if ( event_index >= uLevelEVT_NumEvents ) |
14725 if ( v1 >= (signed int)uLevelEVT_NumEvents ) | 14600 return NULL; |
14726 goto LABEL_6; | 14601 } |
14727 } | 14602 test_evt=(_evt_raw*)&pLevelEVT[event_pos]; |
14728 if ( pLevelEVT[v4 + 4] == 2 ) | 14603 if ( test_evt->_e_type== EVENT_SpeakInHouse ) |
14729 { | 14604 { |
14730 v6 = (unsigned __int8)pLevelEVT[v4 + 5] | 14605 str_index = EVT_DWORD(test_evt->v5); |
14731 + (((unsigned __int8)pLevelEVT[v4 + 6] | 14606 result = (char *)p2DEvents[str_index - 1].pName; |
14732 + (((unsigned __int8)pLevelEVT[v4 + 7] + ((unsigned __int8)pLevelEVT[v4 + 8] << 8)) << 8)) << 8); | |
14733 LABEL_10: | |
14734 //result = (char *)p2DEvents_minus1_::04[13 * v6]; | |
14735 result = (char *)p2DEvents[v6 - 1].pName; | |
14736 } | 14607 } |
14737 else | 14608 else |
14738 { | 14609 { |
14739 for ( i = (char *)pLevelEVT_Index + 4 * (3 * v1 + 3); *(int *)i == uEventID; i += 12 ) | 14610 for ( i = event_index+1; pLevelEVT_Index[i].uEventID == uEventID; ++i ) |
14740 { | 14611 { |
14741 v8 = *((int *)i + 2); | 14612 event_pos = pLevelEVT_Index[i].uEventOffsetInEVT; |
14742 if ( pLevelEVT[v8 + 4] == 2 ) | 14613 test_evt=(_evt_raw*)&pLevelEVT[event_pos]; |
14743 { | 14614 if ( test_evt->_e_type == EVENT_SpeakInHouse ) |
14744 v6 = (unsigned __int8)pLevelEVT[v8 + 5] | 14615 { |
14745 + (((unsigned __int8)pLevelEVT[v8 + 6] | 14616 str_index = EVT_DWORD(test_evt->v5); |
14746 + (((unsigned __int8)pLevelEVT[v8 + 7] + ((unsigned __int8)pLevelEVT[v8 + 8] << 8)) << 8)) << 8); | 14617 if ( str_index < 600 ) |
14747 if ( (unsigned int)v6 < 0x258 ) | 14618 return (char *)p2DEvents[str_index - 1].pName; |
14748 goto LABEL_10; | 14619 } |
14749 } | 14620 } |
14750 } | 14621 result = &pLevelStr[pLevelStrOffsets[EVT_BYTE(last_evt->v5)]]; |
14751 result = &pLevelStr[pLevelStrOffsets[(unsigned __int8)pLevelEVT[v3 + 5]]]; | 14622 } |
14752 } | 14623 |
14753 } | |
14754 return result; | 14624 return result; |
14755 } | 14625 } |
14756 | 14626 |
14757 | 14627 |
14758 | 14628 |
14830 if ( v14 ) | 14700 if ( v14 ) |
14831 { | 14701 { |
14832 v20 = pMapStats->pInfos[v14].pName; | 14702 v20 = pMapStats->pInfos[v14].pName; |
14833 v18 = pGlobalTXT_LocalizationStrings[410]; | 14703 v18 = pGlobalTXT_LocalizationStrings[410]; |
14834 LABEL_10: | 14704 LABEL_10: |
14835 sprintf(byte_591098, v18, v20); | 14705 sprintf(sHouseName, v18, v20); |
14836 goto LABEL_20; | 14706 goto LABEL_20; |
14837 } | 14707 } |
14838 v21 = pGlobalTXT_LocalizationStrings[79]; | 14708 v21 = pGlobalTXT_LocalizationStrings[79]; |
14839 goto LABEL_19; | 14709 goto LABEL_19; |
14840 } | 14710 } |
14849 v18 = pGlobalTXT_LocalizationStrings[411]; | 14719 v18 = pGlobalTXT_LocalizationStrings[411]; |
14850 goto LABEL_10; | 14720 goto LABEL_10; |
14851 } | 14721 } |
14852 v21 = pGlobalTXT_LocalizationStrings[73]; | 14722 v21 = pGlobalTXT_LocalizationStrings[73]; |
14853 LABEL_19: | 14723 LABEL_19: |
14854 strcpy(byte_591098, v21); | 14724 strcpy(sHouseName, v21); |
14855 LABEL_20: | 14725 LABEL_20: |
14856 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)26, 0, (int)byte_591098); | 14726 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)26, 0, (int)sHouseName); |
14857 //if ( BYTE1(pAnimatedRooms[p2DEvents_minus1___02[26 * v9]].field_C) ) | 14727 //if ( BYTE1(pAnimatedRooms[p2DEvents_minus1___02[26 * v9]].field_C) ) |
14858 if ( BYTE1(pAnimatedRooms[p2DEvents[v9 - 1].uAnimationID].field_C) ) | 14728 if ( BYTE1(pAnimatedRooms[p2DEvents[v9 - 1].uAnimationID].field_C) ) |
14859 HousePlaySomeSound(v9, 1); | 14729 HousePlaySomeSound(v9, 1); |
14860 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor && uActiveCharacter && pParty->uFlags & 0x30 ) | 14730 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor && uActiveCharacter && pParty->uFlags & 0x30 ) |
14861 pPlayers[uActiveCharacter]->PlaySound(SPEECH_47, 0); | 14731 pPlayers[uActiveCharacter]->PlaySound(SPEECH_47, 0); |