]> git.leopard-lacewing.eu Git - cgue_weave.git/commitdiff
added Revert LOST
authorPeter Schaefer <schaeferpm@gmail.com>
Tue, 3 May 2016 20:35:02 +0000 (22:35 +0200)
committerPeter Schaefer <schaeferpm@gmail.com>
Tue, 3 May 2016 20:35:02 +0000 (22:35 +0200)
.gitignore
Weave/Game.cpp
Weave/Graphix/Textures/tImage.cpp
Weave/Graphix/Textures/tImage.h
Weave/Scene/EventBox.cpp
Weave/Scene/EventBox.h
Weave/Scene/Marvin.cpp
Weave/Scene/Marvin.h
Weave/Scene/Scene.cpp
Weave/Scene/SceneObject.h
Weave/Weave.vcxproj

index d596d2774a0ce840825955f2819db360119b2163..ec689be46821c36f811a6695f2b5c9a585b7ca8b 100644 (file)
@@ -24,4 +24,8 @@ res
 *.[Cc]ache
 
 CGUE*.rar
-CGUE*.zip
\ No newline at end of file
+CGUE*.zip
+
+*.aux
+*.bbl
+*.blg
\ No newline at end of file
index 6001e419b5da52efdbc40a22d91751b5e8ecf11d..b167f422c900c94fee3f9c3c9844512d53ba3054 100644 (file)
@@ -68,7 +68,8 @@ Game::Game() : playing(true)
 \r
        current_world->addObject(new SceneObject(translate(vec3(-5.f, 3.f, 0.f)), vec4(3.0f, 3.f, 0.4f, 1.5f), "SkyBox", "model_SkyBox_2D.png"));\r
 \r
-       //current_world->addObject(new EventBox(translate(vec3(3.f, .4f, 0.f)),EB_LOSTZONE));\r
+       current_world->addObject(new EventBox(translate(vec3(3.f, .4f, 0.f)),EB_LOSTZONE));\r
+       //current_world->addObject(new EventBox(translate(vec3(0.f, -5.f, 0.f))*glm::scale(vec3(50.f,1.f,50.f)), EB_LOSTZONE));\r
        current_world->addObject(new EventBox(translate(vec3(3.f, .4f, -15.f)), EB_WINZONE));\r
 \r
 }\r
index 01b5322b3e2ee0c641a09ea2f25693401e41abc4..ea09699a26ed34fa0d7b65773156ddd4a2ca2649 100644 (file)
@@ -1,9 +1,8 @@
 #include "tImage.h"
 
+#include "FreeImage.h"
 #include <GL\glew.h>
 #include "../Shader.h"
-#include "FreeImage.h"
-
 
 #include "../../Message.h"
 
@@ -82,4 +81,4 @@ void tImage::loadImage(const std::string & _path)
 tImage::operator std::string() const
 {
        return path;
-}
\ No newline at end of file
+}
index 18f262ec83abfc29d2beb832ba47d2b6e46ebdce..dce65bfa2d414f2991ddfc29b4f07998b300eba4 100644 (file)
@@ -1,5 +1,7 @@
 #pragma once
+
 #include "Texture.h"
+#include "FreeImage.h"
 
 #include "../../GLM.h"
 #include <string>
index 0ef1c8011e5267dc5bc11302cd43680a6deabe92..e924fa61cec47fce4803422b9ecf6a529b0c39d0 100644 (file)
@@ -1,5 +1,7 @@
 #include "EventBox.h"
 
+#include "Marvin.h"
+
 //#include "../Graphix/Graphix.h"
 #include "../Graphix/Shader.h"
 #include "../Graphix/Model.h"
@@ -63,7 +65,9 @@ void EventBox::collides(SceneObject* _other, btPersistentManifold* _contactManif
                                break;
                        case EB_LOSTZONE:
                                Message::info("Spiel Verloren!");
-                               Events::halt = true;
+                               //Events::halt = true;
+                               _other->movable = false;
+
                                break;
                        case EB_WINZONE:
                                Message::info("Spiel Gewonnen!");
index f1b4ab3dc1d25b9ea677b083715fd6c5bf8ac5b0..9bae021e3e05cd36070fd290e880e59fce0edbf1 100644 (file)
@@ -22,5 +22,4 @@ public:
 
 protected:
        uint eb_type;
-
 };
