comparison Indoor.cpp @ 1489:a27cdb3d753e

Cleanup of LevelDecoration and related.
author yoctozepto
date Thu, 29 Aug 2013 22:22:33 +0200
parents 59d1da1863df
children 9e9a12506d51
comparison
equal deleted inserted replaced
1488:f62e6d06acac 1489:a27cdb3d753e
2243 2243
2244 pGameLoadingUI_ProgressBar->Progress(); 2244 pGameLoadingUI_ProgressBar->Progress();
2245 2245
2246 for (uint i = 0; i < uNumLevelDecorations; ++i) 2246 for (uint i = 0; i < uNumLevelDecorations; ++i)
2247 { 2247 {
2248 memcpy(&pLevelDecorations[i].field_2, pData, 2); 2248 memcpy(&pLevelDecorations[i].uFlags, pData, 2);
2249 pData += 2; 2249 pData += 2;
2250 } 2250 }
2251 2251
2252 pGameLoadingUI_ProgressBar->Progress(); 2252 pGameLoadingUI_ProgressBar->Progress();
2253 2253
3866 pSoundList->LoadSound(v15, 0); 3866 pSoundList->LoadSound(v15, 0);
3867 v16 = _6807E0_num_decorations_with_sounds_6807B8++; 3867 v16 = _6807E0_num_decorations_with_sounds_6807B8++;
3868 _6807B8_level_decorations_ids[v16] = i; 3868 _6807B8_level_decorations_ids[v16] = i;
3869 } 3869 }
3870 3870
3871 if ( !(pDecortaion->field_2 & 0x20) ) 3871 if (!(pDecortaion->uFlags & LEVEL_DECORATION_INVISIBLE))
3872 { 3872 {
3873 v17 = &pDecorationList->pDecorations[pDecortaion->uDecorationDescID]; 3873 v17 = &pDecorationList->pDecorations[pDecortaion->uDecorationDescID];
3874 if (!v17->DontDraw()) 3874 if (!v17->DontDraw())
3875 { 3875 {
3876 v18 = v17->uLightRadius; 3876 v18 = v17->uLightRadius;
3906 v21 = v35 + 1; 3906 v21 = v35 + 1;
3907 pDecortaion->_idx_in_stru123 = v35 + 75; 3907 pDecortaion->_idx_in_stru123 = v35 + 75;
3908 v22 = stru_5E4C90._decor_events[v21 + 74 - 75]; 3908 v22 = stru_5E4C90._decor_events[v21 + 74 - 75];
3909 v35 = v21; 3909 v35 = v21;
3910 if ( !v22 ) 3910 if ( !v22 )
3911 pDecortaion->field_2 |= 0x20; 3911 pDecortaion->uFlags |= LEVEL_DECORATION_INVISIBLE;
3912 } 3912 }
3913 } 3913 }
3914 } 3914 }
3915 } 3915 }
3916 3916
4982 int v37; // [sp+A8h] [bp-4h]@5 4982 int v37; // [sp+A8h] [bp-4h]@5
4983 4983
4984 //v26 = uDecorationID; 4984 //v26 = uDecorationID;
4985 //LODWORD(v31) = uSectorID; 4985 //LODWORD(v31) = uSectorID;
4986 v2 = &pLevelDecorations[uDecorationID]; 4986 v2 = &pLevelDecorations[uDecorationID];
4987 if (v2->field_2 & 0x20) 4987 if (v2->uFlags & LEVEL_DECORATION_INVISIBLE)
4988 return; 4988 return;
4989 4989
4990 v3 = &pDecorationList->pDecorations[v2->uDecorationDescID]; 4990 v3 = &pDecorationList->pDecorations[v2->uDecorationDescID];
4991 v4 = v3->uFlags; 4991 v4 = v3->uFlags;
4992 if (v3->uFlags & DECORATION_DESC_EMITS_FIRE) 4992 if (v3->uFlags & DECORATION_DESC_EMITS_FIRE)
6157 v8 = &pLevelDecorations[PID_ID(a1)]; 6157 v8 = &pLevelDecorations[PID_ID(a1)];
6158 v9 = v8->field_16_event_id; 6158 v9 = v8->field_16_event_id;
6159 if ( v9 ) 6159 if ( v9 )
6160 { 6160 {
6161 EventProcessor(v9, a1, 1); 6161 EventProcessor(v9, a1, 1);
6162 LOBYTE(v8->field_2) |= 8u; 6162 v8->uFlags |= LEVEL_DECORATION_VISIBLE_ON_MAP;
6163 } 6163 }
6164 else 6164 else
6165 { 6165 {
6166 if ( !pLevelDecorations[PID_ID(a1)].IsInteractive() ) 6166 if ( !pLevelDecorations[PID_ID(a1)].IsInteractive() )
6167 return 1; 6167 return 1;