Mercurial > might-and-magic-trilogy
comparison mm7_3.cpp @ 109:62772029b56d
Слияние
author | Ritor1 |
---|---|
date | Tue, 06 Nov 2012 10:07:35 +0600 |
parents | ccc0cf95706a 142de719a3ea |
children | 8e802a11b20d |
comparison
equal
deleted
inserted
replaced
108:d543bd89a31e | 109:62772029b56d |
---|---|
2441 if ( pParty->bFlying ) | 2441 if ( pParty->bFlying ) |
2442 { | 2442 { |
2443 pParty->bFlying = 0; | 2443 pParty->bFlying = 0; |
2444 __debugbreak(); | 2444 __debugbreak(); |
2445 if (pParty->FlyActive()) | 2445 if (pParty->FlyActive()) |
2446 stru_5E4C90.field_4B[20 * pParty->pPartyBuffs[7].uOverlayID + 119] |= 1u;// 005E4D58 pOtherOverlayList [negindexing] | 2446 stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[7].uOverlayID + 119] |= 1u;// 005E4D58 pOtherOverlayList [negindexing] |
2447 } | 2447 } |
2448 if ( v80 == -30000 ) | 2448 if ( v80 == -30000 ) |
2449 { | 2449 { |
2450 v80 = _47272C_collide_agains_some_secotors_floors(new_party_x, new_party_y, party_z + 40, &uSectorID, &uFaceID); | 2450 v80 = _47272C_collide_agains_some_secotors_floors(new_party_x, new_party_y, party_z + 40, &uSectorID, &uFaceID); |
2451 if ( v80 == -30000 ) | 2451 if ( v80 == -30000 ) |
3160 } | 3160 } |
3161 else | 3161 else |
3162 { | 3162 { |
3163 LOBYTE(pParty->uFlags) &= 0x7Fu; | 3163 LOBYTE(pParty->uFlags) &= 0x7Fu; |
3164 bWaterWalk = 1; | 3164 bWaterWalk = 1; |
3165 *(short *)&stru_5E4C90.field_4B[20 * pParty->pPartyBuffs[18].uOverlayID + 119] |= 1u; | 3165 *(short *)&stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[18].uOverlayID + 119] |= 1u; |
3166 if ( !(pParty->pPartyBuffs[18].uFlags & 1) | 3166 if ( !(pParty->pPartyBuffs[18].uFlags & 1) |
3167 && *(int *)&pParty->pArtifactsFound[6972 * pParty->pPartyBuffs[18].uCaster + 10] <= 0 ) | 3167 && *(int *)&pParty->pArtifactsFound[6972 * pParty->pPartyBuffs[18].uCaster + 10] <= 0 ) |
3168 bWaterWalk = 0; | 3168 bWaterWalk = 0; |
3169 } | 3169 } |
3170 v3 = sub_46D49E_prolly_get_world_y_under_party(v116, v117, v123, pParty->uPartyHeight, &v130, &v108, bWaterWalk); | 3170 v3 = sub_46D49E_prolly_get_world_y_under_party(v116, v117, v123, pParty->uPartyHeight, &v130, &v108, bWaterWalk); |
3551 v123 = v113 + v129; | 3551 v123 = v113 + v129; |
3552 if ( v127 ) | 3552 if ( v127 ) |
3553 v123 = v113; | 3553 v123 = v113; |
3554 if ( SHIDWORD(pParty->pPartyBuffs[7].uExpireTime) >= 0 | 3554 if ( SHIDWORD(pParty->pPartyBuffs[7].uExpireTime) >= 0 |
3555 && (SHIDWORD(pParty->pPartyBuffs[7].uExpireTime) > 0 || LODWORD(pParty->pPartyBuffs[7].uExpireTime)) ) | 3555 && (SHIDWORD(pParty->pPartyBuffs[7].uExpireTime) > 0 || LODWORD(pParty->pPartyBuffs[7].uExpireTime)) ) |
3556 stru_5E4C90.field_4B[20 * pParty->pPartyBuffs[7].uOverlayID + 119] &= 0xFEu; | 3556 stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[7].uOverlayID + 119] &= 0xFEu; |
3557 pParty->uFallStartY = v123; | 3557 pParty->uFallStartY = v123; |
3558 goto LABEL_141; | 3558 goto LABEL_141; |
3559 } | 3559 } |
3560 if ( v130 && v121 ) | 3560 if ( v130 && v121 ) |
3561 sub_42F960_create_object(v116, v117, v111); | 3561 sub_42F960_create_object(v116, v117, v111); |
3566 if ( pParty->bFlying ) | 3566 if ( pParty->bFlying ) |
3567 goto LABEL_130; | 3567 goto LABEL_130; |
3568 v113 = v123; | 3568 v113 = v123; |
3569 if ( SHIDWORD(pParty->pPartyBuffs[7].uExpireTime) >= 0 | 3569 if ( SHIDWORD(pParty->pPartyBuffs[7].uExpireTime) >= 0 |
3570 && (SHIDWORD(pParty->pPartyBuffs[7].uExpireTime) > 0 || LODWORD(pParty->pPartyBuffs[7].uExpireTime)) ) | 3570 && (SHIDWORD(pParty->pPartyBuffs[7].uExpireTime) > 0 || LODWORD(pParty->pPartyBuffs[7].uExpireTime)) ) |
3571 stru_5E4C90.field_4B[20 * pParty->pPartyBuffs[7].uOverlayID + 119] |= 1u; | 3571 stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[7].uOverlayID + 119] |= 1u; |
3572 LABEL_141: | 3572 LABEL_141: |
3573 v32 = 0; | 3573 v32 = 0; |
3574 if ( bJumping && !pParty->bFlying ) | 3574 if ( bJumping && !pParty->bFlying ) |
3575 { | 3575 { |
3576 v33 = -(pEventTimer->uTimeElapsed * GetGravityStrength()); | 3576 v33 = -(pEventTimer->uTimeElapsed * GetGravityStrength()); |
4050 LABEL_313: | 4050 LABEL_313: |
4051 if ( bWaterWalk ) | 4051 if ( bWaterWalk ) |
4052 { | 4052 { |
4053 LOBYTE(pParty->uFlags) &= 0x7Fu; | 4053 LOBYTE(pParty->uFlags) &= 0x7Fu; |
4054 v79 = 20 * pParty->pPartyBuffs[18].uOverlayID + 6180178; | 4054 v79 = 20 * pParty->pPartyBuffs[18].uOverlayID + 6180178; |
4055 *(short *)&stru_5E4C90.field_4B[20 * pParty->pPartyBuffs[18].uOverlayID + 119] |= 1u; | 4055 *(short *)&stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[18].uOverlayID + 119] |= 1u; |
4056 if ( !v122 || !v69 ) | 4056 if ( !v122 || !v69 ) |
4057 { | 4057 { |
4058 if ( !v76 ) | 4058 if ( !v76 ) |
4059 { | 4059 { |
4060 v80 = *(short *)v79; | 4060 v80 = *(short *)v79; |
8311 void ODM_LoadAndInitialize(const char *pLevelFilename, OutdoorCamera *thisa) | 8311 void ODM_LoadAndInitialize(const char *pLevelFilename, OutdoorCamera *thisa) |
8312 { | 8312 { |
8313 int v2; // ebx@3 | 8313 int v2; // ebx@3 |
8314 unsigned int v3; // eax@3 | 8314 unsigned int v3; // eax@3 |
8315 MapInfo *v4; // edi@4 | 8315 MapInfo *v4; // edi@4 |
8316 int v5; // eax@8 | 8316 //int v5; // eax@8 |
8317 SpawnPointMM7 *v6; // edx@14 | 8317 //SpawnPointMM7 *v6; // edx@14 |
8318 size_t v7; // eax@19 | 8318 size_t v7; // eax@19 |
8319 char *v8; // eax@19 | 8319 char *v8; // eax@19 |
8320 char *v9; // eax@21 | 8320 char *v9; // eax@21 |
8321 char Source[120]; // [sp+Ch] [bp-84h]@19 | 8321 char Source[120]; // [sp+Ch] [bp-84h]@19 |
8322 const char *pFilename; // [sp+84h] [bp-Ch]@1 | 8322 const char *pFilename; // [sp+84h] [bp-Ch]@1 |
8323 unsigned int v12; // [sp+88h] [bp-8h]@12 | 8323 //unsigned int v12; // [sp+88h] [bp-8h]@12 |
8324 int v13; // [sp+8Ch] [bp-4h]@11 | 8324 //int v13; // [sp+8Ch] [bp-4h]@11 |
8325 | 8325 |
8326 pFilename = pLevelFilename; | 8326 pFilename = pLevelFilename; |
8327 thisa->AllocSoftwareDrawBuffers(); | 8327 thisa->AllocSoftwareDrawBuffers(); |
8328 pOutdoorCamera->_485F64(); | 8328 pOutdoorCamera->_485F64(); |
8329 pWeather->bRenderSnow = 0; | 8329 pWeather->bRenderSnow = 0; |
8350 (unsigned int)(signed __int64)((double)(signed __int64)pParty->uTimePlayed * 0.234375) / 0x3C / 0x3C / 0x18 + 1, | 8350 (unsigned int)(signed __int64)((double)(signed __int64)pParty->uTimePlayed * 0.234375) / 0x3C / 0x3C / 0x18 + 1, |
8351 v3, | 8351 v3, |
8352 (int)&thisa); | 8352 (int)&thisa); |
8353 if ( !(BYTE1(dword_6BE364_game_settings_1) & 0x20) ) | 8353 if ( !(BYTE1(dword_6BE364_game_settings_1) & 0x20) ) |
8354 { | 8354 { |
8355 UpdateActors(); | 8355 InitializeActors(); |
8356 UpdateLayingItems(); | 8356 InitializeLayingItems(); |
8357 } | 8357 } |
8358 BYTE1(dword_6BE364_game_settings_1) &= 0xDFu; | 8358 BYTE1(dword_6BE364_game_settings_1) &= 0xDFu; |
8359 v5 = 0; | 8359 //v5 = 0; |
8360 if ( !v2 ) | 8360 if ( !v2 ) |
8361 thisa = 0; | 8361 thisa = 0; |
8362 if ( thisa == (OutdoorCamera *)1 ) | 8362 if ( thisa == (OutdoorCamera *)1 ) |
8363 { | 8363 { |
8364 v13 = 0; | 8364 //v13 = 0; |
8365 if ( (signed int)pOutdoor->uNumSpawnPoints > 0 ) | 8365 for (uint i = 0; i < pOutdoor->uNumSpawnPoints; ++i) |
8366 { | 8366 { |
8367 v12 = 0; | 8367 //v12 = 0; |
8368 while ( 1 ) | 8368 //while ( 1 ) |
8369 { | 8369 //{ |
8370 v6 = &pOutdoor->pSpawnPoints[v12 / 0x18]; | 8370 auto spawn = pOutdoor->pSpawnPoints + i; |
8371 if ( pOutdoor->pSpawnPoints[v12 / 0x18].uKind == 3 ) | 8371 //v6 = &pOutdoor->pSpawnPoints[v12 / 0x18]; |
8372 SpawnEncounter(v4, v6, v5, v5, v5); | 8372 if (spawn->uKind == 3 ) |
8373 else | 8373 SpawnEncounter(v4, spawn, 0, 0, 0); |
8374 v4->SpawnRandomTreasure(v6); | 8374 else |
8375 ++v13; | 8375 v4->SpawnRandomTreasure(spawn); |
8376 v12 += 24; | 8376 //++v13; |
8377 if ( v13 >= (signed int)pOutdoor->uNumSpawnPoints ) | 8377 //v12 += 24; |
8378 break; | 8378 //if ( v13 >= (signed int)pOutdoor->uNumSpawnPoints ) |
8379 v5 = 0; | 8379 // break; |
8380 } | 8380 //v5 = 0; |
8381 //} | |
8381 } | 8382 } |
8382 RespawnGlobalDecorations(); | 8383 RespawnGlobalDecorations(); |
8383 } | 8384 } |
8384 pOutdoor->PrepareDecorations(); | 8385 pOutdoor->PrepareDecorations(); |
8385 pOutdoor->_47F223_LooksLikeGenerateMonsterLoot(); | 8386 pOutdoor->_47F223_LooksLikeGenerateMonsterLoot(); |
12904 } | 12905 } |
12905 | 12906 |
12906 //----- (0043F9E1) -------------------------------------------------------- | 12907 //----- (0043F9E1) -------------------------------------------------------- |
12907 void stru170_stru2::_43F9E1(__int16 x, int y, __int16 z, int w) | 12908 void stru170_stru2::_43F9E1(__int16 x, int y, __int16 z, int w) |
12908 { | 12909 { |
12909 __debugbreak(); | |
12910 | |
12911 _viewport_space_y = y; | 12910 _viewport_space_y = y; |
12912 _viewport_space_w = w; | 12911 _viewport_space_w = w; |
12913 | 12912 |
12914 for (uint i = 0; i < 480; ++i) | 12913 for (uint i = 0; i < 480; ++i) |
12915 { | 12914 { |
17269 goto LABEL_291; | 17268 goto LABEL_291; |
17270 case EVENT_ChangeEvent: | 17269 case EVENT_ChangeEvent: |
17271 v25 = _evt->v5 + ((_evt->v6 + ((_evt->v7 + ((unsigned int)_evt->v8 << 8)) << 8)) << 8); | 17270 v25 = _evt->v5 + ((_evt->v6 + ((_evt->v7 + ((unsigned int)_evt->v8 << 8)) << 8)) << 8); |
17272 if ( v25 ) | 17271 if ( v25 ) |
17273 { | 17272 { |
17274 stru_5E4C90.field_0[_5C3420_pDecoration->field_1C] = _evt->v5 - 124; | 17273 stru_5E4C90._decor_events[_5C3420_pDecoration->_idx_in_stru123 - 75] = _evt->v5 - 124; |
17275 } | 17274 } |
17276 else | 17275 else |
17277 { | 17276 { |
17278 v26 = _5C3420_pDecoration; | 17277 v26 = _5C3420_pDecoration; |
17279 stru_5E4C90.field_0[_5C3420_pDecoration->field_1C] = 0; | 17278 stru_5E4C90._decor_events[_5C3420_pDecoration->_idx_in_stru123 - 75] = 0; |
17280 LOBYTE(v26->field_2) |= 0x20u; | 17279 LOBYTE(v26->field_2) |= 0x20u; |
17281 } | 17280 } |
17282 goto LABEL_291; | 17281 goto LABEL_291; |
17283 case EVENT_SetNPCGreeting: | 17282 case EVENT_SetNPCGreeting: |
17284 v27 = _evt->v5 + ((_evt->v6 + ((_evt->v7 + ((uint)_evt->v8 << 8)) << 8)) << 8); | 17283 v27 = _evt->v5 + ((_evt->v6 + ((_evt->v7 + ((uint)_evt->v8 << 8)) << 8)) << 8); |