changeset 1059:0e0f1192aa57

Слияние
author Ritor1
date Fri, 24 May 2013 00:53:48 +0600
parents cbb1baa606aa (current diff) 1c10b24a4159 (diff)
children b79139c3b5c8 655fde266d96 5c6db175877e
files Vis.cpp
diffstat 5 files changed, 34 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/Events.cpp	Fri May 24 00:53:14 2013 +0600
+++ b/Events.cpp	Fri May 24 00:53:48 2013 +0600
@@ -165,8 +165,23 @@
 [3] Gold Fountain used this week
 [4] Gold Fountain total uses
 
+
+Emerald Isle #110 // Fire Resistance fountain
+0	LocationName
+0	if (Player.FireResistance < 50)
+	{
+1		Set(Player.FireResistance, 50)
+2		SetFooterString(22)	// +50 Fire Resistance (temporarily)
+3		Add(Party.Autonotes, 2)
+4		goto return
+	}
+5	SetFooterString(11)	// Refreshing!
+6	return
+
+
+
 Emerald Isle #111 // ???
-	OnLongTimer
+	Initialize
 	Set(Map.Variables[0], 30)
 	Set(Map.Variables[1], 30)
 
@@ -203,7 +218,7 @@
 0	LocationName
 0	if (Map.Variables[4] < 3)
 	{
-1		if (Map.Variables[3] == 1)
+1		if (Map.Variables[3] == 0)
 		{
 2			if (Party.Gold < 201)
 			{
@@ -233,7 +248,7 @@
 
 Emerald Isle #220	// day timer - monster spawner
 0	LocationName
-0	OnLongTimer
+0	Initialize
 1	if (NumAliveActors(group=20) != 0)
 2		return
 3	SpawnMonsters(1, level=1, count=10, x=-336, y=14512, z=0,  group=20)
--- a/Indoor.h	Fri May 24 00:53:14 2013 +0600
+++ b/Indoor.h	Fri May 24 00:53:48 2013 +0600
@@ -264,6 +264,7 @@
 #define FACE_CLICKABLE          0x02000000 // Event can be triggered by clicking on the facet.
 #define FACE_PRESSURE_PLATE     0x04000000 // Event can be triggered by stepping on the facet.
 #define FACE_ETHEREAL           0x20000000 // Untouchable. You can pass through it.
+#define FACE_PICKED             0x80000000
 
 /*   93 */
 #pragma pack(push, 1)
--- a/Party.h	Fri May 24 00:53:14 2013 +0600
+++ b/Party.h	Fri May 24 00:53:48 2013 +0600
@@ -6,7 +6,7 @@
 
 
 
-
+#define PARTY_AUTONOTES_BIT__EMERALD_FIRE_FOUNTAIN 2
 
 enum PARTY_QUEST_BITS: unsigned __int32
 {
--- a/Vis.cpp	Fri May 24 00:53:14 2013 +0600
+++ b/Vis.cpp	Fri May 24 00:53:48 2013 +0600
@@ -323,11 +323,12 @@
     {
       if ( pFaceID < (signed int)pIndoor->uNumFaces )
       {
-        if ( is_part_of_selection(&pIndoor->pFaces[pFaceID], filter) )
+        auto face = pIndoor->pFaces + pFaceID;
+        if ( is_part_of_selection(face, filter) )
         {
-          if ( !pGame->pIndoorCameraD3D->IsCulled(&pIndoor->pFaces[pFaceID]) )
+          if ( !pGame->pIndoorCameraD3D->IsCulled(face) )
           {
-            if ( Intersect_Ray_Face(pRay, pRay + 1, &fDepth, &a1, &pIndoor->pFaces[pFaceID], 0xFFFFFFFFu) )
+            if ( Intersect_Ray_Face(pRay, pRay + 1, &fDepth, &a1, face, 0xFFFFFFFFu) )
             {
               pGame->pIndoorCameraD3D->ViewTransform(&a1, 1);
               v9 = fixpoint_from_float(/*v8, */a1.vWorldViewPosition.x);
@@ -346,6 +347,12 @@
             }
           }
         }
+        
+        if (face->uAttributes & FACE_PICKED)
+          face->uAttributes |= FACE_OUTLINED;
+        else
+          face->uAttributes &= ~FACE_OUTLINED;
+        face->uAttributes &= ~FACE_PICKED;
       }
     }
     v5 = v17 + 1;
@@ -388,10 +395,11 @@
           list->AddObject(face, VisObjectType_Face, v13);
         }
 
-        if (blv_face.uAttributes & 0x80000000)
+        if (blv_face.uAttributes & FACE_PICKED)
           face->uAttributes |= FACE_OUTLINED;
         else
           face->uAttributes &= ~FACE_OUTLINED;
+        blv_face.uAttributes &= ~FACE_PICKED;
       }
     }
   }
@@ -613,8 +621,6 @@
       IntersectPoint.z < pFace->pBounding.z1 || IntersectPoint.z > pFace->pBounding.z2 )
     return false;
 
-  pFace->uAttributes |= 0x80000000;
-
   if (uModelID != -1)
     ODM_CreateIntersectFacesVertexCoordList(&a, &b, intersect_face_vertex_coords_list_a, intersect_face_vertex_coords_list_b,
                                 &IntersectPoint, pFace, uModelID);
@@ -659,6 +665,8 @@
 
   if ( v16 != 1 )
     return false;
+
+  pFace->uAttributes |= FACE_PICKED;
   return true;
 /*
   int v5; // esi@10
--- a/mm7_3.cpp	Fri May 24 00:53:14 2013 +0600
+++ b/mm7_3.cpp	Fri May 24 00:53:48 2013 +0600
@@ -1611,10 +1611,6 @@
     }
   }
 
-  for (uint i = 0; i < pIndoor->uNumFaces; ++i)
-    pIndoor->pFaces[i].uAttributes &= ~FACE_OUTLINED;
-  pIndoor->pFaces[uFaceID].uAttributes |= FACE_OUTLINED;
-
   blv_prev_party_x = pParty->vPosition.x;
   blv_prev_party_z = pParty->vPosition.y;
   blv_prev_party_y = pParty->vPosition.z;