index 0c86498443d8a7effb40bc4e2781d1f53b4f116c..95b3295bcb33d05943b99d2b189df32d41441d43 100644 (file)
@@ -32,36 +32,41 @@ void Marvin::update(float deltaT)
        Camera& cam(mainScene->getCam());
 
 
-
-       //Jump
-       if (Events::getJump() && abs(yFloorDist)<.5)
-               ySpeed += 5.5;
-
-       int move_x = Events::getMoveX();
-       int move_y = Events::getMoveY();
-       // MOVE Player
-       if (move_x)
-               move(-SPEED_MOVE_NORMAL *move_x * deltaT * cam.getWorldRight());
-
-       if (move_y){
-               if (move_y > 0){
-                       if (move_delta < TIME_TILL_MAX_MOVE)
-                               move_delta += deltaT;
-                       if (move_delta > TIME_TILL_MAX_MOVE)
-                               move_delta = TIME_TILL_MAX_MOVE;
-                       move(SPEED_MOVE_NORMAL * (MOVE_FASTER * move_delta / TIME_TILL_MAX_MOVE + 1) *move_y * deltaT * cam.getWorldDirection());
+       if (movable)
+       {
+               //Jump
+               if (Events::getJump() && abs(yFloorDist)<.5)
+                       ySpeed += 5.5;
+
+               int move_x = Events::getMoveX();
+               int move_y = Events::getMoveY();
+               // MOVE Player
+               if (move_x)
+                       move(-SPEED_MOVE_NORMAL *move_x * deltaT * cam.getWorldRight());
+
+               if (move_y) {
+                       if (move_y > 0) {
+                               if (move_delta < TIME_TILL_MAX_MOVE)
+                                       move_delta += deltaT;
+                               if (move_delta > TIME_TILL_MAX_MOVE)
+                                       move_delta = TIME_TILL_MAX_MOVE;
+                               move(SPEED_MOVE_NORMAL * (MOVE_FASTER * move_delta / TIME_TILL_MAX_MOVE + 1) *move_y * deltaT * cam.getWorldDirection());
+                       }
+                       else
+                               move(SPEED_MOVE_NORMAL *move_y * deltaT * cam.getWorldDirection());
                }
                else
-                       move(SPEED_MOVE_NORMAL *move_y * deltaT * cam.getWorldDirection());
-       }
-       else
-       {
-               move_delta = 0;
+               {
+                       move_delta = 0;
+               }
+
+               //Rotate Play in move direction
+               if (move_x || move_y)
+                       turnTo(cam.getWorldDirection(), 3 * deltaT / TIME_TILL_DIRECTION_ROTATE);
        }
+       
 
-       //Rotate Play in move direction
-       if (move_x || move_y)
-               turnTo(cam.getWorldDirection(), 3 * deltaT / TIME_TILL_DIRECTION_ROTATE);
+       
 
        SceneObject::update(deltaT);
 }
index 4e688b2db68ec8228b43bc95c585d76c82b92e0b..63a3cd6cf4a2471d6412c1db57829af021fca67a 100644 (file)
@@ -15,5 +15,7 @@ public:
        virtual void update(float) override;
 protected:
 
+       
+
 };
 
index d5909e7e112d5eb3d11bbfa4df3650c3b8d7ead2..a7b1590a68d2d074ecbb653f889279c008a5863c 100644 (file)
@@ -193,6 +193,7 @@ void Scene::update(float deltaT)
                //TODO go from keyframe to current time
                lookat->setModel(prev_mat);
                lookat->ySpeed = prev_ySpeed;
+               lookat->movable = true;
 
 
                //for (auto i = SceneObjects.begin(); i != SceneObjects.end(); ++i)
index 0232a660470a957ff63cb131c261639bf513d2b6..4ab3f50353de8206085bff590e61bbfdc82419a7 100644 (file)
@@ -89,6 +89,8 @@ public:
 
        bool ignore;
 
+       bool movable = true;
+
 protected:
 
        mat4 modelMat;
index 24971980ce64a5cc9a526add68e5b7d9173f33df..454b4231869f87e210e24d12f66b4822e0df59df 100644 (file)
@@ -73,7 +73,7 @@
       <WarningLevel>Level3</WarningLevel>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
-      <Optimization>MaxSpeed</Optimization>\r
+      <Optimization>Disabled</Optimization>\r
       <FunctionLevelLinking>true</FunctionLevelLinking>\r
       <IntrinsicFunctions>true</IntrinsicFunctions>\r
       <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r