From c97c179199b39eabe18ad4b1db2eda5eef224161 Mon Sep 17 00:00:00 2001 From: Alexander Biryukov Date: Tue, 3 Apr 2018 14:47:08 +0500 Subject: [PATCH] end of level particle effect --- assets/config.json | 3 +- assets/effects/ball-hit-spark-b.json | 109 ++++++- assets/effects/ball-hit-spark-l.json | 109 ++++++- assets/effects/ball-hit-spark-r.json | 109 ++++++- assets/effects/ball-hit-spark-t.json | 109 ++++++- assets/effects/magic-stars-firework.json | 275 ++++++++++++++++++ game/gamecode.cpp | 26 +- game/gamecode.h | 4 +- game/main_code.cpp | 38 ++- game/main_code.h | 17 +- game/menucode.cpp | 5 - .../DoubleHitBalls-win.vcxproj | 1 + .../DoubleHitBalls-win/tapLog.txt | 76 +++++ 13 files changed, 809 insertions(+), 72 deletions(-) create mode 100755 assets/effects/magic-stars-firework.json diff --git a/assets/config.json b/assets/config.json index 297853b..5329cef 100755 --- a/assets/config.json +++ b/assets/config.json @@ -2,5 +2,6 @@ "lefteffect": "effects/ball-hit-spark-l.json", "righteffect": "effects/ball-hit-spark-r.json", "topeffect": "effects/ball-hit-spark-t.json", - "boteffect": "effects/ball-hit-spark-b.json" + "boteffect": "effects/ball-hit-spark-b.json", + "lvlFinish": "effects/magic-stars-firework.json" } \ No newline at end of file diff --git a/assets/effects/ball-hit-spark-b.json b/assets/effects/ball-hit-spark-b.json index 2efc80a..a429ee9 100755 --- a/assets/effects/ball-hit-spark-b.json +++ b/assets/effects/ball-hit-spark-b.json @@ -6,8 +6,7 @@ { "name": "Spark", - "maxParticles": 11, - "preloading": 11, + "preloading": 5, "texturePath": "textures/spark-white.png", "textureSize": [ 10, 10 ], @@ -28,7 +27,7 @@ "value": 0 }, { - "t": 0.01, + "t": 0.05, "value": 20 } ] @@ -41,8 +40,8 @@ "lifeTime": { - "min": 0.02, - "max": 0.15 + "min": 0.01, + "max": 0.1 }, "coords_system": "PARTICLE_BIRTH", @@ -56,12 +55,12 @@ [ { "t": 0.000, - "value": [ 10, 0, 0 ] + "value": [ 0, -3, 0 ] }, { - "t": 0.15, - "min": [ 60, 0, 0 ], - "max": [ 100, 0, 0 ] + "t": 0.1, + "min": [ 10, 0, 0 ], + "max": [ 70, 0, 0 ] } ] }, @@ -73,13 +72,103 @@ "scale": { - "value": 0.5 + "value": 0.4 }, "color": { "value": [ 1, 1, 0, 1 ] + }, + "emitters": + [ + { + "name": "Spark", + + "maxParticles": 6, + "preloading": 6, + + "texturePath": "textures/spark-white.png", + "textureSize": [ 10, 10 ], + + "gravity": [0, -100, 0], + + "spawnRange_system": "PARTICLE_BIRTH", + + "spawnTotal": + { + "interpolation": "LINEAR_SPLINE", + "matchDeathTime": "true", + "timeline": + [ + { + "t": 0.000, + "value": 0 + }, + { + "t": 0.08, + "value": 6 + } + ] + }, + "spawnRange": + { + "value": [ 0, 180, 0, 160 ] + }, + + "lifeTime": + { + "min": 0.01, + "max": 0.1 + }, + + "coords_system": "PARTICLE_BIRTH", + "coords_axis_system": "PARTICLE_BIRTH", + "rotation_system": "PARTICLE_BIRTH", + + "coords": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 0, 0 ] + }, + { + "t": 0.1, + "min": [ 0, 0, 0 ], + "max": [ 80, 0, 0 ] + } + ] + }, + + "rotation": + { + "value": [ 0, 0, 0 ] + }, + + "scale": + { + "value": 0.2 + }, + + "color": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 1, 1, 0, 1 ] + }, + { + "t": 0.100, + "value": [ 1, 0.5, 0, 1 ] + } + ] + } } + ] } ] } \ No newline at end of file diff --git a/assets/effects/ball-hit-spark-l.json b/assets/effects/ball-hit-spark-l.json index 16dce64..b016dca 100755 --- a/assets/effects/ball-hit-spark-l.json +++ b/assets/effects/ball-hit-spark-l.json @@ -6,8 +6,7 @@ { "name": "Spark", - "maxParticles": 11, - "preloading": 11, + "preloading": 5, "texturePath": "textures/spark-white.png", "textureSize": [ 10, 10 ], @@ -28,7 +27,7 @@ "value": 0 }, { - "t": 0.01, + "t": 0.05, "value": 20 } ] @@ -41,8 +40,8 @@ "lifeTime": { - "min": 0.02, - "max": 0.15 + "min": 0.01, + "max": 0.1 }, "coords_system": "PARTICLE_BIRTH", @@ -56,12 +55,12 @@ [ { "t": 0.000, - "value": [ 10, 0, 0 ] + "value": [ 3, 0, 0 ] }, { - "t": 0.15, - "min": [ 60, 0, 0 ], - "max": [ 100, 0, 0 ] + "t": 0.1, + "min": [ 10, 0, 0 ], + "max": [ 70, 0, 0 ] } ] }, @@ -73,13 +72,103 @@ "scale": { - "value": 0.5 + "value": 0.4 }, "color": { "value": [ 1, 1, 0, 1 ] + }, + "emitters": + [ + { + "name": "Spark", + + "maxParticles": 6, + "preloading": 6, + + "texturePath": "textures/spark-white.png", + "textureSize": [ 10, 10 ], + + "gravity": [0, -100, 0], + + "spawnRange_system": "PARTICLE_BIRTH", + + "spawnTotal": + { + "interpolation": "LINEAR_SPLINE", + "matchDeathTime": "true", + "timeline": + [ + { + "t": 0.000, + "value": 0 + }, + { + "t": 0.08, + "value": 6 + } + ] + }, + "spawnRange": + { + "value": [ 0, 180, 0, 160 ] + }, + + "lifeTime": + { + "min": 0.01, + "max": 0.1 + }, + + "coords_system": "PARTICLE_BIRTH", + "coords_axis_system": "PARTICLE_BIRTH", + "rotation_system": "PARTICLE_BIRTH", + + "coords": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 0, 0 ] + }, + { + "t": 0.1, + "min": [ 0, 0, 0 ], + "max": [ 80, 0, 0 ] + } + ] + }, + + "rotation": + { + "value": [ 0, 0, 0 ] + }, + + "scale": + { + "value": 0.2 + }, + + "color": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 1, 1, 0, 1 ] + }, + { + "t": 0.100, + "value": [ 1, 0.5, 0, 1 ] + } + ] + } } + ] } ] } \ No newline at end of file diff --git a/assets/effects/ball-hit-spark-r.json b/assets/effects/ball-hit-spark-r.json index 1d144c7..5f3299c 100755 --- a/assets/effects/ball-hit-spark-r.json +++ b/assets/effects/ball-hit-spark-r.json @@ -6,8 +6,7 @@ { "name": "Spark", - "maxParticles": 11, - "preloading": 11, + "preloading": 5, "texturePath": "textures/spark-white.png", "textureSize": [ 10, 10 ], @@ -28,7 +27,7 @@ "value": 0 }, { - "t": 0.01, + "t": 0.05, "value": 20 } ] @@ -41,8 +40,8 @@ "lifeTime": { - "min": 0.02, - "max": 0.15 + "min": 0.01, + "max": 0.1 }, "coords_system": "PARTICLE_BIRTH", @@ -56,12 +55,12 @@ [ { "t": 0.000, - "value": [ 10, 0, 0 ] + "value": [ -3, 0, 0 ] }, { - "t": 0.15, - "min": [ 60, 0, 0 ], - "max": [ 100, 0, 0 ] + "t": 0.1, + "min": [ 10, 0, 0 ], + "max": [ 70, 0, 0 ] } ] }, @@ -73,13 +72,103 @@ "scale": { - "value": 0.5 + "value": 0.4 }, "color": { "value": [ 1, 1, 0, 1 ] + }, + "emitters": + [ + { + "name": "Spark", + + "maxParticles": 6, + "preloading": 6, + + "texturePath": "textures/spark-white.png", + "textureSize": [ 10, 10 ], + + "gravity": [0, -100, 0], + + "spawnRange_system": "PARTICLE_BIRTH", + + "spawnTotal": + { + "interpolation": "LINEAR_SPLINE", + "matchDeathTime": "true", + "timeline": + [ + { + "t": 0.000, + "value": 0 + }, + { + "t": 0.08, + "value": 6 + } + ] + }, + "spawnRange": + { + "value": [ 0, 180, 0, 160 ] + }, + + "lifeTime": + { + "min": 0.01, + "max": 0.1 + }, + + "coords_system": "PARTICLE_BIRTH", + "coords_axis_system": "PARTICLE_BIRTH", + "rotation_system": "PARTICLE_BIRTH", + + "coords": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 0, 0 ] + }, + { + "t": 0.1, + "min": [ 0, 0, 0 ], + "max": [ 80, 0, 0 ] + } + ] + }, + + "rotation": + { + "value": [ 0, 0, 0 ] + }, + + "scale": + { + "value": 0.2 + }, + + "color": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 1, 1, 0, 1 ] + }, + { + "t": 0.100, + "value": [ 1, 0.5, 0, 1 ] + } + ] + } } + ] } ] } \ No newline at end of file diff --git a/assets/effects/ball-hit-spark-t.json b/assets/effects/ball-hit-spark-t.json index aea215f..c60d23a 100755 --- a/assets/effects/ball-hit-spark-t.json +++ b/assets/effects/ball-hit-spark-t.json @@ -6,8 +6,7 @@ { "name": "Spark", - "maxParticles": 11, - "preloading": 11, + "preloading": 5, "texturePath": "textures/spark-white.png", "textureSize": [ 10, 10 ], @@ -28,7 +27,7 @@ "value": 0 }, { - "t": 0.01, + "t": 0.05, "value": 20 } ] @@ -41,8 +40,8 @@ "lifeTime": { - "min": 0.02, - "max": 0.15 + "min": 0.01, + "max": 0.1 }, "coords_system": "PARTICLE_BIRTH", @@ -56,12 +55,12 @@ [ { "t": 0.000, - "value": [ 10, 0, 0 ] + "value": [ 0, 3, 0 ] }, { - "t": 0.15, - "min": [ 60, 0, 0 ], - "max": [ 100, 0, 0 ] + "t": 0.1, + "min": [ 10, 0, 0 ], + "max": [ 70, 0, 0 ] } ] }, @@ -73,13 +72,103 @@ "scale": { - "value": 0.5 + "value": 0.4 }, "color": { "value": [ 1, 1, 0, 1 ] + }, + "emitters": + [ + { + "name": "Spark", + + "maxParticles": 6, + "preloading": 6, + + "texturePath": "textures/spark-white.png", + "textureSize": [ 10, 10 ], + + "gravity": [0, -100, 0], + + "spawnRange_system": "PARTICLE_BIRTH", + + "spawnTotal": + { + "interpolation": "LINEAR_SPLINE", + "matchDeathTime": "true", + "timeline": + [ + { + "t": 0.000, + "value": 0 + }, + { + "t": 0.08, + "value": 6 + } + ] + }, + "spawnRange": + { + "value": [ 0, 180, 0, 160 ] + }, + + "lifeTime": + { + "min": 0.01, + "max": 0.1 + }, + + "coords_system": "PARTICLE_BIRTH", + "coords_axis_system": "PARTICLE_BIRTH", + "rotation_system": "PARTICLE_BIRTH", + + "coords": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 0, 0 ] + }, + { + "t": 0.1, + "min": [ 0, 0, 0 ], + "max": [ 80, 0, 0 ] + } + ] + }, + + "rotation": + { + "value": [ 0, 0, 0 ] + }, + + "scale": + { + "value": 0.2 + }, + + "color": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 1, 1, 0, 1 ] + }, + { + "t": 0.100, + "value": [ 1, 0.5, 0, 1 ] + } + ] + } } + ] } ] } \ No newline at end of file diff --git a/assets/effects/magic-stars-firework.json b/assets/effects/magic-stars-firework.json new file mode 100755 index 0000000..21fb683 --- /dev/null +++ b/assets/effects/magic-stars-firework.json @@ -0,0 +1,275 @@ +{ + "emitters": + [ + { + "preloading": 4, + + "texturePath": "textures/magic-star.png", + "textureSize": [ 22.625, 12.5 ], + + "hasInertion": "false", + "gravity": [0, 0, 0], + + "spawnRange_system": "PARTICLE_EFFECT", + + "spawnTotal": + { + "interpolation": "LINEAR_SPLINE", + "timelineType": "LIMITED", + "timeline": + [ + { + "t": 0, + "value": 0 + }, + { + "t": 1, + "value": 4 + } + ] + }, + + "spawnRange": + { + "value": [ 0, 90, 0, 60 ] + }, + + "lifeTime": + { + "min": 0.5, + "max": 2 + }, + + "coords_system": "PARTICLE_BIRTH", + "coords_axis_system": "PARTICLE_BIRTH", + "rotation_system": "PARTICLE_BIRTH", + + "coords": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 0, 0 ] + }, + { + "t": 0.500, + "min": [ 60, 0, 0 ], + "max": [ 160, 0, 0 ] + } + ] + }, + + "rotation": + { + "value": [ 0, 0, 0 ] + }, + + "scale": + { + "interpolation": "DISCRETE", + "timeline": + [ + { + "value": 0.8 + } + ] + }, + + "color": + { + "value": [ 1, 1, 1, 1 ] + }, + + "emitters": + [ + { + "name": "Spark", + + "maxParticles": 110, + "preloading": 110, + + "texturePath": "textures/spark-white.png", + "textureSize": [ 10, 10 ], + + "gravity": [0, -200, 0], + + "spawnRange_system": "PARTICLE_BIRTH", + + "spawnTotal": + { + "interpolation": "LINEAR_SPLINE", + "matchDeathTime": "true", + "timeline": + [ + { + "t": 0.000, + "value": 0 + }, + { + "t": 1, + "value": 50 + } + ] + }, + + "spawnRange": + { + "value": [ 0, 0, 0, 360 ] + }, + + "lifeTime": + { + "min": 1, + "max": 1.98 + }, + + "coords_system": "PARTICLE_BIRTH", + "coords_axis_system": "PARTICLE_BIRTH", + "rotation_system": "PARTICLE_BIRTH", + + "coords": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 0, 0 ] + }, + { + "t": 1.000, + "min": [ 0, 0, 0 ], + "max": [ 50, 0, 0 ] + } + ] + }, + + "rotation": + { + "value": [ 0, 0, 0 ] + }, + + "scale": + { + "value": 1 + }, + + "color": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 1, 1, 1 ] + }, + { + "t": 1.000, + "value": [ 0, 0, 1, 1 ] + }, + { + "t": 1.200, + "value": [ 0, 0, 1, 0 ] + } + ] + } + }, + { + "name": "Spark", + + "maxParticles": 300, + "preloading": 300, + + "texturePath": "textures/spark-white.png", + "textureSize": [ 10, 10 ], + + "hasInertion": "true", + "gravity": [0, -500, 0], + + "spawnRange_system": "PARTICLE_BIRTH", + + "spawnTotal": + { + "interpolation": "DISCRETE", + "matchDeathTime": "true", + "timeline": + [ + { + "t": 0.000, + "value": 0 + }, + { + "t": 2.000, + "value": 300 + } + ] + }, + + "spawnRange": + { + "value": [ 0, 0, 0, 360 ] + }, + + "lifeTime": + { + "min": 1, + "max": 2 + }, + + "coords_system": "PARTICLE_BIRTH", + "coords_axis_system": "PARTICLE_BIRTH", + "rotation_system": "PARTICLE_BIRTH", + + "coords": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 0, 0, 0 ] + }, + { + "t": 1.000, + "min": [ 25, 0, 0 ], + "max": [ 300, 0, 0 ] + } + ] + }, + + "rotation": + { + "value": [ 0, 0, 0 ] + }, + + "scale": + { + "value": 1 + }, + + "color": + { + "interpolation": "LINEAR_SPLINE", + "timeline": + [ + { + "t": 0.000, + "value": [ 1, 1, 0, 1 ] + }, + { + "t": 1.000, + "value": [ 1, 0, 0, 1 ] + }, + { + "t": 1.200, + "value": [ 1, 0, 0, 0 ] + } + ] + } + } + ] + } + ] +} \ No newline at end of file diff --git a/game/gamecode.cpp b/game/gamecode.cpp index c5cec09..80f7a9c 100644 --- a/game/gamecode.cpp +++ b/game/gamecode.cpp @@ -20,7 +20,7 @@ const float CONST_TIMER_LOADING = 150.f; const float CONST_PAUSE_APPEAR_TIME = 150.f; -const float CONST_FINISH_FREEZE_TIME = 1000.f; +const float CONST_FINISH_FREEZE_TIME = 4000.f; // 1000.f const float CONST_FINISHING_TIME = 250.f; const float CONST_BALL_VELOCITY = 200.f; @@ -324,9 +324,7 @@ void TBall::ReflectToLeft() { *SE::Console << "TBall::ReflectToLeft"; - Application->lsparkler.setCoords({Pos(0),Pos(1),0}); - Application->lsparkler.stopSpawn(); - Application->lsparkler.startSpawn(); + Application->hitSpark("left",Pos); if (Velocity(0) > 0.f) { @@ -338,9 +336,7 @@ void TBall::ReflectToRight() { *SE::Console << "TBall::ReflectToRight"; - Application->rsparkler.setCoords({ Pos(0),Pos(1),0 }); - Application->rsparkler.stopSpawn(); - Application->rsparkler.startSpawn(); + Application->hitSpark("right", Pos); if (Velocity(0) < 0.f) { @@ -352,9 +348,7 @@ void TBall::ReflectToUp() { *SE::Console << "TBall::ReflectToUp"; - Application->tsparkler.setCoords({ Pos(0),Pos(1),0 }); - Application->tsparkler.stopSpawn(); - Application->tsparkler.startSpawn(); + Application->hitSpark("up", Pos); if (Velocity(1) < 0.f) { @@ -366,9 +360,7 @@ void TBall::ReflectToDown() { *SE::Console << "TBall::ReflectToDown"; - Application->bsparkler.setCoords({ Pos(0),Pos(1),0 }); - Application->bsparkler.stopSpawn(); - Application->bsparkler.startSpawn(); + Application->hitSpark("down", Pos); if (Velocity(1) > 0.f) { @@ -574,7 +566,7 @@ bool TGameLevel::TapInBackBtnArea(const Vector2f& pos) void TGameLevel::SetFinishFreeze() { *SE::Console << "TGameLevel::SetFinishFreeze"; - StateTimer = CONST_FINISH_FREEZE_TIME; + StateTimer = CONST_FINISH_FREEZE_TIME; // Firework timeline timer LevelState = CONST_LEVELSTATE_FINISH_FREEZE; @@ -858,6 +850,8 @@ void TGameLevel::Draw() iBonus->Draw(); } + Application->EffectsDraw(); + DrawBallInstancingList(); Renderer->PopShader(); @@ -1201,6 +1195,8 @@ void TGameLevel::Update(size_t dt) if (noMoreBlocks && LevelState != CONST_LEVELSTATE_FINISH_FREEZE) { + Application->fireworkEffect(); // Firework start + Application->OpenNextLevel(); Application->MarkSetGameLevelPause(); SetFinishFreeze(); @@ -1695,4 +1691,4 @@ void TGameLevel::TryGoToMenu() { OutScale = 1.f; } -} \ No newline at end of file +} diff --git a/game/gamecode.h b/game/gamecode.h index aad2bb0..89c0f84 100644 --- a/game/gamecode.h +++ b/game/gamecode.h @@ -17,8 +17,8 @@ const int CONST_BRICKSTATE_APPEAR = 0; const float CONST_BRICK_DISAPPEAR_TIME = 200.f; const float CONST_BRICK_APPEAR_TIME = 200.f; -const int CONST_BRICKMATRIX_WIDTH = 12; -const int CONST_BRICKMATRIX_HEIGHT = 13; +const int CONST_BRICKMATRIX_WIDTH = 12; // 12 +const int CONST_BRICKMATRIX_HEIGHT = 13; // 13 const float CONST_BRICK_WIDTH = 38.65f; const float CONST_BRICK_HEIGHT = 0.5f*CONST_BRICK_WIDTH; const float CONST_BRICK_SHIFT_X = 8.2f; diff --git a/game/main_code.cpp b/game/main_code.cpp index 981b02a..c643d1b 100644 --- a/game/main_code.cpp +++ b/game/main_code.cpp @@ -338,7 +338,6 @@ void TMyApplication::InnerDraw() OnDrawSignal(); - EffectsDraw(); } @@ -582,6 +581,11 @@ void TMyApplication::EffectsInit() { boost::property_tree::json_parser::read_json(ST::PathToResources + effectJSON, JSONsource); bsparkler.parse(JSONsource); bsparkler.load(); + // Level finish + effectJSON = JSONconfig.get("lvlFinish"); + boost::property_tree::json_parser::read_json(ST::PathToResources + effectJSON, JSONsource); + lvlFirework.parse(JSONsource); + lvlFirework.load(); float width = Renderer->GetScreenWidth(); float height = Renderer->GetScreenHeight(); @@ -590,6 +594,7 @@ void TMyApplication::EffectsInit() { rsparkler.setCoords({ width / 2, height / 2, 0 }); tsparkler.setCoords({ width / 2, height / 2, 0 }); bsparkler.setCoords({ width / 2, height / 2, 0 }); + lvlFirework.setCoords({ width / 2, 0, 0 }); } void TMyApplication::EffectsUpdate(size_t dt) { @@ -597,10 +602,41 @@ void TMyApplication::EffectsUpdate(size_t dt) { rsparkler.update(dt / 1000.f); tsparkler.update(dt / 1000.f); bsparkler.update(dt / 1000.f); + lvlFirework.update(dt / 1000.f); } void TMyApplication::EffectsDraw() { lsparkler.draw(); rsparkler.draw(); tsparkler.draw(); bsparkler.draw(); + lvlFirework.draw(); +} + +void TMyApplication::hitSpark(std::string direct,Vector2f Pos) { + if (direct == "left") { + lsparkler.setCoords({ Pos(0),Pos(1),0 }); + lsparkler.stopSpawn(); + lsparkler.startSpawn(); + + } + if (direct == "right") { + rsparkler.setCoords({ Pos(0),Pos(1),0 }); + rsparkler.stopSpawn(); + rsparkler.startSpawn(); + } + if (direct == "up") { + tsparkler.setCoords({ Pos(0),Pos(1),0 }); + tsparkler.stopSpawn(); + tsparkler.startSpawn(); + } + if (direct == "down") { + bsparkler.setCoords({ Pos(0),Pos(1),0 }); + bsparkler.stopSpawn(); + bsparkler.startSpawn(); + } +} + +void TMyApplication::fireworkEffect() { + lvlFirework.stopSpawn(); + lvlFirework.startSpawn(); } \ No newline at end of file diff --git a/game/main_code.h b/game/main_code.h index 19e6256..cacab24 100644 --- a/game/main_code.h +++ b/game/main_code.h @@ -92,6 +92,9 @@ protected: int levelScreenHeight; float levelScreenRatio = 1.6; + ParticleEffect lsparkler, rsparkler, tsparkler, bsparkler; // Different directed reflection effects + ParticleEffect lvlFirework; // Level finished effect + TGameMenu Menu; TGameLevel GameLevel; TGameCredits GameCredits; @@ -124,8 +127,6 @@ protected: public: bool Loaded; - ParticleEffect lsparkler, rsparkler, tsparkler, bsparkler; // Diffrent directed reflection effects - TMyApplication() : TApplication(), Loaded(false), Inited(false) { } virtual void InnerInit(); @@ -142,9 +143,15 @@ public: void GoFromCreditsToMenu(); void MarkSetGameLevelPause(); void MarkReleaseGameLevelPause(); + + // Effects ------- void EffectsUpdate(size_t dt); void EffectsDraw(); + void fireworkEffect(); + void hitSpark(std::string direct, Vector2f Pos); + // Effects ------- + void OpenNextLevel(); bool IsLoaded(); @@ -171,10 +178,4 @@ public: extern TMyApplication* Application; -class TMySalmonRenderer : public TSalmonRenderer -{ -public: - void DrawRect(const Vector2f& p1, const Vector2f& p2); -}; - #endif diff --git a/game/menucode.cpp b/game/menucode.cpp index 675136e..c4c6723 100644 --- a/game/menucode.cpp +++ b/game/menucode.cpp @@ -172,11 +172,6 @@ void TGameMenu::OnTapUp(Vector2f pos) { *SE::Console << "TGameMenu::OnTapUp"; HoldToTap = false; - - std::fstream tapLog; - tapLog.open("tapLog.txt", std::ios::app); - tapLog << "Tapped up:: " << pos(0) << " " << pos(1) << endl; - tapLog.close(); if (SelectedGame != -1) { diff --git a/windows/DoubleHitBalls-win/DoubleHitBalls-win/DoubleHitBalls-win.vcxproj b/windows/DoubleHitBalls-win/DoubleHitBalls-win/DoubleHitBalls-win.vcxproj index 680e589..1b89c36 100755 --- a/windows/DoubleHitBalls-win/DoubleHitBalls-win/DoubleHitBalls-win.vcxproj +++ b/windows/DoubleHitBalls-win/DoubleHitBalls-win/DoubleHitBalls-win.vcxproj @@ -152,6 +152,7 @@ WIN32;NDEBUG;_WINDOWS;TARGET_WIN32;_WIN32_WINNT=0x0501;WIN32_LEAN_AND_MEAN;EIGEN_DONT_ALIGN_STATICALLY;%(PreprocessorDefinitions) ../../../game;../../../../tes-engine;../../../../eigen;../../../../boost_1_63_0/;../../../../boost_1_63_0/bin.v2/libs/system/build/msvc-14.0/release/address-model-64/link-static/threading-multi;../../../../boost_1_63_0/bin.v2/libs/date_time/build/msvc-14.0/release/address-model-64/link-static/threading-multi/;../../../../boost_1_63_0/bin.v2/libs/regex/build/msvc-14.0/release/address-model-64/link-static/threading-multi;../../../../boost_1_63_0/bin.v2/libs/thread/build/msvc-14.0/release/address-model-64/link-static/threading-multi;../../../../boost_1_63_0/bin.v2/libs/chrono/build/msvc-14.0/release/address-model-64/link-static/threading-multi;../../../../boost_1_63_0/bin.v2/libs/signals/build/msvc-14.0/release/address-model-64/link-static/threading-multi;../../../../libs/boost-gil-extension;../../../../libs/jpeg-9;../../../../libs/jpeg-9/vc10;../../../../libs/lpng1510 4503 + MultiThreadedDLL Windows diff --git a/windows/DoubleHitBalls-win/DoubleHitBalls-win/tapLog.txt b/windows/DoubleHitBalls-win/DoubleHitBalls-win/tapLog.txt index 5ec9606..007102a 100755 --- a/windows/DoubleHitBalls-win/DoubleHitBalls-win/tapLog.txt +++ b/windows/DoubleHitBalls-win/DoubleHitBalls-win/tapLog.txt @@ -101,3 +101,79 @@ Tapped up:: 259 95 Tapped up:: 302 131 Tapped up:: 215 153 Tapped up:: 326 138 +Tapped up:: 325 206 +Tapped up:: 358 136 +Tapped up:: 335 117 +Tapped up:: 257 129 +Tapped up:: 367 145 +Tapped up:: 770 480 +Tapped up:: 310 159 +Tapped up:: 294 143 +Tapped up:: 381 137 +Tapped up:: 387 178 +Tapped up:: 283 120 +Tapped up:: 306 157 +Tapped up:: 392 296 +Tapped up:: 350 190 +Tapped up:: 296 193 +Tapped up:: 314 121 +Tapped up:: 303 132 +Tapped up:: 192 121 +Tapped up:: 282 142 +Tapped up:: 357 186 +Tapped up:: 378 146 +Tapped up:: 308 99 +Tapped up:: 278 142 +Tapped up:: 284 230 +Tapped up:: 199 111 +Tapped up:: 250 85 +Tapped up:: 370 117 +Tapped up:: 262 140 +Tapped up:: 266 150 +Tapped up:: 326 169 +Tapped up:: 383 163 +Tapped up:: 278 122 +Tapped up:: 337 146 +Tapped up:: 318 157 +Tapped up:: 290 133 +Tapped up:: 336 189 +Tapped up:: 378 117 +Tapped up:: 288 137 +Tapped up:: 287 99 +Tapped up:: 359 149 +Tapped up:: 303 170 +Tapped up:: 306 147 +Tapped up:: 244 150 +Tapped up:: 338 145 +Tapped up:: 319 156 +Tapped up:: 249 152 +Tapped up:: 284 179 +Tapped up:: 371 200 +Tapped up:: 375 153 +Tapped up:: 226 135 +Tapped up:: 306 142 +Tapped up:: 335 127 +Tapped up:: 372 118 +Tapped up:: 370 131 +Tapped up:: 236 136 +Tapped up:: 361 162 +Tapped up:: 330 116 +Tapped up:: 297 176 +Tapped up:: 355 166 +Tapped up:: 274 128 +Tapped up:: 313 148 +Tapped up:: 290 178 +Tapped up:: 463 79 +Tapped up:: 473 102 +Tapped up:: 680 332 +Tapped up:: 313 144 +Tapped up:: 297 93 +Tapped up:: 356 109 +Tapped up:: 213 197 +Tapped up:: 260 148 +Tapped up:: 310 130 +Tapped up:: 296 136 +Tapped up:: 394 181 +Tapped up:: 340 157 +Tapped up:: 322 127 +Tapped up:: 278 110