]> git.leopard-lacewing.eu Git - cgue_weave.git/commitdiff
Resize Bloom Bug
authorPeter Schaefer <schaeferpm@gmail.com>
Mon, 20 Jun 2016 22:01:11 +0000 (00:01 +0200)
committerPeter Schaefer <schaeferpm@gmail.com>
Mon, 20 Jun 2016 22:01:11 +0000 (00:01 +0200)
Weave/Scene/EventBox.cpp
Weave/Scene/EventBox.h
Weave/Scene/Lever.cpp
Weave/Scene/Scene.cpp
Weave/Scene/SceneObject.h

index aa250a32475001c3e377be93a47d6ab460a0ed92..dd2b318f0ed1c1158ce75174d2d12f8c4aae0e06 100644 (file)
@@ -1,6 +1,7 @@
 #include "EventBox.h"
 
 #include "Marvin.h"
+#include "Lever.h"
 
 //#include "../Graphix/Graphix.h"
 #include "../Graphix/Shader.h"
@@ -21,6 +22,9 @@ EventBox::EventBox(const mat4& _modelMat, eventBoxType _EB_TYPE) :
        collide_group = COL_EVENT;
        collide_with = COL_MARVIN;
 
+       if (eb_type == EB_LEVER)
+               collide_with = COL_LEVER;
+
        collision = model;
        collision->bt_init();
        bt_collision_object->setCollisionShape(*collision);
@@ -73,5 +77,8 @@ void EventBox::collides(SceneObject* _other, btPersistentManifold* _contactManif
                                Message::info("Spiel Gewonnen!");
                                Events::halt = true;
                                break;
+                       case EB_LEVER:
+                               ((Lever*)_other)->trigger();
+                               break;
                        }
 }
index f0e6ca1f9f9cb2ceab909207e2d19393180c044f..10faef1094de8313e50bd16d636213287567fa35 100644 (file)
@@ -6,7 +6,7 @@
 enum eventBoxType {
        EB_WINZONE = 0,
        EB_LOSTZONE = 1,
-       EB_TRIGGER = 2
+       EB_LEVER = 2
 };
 
 class EventBox :
@@ -23,5 +23,4 @@ public:
 
 protected:
        eventBoxType eb_type;
-       SceneObject* trigger;
 };
index 058934592ce0ded1d60e943352c25da737ee3173..8394384098c144f554c02c8867528f7ddf4b4c14 100644 (file)
@@ -4,11 +4,15 @@
 Lever::Lever(const mat4& _modelMat, const vec4& _material, string _modelpath, string texturepath) : SceneObject(_modelMat, _material, _modelpath, texturepath)
 {
        recipient = nullptr;
+       collide_group = COL_LEVER;
+       collide_with = COL_EVENT;
 }
 
 Lever::Lever(const mat4& modelMat, const vec4& material, Model* model, string texturepath) : SceneObject(modelMat, material, model, texturepath)
 {
        recipient = nullptr;
+       collide_group = COL_LEVER;
+       collide_with = COL_EVENT;
 }
 
 Lever::~Lever()
index 533c2298a7c72d6892efb77bd957d7634f2a0910..f9ec11a4ea03d114b2e1a9b7f4bd18fd87fcdce0 100644 (file)
@@ -517,9 +517,9 @@ void Scene::setView(unsigned int width, unsigned int height, bool updateProjecti
        }
 
        render->updateSize(width, height);
-       postRender->updateSize(width, height);
+       postRender->updateSize(width / 2, height / 2);
        for (int i = 0; i < 2; i++)
-               blurPingPong[i]->updateSize(width, height);
+               blurPingPong[i]->updateSize(width / 2, height / 2);
        shadowdir->updateSize(width, height);
 
 }
index 82e9d62467b229c91eef90c0583042aed4e4a897..156292d96c639d873e1f352683c55eee226f1b3b 100644 (file)
@@ -21,7 +21,8 @@ enum collisiontypes {
        COL_MARVIN = BIT(1), //<Collide with Marvin
        COL_ENEMY = BIT(2), //<Collide with Enemies
        COL_KEY = BIT(3), //<Collide with Key's
-       COL_EVENT = BIT(4)
+       COL_EVENT = BIT(4),
+       COL_LEVER = BIT(5)
 };
 
 enum drawTarget {