Mercurial > might-and-magic-trilogy
comparison Game.cpp @ 58:41cbaabde2cb
BLV render
author | Nomad |
---|---|
date | Thu, 25 Oct 2012 02:05:16 +0200 |
parents | 0f4ed4f0f472 |
children | 5159d2e6f559 |
comparison
equal
deleted
inserted
replaced
53:fd2fd234a66c | 58:41cbaabde2cb |
---|---|
59 pIndoorCamera->sRotationX = pParty->sRotationX; | 59 pIndoorCamera->sRotationX = pParty->sRotationX; |
60 pIndoorCamera->sRotationY = pParty->sRotationY; | 60 pIndoorCamera->sRotationY = pParty->sRotationY; |
61 pIndoorCamera->pos.x = pParty->vPosition.x | 61 pIndoorCamera->pos.x = pParty->vPosition.x |
62 - ((unsigned __int64)(stru_5C6E00->SinCos(pParty->sRotationY) | 62 - ((unsigned __int64)(stru_5C6E00->SinCos(pParty->sRotationY) |
63 * (signed __int64)pParty->field_18) >> 16); | 63 * (signed __int64)pParty->field_18) >> 16); |
64 pIndoorCamera->pos.y = pParty->vPosition.z | 64 pIndoorCamera->pos.y = pParty->vPosition.y |
65 - ((unsigned __int64)(stru_5C6E00->SinCos( | 65 - ((unsigned __int64)(stru_5C6E00->SinCos( |
66 pParty->sRotationY - stru_5C6E00->uIntegerHalfPi) | 66 pParty->sRotationY - stru_5C6E00->uIntegerHalfPi) |
67 * (signed __int64)pParty->field_18) >> 16); | 67 * (signed __int64)pParty->field_18) >> 16); |
68 pIndoorCamera->pos.z = pParty->vPosition.y + pParty->sEyelevel; | 68 pIndoorCamera->pos.z = pParty->vPosition.z + pParty->sEyelevel; |
69 pIndoorCamera->Initialize2(); | 69 pIndoorCamera->Initialize2(); |
70 pIndoorCameraD3D->CreateWorldMatrixAndSomeStuff(); | 70 pIndoorCameraD3D->CreateWorldMatrixAndSomeStuff(); |
71 pIndoorCameraD3D->_4374E8_ProllyBuildFrustrum(); | 71 pIndoorCameraD3D->_4374E8_ProllyBuildFrustrum(); |
72 | 72 |
73 if ( pVideoPlayer->AnyMovieLoaded() ) | 73 if ( pVideoPlayer->AnyMovieLoaded() ) |
77 pRenderer->BeginSceneD3D(); | 77 pRenderer->BeginSceneD3D(); |
78 pMouse->DrawCursorToTarget(); | 78 pMouse->DrawCursorToTarget(); |
79 } | 79 } |
80 else | 80 else |
81 { | 81 { |
82 if ( pParty->vPosition.x != pParty->vPrevPosition.x | pParty->sRotationY != pParty->sPrevRotationY | pParty->vPosition.z != pParty->vPrevPosition.z | pParty->sRotationX != pParty->sPrevRotationX | pParty->vPosition.y != pParty->vPrevPosition.y | pParty->sEyelevel != pParty->sPrevEyelevel ) | 82 if ( pParty->vPosition.x != pParty->vPrevPosition.x | pParty->sRotationY != pParty->sPrevRotationY | pParty->vPosition.y != pParty->vPrevPosition.z | pParty->sRotationX != pParty->sPrevRotationX | pParty->vPosition.z != pParty->vPrevPosition.y | pParty->sEyelevel != pParty->sPrevEyelevel ) |
83 pParty->uFlags |= 2u; | 83 pParty->uFlags |= 2u; |
84 pParty->vPrevPosition.x = pParty->vPosition.x; | 84 pParty->vPrevPosition.x = pParty->vPosition.x; |
85 pParty->vPrevPosition.y = pParty->vPosition.y; | 85 pParty->vPrevPosition.y = pParty->vPosition.z; |
86 //v0 = &pRenderer; | 86 //v0 = &pRenderer; |
87 pParty->sPrevRotationY = pParty->sRotationY; | 87 pParty->sPrevRotationY = pParty->sRotationY; |
88 pParty->vPrevPosition.z = pParty->vPosition.z; | 88 pParty->vPrevPosition.z = pParty->vPosition.y; |
89 pParty->sPrevRotationX = pParty->sRotationX; | 89 pParty->sPrevRotationX = pParty->sRotationX; |
90 pParty->sPrevEyelevel = pParty->sEyelevel; | 90 pParty->sPrevEyelevel = pParty->sEyelevel; |
91 pRenderer->BeginSceneD3D(); | 91 pRenderer->BeginSceneD3D(); |
92 | 92 |
93 if ( !pRenderer->pRenderD3D ) | 93 if ( !pRenderer->pRenderD3D ) |
417 } | 417 } |
418 while ( (signed int)pHealth < (signed int)&pParty->field_871C[567] ); | 418 while ( (signed int)pHealth < (signed int)&pParty->field_871C[567] ); |
419 if ( (unsigned __int16)_449B57_test_bit(pParty->_award_bits, 136) ) | 419 if ( (unsigned __int16)_449B57_test_bit(pParty->_award_bits, 136) ) |
420 { | 420 { |
421 pParty->vPosition.x = -17331; // respawn in harmondale | 421 pParty->vPosition.x = -17331; // respawn in harmondale |
422 pParty->vPosition.z = 12547; | 422 pParty->vPosition.y = 12547; |
423 pParty->vPosition.y = 465; | 423 pParty->vPosition.z = 465; |
424 pParty->sRotationY = 0; | 424 pParty->sRotationY = 0; |
425 v13 = "out02.odm"; | 425 v13 = "out02.odm"; |
426 } | 426 } |
427 else | 427 else |
428 { | 428 { |
429 pParty->vPosition.x = 12552; // respawn on emerald isle | 429 pParty->vPosition.x = 12552; // respawn on emerald isle |
430 pParty->vPosition.z = 1816; | 430 pParty->vPosition.y = 1816; |
431 pParty->vPosition.y = 0; | 431 pParty->vPosition.z = 0; |
432 pParty->sRotationY = 512; | 432 pParty->sRotationY = 512; |
433 v13 = "out01.odm"; | 433 v13 = "out01.odm"; |
434 } | 434 } |
435 strcpy(Source, v13); | 435 strcpy(Source, v13); |
436 pParty->uFallStartY = pParty->vPosition.y; | 436 pParty->uFallStartY = pParty->vPosition.z; |
437 pParty->sRotationX = 0; | 437 pParty->sRotationX = 0; |
438 pParty->uFallSpeed = 0; | 438 pParty->uFallSpeed = 0; |
439 pParty->field_6E4 = 0; | 439 pParty->field_6E4 = 0; |
440 pParty->field_6E0 = 0; | 440 pParty->field_6E0 = 0; |
441 if ( _strcmpi(Source, pCurrentMapName) ) | 441 if ( _strcmpi(Source, pCurrentMapName) ) |
442 { | 442 { |
443 strcpy(pCurrentMapName, Source); | 443 strcpy(pCurrentMapName, Source); |
444 _5B65A8_npcdata_uflags_or_other = pParty->vPosition.x; | 444 _5B65A8_npcdata_uflags_or_other = pParty->vPosition.x; |
445 _5B65AC_npcdata_fame_or_other = pParty->vPosition.z; | 445 _5B65AC_npcdata_fame_or_other = pParty->vPosition.y; |
446 _5B65B0_npcdata_rep_or_other = pParty->vPosition.y; | 446 _5B65B0_npcdata_rep_or_other = pParty->vPosition.z; |
447 _5B65B4_npcdata_loword_house_or_other = pParty->sRotationY; | 447 _5B65B4_npcdata_loword_house_or_other = pParty->sRotationY; |
448 _5B65B8_npcdata_hiword_house_or_other = pParty->sRotationX; | 448 _5B65B8_npcdata_hiword_house_or_other = pParty->sRotationX; |
449 dword_5B65C0 = 1; | 449 dword_5B65C0 = 1; |
450 PrepareWorld(1u); | 450 PrepareWorld(1u); |
451 } | 451 } |