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+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Document
WHERE python >nul 2>&1 || GOTO :NO_PYTHON
cd asset_src
call python .\tiled2cpp.py || GOTO :PYTHON_ERROR
@@ -240,7 +242,7 @@ exit /b 0
:PYTHON_ERROR
ECHO Warning: tiled2cpp.py failed. Make sure you installed requirements.txt
ECHO Warning: Continuing the build without generating code from tiled
-exit /b 0
+exit /b 0
WHERE python >nul 2>&1 || GOTO :NO_PYTHON
cd asset_src
call python .\tiled2cpp.py || GOTO :PYTHON_ERROR
@@ -252,7 +254,7 @@ exit /b 0
:PYTHON_ERROR
ECHO Warning: tiled2cpp.py failed. Make sure you installed requirements.txt
ECHO Warning: Continuing the build without generating code from tiled
-exit /b 0
+exit /b 0
WHERE python >nul 2>&1 || GOTO :NO_PYTHON
cd asset_src
call python .\tiled2cpp.py || GOTO :PYTHON_ERROR
@@ -264,7 +266,7 @@ exit /b 0
:PYTHON_ERROR
ECHO Warning: tiled2cpp.py failed. Make sure you installed requirements.txt
ECHO Warning: Continuing the build without generating code from tiled
-exit /b 0
+exit /b 0
WHERE python >nul 2>&1 || GOTO :NO_PYTHON
cd asset_src
call python .\tiled2cpp.py || GOTO :PYTHON_ERROR
@@ -276,168 +278,168 @@ exit /b 0
:PYTHON_ERROR
ECHO Warning: tiled2cpp.py failed. Make sure you installed requirements.txt
ECHO Warning: Continuing the build without generating code from tiled
-exit /b 0
- $(SolutionDir)/obj/last_tiled_generation
- $(SolutionDir)/obj/last_tiled_generation
- $(SolutionDir)/obj/last_tiled_generation
- $(SolutionDir)/obj/last_tiled_generation
- Generating code from Tiled map
- Generating code from Tiled map
- Generating code from Tiled map
- Generating code from Tiled map
- $(SolutionDir)/asset_src/tiled2cpp.py
- $(SolutionDir)/asset_src/tiled2cpp.py
- $(SolutionDir)/asset_src/tiled2cpp.py
- $(SolutionDir)/asset_src/tiled2cpp.py
-
-
-
-
-
-
-
-
-
-
-
- 15.0
- {DD692F54-6DEA-4A3F-A5C9-D6C1D7E488A7}
- Gaem
- 10.0
-
-
-
- true
- v143
-
-
- true
- v143
-
-
- v143
-
-
- v143
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(SolutionDir)\bin\
- $(SolutionDir)\bin\
- WindowsLocalDebugger
- $(SolutionDir)\obj\$(Platform)\$(Configuration)\
-
-
- $(SolutionDir)\bin\
- $(SolutionDir)\bin\
- WindowsLocalDebugger
- $(SolutionDir)\obj\$(Platform)\$(Configuration)\
-
-
- $(SolutionDir)\bin\
- $(SolutionDir)\obj\$(Platform)\$(Configuration)\
-
-
- $(SolutionDir)\bin\
- $(SolutionDir)\obj\$(Platform)\$(Configuration)\
-
-
-
- Level3
- Disabled
- true
- true
- $(SolutionDir)\vendor\imgui;$(SolutionDir)\vendor\SDL2\include;$(SolutionDir)\vendor\imgui_impl;$(SolutionDir)\vendor\SDL_gpu\include;$(SolutionDir)\vendor\glew;$(SolutionDir)\vendor\stb_image;$(SolutionDir)\vendor\tweeny;$(SolutionDir)\vendor\magic_enum;$(SolutionDir)\engine;$(SolutionDir)\generated;%(AdditionalIncludeDirectories)
- stdcpp17
- 4244;4267
- _IMGUI;SDL_MAIN_HANDLED;GLEW_STATIC;SDL_GPU_DISABLE_GLES;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
- ProgramDatabase
- MultiThreadedDebugDLL
-
-
- $(SolutionDir)\vendor\SDL2\lib\x86;%(AdditionalLibraryDirectories)
- opengl32.lib;SDL2main.lib;SDL2.lib;SDL2_ttf.lib;SDL2_mixer.lib;%(AdditionalDependencies)
-
-
-
-
- Level3
- Disabled
- true
- true
- $(SolutionDir)\vendor\imgui;$(SolutionDir)\vendor\SDL2\include;$(SolutionDir)\vendor\imgui_impl;$(SolutionDir)\vendor\SDL_gpu\include;$(SolutionDir)\vendor\glew;$(SolutionDir)\vendor\stb_image;$(SolutionDir)\vendor\tweeny;$(SolutionDir)\vendor\magic_enum;$(SolutionDir)\engine;$(SolutionDir)\generated;%(AdditionalIncludeDirectories)
- stdcpp17
- 4244;4267
- _IMGUI;SDL_MAIN_HANDLED;GLEW_STATIC;SDL_GPU_DISABLE_GLES;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
- true
- EnableFastChecks
- MultiThreadedDebugDLL
-
-
- $(SolutionDir)\vendor\SDL2\lib\x64;%(AdditionalLibraryDirectories)
- opengl32.lib;SDL2main.lib;SDL2.lib;SDL2_ttf.lib;SDL2_mixer.lib;%(AdditionalDependencies)
-
-
-
-
- Level3
- MaxSpeed
- true
- true
- true
- true
- $(SolutionDir)\vendor\imgui;$(SolutionDir)\vendor\SDL2\include;$(SolutionDir)\vendor\imgui_impl;$(SolutionDir)\vendor\SDL_gpu\include;$(SolutionDir)\vendor\glew;$(SolutionDir)\vendor\stb_image;$(SolutionDir)\vendor\tweeny;$(SolutionDir)\vendor\magic_enum;$(SolutionDir)\engine;$(SolutionDir)\generated;%(AdditionalIncludeDirectories)
- stdcpp17
- 4244;4267
- GLEW_STATIC;SDL_GPU_DISABLE_GLES;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
-
-
- true
- true
- $(SolutionDir)\vendor\SDL2\lib\x86;%(AdditionalLibraryDirectories)
- opengl32.lib;SDL2main.lib;SDL2.lib;SDL2_ttf.lib;SDL2_mixer.lib;%(AdditionalDependencies)
- Windows
-
-
-
-
- Level3
- MaxSpeed
- true
- true
- true
- true
- $(SolutionDir)\vendor\imgui;$(SolutionDir)\vendor\SDL2\include;$(SolutionDir)\vendor\imgui_impl;$(SolutionDir)\vendor\SDL_gpu\include;$(SolutionDir)\vendor\glew;$(SolutionDir)\vendor\stb_image;$(SolutionDir)\vendor\tweeny;$(SolutionDir)\vendor\magic_enum;$(SolutionDir)\engine;$(SolutionDir)\generated;%(AdditionalIncludeDirectories)
- stdcpp17
- 4244;4267
- GLEW_STATIC;SDL_GPU_DISABLE_GLES;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
-
-
- true
- true
- $(SolutionDir)\vendor\SDL2\lib\x64;%(AdditionalLibraryDirectories)
- opengl32.lib;SDL2main.lib;SDL2.lib;SDL2_ttf.lib;SDL2_mixer.lib;%(AdditionalDependencies)
- Windows
-
-
-
-
-
+exit /b 0
+ $(SolutionDir)/obj/last_tiled_generation
+ $(SolutionDir)/obj/last_tiled_generation
+ $(SolutionDir)/obj/last_tiled_generation
+ $(SolutionDir)/obj/last_tiled_generation
+ Generating code from Tiled map
+ Generating code from Tiled map
+ Generating code from Tiled map
+ Generating code from Tiled map
+ $(SolutionDir)/asset_src/tiled2cpp.py
+ $(SolutionDir)/asset_src/tiled2cpp.py
+ $(SolutionDir)/asset_src/tiled2cpp.py
+ $(SolutionDir)/asset_src/tiled2cpp.py
+
+
+
+
+
+
+
+
+
+
+
+ 15.0
+ {DD692F54-6DEA-4A3F-A5C9-D6C1D7E488A7}
+ Gaem
+ 10.0
+
+
+
+ true
+ v143
+
+
+ true
+ v143
+
+
+ v143
+
+
+ v143
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(SolutionDir)\bin\
+ $(SolutionDir)\bin\
+ WindowsLocalDebugger
+ $(SolutionDir)\obj\$(Platform)\$(Configuration)\
+
+
+ $(SolutionDir)\bin\
+ $(SolutionDir)\bin\
+ WindowsLocalDebugger
+ $(SolutionDir)\obj\$(Platform)\$(Configuration)\
+
+
+ $(SolutionDir)\bin\
+ $(SolutionDir)\obj\$(Platform)\$(Configuration)\
+
+
+ $(SolutionDir)\bin\
+ $(SolutionDir)\obj\$(Platform)\$(Configuration)\
+
+
+
+ Level3
+ Disabled
+ true
+ true
+ $(SolutionDir)\vendor\imgui;$(SolutionDir)\vendor\SDL2\include;$(SolutionDir)\vendor\imgui_impl;$(SolutionDir)\vendor\SDL_gpu\include;$(SolutionDir)\vendor\glew;$(SolutionDir)\vendor\stb_image;$(SolutionDir)\vendor\tweeny;$(SolutionDir)\vendor\magic_enum;$(SolutionDir)\engine;$(SolutionDir)\generated;%(AdditionalIncludeDirectories)
+ stdcpp17
+ 4244;4267
+ _IMGUI;SDL_MAIN_HANDLED;GLEW_STATIC;SDL_GPU_DISABLE_GLES;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+ ProgramDatabase
+ MultiThreadedDebugDLL
+
+
+ $(SolutionDir)\vendor\SDL2\lib\x86;%(AdditionalLibraryDirectories)
+ opengl32.lib;SDL2main.lib;SDL2.lib;SDL2_ttf.lib;SDL2_mixer.lib;%(AdditionalDependencies)
+
+
+
+
+ Level3
+ Disabled
+ true
+ true
+ $(SolutionDir)\vendor\imgui;$(SolutionDir)\vendor\SDL2\include;$(SolutionDir)\vendor\imgui_impl;$(SolutionDir)\vendor\SDL_gpu\include;$(SolutionDir)\vendor\glew;$(SolutionDir)\vendor\stb_image;$(SolutionDir)\vendor\tweeny;$(SolutionDir)\vendor\magic_enum;$(SolutionDir)\engine;$(SolutionDir)\generated;%(AdditionalIncludeDirectories)
+ stdcpp17
+ 4244;4267
+ _IMGUI;SDL_MAIN_HANDLED;GLEW_STATIC;SDL_GPU_DISABLE_GLES;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+ true
+ EnableFastChecks
+ MultiThreadedDebugDLL
+
+
+ $(SolutionDir)\vendor\SDL2\lib\x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;SDL2main.lib;SDL2.lib;SDL2_ttf.lib;SDL2_mixer.lib;%(AdditionalDependencies)
+
+
+
+
+ Level3
+ MaxSpeed
+ true
+ true
+ true
+ true
+ $(SolutionDir)\vendor\imgui;$(SolutionDir)\vendor\SDL2\include;$(SolutionDir)\vendor\imgui_impl;$(SolutionDir)\vendor\SDL_gpu\include;$(SolutionDir)\vendor\glew;$(SolutionDir)\vendor\stb_image;$(SolutionDir)\vendor\tweeny;$(SolutionDir)\vendor\magic_enum;$(SolutionDir)\engine;$(SolutionDir)\generated;%(AdditionalIncludeDirectories)
+ stdcpp17
+ 4244;4267
+ GLEW_STATIC;SDL_GPU_DISABLE_GLES;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+
+
+ true
+ true
+ $(SolutionDir)\vendor\SDL2\lib\x86;%(AdditionalLibraryDirectories)
+ opengl32.lib;SDL2main.lib;SDL2.lib;SDL2_ttf.lib;SDL2_mixer.lib;%(AdditionalDependencies)
+ Windows
+
+
+
+
+ Level3
+ MaxSpeed
+ true
+ true
+ true
+ true
+ $(SolutionDir)\vendor\imgui;$(SolutionDir)\vendor\SDL2\include;$(SolutionDir)\vendor\imgui_impl;$(SolutionDir)\vendor\SDL_gpu\include;$(SolutionDir)\vendor\glew;$(SolutionDir)\vendor\stb_image;$(SolutionDir)\vendor\tweeny;$(SolutionDir)\vendor\magic_enum;$(SolutionDir)\engine;$(SolutionDir)\generated;%(AdditionalIncludeDirectories)
+ stdcpp17
+ 4244;4267
+ GLEW_STATIC;SDL_GPU_DISABLE_GLES;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
+
+
+ true
+ true
+ $(SolutionDir)\vendor\SDL2\lib\x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;SDL2main.lib;SDL2.lib;SDL2_ttf.lib;SDL2_mixer.lib;%(AdditionalDependencies)
+ Windows
+
+
+
+
+
\ No newline at end of file
diff --git a/src/scene_entrypoint.h b/src/scene_entrypoint.h
index 0adb859c..f2fdafa8 100644
--- a/src/scene_entrypoint.h
+++ b/src/scene_entrypoint.h
@@ -2,5 +2,7 @@
#include "scene_hellcross.h" // HellCrossScene
#include "scene_main.h" // MainScene
+#include "scene_intro.h" // IntroScene
+
+typedef IntroScene EntryPointScene;
-typedef HellCrossScene EntryPointScene;
diff --git a/src/scene_intro.cpp b/src/scene_intro.cpp
new file mode 100644
index 00000000..879628d6
--- /dev/null
+++ b/src/scene_intro.cpp
@@ -0,0 +1,96 @@
+#pragma once
+
+#include "scene_intro.h"
+
+#include "scene_manager.h"
+#include "scene_entrypoint.h"
+#include "lava.h"
+#include "text.h"
+#include "bat.h"
+#include "input.h"
+#include "assets.h"
+#include "assets_sounds.h"
+#include "parallax.h"
+#include "screen.h"
+#include "window.h"
+#include "drawall.h"
+
+IntroScene::IntroScene()
+ : bounds(0, 0, Window::GAME_WIDTH, Window::GAME_HEIGHT)
+ , lava(BoxBounds(0, Window::GAME_HEIGHT - 20, Window::GAME_WIDTH, 200))
+ , parallax(bounds, Assets::forestParallaxTextures, 0.f, 1.f, -142.1f)
+ , titleText(Assets::font_30, Assets::font_30_outline)
+ , startText(Assets::font_30)
+ , creditsText(Assets::font_30)
+{
+ titleText.SetFillColor(0, 0, 0);
+ titleText.SetOutlineColor(255, 255, 0);
+ titleText.SetString("Recoil Rider");
+
+ startText.SetFillColor(255, 255, 255);
+ startText.SetString("- Press Start -");
+
+ creditsText.SetFillColor(255, 255, 255);
+ creditsText.SetString("A game by:\n\nAlbert Vaca Cintora");
+}
+
+void IntroScene::EnterScene()
+{
+ MusicPlayer::SetVolume(0.3f);
+ MusicPlayer::Ensure(Assets::musicHellcross);
+ BoxBounds batBounds = BoxBounds(0, 0, Window::GAME_WIDTH, Window::GAME_HEIGHT - 28);
+ new Bat(Rand::VecInRange(batBounds), false, true, &batBounds);
+}
+
+void IntroScene::ExitScene()
+{
+ Bat::DeleteAll();
+}
+
+void IntroScene::Update(float dt)
+{
+ MusicPlayer::ToggleMusicWithM();
+ if (Input::IsJustPressedAnyPlayer(GameKeys::START)) {
+ if (Keyboard::IsKeyPressed(SDL_SCANCODE_RSHIFT) && Keyboard::IsKeyPressed(SDL_SCANCODE_LSHIFT)) {
+ SceneManager::ChangeScene(new MainScene());
+ }
+ else {
+ SceneManager::ChangeScene(new HellCrossScene());
+ }
+ }
+
+ for (Lava* l : Lava::GetAll()) {
+ l->Update(dt);
+ }
+ for (Bat* e : Bat::GetAll()) {
+ e->Update(dt);
+ }
+}
+
+void IntroScene::Draw()
+{
+ Window::Clear(31, 36, 50);
+
+ DrawAllInOrder(
+ ¶llax,
+ Bat::GetAll(),
+ Lava::GetAll()
+ );
+
+ Window::Draw(titleText, vec(Camera::Center().x, Camera::Center().y - 30))
+ .withOrigin(titleText.Size() / 2)
+ .withScale(0.8f)
+ .withRotationDegs(sin(mainClock)*15);
+
+ bool blink = static_cast(std::floor(mainClock / 0.5f)) % 2 == 0;
+ if (blink) {
+ Window::Draw(startText, vec(Camera::Center().x, Camera::Center().y + 60))
+ .withOrigin(startText.Size() / 2)
+ .withScale(0.3f);
+ }
+
+ /*
+ Window::Draw(creditsText, vec(15, 205))
+ .withScale(0.3f);
+ */
+}
diff --git a/src/scene_intro.h b/src/scene_intro.h
new file mode 100644
index 00000000..9ab737e4
--- /dev/null
+++ b/src/scene_intro.h
@@ -0,0 +1,24 @@
+#pragma once
+
+#include "scene.h"
+#include "lava.h"
+#include "text.h"
+#include "parallax.h"
+
+struct IntroScene : Scene
+{
+ BoxBounds bounds;
+
+ Lava lava;
+ Parallax parallax;
+
+ Text titleText;
+ Text startText;
+ Text creditsText;
+
+ IntroScene();
+ void EnterScene() override;
+ void ExitScene() override;
+ void Update(float dt) override;
+ void Draw() override;
+};