Mercurial > mm7
comparison mm7_4.cpp @ 1489:a27cdb3d753e
Cleanup of LevelDecoration and related.
author | yoctozepto |
---|---|
date | Thu, 29 Aug 2013 22:22:33 +0200 |
parents | 7ef4b64f6329 |
children | 4055b09160ae |
comparison
equal
deleted
inserted
replaced
1488:f62e6d06acac | 1489:a27cdb3d753e |
---|---|
97 v3 = v1->vPosition.y; | 97 v3 = v1->vPosition.y; |
98 v33 = v1->vPosition.x; | 98 v33 = v1->vPosition.x; |
99 v32 = v1->vPosition.y; | 99 v32 = v1->vPosition.y; |
100 v35 = v1->vPosition.z; | 100 v35 = v1->vPosition.z; |
101 v31 = v1->field_18; | 101 v31 = v1->field_18; |
102 if ( v1->field_2 & 1 ) | 102 if (v1->uFlags & LEVEL_DECORATION_TRIGGERED_BY_TOUCH) |
103 { | 103 { |
104 v36 = abs(v1->vPosition.x - pParty->vPosition.x); | 104 v36 = abs(v1->vPosition.x - pParty->vPosition.x); |
105 v25 = abs(v3 - pParty->vPosition.y); | 105 v25 = abs(v3 - pParty->vPosition.y); |
106 v28 = abs(v35 - pParty->vPosition.z); | 106 v28 = abs(v35 - pParty->vPosition.z); |
107 v4 = v36; | 107 v4 = v36; |
125 v5 = v8; | 125 v5 = v8; |
126 } | 126 } |
127 if ( (signed int)(((unsigned int)(11 * v5) >> 5) + (v6 >> 2) + v4) < v2 ) | 127 if ( (signed int)(((unsigned int)(11 * v5) >> 5) + (v6 >> 2) + v4) < v2 ) |
128 EventProcessor(v1->field_16_event_id, PID(OBJECT_Decoration,i), 1); | 128 EventProcessor(v1->field_16_event_id, PID(OBJECT_Decoration,i), 1); |
129 } | 129 } |
130 if ( v1->field_2 & 2 ) | 130 if (v1->uFlags & LEVEL_DECORATION_TRIGGERED_BY_MONSTER) |
131 { | 131 { |
132 v37 = 0; | 132 v37 = 0; |
133 if ( (signed int)uNumActors > 0 ) | 133 if ( (signed int)uNumActors > 0 ) |
134 { | 134 { |
135 v9 = pActors.data();//[0].vPosition.y; | 135 v9 = pActors.data();//[0].vPosition.y; |
165 ++v9; | 165 ++v9; |
166 } | 166 } |
167 while ( v37 < (signed int)uNumActors ); | 167 while ( v37 < (signed int)uNumActors ); |
168 } | 168 } |
169 } | 169 } |
170 if ( v1->field_2 & 4 ) | 170 if (v1->uFlags & LEVEL_DECORATION_TRIGGERED_BY_OBJECT) |
171 { | 171 { |
172 v38 = 0; | 172 v38 = 0; |
173 if ( (signed int)uNumSpriteObjects > 0 ) | 173 if ( (signed int)uNumSpriteObjects > 0 ) |
174 { | 174 { |
175 v17 = (char *)&pSpriteObjects[0].vPosition.y; | 175 v17 = (char *)&pSpriteObjects[0].vPosition.y; |
464 | 464 |
465 v0 = &pIndoor->pSectors[stru_721530.uSectorID]; | 465 v0 = &pIndoor->pSectors[stru_721530.uSectorID]; |
466 for ( i = 0; i < v0->uNumDecorations; ++i ) | 466 for ( i = 0; i < v0->uNumDecorations; ++i ) |
467 { | 467 { |
468 v1 = &pLevelDecorations[v0->pDecorationIDs[i]]; | 468 v1 = &pLevelDecorations[v0->pDecorationIDs[i]]; |
469 if ( !(v1->field_2 & 0x20) ) | 469 if (!(v1->uFlags & LEVEL_DECORATION_INVISIBLE)) |
470 { | 470 { |
471 v2 = &pDecorationList->pDecorations[v1->uDecorationDescID]; | 471 v2 = &pDecorationList->pDecorations[v1->uDecorationDescID]; |
472 if (!v2->CanMoveThrough()) | 472 if (!v2->CanMoveThrough()) |
473 { | 473 { |
474 v3 = v2->uRadius; | 474 v3 = v2->uRadius; |