Mercurial > mm7
comparison mm7_5.cpp @ 1861:a86c60679949
changing most of party arrays to std::arrays, some minor cleanups in actor.cpp
author | Grumpy7 |
---|---|
date | Mon, 14 Oct 2013 06:32:30 +0200 |
parents | 35c1e4ff6ba7 |
children | 2070d01ccfae |
comparison
equal
deleted
inserted
replaced
1860:3186f469323a | 1861:a86c60679949 |
---|---|
1702 if ( pParty->uNumFoodRations ) | 1702 if ( pParty->uNumFoodRations ) |
1703 { | 1703 { |
1704 pParty->RestAndHeal(); | 1704 pParty->RestAndHeal(); |
1705 if ( ((pParty->uNumFoodRations - (signed int)GetTravelTime()) & 0x80000000u) != 0 ) | 1705 if ( ((pParty->uNumFoodRations - (signed int)GetTravelTime()) & 0x80000000u) != 0 ) |
1706 { | 1706 { |
1707 pPlayer7 = pParty->pPlayers; | 1707 pPlayer7 = pParty->pPlayers.data(); |
1708 do | 1708 do |
1709 { | 1709 { |
1710 pPlayer7->SetCondition(1, 0); | 1710 pPlayer7->SetCondition(1, 0); |
1711 ++pPlayer7; | 1711 ++pPlayer7; |
1712 } | 1712 } |
1713 while ( (signed int)pPlayer7 < (signed int)pParty->pHirelings ); | 1713 while ( (signed int)pPlayer7 < (signed int)pParty->pHirelings.data() ); |
1714 ++pParty->days_played_without_rest; | 1714 ++pParty->days_played_without_rest; |
1715 } | 1715 } |
1716 Party::TakeFood((unsigned int)GetTravelTime()); | 1716 Party::TakeFood((unsigned int)GetTravelTime()); |
1717 } | 1717 } |
1718 else | 1718 else |
1719 { | 1719 { |
1720 pPlayer8 = pParty->pPlayers; | 1720 pPlayer8 = pParty->pPlayers.data(); |
1721 do | 1721 do |
1722 { | 1722 { |
1723 pPlayer8->SetCondition(1, 0); | 1723 pPlayer8->SetCondition(1, 0); |
1724 ++pPlayer8; | 1724 ++pPlayer8; |
1725 } | 1725 } |
1726 while ( (signed int)pPlayer8 < (signed int)pParty->pHirelings ); | 1726 while ( (signed int)pPlayer8 < (signed int)pParty->pHirelings.data() ); |
1727 ++pParty->days_played_without_rest; | 1727 ++pParty->days_played_without_rest; |
1728 } | 1728 } |
1729 pPaletteManager->ResetNonLocked(); | 1729 pPaletteManager->ResetNonLocked(); |
1730 pSpriteFrameTable->ResetSomeSpriteFlags(); | 1730 pSpriteFrameTable->ResetSomeSpriteFlags(); |
1731 strcpy(pCurrentMapName, pOut); | 1731 strcpy(pCurrentMapName, pOut); |
3277 UIMessageType pUIMessageType; // [sp+8h] [bp-8h]@3 | 3277 UIMessageType pUIMessageType; // [sp+8h] [bp-8h]@3 |
3278 int pSex; // [sp+Ch] [bp-4h]@3 | 3278 int pSex; // [sp+Ch] [bp-4h]@3 |
3279 | 3279 |
3280 if ( pMessageQueue_50CBD0->uNumMessages ) | 3280 if ( pMessageQueue_50CBD0->uNumMessages ) |
3281 { | 3281 { |
3282 pPlayer = pParty->pPlayers; | 3282 pPlayer = pParty->pPlayers.data(); |
3283 do | 3283 do |
3284 { | 3284 { |
3285 int param2; | 3285 int param2; |
3286 pMessageQueue_50CBD0->PopMessage(&pUIMessageType, &pParam, ¶m2); | 3286 pMessageQueue_50CBD0->PopMessage(&pUIMessageType, &pParam, ¶m2); |
3287 auto player = &pParty->pPlayers[pParam]; | 3287 auto player = &pParty->pPlayers[pParam]; |
3746 v25.y = *((short *)v1 - 100); | 3746 v25.y = *((short *)v1 - 100); |
3747 v25.x = *((short *)v1 - 200); | 3747 v25.x = *((short *)v1 - 200); |
3748 if ( sub_407A1C(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z + pParty->sEyelevel, v25) ) | 3748 if ( sub_407A1C(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z + pParty->sEyelevel, v25) ) |
3749 { | 3749 { |
3750 v26 = 0; | 3750 v26 = 0; |
3751 v27 = pParty->pPlayers;//[0].pConditions[15]; | 3751 v27 = pParty->pPlayers.data();//[0].pConditions[15]; |
3752 do | 3752 do |
3753 { | 3753 { |
3754 if ( !(HIDWORD(v27->pConditions[14]) | LODWORD(v27->pConditions[14])) && !v27->pConditions[15] && !v27->pConditions[16] ) | 3754 if ( !(HIDWORD(v27->pConditions[14]) | LODWORD(v27->pConditions[14])) && !v27->pConditions[15] && !v27->pConditions[16] ) |
3755 DamagePlayerFromMonster(*((short *)v1 - 300), stru_50FE08.field_450[v43], pVelocity, v26); | 3755 DamagePlayerFromMonster(*((short *)v1 - 300), stru_50FE08.field_450[v43], pVelocity, v26); |
3756 ++v27; | 3756 ++v27; |