diff --git a/assets/effects/magic-stars-firework.json b/assets/effects/magic-stars-firework.json index 21fb683..1e9fb74 100755 --- a/assets/effects/magic-stars-firework.json +++ b/assets/effects/magic-stars-firework.json @@ -4,7 +4,7 @@ { "preloading": 4, - "texturePath": "textures/magic-star.png", + "texturePath": "", "textureSize": [ 22.625, 12.5 ], "hasInertion": "false", @@ -24,7 +24,7 @@ }, { "t": 1, - "value": 4 + "value": 1 } ] }, @@ -90,7 +90,7 @@ "maxParticles": 110, "preloading": 110, - "texturePath": "textures/spark-white.png", + "texturePath": "", "textureSize": [ 10, 10 ], "gravity": [0, -200, 0], @@ -109,7 +109,7 @@ }, { "t": 1, - "value": 50 + "value": 0 } ] }, @@ -159,6 +159,7 @@ "color": { "interpolation": "LINEAR_SPLINE", + "matchDeathTime": "true", "timeline": [ { @@ -202,7 +203,7 @@ }, { "t": 2.000, - "value": 300 + "value": 1 } ] }, @@ -251,6 +252,7 @@ "color": { + "matchDeathTime": "true", "interpolation": "LINEAR_SPLINE", "timeline": [ @@ -264,7 +266,7 @@ }, { "t": 1.200, - "value": [ 1, 0, 0, 0 ] + "value": [ 1, 0, 0, 1 ] } ] } diff --git a/game/gamecode.cpp b/game/gamecode.cpp index dc4734c..1bd7127 100755 --- a/game/gamecode.cpp +++ b/game/gamecode.cpp @@ -849,6 +849,8 @@ void TGameLevel::Draw() void TGameLevel::InnerDraw(int screenWidth, int screenHeight, int matrixWidth, int matrixHeight, bool blackAndWhite) { + Application->EffectsDraw(); + return; // Scaling math float tSW = Application->GetGameLevelScreenWidth(); // Screen Width float tSH = Application->GetGameLevelScreenHeight(); // Screen Height @@ -1023,6 +1025,8 @@ void TGameLevel::InnerDraw(int screenWidth, int screenHeight, int matrixWidth, i DrawBallInstancingList(blackAndWhite); + Application->EffectsDraw(); + Renderer->PopMatrix(); @@ -1032,8 +1036,6 @@ void TGameLevel::InnerDraw(int screenWidth, int screenHeight, int matrixWidth, i { iBonus->Draw(); } - - Application->EffectsDraw(); Renderer->PopShader(); @@ -1823,6 +1825,11 @@ void TGameLevel::OnTapDown(Vector2f pos) float xPos = pos(0) - xOffset; float yPos = pos(1) - yOffset; + Application->hitSpark("left", { xPos, yPos }); + Application->fireworkEffect(); + + return; + if (LevelState == CONST_LEVELSTATE_STANDBY) { if (TapInBackBtnArea({ xPos, yPos })) diff --git a/game/main_code.cpp b/game/main_code.cpp index 3f4157b..b64d77d 100755 --- a/game/main_code.cpp +++ b/game/main_code.cpp @@ -142,8 +142,8 @@ void TMyApplication::InnerInit() #ifdef TARGET_WIN32 #ifdef NDEBUG - ST::PathToResources = "resources/"; - //ST::PathToResources = "../../../assets/"; + //ST::PathToResources = "resources/"; + ST::PathToResources = "../../../assets/"; #else ST::PathToResources = "../../../assets/"; #endif @@ -855,26 +855,26 @@ void TMyApplication::EffectsInit() { std::string effectJSON; // LEFT - effectJSON = JSONconfig.get("lefteffect"); - //boost::property_tree::json_parser::read_json(ST::PathToResources + effectJSON, JSONsource); - JSONsource = SE::ReadJsonFile(ST::PathToResources + effectJSON); - lsparkler.parse(JSONsource); // parse JSON - lsparkler.load(); // load textures - // RIGHT - effectJSON = JSONconfig.get("righteffect"); - JSONsource = SE::ReadJsonFile(ST::PathToResources + effectJSON); - rsparkler.parse(JSONsource); - rsparkler.load(); - // TOP - effectJSON = JSONconfig.get("topeffect"); - JSONsource = SE::ReadJsonFile(ST::PathToResources + effectJSON); - tsparkler.parse(JSONsource); - tsparkler.load(); - // BOTTOM - effectJSON = JSONconfig.get("boteffect"); - JSONsource = SE::ReadJsonFile(ST::PathToResources + effectJSON); - bsparkler.parse(JSONsource); - bsparkler.load(); + //effectJSON = JSONconfig.get("lefteffect"); + ////boost::property_tree::json_parser::read_json(ST::PathToResources + effectJSON, JSONsource); + // JSONsource = SE::ReadJsonFile(ST::PathToResources + effectJSON); + //lsparkler.parse(JSONsource); // parse JSON + //lsparkler.load(); // load textures + //// RIGHT + //effectJSON = JSONconfig.get("righteffect"); + // JSONsource = SE::ReadJsonFile(ST::PathToResources + effectJSON); + //rsparkler.parse(JSONsource); + //rsparkler.load(); + //// TOP + //effectJSON = JSONconfig.get("topeffect"); + // JSONsource = SE::ReadJsonFile(ST::PathToResources + effectJSON); + //tsparkler.parse(JSONsource); + //tsparkler.load(); + //// BOTTOM + //effectJSON = JSONconfig.get("boteffect"); + // JSONsource = SE::ReadJsonFile(ST::PathToResources + effectJSON); + //bsparkler.parse(JSONsource); + //bsparkler.load(); // Level finish effectJSON = JSONconfig.get("lvlFinish"); JSONsource = SE::ReadJsonFile(ST::PathToResources + effectJSON); @@ -892,10 +892,10 @@ void TMyApplication::EffectsInit() { } void TMyApplication::EffectsUpdate(size_t dt) { - lsparkler.update(dt / 1000.f); - rsparkler.update(dt / 1000.f); - tsparkler.update(dt / 1000.f); - bsparkler.update(dt / 1000.f); + //lsparkler.update(dt / 1000.f); + //rsparkler.update(dt / 1000.f); + //tsparkler.update(dt / 1000.f); + //bsparkler.update(dt / 1000.f); lvlFirework.update(dt / 1000.f); } void TMyApplication::EffectsDraw() { @@ -927,10 +927,10 @@ void TMyApplication::EffectsDraw() { glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - lsparkler.draw(); - rsparkler.draw(); - tsparkler.draw(); - bsparkler.draw(); + //lsparkler.draw(); + //rsparkler.draw(); + //tsparkler.draw(); + //bsparkler.draw(); lvlFirework.draw(); Renderer->PopMatrix(); diff --git a/windows/DoubleHitBalls-win/DoubleHitBalls-win/DoubleHitBalls-win.vcxproj b/windows/DoubleHitBalls-win/DoubleHitBalls-win/DoubleHitBalls-win.vcxproj index 35c00b3..4b1de9b 100755 --- a/windows/DoubleHitBalls-win/DoubleHitBalls-win/DoubleHitBalls-win.vcxproj +++ b/windows/DoubleHitBalls-win/DoubleHitBalls-win/DoubleHitBalls-win.vcxproj @@ -110,7 +110,7 @@ Level3 Disabled - TARGET_WIN32;DEBUG;_WIN32_WINNT=0x0501;EIGEN_DONT_ALIGN_STATICALLY;_WINDOWS;WIN32;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) + TARGET_WIN32;DEBUG;_WIN32_WINNT=0x0501;_DISABLE_EXTENDED_ALIGNED_STORAGE;EIGEN_DONT_ALIGN_STATICALLY;_WINDOWS;WIN32;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) ../../../game;../../../../tes-engine;../../../../../boost_1_67_0;../../../../eigen;../../../../boost_1_67_0;../../../../boost_1_67_0/bin.v2/libs/system/build/msvc-14.1/debug/address-model-64/link-static/threading-multi;../../../../boost_1_67_0/bin.v2/libs/date_time/build/msvc-14.1/debug/address-model-64/link-static/threading-multi/;../../../../boost_1_67_0/bin.v2/libs/regex/build/msvc-14.1/debug/address-model-64/link-static/threading-multi;../../../../boost_1_67_0/bin.v2/libs/thread/build/msvc-14.1/debug/address-model-64/link-static/threading-multi;../../../../boost_1_67_0/bin.v2/libs/chrono/build/msvc-14.1/debug/address-model-64/link-static/threading-multi;../../../../boost_1_67_0/bin.v2/libs/signals/build/msvc-14.1/debug/address-model-64/link-static/threading-multi;../../../../libs/boost-gil-extension;../../../../libs/jpeg-9;../../../../libs/jpeg-9/vc10;../../../../libs/lpng1510 4503 @@ -150,7 +150,7 @@ MaxSpeed true true - WIN32;NDEBUG;_WINDOWS;TARGET_WIN32;_WIN32_WINNT=0x0501;WIN32_LEAN_AND_MEAN;EIGEN_DONT_ALIGN_STATICALLY;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;TARGET_WIN32;_WIN32_WINNT=0x0501;WIN32_LEAN_AND_MEAN;_DISABLE_EXTENDED_ALIGNED_STORAGE;EIGEN_DONT_ALIGN_STATICALLY;EIGEN_DONT_VECTORIZE;EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT;%(PreprocessorDefinitions) ../../../game;../../../../tes-engine;../../../../eigen;../../../../boost_1_67_0/;../../../../libs/boost-gil-extension;../../../../libs/jpeg-9;../../../../libs/jpeg-9/vc10;../../../../libs/lpng1510 4503 MultiThreadedDLL