Merging in engine files
18
.gitignore
vendored
@ -1,3 +1,13 @@
|
|||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
# ---> KDevelop4
|
||||||
|
#*.kdev4
|
||||||
|
#.kdev4/
|
||||||
|
|
||||||
|
# ---> build artifacts
|
||||||
|
build/*
|
||||||
|
|
||||||
|
>>>>>>> master
|
||||||
# ---> C++
|
# ---> C++
|
||||||
# Prerequisites
|
# Prerequisites
|
||||||
*.d
|
*.d
|
||||||
@ -44,7 +54,10 @@
|
|||||||
|
|
||||||
# Linker output
|
# Linker output
|
||||||
*.ilk
|
*.ilk
|
||||||
|
<<<<<<< HEAD
|
||||||
*.map
|
*.map
|
||||||
|
=======
|
||||||
|
>>>>>>> master
|
||||||
*.exp
|
*.exp
|
||||||
|
|
||||||
# Precompiled Headers
|
# Precompiled Headers
|
||||||
@ -86,6 +99,7 @@ Module.symvers
|
|||||||
Mkfile.old
|
Mkfile.old
|
||||||
dkms.conf
|
dkms.conf
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
# ---> CMake
|
# ---> CMake
|
||||||
CMakeLists.txt.user
|
CMakeLists.txt.user
|
||||||
CMakeCache.txt
|
CMakeCache.txt
|
||||||
@ -98,4 +112,8 @@ install_manifest.txt
|
|||||||
compile_commands.json
|
compile_commands.json
|
||||||
CTestTestfile.cmake
|
CTestTestfile.cmake
|
||||||
_deps
|
_deps
|
||||||
|
=======
|
||||||
|
# CMake artifacts
|
||||||
|
CMakeCache.txt
|
||||||
|
>>>>>>> master
|
||||||
|
|
||||||
|
94
.kdev4/BeagleRescue.git.kdev4
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
<<<<<<< HEAD
|
||||||
|
[Buildset]
|
||||||
|
BuildItems=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x01\x00\x00\x00\x0b\x00\x00\x00\x00\x01\x00\x00\x00 \x00B\x00e\x00a\x00g\x00l\x00e\x00R\x00e\x00s\x00c\x00u\x00e\x00.\x00g\x00i\x00t)
|
||||||
|
|
||||||
|
[CMake]
|
||||||
|
Build Directory Count=1
|
||||||
|
Current Build Directory Index-Host System=0
|
||||||
|
|
||||||
|
[CMake][CMake Build Directory 0]
|
||||||
|
Build Directory Path=/home/ayoungblood/BeagleRescue.git/build
|
||||||
|
Build Type=Release
|
||||||
|
CMake Binary=/usr/bin/cmake
|
||||||
|
CMake Executable=/usr/bin/cmake
|
||||||
|
Environment Profile=
|
||||||
|
Extra Arguments=
|
||||||
|
Install Directory=
|
||||||
|
Runtime=Host System
|
||||||
|
|
||||||
|
[CustomDefinesAndIncludes][ProjectPath0]
|
||||||
|
Path=.
|
||||||
|
parseAmbiguousAsCPP=true
|
||||||
|
parserArguments=-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -std=c++17
|
||||||
|
parserArgumentsC=-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -std=c99
|
||||||
|
parserArgumentsCuda=-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -std=c++11
|
||||||
|
parserArgumentsOpenCL=-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -cl-std=CL1.1
|
||||||
|
|
||||||
|
[CustomDefinesAndIncludes][ProjectPath0][Compiler]
|
||||||
|
Name=GCC
|
||||||
|
|
||||||
|
[Launch]
|
||||||
|
Launch Configurations=Launch Configuration 0
|
||||||
|
|
||||||
|
[Launch][Launch Configuration 0]
|
||||||
|
Configured Launch Modes=execute,debug
|
||||||
|
Configured Launchers=nativeAppLauncher,lldb
|
||||||
|
Name=BeagleRescue
|
||||||
|
Type=Native Application
|
||||||
|
|
||||||
|
[Launch][Launch Configuration 0][Data]
|
||||||
|
Arguments=
|
||||||
|
Break on Start=false
|
||||||
|
Dependencies=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x00)
|
||||||
|
Dependency Action=Nothing
|
||||||
|
EnvironmentGroup=
|
||||||
|
Executable=file:///home/ayoungblood/BeagleRescue.git/build/BeagleRescue
|
||||||
|
External Terminal=konsole --noclose --workdir %workdir -e %exe
|
||||||
|
Kill Before Executing Again=4194304
|
||||||
|
LLDB Arguments=
|
||||||
|
LLDB Config Script=
|
||||||
|
LLDB Environment=
|
||||||
|
LLDB Executable=
|
||||||
|
LLDB Inherit System Env=true
|
||||||
|
LLDB Remote Debugging=false
|
||||||
|
LLDB Remote Path=
|
||||||
|
LLDB Remote Server=
|
||||||
|
Project Target=BeagleRescue,BeagleRescue
|
||||||
|
Start With=ApplicationOutput
|
||||||
|
Use External Terminal=false
|
||||||
|
Working Directory=file:///home/ayoungblood/BeagleRescue.git
|
||||||
|
isExecutable=true
|
||||||
|
|
||||||
|
[Project]
|
||||||
|
VersionControlSupport=kdevgit
|
||||||
|
||||||| 8aa7974
|
||||||
|
=======
|
||||||
|
[Buildset]
|
||||||
|
BuildItems=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x01\x00\x00\x00\x0b\x00\x00\x00\x00\x01\x00\x00\x00 \x00B\x00e\x00a\x00g\x00l\x00e\x00R\x00e\x00s\x00c\x00u\x00e\x00.\x00g\x00i\x00t)
|
||||||
|
|
||||||
|
[CMake]
|
||||||
|
Build Directory Count=1
|
||||||
|
Current Build Directory Index-Host System=0
|
||||||
|
|
||||||
|
[CMake][CMake Build Directory 0]
|
||||||
|
Build Directory Path=/home/ayoungblood/projects/BeagleRescue.git/build
|
||||||
|
Build Type=Release
|
||||||
|
CMake Binary=/usr/bin/cmake
|
||||||
|
CMake Executable=/usr/bin/cmake
|
||||||
|
Environment Profile=
|
||||||
|
Extra Arguments=
|
||||||
|
Install Directory=
|
||||||
|
Runtime=Host System
|
||||||
|
|
||||||
|
[Launch]
|
||||||
|
Launch Configurations=Launch Configuration 0
|
||||||
|
|
||||||
|
[Launch][Launch Configuration 0]
|
||||||
|
Configured Launch Modes=execute
|
||||||
|
Configured Launchers=nativeAppLauncher
|
||||||
|
Name=New Compiled Binary Launcher
|
||||||
|
Type=Native Application
|
||||||
|
|
||||||
|
[Project]
|
||||||
|
VersionControlSupport=kdevgit
|
||||||
|
>>>>>>> a3d13f32a5f0e4e11c618a4c3d524fd52fc0ed08
|
51
.kdev4/BeagleRescue.kdev4
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
[Buildset]
|
||||||
|
BuildItems=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x01\x00\x00\x00\x0b\x00\x00\x00\x00\x01\x00\x00\x00\x18\x00B\x00e\x00a\x00g\x00l\x00e\x00R\x00e\x00s\x00c\x00u\x00e)
|
||||||
|
|
||||||
|
[CMake]
|
||||||
|
Build Directory Count=2
|
||||||
|
Current Build Directory Index-Host System=0
|
||||||
|
Temporary Build Directory Index=1
|
||||||
|
|
||||||
|
[CMake][CMake Build Directory 0]
|
||||||
|
Build Directory Path=/home/ayoungblood/projects/BeagleRescue/build
|
||||||
|
Build Type=Release
|
||||||
|
CMake Binary=/usr/bin/cmake
|
||||||
|
CMake Executable=/usr/bin/cmake
|
||||||
|
Environment Profile=
|
||||||
|
Extra Arguments=
|
||||||
|
Install Directory=/usr/local
|
||||||
|
Runtime=Host System
|
||||||
|
|
||||||
|
[CMake][CMake Build Directory 1]
|
||||||
|
Build Directory Path=/home/ayoungblood/Projects/BeagleRescue/build
|
||||||
|
Build Type=Release
|
||||||
|
CMake Binary=/usr/bin/cmake
|
||||||
|
CMake Executable=/usr/bin/cmake
|
||||||
|
Environment Profile=
|
||||||
|
Extra Arguments=
|
||||||
|
Install Directory=
|
||||||
|
|
||||||
|
[Launch]
|
||||||
|
Launch Configurations=Launch Configuration 0
|
||||||
|
|
||||||
|
[Launch][Launch Configuration 0]
|
||||||
|
Configured Launch Modes=execute
|
||||||
|
Configured Launchers=nativeAppLauncher
|
||||||
|
Name=BeagleRescue
|
||||||
|
Type=Native Application
|
||||||
|
|
||||||
|
[Launch][Launch Configuration 0][Data]
|
||||||
|
Arguments=
|
||||||
|
Dependencies=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x00)
|
||||||
|
Dependency Action=Nothing
|
||||||
|
EnvironmentGroup=
|
||||||
|
Executable=file:///home/ayoungblood/Projects/BeagleRescue
|
||||||
|
External Terminal=konsole --noclose --workdir %workdir -e %exe
|
||||||
|
Kill Before Executing Again=4194304
|
||||||
|
Project Target=BeagleRescue,BeagleRescue
|
||||||
|
Use External Terminal=false
|
||||||
|
Working Directory=file:///home/ayoungblood/projects/BeagleRescue
|
||||||
|
isExecutable=true
|
||||||
|
|
||||||
|
[Project]
|
||||||
|
VersionControlSupport=kdevgit
|
28
CMakeLists.txt
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.25.1)
|
||||||
|
project(KaijuSaveEarth VERSION 1.0.0 )
|
||||||
|
|
||||||
|
#set(CMAKE_CXX_STANDARD 11) # old requirements
|
||||||
|
set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to be used") # new requirements for tileson
|
||||||
|
set(CMAKE_CXX_REQUIRED ON)
|
||||||
|
|
||||||
|
include(FetchContent)
|
||||||
|
include(FindPkgConfig)
|
||||||
|
|
||||||
|
PKG_SEARCH_MODULE(SDL2 REQUIRED sdl2)
|
||||||
|
PKG_SEARCH_MODULE(SDL2IMAGE REQUIRED SDL2_image>=2.0.0)
|
||||||
|
PKG_SEARCH_MODULE(SDL2MIXER REQUIRED SDL2_mixer>=2.0.0)
|
||||||
|
|
||||||
|
# Point to our own cmake modules
|
||||||
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/sdl2)
|
||||||
|
|
||||||
|
# Add global definitions
|
||||||
|
add_definitions("-Wall")
|
||||||
|
include_directories(${PROJECT_NAME} ${SDL2_INCLUDE_DIRS} ${SDL2IMAGE_INCLUDE_DIRS} ${SDL2MIXER_INCLUDE_DIRS})
|
||||||
|
#add_custom_target(${TMXPARSER})
|
||||||
|
|
||||||
|
file(GLOB_RECURSE CSOURCES src/cjson/*.c)
|
||||||
|
file(GLOB_RECURSE CPPSOURCES src/*.cpp)
|
||||||
|
|
||||||
|
add_executable(${PROJECT_NAME} ${CSOURCES} ${CPPSOURCES})
|
||||||
|
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
|
||||||
|
target_link_libraries(${PROJECT_NAME} PRIVATE ${SDL2_LIBRARIES} ${SDL2IMAGE_LIBRARIES} ${SDL2MIXER_LIBRARIES})
|
5
KaijuSaveEarth.kdev4
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[Project]
|
||||||
|
CreatedFrom=CMakeLists.txt
|
||||||
|
Manager=KDevCMakeManager
|
||||||
|
Name=KaijuSaveEarth
|
||||||
|
VersionControl=%{VERSIONCONTROLPLUGIN}
|
22
LICENSE
@ -1,3 +1,4 @@
|
|||||||
|
<<<<<<< HEAD
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) <year> <copyright holders>
|
Copyright (c) <year> <copyright holders>
|
||||||
@ -7,3 +8,24 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
=======
|
||||||
|
MIT License Copyright (c) 2023 Alan Youngblood
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is furnished
|
||||||
|
to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice (including the next
|
||||||
|
paragraph) shall be included in all copies or substantial portions of the
|
||||||
|
Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
||||||
|
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||||
|
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
>>>>>>> master
|
||||||
|
608
Makefile
Normal file
@ -0,0 +1,608 @@
|
|||||||
|
# CMAKE generated file: DO NOT EDIT!
|
||||||
|
# Generated by "Unix Makefiles" Generator, CMake Version 3.25
|
||||||
|
|
||||||
|
# Default target executed when no arguments are given to make.
|
||||||
|
default_target: all
|
||||||
|
.PHONY : default_target
|
||||||
|
|
||||||
|
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
|
||||||
|
.NOTPARALLEL:
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Special targets provided by cmake.
|
||||||
|
|
||||||
|
# Disable implicit rules so canonical targets will work.
|
||||||
|
.SUFFIXES:
|
||||||
|
|
||||||
|
# Disable VCS-based implicit rules.
|
||||||
|
% : %,v
|
||||||
|
|
||||||
|
# Disable VCS-based implicit rules.
|
||||||
|
% : RCS/%
|
||||||
|
|
||||||
|
# Disable VCS-based implicit rules.
|
||||||
|
% : RCS/%,v
|
||||||
|
|
||||||
|
# Disable VCS-based implicit rules.
|
||||||
|
% : SCCS/s.%
|
||||||
|
|
||||||
|
# Disable VCS-based implicit rules.
|
||||||
|
% : s.%
|
||||||
|
|
||||||
|
.SUFFIXES: .hpux_make_needs_suffix_list
|
||||||
|
|
||||||
|
# Command-line flag to silence nested $(MAKE).
|
||||||
|
$(VERBOSE)MAKESILENT = -s
|
||||||
|
|
||||||
|
#Suppress display of executed commands.
|
||||||
|
$(VERBOSE).SILENT:
|
||||||
|
|
||||||
|
# A target that is always out of date.
|
||||||
|
cmake_force:
|
||||||
|
.PHONY : cmake_force
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Set environment variables for the build.
|
||||||
|
|
||||||
|
# The shell in which to execute make rules.
|
||||||
|
SHELL = /bin/sh
|
||||||
|
|
||||||
|
# The CMake executable.
|
||||||
|
CMAKE_COMMAND = /usr/bin/cmake
|
||||||
|
|
||||||
|
# The command to remove a file.
|
||||||
|
RM = /usr/bin/cmake -E rm -f
|
||||||
|
|
||||||
|
# Escaping for special characters.
|
||||||
|
EQUALS = =
|
||||||
|
|
||||||
|
# The top-level source directory on which CMake was run.
|
||||||
|
CMAKE_SOURCE_DIR = /home/ayoungblood/Projects/BeagleRescue
|
||||||
|
|
||||||
|
# The top-level build directory on which CMake was run.
|
||||||
|
CMAKE_BINARY_DIR = /home/ayoungblood/Projects/BeagleRescue
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Targets provided globally by CMake.
|
||||||
|
|
||||||
|
# Special rule for the target edit_cache
|
||||||
|
edit_cache:
|
||||||
|
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..."
|
||||||
|
/usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available.
|
||||||
|
.PHONY : edit_cache
|
||||||
|
|
||||||
|
# Special rule for the target edit_cache
|
||||||
|
edit_cache/fast: edit_cache
|
||||||
|
.PHONY : edit_cache/fast
|
||||||
|
|
||||||
|
# Special rule for the target rebuild_cache
|
||||||
|
rebuild_cache:
|
||||||
|
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
|
||||||
|
/usr/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||||
|
.PHONY : rebuild_cache
|
||||||
|
|
||||||
|
# Special rule for the target rebuild_cache
|
||||||
|
rebuild_cache/fast: rebuild_cache
|
||||||
|
.PHONY : rebuild_cache/fast
|
||||||
|
|
||||||
|
# Special rule for the target list_install_components
|
||||||
|
list_install_components:
|
||||||
|
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\""
|
||||||
|
.PHONY : list_install_components
|
||||||
|
|
||||||
|
# Special rule for the target list_install_components
|
||||||
|
list_install_components/fast: list_install_components
|
||||||
|
.PHONY : list_install_components/fast
|
||||||
|
|
||||||
|
# Special rule for the target install
|
||||||
|
install: preinstall
|
||||||
|
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
|
||||||
|
/usr/bin/cmake -P cmake_install.cmake
|
||||||
|
.PHONY : install
|
||||||
|
|
||||||
|
# Special rule for the target install
|
||||||
|
install/fast: preinstall/fast
|
||||||
|
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
|
||||||
|
/usr/bin/cmake -P cmake_install.cmake
|
||||||
|
.PHONY : install/fast
|
||||||
|
|
||||||
|
# Special rule for the target install/local
|
||||||
|
install/local: preinstall
|
||||||
|
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
|
||||||
|
/usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
|
||||||
|
.PHONY : install/local
|
||||||
|
|
||||||
|
# Special rule for the target install/local
|
||||||
|
install/local/fast: preinstall/fast
|
||||||
|
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
|
||||||
|
/usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
|
||||||
|
.PHONY : install/local/fast
|
||||||
|
|
||||||
|
# Special rule for the target install/strip
|
||||||
|
install/strip: preinstall
|
||||||
|
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
|
||||||
|
/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
|
||||||
|
.PHONY : install/strip
|
||||||
|
|
||||||
|
# Special rule for the target install/strip
|
||||||
|
install/strip/fast: preinstall/fast
|
||||||
|
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
|
||||||
|
/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
|
||||||
|
.PHONY : install/strip/fast
|
||||||
|
|
||||||
|
# The main all target
|
||||||
|
all: cmake_check_build_system
|
||||||
|
$(CMAKE_COMMAND) -E cmake_progress_start /home/ayoungblood/Projects/BeagleRescue/CMakeFiles /home/ayoungblood/Projects/BeagleRescue//CMakeFiles/progress.marks
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 all
|
||||||
|
$(CMAKE_COMMAND) -E cmake_progress_start /home/ayoungblood/Projects/BeagleRescue/CMakeFiles 0
|
||||||
|
.PHONY : all
|
||||||
|
|
||||||
|
# The main clean target
|
||||||
|
clean:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 clean
|
||||||
|
.PHONY : clean
|
||||||
|
|
||||||
|
# The main clean target
|
||||||
|
clean/fast: clean
|
||||||
|
.PHONY : clean/fast
|
||||||
|
|
||||||
|
# Prepare targets for installation.
|
||||||
|
preinstall: all
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall
|
||||||
|
.PHONY : preinstall
|
||||||
|
|
||||||
|
# Prepare targets for installation.
|
||||||
|
preinstall/fast:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall
|
||||||
|
.PHONY : preinstall/fast
|
||||||
|
|
||||||
|
# clear depends
|
||||||
|
depend:
|
||||||
|
$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
|
||||||
|
.PHONY : depend
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Target rules for targets named BeagleRescue
|
||||||
|
|
||||||
|
# Build rule for target.
|
||||||
|
BeagleRescue: cmake_check_build_system
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 BeagleRescue
|
||||||
|
.PHONY : BeagleRescue
|
||||||
|
|
||||||
|
# fast build rule for target.
|
||||||
|
BeagleRescue/fast:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/build
|
||||||
|
.PHONY : BeagleRescue/fast
|
||||||
|
|
||||||
|
src/assetmgr/AssetManager.o: src/assetmgr/AssetManager.cpp.o
|
||||||
|
.PHONY : src/assetmgr/AssetManager.o
|
||||||
|
|
||||||
|
# target to build an object file
|
||||||
|
src/assetmgr/AssetManager.cpp.o:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/assetmgr/AssetManager.cpp.o
|
||||||
|
.PHONY : src/assetmgr/AssetManager.cpp.o
|
||||||
|
|
||||||
|
src/assetmgr/AssetManager.i: src/assetmgr/AssetManager.cpp.i
|
||||||
|
.PHONY : src/assetmgr/AssetManager.i
|
||||||
|
|
||||||
|
# target to preprocess a source file
|
||||||
|
src/assetmgr/AssetManager.cpp.i:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/assetmgr/AssetManager.cpp.i
|
||||||
|
.PHONY : src/assetmgr/AssetManager.cpp.i
|
||||||
|
|
||||||
|
src/assetmgr/AssetManager.s: src/assetmgr/AssetManager.cpp.s
|
||||||
|
.PHONY : src/assetmgr/AssetManager.s
|
||||||
|
|
||||||
|
# target to generate assembly for a file
|
||||||
|
src/assetmgr/AssetManager.cpp.s:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/assetmgr/AssetManager.cpp.s
|
||||||
|
.PHONY : src/assetmgr/AssetManager.cpp.s
|
||||||
|
|
||||||
|
src/assetmgr/GameObject.o: src/assetmgr/GameObject.cpp.o
|
||||||
|
.PHONY : src/assetmgr/GameObject.o
|
||||||
|
|
||||||
|
# target to build an object file
|
||||||
|
src/assetmgr/GameObject.cpp.o:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/assetmgr/GameObject.cpp.o
|
||||||
|
.PHONY : src/assetmgr/GameObject.cpp.o
|
||||||
|
|
||||||
|
src/assetmgr/GameObject.i: src/assetmgr/GameObject.cpp.i
|
||||||
|
.PHONY : src/assetmgr/GameObject.i
|
||||||
|
|
||||||
|
# target to preprocess a source file
|
||||||
|
src/assetmgr/GameObject.cpp.i:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/assetmgr/GameObject.cpp.i
|
||||||
|
.PHONY : src/assetmgr/GameObject.cpp.i
|
||||||
|
|
||||||
|
src/assetmgr/GameObject.s: src/assetmgr/GameObject.cpp.s
|
||||||
|
.PHONY : src/assetmgr/GameObject.s
|
||||||
|
|
||||||
|
# target to generate assembly for a file
|
||||||
|
src/assetmgr/GameObject.cpp.s:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/assetmgr/GameObject.cpp.s
|
||||||
|
.PHONY : src/assetmgr/GameObject.cpp.s
|
||||||
|
|
||||||
|
src/assetmgr/Map.o: src/assetmgr/Map.cpp.o
|
||||||
|
.PHONY : src/assetmgr/Map.o
|
||||||
|
|
||||||
|
# target to build an object file
|
||||||
|
src/assetmgr/Map.cpp.o:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/assetmgr/Map.cpp.o
|
||||||
|
.PHONY : src/assetmgr/Map.cpp.o
|
||||||
|
|
||||||
|
src/assetmgr/Map.i: src/assetmgr/Map.cpp.i
|
||||||
|
.PHONY : src/assetmgr/Map.i
|
||||||
|
|
||||||
|
# target to preprocess a source file
|
||||||
|
src/assetmgr/Map.cpp.i:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/assetmgr/Map.cpp.i
|
||||||
|
.PHONY : src/assetmgr/Map.cpp.i
|
||||||
|
|
||||||
|
src/assetmgr/Map.s: src/assetmgr/Map.cpp.s
|
||||||
|
.PHONY : src/assetmgr/Map.s
|
||||||
|
|
||||||
|
# target to generate assembly for a file
|
||||||
|
src/assetmgr/Map.cpp.s:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/assetmgr/Map.cpp.s
|
||||||
|
.PHONY : src/assetmgr/Map.cpp.s
|
||||||
|
|
||||||
|
src/assetmgr/MusicManager.o: src/assetmgr/MusicManager.cpp.o
|
||||||
|
.PHONY : src/assetmgr/MusicManager.o
|
||||||
|
|
||||||
|
# target to build an object file
|
||||||
|
src/assetmgr/MusicManager.cpp.o:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/assetmgr/MusicManager.cpp.o
|
||||||
|
.PHONY : src/assetmgr/MusicManager.cpp.o
|
||||||
|
|
||||||
|
src/assetmgr/MusicManager.i: src/assetmgr/MusicManager.cpp.i
|
||||||
|
.PHONY : src/assetmgr/MusicManager.i
|
||||||
|
|
||||||
|
# target to preprocess a source file
|
||||||
|
src/assetmgr/MusicManager.cpp.i:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/assetmgr/MusicManager.cpp.i
|
||||||
|
.PHONY : src/assetmgr/MusicManager.cpp.i
|
||||||
|
|
||||||
|
src/assetmgr/MusicManager.s: src/assetmgr/MusicManager.cpp.s
|
||||||
|
.PHONY : src/assetmgr/MusicManager.s
|
||||||
|
|
||||||
|
# target to generate assembly for a file
|
||||||
|
src/assetmgr/MusicManager.cpp.s:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/assetmgr/MusicManager.cpp.s
|
||||||
|
.PHONY : src/assetmgr/MusicManager.cpp.s
|
||||||
|
|
||||||
|
src/assetmgr/TextureManager.o: src/assetmgr/TextureManager.cpp.o
|
||||||
|
.PHONY : src/assetmgr/TextureManager.o
|
||||||
|
|
||||||
|
# target to build an object file
|
||||||
|
src/assetmgr/TextureManager.cpp.o:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/assetmgr/TextureManager.cpp.o
|
||||||
|
.PHONY : src/assetmgr/TextureManager.cpp.o
|
||||||
|
|
||||||
|
src/assetmgr/TextureManager.i: src/assetmgr/TextureManager.cpp.i
|
||||||
|
.PHONY : src/assetmgr/TextureManager.i
|
||||||
|
|
||||||
|
# target to preprocess a source file
|
||||||
|
src/assetmgr/TextureManager.cpp.i:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/assetmgr/TextureManager.cpp.i
|
||||||
|
.PHONY : src/assetmgr/TextureManager.cpp.i
|
||||||
|
|
||||||
|
src/assetmgr/TextureManager.s: src/assetmgr/TextureManager.cpp.s
|
||||||
|
.PHONY : src/assetmgr/TextureManager.s
|
||||||
|
|
||||||
|
# target to generate assembly for a file
|
||||||
|
src/assetmgr/TextureManager.cpp.s:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/assetmgr/TextureManager.cpp.s
|
||||||
|
.PHONY : src/assetmgr/TextureManager.cpp.s
|
||||||
|
|
||||||
|
src/cjson/cJSON.o: src/cjson/cJSON.c.o
|
||||||
|
.PHONY : src/cjson/cJSON.o
|
||||||
|
|
||||||
|
# target to build an object file
|
||||||
|
src/cjson/cJSON.c.o:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/cjson/cJSON.c.o
|
||||||
|
.PHONY : src/cjson/cJSON.c.o
|
||||||
|
|
||||||
|
src/cjson/cJSON.i: src/cjson/cJSON.c.i
|
||||||
|
.PHONY : src/cjson/cJSON.i
|
||||||
|
|
||||||
|
# target to preprocess a source file
|
||||||
|
src/cjson/cJSON.c.i:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/cjson/cJSON.c.i
|
||||||
|
.PHONY : src/cjson/cJSON.c.i
|
||||||
|
|
||||||
|
src/cjson/cJSON.s: src/cjson/cJSON.c.s
|
||||||
|
.PHONY : src/cjson/cJSON.s
|
||||||
|
|
||||||
|
# target to generate assembly for a file
|
||||||
|
src/cjson/cJSON.c.s:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/cjson/cJSON.c.s
|
||||||
|
.PHONY : src/cjson/cJSON.c.s
|
||||||
|
|
||||||
|
src/ecs/ECS.o: src/ecs/ECS.cpp.o
|
||||||
|
.PHONY : src/ecs/ECS.o
|
||||||
|
|
||||||
|
# target to build an object file
|
||||||
|
src/ecs/ECS.cpp.o:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/ecs/ECS.cpp.o
|
||||||
|
.PHONY : src/ecs/ECS.cpp.o
|
||||||
|
|
||||||
|
src/ecs/ECS.i: src/ecs/ECS.cpp.i
|
||||||
|
.PHONY : src/ecs/ECS.i
|
||||||
|
|
||||||
|
# target to preprocess a source file
|
||||||
|
src/ecs/ECS.cpp.i:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/ecs/ECS.cpp.i
|
||||||
|
.PHONY : src/ecs/ECS.cpp.i
|
||||||
|
|
||||||
|
src/ecs/ECS.s: src/ecs/ECS.cpp.s
|
||||||
|
.PHONY : src/ecs/ECS.s
|
||||||
|
|
||||||
|
# target to generate assembly for a file
|
||||||
|
src/ecs/ECS.cpp.s:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/ecs/ECS.cpp.s
|
||||||
|
.PHONY : src/ecs/ECS.cpp.s
|
||||||
|
|
||||||
|
src/game/Collision.o: src/game/Collision.cpp.o
|
||||||
|
.PHONY : src/game/Collision.o
|
||||||
|
|
||||||
|
# target to build an object file
|
||||||
|
src/game/Collision.cpp.o:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/game/Collision.cpp.o
|
||||||
|
.PHONY : src/game/Collision.cpp.o
|
||||||
|
|
||||||
|
src/game/Collision.i: src/game/Collision.cpp.i
|
||||||
|
.PHONY : src/game/Collision.i
|
||||||
|
|
||||||
|
# target to preprocess a source file
|
||||||
|
src/game/Collision.cpp.i:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/game/Collision.cpp.i
|
||||||
|
.PHONY : src/game/Collision.cpp.i
|
||||||
|
|
||||||
|
src/game/Collision.s: src/game/Collision.cpp.s
|
||||||
|
.PHONY : src/game/Collision.s
|
||||||
|
|
||||||
|
# target to generate assembly for a file
|
||||||
|
src/game/Collision.cpp.s:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/game/Collision.cpp.s
|
||||||
|
.PHONY : src/game/Collision.cpp.s
|
||||||
|
|
||||||
|
src/game/Game.o: src/game/Game.cpp.o
|
||||||
|
.PHONY : src/game/Game.o
|
||||||
|
|
||||||
|
# target to build an object file
|
||||||
|
src/game/Game.cpp.o:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/game/Game.cpp.o
|
||||||
|
.PHONY : src/game/Game.cpp.o
|
||||||
|
|
||||||
|
src/game/Game.i: src/game/Game.cpp.i
|
||||||
|
.PHONY : src/game/Game.i
|
||||||
|
|
||||||
|
# target to preprocess a source file
|
||||||
|
src/game/Game.cpp.i:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/game/Game.cpp.i
|
||||||
|
.PHONY : src/game/Game.cpp.i
|
||||||
|
|
||||||
|
src/game/Game.s: src/game/Game.cpp.s
|
||||||
|
.PHONY : src/game/Game.s
|
||||||
|
|
||||||
|
# target to generate assembly for a file
|
||||||
|
src/game/Game.cpp.s:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/game/Game.cpp.s
|
||||||
|
.PHONY : src/game/Game.cpp.s
|
||||||
|
|
||||||
|
src/game/GameStateManager.o: src/game/GameStateManager.cpp.o
|
||||||
|
.PHONY : src/game/GameStateManager.o
|
||||||
|
|
||||||
|
# target to build an object file
|
||||||
|
src/game/GameStateManager.cpp.o:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/game/GameStateManager.cpp.o
|
||||||
|
.PHONY : src/game/GameStateManager.cpp.o
|
||||||
|
|
||||||
|
src/game/GameStateManager.i: src/game/GameStateManager.cpp.i
|
||||||
|
.PHONY : src/game/GameStateManager.i
|
||||||
|
|
||||||
|
# target to preprocess a source file
|
||||||
|
src/game/GameStateManager.cpp.i:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/game/GameStateManager.cpp.i
|
||||||
|
.PHONY : src/game/GameStateManager.cpp.i
|
||||||
|
|
||||||
|
src/game/GameStateManager.s: src/game/GameStateManager.cpp.s
|
||||||
|
.PHONY : src/game/GameStateManager.s
|
||||||
|
|
||||||
|
# target to generate assembly for a file
|
||||||
|
src/game/GameStateManager.cpp.s:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/game/GameStateManager.cpp.s
|
||||||
|
.PHONY : src/game/GameStateManager.cpp.s
|
||||||
|
|
||||||
|
src/game/Main.o: src/game/Main.cpp.o
|
||||||
|
.PHONY : src/game/Main.o
|
||||||
|
|
||||||
|
# target to build an object file
|
||||||
|
src/game/Main.cpp.o:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/game/Main.cpp.o
|
||||||
|
.PHONY : src/game/Main.cpp.o
|
||||||
|
|
||||||
|
src/game/Main.i: src/game/Main.cpp.i
|
||||||
|
.PHONY : src/game/Main.i
|
||||||
|
|
||||||
|
# target to preprocess a source file
|
||||||
|
src/game/Main.cpp.i:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/game/Main.cpp.i
|
||||||
|
.PHONY : src/game/Main.cpp.i
|
||||||
|
|
||||||
|
src/game/Main.s: src/game/Main.cpp.s
|
||||||
|
.PHONY : src/game/Main.s
|
||||||
|
|
||||||
|
# target to generate assembly for a file
|
||||||
|
src/game/Main.cpp.s:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/game/Main.cpp.s
|
||||||
|
.PHONY : src/game/Main.cpp.s
|
||||||
|
|
||||||
|
src/game/StateMachine.o: src/game/StateMachine.cpp.o
|
||||||
|
.PHONY : src/game/StateMachine.o
|
||||||
|
|
||||||
|
# target to build an object file
|
||||||
|
src/game/StateMachine.cpp.o:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/game/StateMachine.cpp.o
|
||||||
|
.PHONY : src/game/StateMachine.cpp.o
|
||||||
|
|
||||||
|
src/game/StateMachine.i: src/game/StateMachine.cpp.i
|
||||||
|
.PHONY : src/game/StateMachine.i
|
||||||
|
|
||||||
|
# target to preprocess a source file
|
||||||
|
src/game/StateMachine.cpp.i:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/game/StateMachine.cpp.i
|
||||||
|
.PHONY : src/game/StateMachine.cpp.i
|
||||||
|
|
||||||
|
src/game/StateMachine.s: src/game/StateMachine.cpp.s
|
||||||
|
.PHONY : src/game/StateMachine.s
|
||||||
|
|
||||||
|
# target to generate assembly for a file
|
||||||
|
src/game/StateMachine.cpp.s:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/game/StateMachine.cpp.s
|
||||||
|
.PHONY : src/game/StateMachine.cpp.s
|
||||||
|
|
||||||
|
src/game/Vector2D.o: src/game/Vector2D.cpp.o
|
||||||
|
.PHONY : src/game/Vector2D.o
|
||||||
|
|
||||||
|
# target to build an object file
|
||||||
|
src/game/Vector2D.cpp.o:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/game/Vector2D.cpp.o
|
||||||
|
.PHONY : src/game/Vector2D.cpp.o
|
||||||
|
|
||||||
|
src/game/Vector2D.i: src/game/Vector2D.cpp.i
|
||||||
|
.PHONY : src/game/Vector2D.i
|
||||||
|
|
||||||
|
# target to preprocess a source file
|
||||||
|
src/game/Vector2D.cpp.i:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/game/Vector2D.cpp.i
|
||||||
|
.PHONY : src/game/Vector2D.cpp.i
|
||||||
|
|
||||||
|
src/game/Vector2D.s: src/game/Vector2D.cpp.s
|
||||||
|
.PHONY : src/game/Vector2D.s
|
||||||
|
|
||||||
|
# target to generate assembly for a file
|
||||||
|
src/game/Vector2D.cpp.s:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/game/Vector2D.cpp.s
|
||||||
|
.PHONY : src/game/Vector2D.cpp.s
|
||||||
|
|
||||||
|
src/ui/UINineSlice.o: src/ui/UINineSlice.cpp.o
|
||||||
|
.PHONY : src/ui/UINineSlice.o
|
||||||
|
|
||||||
|
# target to build an object file
|
||||||
|
src/ui/UINineSlice.cpp.o:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/ui/UINineSlice.cpp.o
|
||||||
|
.PHONY : src/ui/UINineSlice.cpp.o
|
||||||
|
|
||||||
|
src/ui/UINineSlice.i: src/ui/UINineSlice.cpp.i
|
||||||
|
.PHONY : src/ui/UINineSlice.i
|
||||||
|
|
||||||
|
# target to preprocess a source file
|
||||||
|
src/ui/UINineSlice.cpp.i:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/ui/UINineSlice.cpp.i
|
||||||
|
.PHONY : src/ui/UINineSlice.cpp.i
|
||||||
|
|
||||||
|
src/ui/UINineSlice.s: src/ui/UINineSlice.cpp.s
|
||||||
|
.PHONY : src/ui/UINineSlice.s
|
||||||
|
|
||||||
|
# target to generate assembly for a file
|
||||||
|
src/ui/UINineSlice.cpp.s:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/ui/UINineSlice.cpp.s
|
||||||
|
.PHONY : src/ui/UINineSlice.cpp.s
|
||||||
|
|
||||||
|
src/ui/UIText.o: src/ui/UIText.cpp.o
|
||||||
|
.PHONY : src/ui/UIText.o
|
||||||
|
|
||||||
|
# target to build an object file
|
||||||
|
src/ui/UIText.cpp.o:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/ui/UIText.cpp.o
|
||||||
|
.PHONY : src/ui/UIText.cpp.o
|
||||||
|
|
||||||
|
src/ui/UIText.i: src/ui/UIText.cpp.i
|
||||||
|
.PHONY : src/ui/UIText.i
|
||||||
|
|
||||||
|
# target to preprocess a source file
|
||||||
|
src/ui/UIText.cpp.i:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/ui/UIText.cpp.i
|
||||||
|
.PHONY : src/ui/UIText.cpp.i
|
||||||
|
|
||||||
|
src/ui/UIText.s: src/ui/UIText.cpp.s
|
||||||
|
.PHONY : src/ui/UIText.s
|
||||||
|
|
||||||
|
# target to generate assembly for a file
|
||||||
|
src/ui/UIText.cpp.s:
|
||||||
|
$(MAKE) $(MAKESILENT) -f CMakeFiles/BeagleRescue.dir/build.make CMakeFiles/BeagleRescue.dir/src/ui/UIText.cpp.s
|
||||||
|
.PHONY : src/ui/UIText.cpp.s
|
||||||
|
|
||||||
|
# Help Target
|
||||||
|
help:
|
||||||
|
@echo "The following are some of the valid targets for this Makefile:"
|
||||||
|
@echo "... all (the default if no target is provided)"
|
||||||
|
@echo "... clean"
|
||||||
|
@echo "... depend"
|
||||||
|
@echo "... edit_cache"
|
||||||
|
@echo "... install"
|
||||||
|
@echo "... install/local"
|
||||||
|
@echo "... install/strip"
|
||||||
|
@echo "... list_install_components"
|
||||||
|
@echo "... rebuild_cache"
|
||||||
|
@echo "... BeagleRescue"
|
||||||
|
@echo "... src/assetmgr/AssetManager.o"
|
||||||
|
@echo "... src/assetmgr/AssetManager.i"
|
||||||
|
@echo "... src/assetmgr/AssetManager.s"
|
||||||
|
@echo "... src/assetmgr/GameObject.o"
|
||||||
|
@echo "... src/assetmgr/GameObject.i"
|
||||||
|
@echo "... src/assetmgr/GameObject.s"
|
||||||
|
@echo "... src/assetmgr/Map.o"
|
||||||
|
@echo "... src/assetmgr/Map.i"
|
||||||
|
@echo "... src/assetmgr/Map.s"
|
||||||
|
@echo "... src/assetmgr/MusicManager.o"
|
||||||
|
@echo "... src/assetmgr/MusicManager.i"
|
||||||
|
@echo "... src/assetmgr/MusicManager.s"
|
||||||
|
@echo "... src/assetmgr/TextureManager.o"
|
||||||
|
@echo "... src/assetmgr/TextureManager.i"
|
||||||
|
@echo "... src/assetmgr/TextureManager.s"
|
||||||
|
@echo "... src/cjson/cJSON.o"
|
||||||
|
@echo "... src/cjson/cJSON.i"
|
||||||
|
@echo "... src/cjson/cJSON.s"
|
||||||
|
@echo "... src/ecs/ECS.o"
|
||||||
|
@echo "... src/ecs/ECS.i"
|
||||||
|
@echo "... src/ecs/ECS.s"
|
||||||
|
@echo "... src/game/Collision.o"
|
||||||
|
@echo "... src/game/Collision.i"
|
||||||
|
@echo "... src/game/Collision.s"
|
||||||
|
@echo "... src/game/Game.o"
|
||||||
|
@echo "... src/game/Game.i"
|
||||||
|
@echo "... src/game/Game.s"
|
||||||
|
@echo "... src/game/GameStateManager.o"
|
||||||
|
@echo "... src/game/GameStateManager.i"
|
||||||
|
@echo "... src/game/GameStateManager.s"
|
||||||
|
@echo "... src/game/Main.o"
|
||||||
|
@echo "... src/game/Main.i"
|
||||||
|
@echo "... src/game/Main.s"
|
||||||
|
@echo "... src/game/StateMachine.o"
|
||||||
|
@echo "... src/game/StateMachine.i"
|
||||||
|
@echo "... src/game/StateMachine.s"
|
||||||
|
@echo "... src/game/Vector2D.o"
|
||||||
|
@echo "... src/game/Vector2D.i"
|
||||||
|
@echo "... src/game/Vector2D.s"
|
||||||
|
@echo "... src/ui/UINineSlice.o"
|
||||||
|
@echo "... src/ui/UINineSlice.i"
|
||||||
|
@echo "... src/ui/UINineSlice.s"
|
||||||
|
@echo "... src/ui/UIText.o"
|
||||||
|
@echo "... src/ui/UIText.i"
|
||||||
|
@echo "... src/ui/UIText.s"
|
||||||
|
.PHONY : help
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Special targets to cleanup operation of make.
|
||||||
|
|
||||||
|
# Special rule to run CMake to check the build system integrity.
|
||||||
|
# No rule that depends on this can have commands that come from listfiles
|
||||||
|
# because they might be regenerated.
|
||||||
|
cmake_check_build_system:
|
||||||
|
$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
|
||||||
|
.PHONY : cmake_check_build_system
|
||||||
|
|
13
README.md
@ -1,5 +1,16 @@
|
|||||||
|
<<<<<<< HEAD
|
||||||
# KaijuSaveEarth
|
# KaijuSaveEarth
|
||||||
|
|
||||||
LowRezJam 2023
|
LowRezJam 2023
|
||||||
Kaiju Save Earth
|
Kaiju Save Earth
|
||||||
A game where you play as a giant monster trying to save as many humans as possible before they destroy themselves and the world!
|
A game where you play as a giant monster trying to save as many humans as possible before they destroy themselves and the world!
|
||||||
|
=======
|
||||||
|
# Kaiju Save Earth
|
||||||
|
---
|
||||||
|
Low Rez Jam 2023
|
||||||
|
|
||||||
|
A game where you play as a giant monster (Kaiju) who must save all the humans from destroying themselves and the world by catching them and safely stowing them on your back.
|
||||||
|
|
||||||
|
By:
|
||||||
|
Alan Youngblood
|
||||||
|
>>>>>>> master
|
||||||
|
BIN
assets/ColTex.png
Normal file
After Width: | Height: | Size: 159 B |
BIN
assets/audio/music/sillypuppy.ogg
Normal file
BIN
assets/audio/music/victory.ogg
Normal file
BIN
assets/audio/sfx/Bark1.wav
Normal file
BIN
assets/audio/sfx/Bark2.wav
Normal file
BIN
assets/audio/sfx/Bark3.wav
Normal file
BIN
assets/audio/sfx/Bark4.wav
Normal file
BIN
assets/audio/sfx/Bark5.wav
Normal file
BIN
assets/audio/sfx/Fire.wav
Normal file
BIN
assets/audio/sfx/Voice_Oooh_1.wav
Normal file
BIN
assets/audio/sfx/Voice_Ouch_1.wav
Normal file
BIN
assets/audio/sfx/Voice_Ouch_2.wav
Normal file
BIN
assets/audio/sfx/Voice_Ouch_3.wav
Normal file
BIN
assets/audio/sfx/Whimper1.wav
Normal file
BIN
assets/audio/sfx/Whimper2.wav
Normal file
BIN
assets/audio/sfx/bwoop.wav
Normal file
91
assets/maps/br-map-color.txt
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
10,11,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10,12,10,11,11,11,11,11,11,11,11,11,11,12,13,15,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,13,14,15
|
||||||
|
13,14,15,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,13,15,39,39,39,39,39,39,39,39,39,39,39,39,13,15,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,13,14,15
|
||||||
|
13,14,15,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,13,15,39,39,39,39,39,39,39,39,39,39,39,39,13,15,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,13,14,15
|
||||||
|
13,14,15,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,13,15,39,39,39,39,39,39,39,39,39,39,39,39,13,15,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,13,14,15
|
||||||
|
13,14,15,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,19,21,39,39,39,39,39,39,39,39,39,39,39,39,19,21,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,13,14,15
|
||||||
|
13,14,15,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,22,25,39,39,39,39,39,39,39,39,39,39,39,39,22,25,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,13,14,15
|
||||||
|
13,14,15,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,23,26,39,39,39,39,39,39,39,39,39,39,39,39,23,26,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,13,14,15
|
||||||
|
13,14,15,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,24,27,39,39,39,39,39,39,39,39,39,39,39,39,24,27,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,13,14,15
|
||||||
|
13,14,15,43,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,45,10,12,43,44,45,38,38,38,38,38,43,44,44,45,13,15,43,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,45,13,14,15
|
||||||
|
13,14,15,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,13,15,38,38,38,38,38,38,38,38,38,38,38,38,13,15,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,13,14,15
|
||||||
|
13,14,15,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,13,15,38,38,38,38,38,38,38,38,38,38,38,38,13,15,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,13,14,15
|
||||||
|
13,14,15,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,19,21,38,38,38,38,38,38,38,38,38,38,38,38,19,21,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,13,14,15
|
||||||
|
13,14,15,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,22,25,38,38,38,38,43,45,38,38,38,38,38,38,22,25,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,13,14,15
|
||||||
|
13,14,15,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,23,26,38,38,38,38,38,38,38,38,38,38,38,38,23,26,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,13,14,15
|
||||||
|
13,14,15,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,24,27,38,38,38,38,38,38,38,38,38,38,38,38,24,27,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,13,14,15
|
||||||
|
13,14,15,43,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,45,11,12,43,44,45,36,36,36,36,36,36,43,44,45,11,11,43,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,45,13,14,15
|
||||||
|
13,14,15,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,13,15,36,36,36,36,36,36,36,36,36,36,36,36,13,15,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,13,14,15
|
||||||
|
13,14,15,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,13,15,36,36,36,36,36,36,36,36,36,36,36,36,13,15,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,13,14,15
|
||||||
|
13,14,15,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,19,21,36,36,36,36,36,36,36,36,36,36,36,36,19,21,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,13,14,15
|
||||||
|
13,14,15,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,22,25,36,36,36,36,36,36,43,45,36,36,36,36,22,25,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,13,14,15
|
||||||
|
13,14,15,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,23,26,36,36,36,36,36,36,36,36,36,36,36,36,23,26,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,13,14,15
|
||||||
|
13,14,15,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,24,27,36,36,36,36,36,36,36,36,36,36,36,36,24,27,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,13,14,15
|
||||||
|
13,14,15,43,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,45,10,12,43,44,45,33,33,33,33,33,33,43,44,45,10,12,43,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,45,13,14,15
|
||||||
|
13,14,15,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,13,15,33,33,33,33,33,33,33,33,33,33,33,33,13,15,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,13,14,15
|
||||||
|
13,14,15,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,13,15,33,33,33,33,33,33,33,33,33,33,33,33,13,15,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,13,14,15
|
||||||
|
13,14,15,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,19,21,33,33,33,33,33,33,33,33,33,33,33,33,19,21,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,13,14,15
|
||||||
|
13,14,15,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,22,25,33,33,33,33,43,45,33,33,33,33,33,33,22,25,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,13,14,15
|
||||||
|
13,14,15,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,23,26,33,33,33,33,33,33,33,33,33,33,33,33,23,26,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,13,14,15
|
||||||
|
13,14,15,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,24,27,33,33,33,33,33,33,33,33,33,33,33,33,24,27,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,13,14,15
|
||||||
|
13,14,15,43,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,45,10,12,43,44,45,34,34,34,34,34,34,43,44,45,10,12,43,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,45,13,14,15
|
||||||
|
13,14,15,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,13,15,34,34,34,34,34,34,34,34,34,34,34,34,13,15,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,13,14,15
|
||||||
|
13,14,15,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,13,15,34,34,34,34,34,34,34,34,34,34,34,34,13,15,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,13,14,15
|
||||||
|
13,14,15,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,19,21,34,34,34,34,34,34,34,34,34,34,34,34,19,21,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,13,14,15
|
||||||
|
13,14,15,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,22,25,34,34,34,34,34,43,45,34,34,34,34,34,22,25,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,13,14,15
|
||||||
|
13,14,15,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,23,26,34,34,34,34,34,34,34,34,34,34,34,34,23,26,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,13,14,15
|
||||||
|
13,14,15,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,24,27,34,34,34,34,34,34,34,34,34,34,34,34,24,27,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,19,20,21
|
||||||
|
13,14,15,43,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,45,10,12,43,44,45,37,37,37,37,37,37,43,44,45,10,12,43,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,45,13,14,15
|
||||||
|
13,14,15,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,13,15,37,37,37,37,37,37,37,37,37,37,37,37,13,15,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,13,14,15
|
||||||
|
13,14,15,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,13,15,37,37,37,37,37,37,37,37,37,37,37,37,13,15,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,13,14,15
|
||||||
|
13,14,15,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,19,21,37,37,37,37,43,43,45,37,37,37,37,37,19,21,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,13,14,15
|
||||||
|
13,14,15,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,22,25,37,37,37,37,37,37,37,37,37,37,37,37,22,25,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,13,14,15
|
||||||
|
13,14,15,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,23,26,37,37,37,37,37,37,37,37,37,37,37,37,23,26,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,13,14,15
|
||||||
|
13,14,15,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,24,27,37,37,37,37,37,37,37,37,37,37,37,37,24,27,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,13,14,15
|
||||||
|
13,14,15,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,13,14,15
|
||||||
|
13,14,15,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,13,14,15
|
||||||
|
|
||||||
|
0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0
|
||||||
|
0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0
|
||||||
|
0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0
|
||||||
|
0,0,1,0,0,0,0,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
92
assets/maps/br-map.txt
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
10,11,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10,12,10,11,11,11,11,11,11,11,11,11,11,12,13,15,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,15,17,17,17,17,17,17,17,17,17,17,17,17,13,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,15,17,17,17,17,17,17,17,17,17,17,17,17,13,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,15,17,17,17,17,17,17,17,17,17,17,17,17,13,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,19,21,17,17,17,17,17,17,17,17,17,17,17,17,19,21,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10,12,11,11,17,17,17,17,17,17,17,17,11,11,13,15,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,15,17,17,17,17,17,17,17,17,17,17,17,17,13,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,15,17,17,17,17,17,17,17,17,17,17,17,17,13,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,19,21,17,17,17,17,17,17,17,17,17,17,17,17,19,21,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,11,17,17,17,17,17,17,17,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,15,17,17,17,17,17,17,17,17,17,17,17,17,13,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,15,17,17,17,17,17,17,17,17,17,17,17,17,13,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,19,21,17,17,17,17,17,17,17,17,17,17,17,17,19,21,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10,12,11,11,11,16,17,17,17,17,17,29,28,28,10,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,13,14,15
|
||||||
|
13,14,15,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,18,13,15,16,17,17,17,17,17,17,17,29,30,17,18,13,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,18,13,15,16,17,17,17,17,17,17,29,30,17,17,18,13,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,18,19,21,16,17,17,17,17,17,29,30,17,17,17,18,19,21,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,18,22,25,16,17,17,17,17,29,30,17,17,17,17,18,22,25,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,18,23,26,16,17,17,17,29,30,17,17,17,17,17,18,23,26,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,18,24,27,16,17,17,17,17,17,17,17,17,17,17,18,24,27,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10,12,11,11,12,31,17,17,17,17,17,11,11,11,10,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,15,17,17,17,32,31,17,17,17,17,17,17,17,13,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,15,17,17,17,17,32,31,17,17,17,17,17,17,13,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,19,21,17,17,17,17,17,32,31,17,17,17,17,17,19,21,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,22,25,17,17,17,17,17,17,32,31,17,17,17,17,22,25,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,23,26,17,17,17,17,17,17,17,32,31,17,17,17,23,26,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,24,27,17,17,17,17,17,17,17,17,17,17,17,17,24,27,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,19,20,21
|
||||||
|
13,14,15,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10,12,11,11,17,17,17,17,17,17,17,29,11,11,10,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,15,17,17,17,17,17,17,17,17,29,30,17,17,13,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,15,17,17,17,17,17,17,17,29,30,17,17,17,13,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,19,21,17,17,17,17,17,17,29,30,17,17,17,17,19,21,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,22,25,17,17,17,17,17,29,30,17,17,17,17,17,22,25,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,23,26,17,17,17,17,29,30,17,17,17,17,17,17,23,26,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,24,27,17,17,17,17,17,17,17,17,17,17,17,17,24,27,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,13,14,15
|
||||||
|
13,14,15,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,13,14,15
|
||||||
|
13,14,15,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,13,14,15
|
||||||
|
|
||||||
|
0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0
|
||||||
|
0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0
|
||||||
|
0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||||
|
|
BIN
assets/maps/br-tiles.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
338
assets/maps/br-tiles.tsj
Normal file
@ -0,0 +1,338 @@
|
|||||||
|
{ "columns":10,
|
||||||
|
"image":"..\/..\/..\/Projects\/BeagleRescue\/assets\/maps\/br-tiles.png",
|
||||||
|
"imageheight":80,
|
||||||
|
"imagewidth":160,
|
||||||
|
"margin":0,
|
||||||
|
"name":"br-tiles",
|
||||||
|
"spacing":0,
|
||||||
|
"tilecount":50,
|
||||||
|
"tiledversion":"1.8.2",
|
||||||
|
"tileheight":16,
|
||||||
|
"tiles":[
|
||||||
|
{
|
||||||
|
"id":10,
|
||||||
|
"objectgroup":
|
||||||
|
{
|
||||||
|
"draworder":"index",
|
||||||
|
"id":2,
|
||||||
|
"name":"",
|
||||||
|
"objects":[
|
||||||
|
{
|
||||||
|
"height":16,
|
||||||
|
"id":1,
|
||||||
|
"name":"",
|
||||||
|
"rotation":0,
|
||||||
|
"type":"",
|
||||||
|
"visible":true,
|
||||||
|
"width":16,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
}],
|
||||||
|
"opacity":1,
|
||||||
|
"type":"objectgroup",
|
||||||
|
"visible":true,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id":11,
|
||||||
|
"objectgroup":
|
||||||
|
{
|
||||||
|
"draworder":"index",
|
||||||
|
"id":2,
|
||||||
|
"name":"",
|
||||||
|
"objects":[
|
||||||
|
{
|
||||||
|
"height":16,
|
||||||
|
"id":1,
|
||||||
|
"name":"",
|
||||||
|
"rotation":0,
|
||||||
|
"type":"",
|
||||||
|
"visible":true,
|
||||||
|
"width":16,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
}],
|
||||||
|
"opacity":1,
|
||||||
|
"type":"objectgroup",
|
||||||
|
"visible":true,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id":12,
|
||||||
|
"objectgroup":
|
||||||
|
{
|
||||||
|
"draworder":"index",
|
||||||
|
"id":2,
|
||||||
|
"name":"",
|
||||||
|
"objects":[
|
||||||
|
{
|
||||||
|
"height":16,
|
||||||
|
"id":1,
|
||||||
|
"name":"",
|
||||||
|
"rotation":0,
|
||||||
|
"type":"",
|
||||||
|
"visible":true,
|
||||||
|
"width":16,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
}],
|
||||||
|
"opacity":1,
|
||||||
|
"type":"objectgroup",
|
||||||
|
"visible":true,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id":13,
|
||||||
|
"objectgroup":
|
||||||
|
{
|
||||||
|
"draworder":"index",
|
||||||
|
"id":2,
|
||||||
|
"name":"",
|
||||||
|
"objects":[
|
||||||
|
{
|
||||||
|
"height":16,
|
||||||
|
"id":1,
|
||||||
|
"name":"",
|
||||||
|
"rotation":0,
|
||||||
|
"type":"",
|
||||||
|
"visible":true,
|
||||||
|
"width":16,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
}],
|
||||||
|
"opacity":1,
|
||||||
|
"type":"objectgroup",
|
||||||
|
"visible":true,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id":15,
|
||||||
|
"objectgroup":
|
||||||
|
{
|
||||||
|
"draworder":"index",
|
||||||
|
"id":2,
|
||||||
|
"name":"",
|
||||||
|
"objects":[
|
||||||
|
{
|
||||||
|
"height":16,
|
||||||
|
"id":1,
|
||||||
|
"name":"",
|
||||||
|
"rotation":0,
|
||||||
|
"type":"",
|
||||||
|
"visible":true,
|
||||||
|
"width":16,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
}],
|
||||||
|
"opacity":1,
|
||||||
|
"type":"objectgroup",
|
||||||
|
"visible":true,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id":19,
|
||||||
|
"objectgroup":
|
||||||
|
{
|
||||||
|
"draworder":"index",
|
||||||
|
"id":2,
|
||||||
|
"name":"",
|
||||||
|
"objects":[
|
||||||
|
{
|
||||||
|
"height":16,
|
||||||
|
"id":1,
|
||||||
|
"name":"",
|
||||||
|
"rotation":0,
|
||||||
|
"type":"",
|
||||||
|
"visible":true,
|
||||||
|
"width":16,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
}],
|
||||||
|
"opacity":1,
|
||||||
|
"type":"objectgroup",
|
||||||
|
"visible":true,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id":20,
|
||||||
|
"objectgroup":
|
||||||
|
{
|
||||||
|
"draworder":"index",
|
||||||
|
"id":2,
|
||||||
|
"name":"",
|
||||||
|
"objects":[
|
||||||
|
{
|
||||||
|
"height":16,
|
||||||
|
"id":1,
|
||||||
|
"name":"",
|
||||||
|
"rotation":0,
|
||||||
|
"type":"",
|
||||||
|
"visible":true,
|
||||||
|
"width":16,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
}],
|
||||||
|
"opacity":1,
|
||||||
|
"type":"objectgroup",
|
||||||
|
"visible":true,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id":21,
|
||||||
|
"objectgroup":
|
||||||
|
{
|
||||||
|
"draworder":"index",
|
||||||
|
"id":2,
|
||||||
|
"name":"",
|
||||||
|
"objects":[
|
||||||
|
{
|
||||||
|
"height":16,
|
||||||
|
"id":1,
|
||||||
|
"name":"",
|
||||||
|
"rotation":0,
|
||||||
|
"type":"",
|
||||||
|
"visible":true,
|
||||||
|
"width":16,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
}],
|
||||||
|
"opacity":1,
|
||||||
|
"type":"objectgroup",
|
||||||
|
"visible":true,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id":28,
|
||||||
|
"objectgroup":
|
||||||
|
{
|
||||||
|
"draworder":"index",
|
||||||
|
"id":2,
|
||||||
|
"name":"",
|
||||||
|
"objects":[
|
||||||
|
{
|
||||||
|
"height":16,
|
||||||
|
"id":1,
|
||||||
|
"name":"",
|
||||||
|
"rotation":0,
|
||||||
|
"type":"",
|
||||||
|
"visible":true,
|
||||||
|
"width":16,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
}],
|
||||||
|
"opacity":1,
|
||||||
|
"type":"objectgroup",
|
||||||
|
"visible":true,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id":43,
|
||||||
|
"objectgroup":
|
||||||
|
{
|
||||||
|
"draworder":"index",
|
||||||
|
"id":2,
|
||||||
|
"name":"",
|
||||||
|
"objects":[
|
||||||
|
{
|
||||||
|
"height":16,
|
||||||
|
"id":2,
|
||||||
|
"name":"",
|
||||||
|
"rotation":0,
|
||||||
|
"type":"",
|
||||||
|
"visible":true,
|
||||||
|
"width":16,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"height":14.2813,
|
||||||
|
"id":3,
|
||||||
|
"name":"",
|
||||||
|
"rotation":0,
|
||||||
|
"type":"",
|
||||||
|
"visible":true,
|
||||||
|
"width":14.4375,
|
||||||
|
"x":0.96875,
|
||||||
|
"y":0.875
|
||||||
|
}],
|
||||||
|
"opacity":1,
|
||||||
|
"type":"objectgroup",
|
||||||
|
"visible":true,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id":44,
|
||||||
|
"objectgroup":
|
||||||
|
{
|
||||||
|
"draworder":"index",
|
||||||
|
"id":2,
|
||||||
|
"name":"",
|
||||||
|
"objects":[
|
||||||
|
{
|
||||||
|
"height":16,
|
||||||
|
"id":1,
|
||||||
|
"name":"",
|
||||||
|
"rotation":0,
|
||||||
|
"type":"",
|
||||||
|
"visible":true,
|
||||||
|
"width":16,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
}],
|
||||||
|
"opacity":1,
|
||||||
|
"type":"objectgroup",
|
||||||
|
"visible":true,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id":45,
|
||||||
|
"objectgroup":
|
||||||
|
{
|
||||||
|
"draworder":"index",
|
||||||
|
"id":2,
|
||||||
|
"name":"",
|
||||||
|
"objects":[
|
||||||
|
{
|
||||||
|
"height":16,
|
||||||
|
"id":1,
|
||||||
|
"name":"",
|
||||||
|
"rotation":0,
|
||||||
|
"type":"",
|
||||||
|
"visible":true,
|
||||||
|
"width":16,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
}],
|
||||||
|
"opacity":1,
|
||||||
|
"type":"objectgroup",
|
||||||
|
"visible":true,
|
||||||
|
"x":0,
|
||||||
|
"y":0
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
"tilewidth":16,
|
||||||
|
"type":"tileset",
|
||||||
|
"version":"1.8"
|
||||||
|
}
|
65
assets/maps/br-tiles.tsx
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<tileset version="1.8" tiledversion="1.8.2" name="br-tiles" tilewidth="16" tileheight="16" tilecount="50" columns="10">
|
||||||
|
<image source="br-tiles.png" width="160" height="80"/>
|
||||||
|
<tile id="10">
|
||||||
|
<objectgroup draworder="index" id="2">
|
||||||
|
<object id="1" x="0" y="0" width="16" height="16"/>
|
||||||
|
</objectgroup>
|
||||||
|
</tile>
|
||||||
|
<tile id="11">
|
||||||
|
<objectgroup draworder="index" id="2">
|
||||||
|
<object id="1" x="0" y="0" width="16" height="16"/>
|
||||||
|
</objectgroup>
|
||||||
|
</tile>
|
||||||
|
<tile id="12">
|
||||||
|
<objectgroup draworder="index" id="2">
|
||||||
|
<object id="1" x="0" y="0" width="16" height="16"/>
|
||||||
|
</objectgroup>
|
||||||
|
</tile>
|
||||||
|
<tile id="13">
|
||||||
|
<objectgroup draworder="index" id="2">
|
||||||
|
<object id="1" x="0" y="0" width="16" height="16"/>
|
||||||
|
</objectgroup>
|
||||||
|
</tile>
|
||||||
|
<tile id="15">
|
||||||
|
<objectgroup draworder="index" id="2">
|
||||||
|
<object id="1" x="0" y="0" width="16" height="16"/>
|
||||||
|
</objectgroup>
|
||||||
|
</tile>
|
||||||
|
<tile id="19">
|
||||||
|
<objectgroup draworder="index" id="2">
|
||||||
|
<object id="1" x="0" y="0" width="16" height="16"/>
|
||||||
|
</objectgroup>
|
||||||
|
</tile>
|
||||||
|
<tile id="20">
|
||||||
|
<objectgroup draworder="index" id="2">
|
||||||
|
<object id="1" x="0" y="0" width="16" height="16"/>
|
||||||
|
</objectgroup>
|
||||||
|
</tile>
|
||||||
|
<tile id="21">
|
||||||
|
<objectgroup draworder="index" id="2">
|
||||||
|
<object id="1" x="0" y="0" width="16" height="16"/>
|
||||||
|
</objectgroup>
|
||||||
|
</tile>
|
||||||
|
<tile id="28">
|
||||||
|
<objectgroup draworder="index" id="2">
|
||||||
|
<object id="1" x="0" y="0" width="16" height="16"/>
|
||||||
|
</objectgroup>
|
||||||
|
</tile>
|
||||||
|
<tile id="43">
|
||||||
|
<objectgroup draworder="index" id="2">
|
||||||
|
<object id="2" x="0" y="0" width="16" height="16"/>
|
||||||
|
<object id="3" x="0.96875" y="0.875" width="14.4375" height="14.2813"/>
|
||||||
|
</objectgroup>
|
||||||
|
</tile>
|
||||||
|
<tile id="44">
|
||||||
|
<objectgroup draworder="index" id="2">
|
||||||
|
<object id="1" x="0" y="0" width="16" height="16"/>
|
||||||
|
</objectgroup>
|
||||||
|
</tile>
|
||||||
|
<tile id="45">
|
||||||
|
<objectgroup draworder="index" id="2">
|
||||||
|
<object id="1" x="0" y="0" width="16" height="16"/>
|
||||||
|
</objectgroup>
|
||||||
|
</tile>
|
||||||
|
</tileset>
|
44
assets/maps/testmap
Normal file
48
assets/maps/testmap.json
Normal file
96
assets/maps/testmap.tmx
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<map version="1.8" tiledversion="1.8.2" orientation="orthogonal" renderorder="right-down" width="42" height="42" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="1">
|
||||||
|
<tileset firstgid="1" source="br-tiles.tsx"/>
|
||||||
|
<layer id="1" name="TileMap" width="42" height="42">
|
||||||
|
<data encoding="csv">
|
||||||
|
11,12,13,35,35,35,36,36,36,35,36,35,35,9,35,35,35,35,35,35,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,35,35,35,35,36,36,35,35,35,35,10,35,35,35,35,35,35,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,35,35,37,35,35,35,35,41,42,43,35,35,35,35,35,35,35,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,35,35,35,35,35,35,38,38,35,35,35,35,35,35,35,35,35,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,35,35,35,35,35,38,38,35,35,35,35,35,35,35,35,35,35,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,35,35,35,35,38,38,35,35,37,35,35,35,35,35,35,35,35,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,35,35,35,38,38,35,35,35,37,37,35,35,35,35,35,35,35,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,35,35,38,38,35,35,35,37,37,37,35,35,35,35,35,35,35,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,35,38,38,35,35,35,35,35,35,37,35,35,35,35,35,35,35,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,34,45,46,34,34,34,45,46,44,45,46,44,45,46,44,45,46,44,45,46,44,45,44,45,44,45,46,45,44,44,44,44,44,44,44,44,14,15,16,
|
||||||
|
14,15,16,34,34,34,34,34,34,34,34,34,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,34,34,34,34,34,34,34,34,34,34,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,34,34,34,41,42,43,34,34,34,34,34,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,34,34,34,34,34,34,34,34,34,34,34,34,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,34,34,34,34,34,34,34,34,34,34,34,34,34,34,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,34,34,34,34,34,34,34,34,34,34,34,34,34,34,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,34,34,34,34,34,34,34,34,34,34,34,34,34,34,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,17,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,17,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,17,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,17,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,17,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,17,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,17,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,17,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,17,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,17,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,44,45,46,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,17,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,17,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,17,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,17,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,17,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,17,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,44,45,46,40,40,14,15,16,
|
||||||
|
14,15,16,17,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,17,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,17,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,17,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,17,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,11,12,13,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,17,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,11,12,13,40,40,40,40,40,14,15,16,40,40,40,40,40,40,14,15,16,
|
||||||
|
14,15,16,17,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,17,18,19,40,40,40,40,40,14,15,16,40,40,40,40,40,40,14,15,16,
|
||||||
|
20,21,22,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,11,12,13
|
||||||
|
</data>
|
||||||
|
</layer>
|
||||||
|
<layer id="3" name="Collision" width="42" height="42" visible="0">
|
||||||
|
<data encoding="csv">
|
||||||
|
2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,
|
||||||
|
2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,
|
||||||
|
2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,
|
||||||
|
2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,
|
||||||
|
2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,
|
||||||
|
2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,
|
||||||
|
2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,2,2,2,
|
||||||
|
2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,0,0,0,0,0,0,2,2,2,
|
||||||
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
|
||||||
|
</data>
|
||||||
|
</layer>
|
||||||
|
</map>
|
14
assets/maps/testmapb64.tmx
Normal file
0
assets/maps/testmapb64decoded.txt
Normal file
BIN
assets/screenshots/BeagleRescue-Screen1.png
Normal file
After Width: | Height: | Size: 8.9 KiB |
BIN
assets/screenshots/BeagleRescue-Screen2.png
Normal file
After Width: | Height: | Size: 9.6 KiB |
BIN
assets/screenshots/UI-preview.ase
Normal file
BIN
assets/textures/actors/beagle.aseprite
Normal file
BIN
assets/textures/actors/beagle.png
Normal file
After Width: | Height: | Size: 757 B |
BIN
assets/textures/actors/beaglepuppy-bark.gif
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
assets/textures/actors/beaglepuppy-idle.gif
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
assets/textures/actors/beaglepuppy.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
assets/textures/actors/firefighter-idle.gif
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
assets/textures/actors/firefighter-walk.gif
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
assets/textures/actors/firefighter.aseprite
Normal file
98
assets/textures/actors/firefighter.json
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
{ "frames": [
|
||||||
|
{
|
||||||
|
"filename": "0",
|
||||||
|
"frame": { "x": 0, "y": 0, "w": 22, "h": 42 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 22, "h": 42 },
|
||||||
|
"sourceSize": { "w": 22, "h": 42 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "1",
|
||||||
|
"frame": { "x": 22, "y": 0, "w": 22, "h": 42 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 22, "h": 42 },
|
||||||
|
"sourceSize": { "w": 22, "h": 42 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "2",
|
||||||
|
"frame": { "x": 44, "y": 0, "w": 22, "h": 42 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 22, "h": 42 },
|
||||||
|
"sourceSize": { "w": 22, "h": 42 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "3",
|
||||||
|
"frame": { "x": 0, "y": 42, "w": 22, "h": 42 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 22, "h": 42 },
|
||||||
|
"sourceSize": { "w": 22, "h": 42 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "4",
|
||||||
|
"frame": { "x": 22, "y": 42, "w": 22, "h": 42 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 22, "h": 42 },
|
||||||
|
"sourceSize": { "w": 22, "h": 42 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "5",
|
||||||
|
"frame": { "x": 44, "y": 42, "w": 22, "h": 42 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 22, "h": 42 },
|
||||||
|
"sourceSize": { "w": 22, "h": 42 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "6",
|
||||||
|
"frame": { "x": 0, "y": 84, "w": 22, "h": 42 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 22, "h": 42 },
|
||||||
|
"sourceSize": { "w": 22, "h": 42 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "7",
|
||||||
|
"frame": { "x": 22, "y": 84, "w": 22, "h": 42 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 22, "h": 42 },
|
||||||
|
"sourceSize": { "w": 22, "h": 42 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "8",
|
||||||
|
"frame": { "x": 44, "y": 84, "w": 22, "h": 42 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 22, "h": 42 },
|
||||||
|
"sourceSize": { "w": 22, "h": 42 },
|
||||||
|
"duration": 100
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"meta": {
|
||||||
|
"app": "http://www.aseprite.org/",
|
||||||
|
"version": "1.2.25-x64",
|
||||||
|
"image": "firefighter.png",
|
||||||
|
"format": "RGBA8888",
|
||||||
|
"size": { "w": 66, "h": 126 },
|
||||||
|
"scale": "1",
|
||||||
|
"frameTags": [
|
||||||
|
{ "name": "idle", "from": 0, "to": 2, "direction": "forward" },
|
||||||
|
{ "name": "walk", "from": 3, "to": 5, "direction": "forward" },
|
||||||
|
{ "name": "jump", "from": 6, "to": 6, "direction": "forward" },
|
||||||
|
{ "name": "fall", "from": 7, "to": 7, "direction": "forward" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
BIN
assets/textures/actors/firefighter.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
assets/textures/arne32-palette.png
Normal file
After Width: | Height: | Size: 217 B |
BIN
assets/textures/particles/fire.aseprite
Normal file
BIN
assets/textures/particles/fire2.aseprite
Normal file
BIN
assets/textures/particles/fire2.gif
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
assets/textures/tiles/background-sky.aseprite
Normal file
BIN
assets/textures/tiles/background-sky.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
assets/textures/tiles/br-tiles.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/textures/tiles/br-tiles.pyxel
Normal file
103
assets/textures/tiles/br-tiles.tsx
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<tileset version="1.8" tiledversion="1.8.2" name="br-tiles" tilewidth="16" tileheight="16" tilecount="50" columns="10">
|
||||||
|
<image source="br-tiles.png" width="160" height="80"/>
|
||||||
|
<tile id="8"/>
|
||||||
|
<tile id="1"/>
|
||||||
|
<tile id="0"/>
|
||||||
|
<tile id="2"/>
|
||||||
|
<tile id="3"/>
|
||||||
|
<tile id="4"/>
|
||||||
|
<tile id="5"/>
|
||||||
|
<tile id="6"/>
|
||||||
|
<tile id="7"/>
|
||||||
|
<tile id="10">
|
||||||
|
<objectgroup draworder="index" id="2">
|
||||||
|
<object id="1" x="0" y="0" width="16" height="16"/>
|
||||||
|
</objectgroup>
|
||||||
|
</tile>
|
||||||
|
<tile id="9"/>
|
||||||
|
<tile id="11">
|
||||||
|
<objectgroup draworder="index" id="2">
|
||||||
|
<object id="1" x="0" y="0" width="16" height="16"/>
|
||||||
|
</objectgroup>
|
||||||
|
</tile>
|
||||||
|
<tile id="12">
|
||||||
|
<objectgroup draworder="index" id="2">
|
||||||
|
<object id="1" x="0" y="0" width="16" height="16"/>
|
||||||
|
</objectgroup>
|
||||||
|
</tile>
|
||||||
|
<tile id="13">
|
||||||
|
<objectgroup draworder="index" id="2">
|
||||||
|
<object id="1" x="0" y="0" width="16" height="16"/>
|
||||||
|
</objectgroup>
|
||||||
|
</tile>
|
||||||
|
<tile id="14"/>
|
||||||
|
<tile id="15">
|
||||||
|
<objectgroup draworder="index" id="2">
|
||||||
|
<object id="1" x="0" y="0" width="16" height="16"/>
|
||||||
|
</objectgroup>
|
||||||
|
</tile>
|
||||||
|
<tile id="16"/>
|
||||||
|
<tile id="17"/>
|
||||||
|
<tile id="18"/>
|
||||||
|
<tile id="19">
|
||||||
|
<objectgroup draworder="index" id="2">
|
||||||
|
<object id="1" x="0" y="0" width="16" height="16"/>
|
||||||
|
</objectgroup>
|
||||||
|
</tile>
|
||||||
|
<tile id="20">
|
||||||
|
<objectgroup draworder="index" id="2">
|
||||||
|
<object id="1" x="0" y="0" width="16" height="16"/>
|
||||||
|
</objectgroup>
|
||||||
|
</tile>
|
||||||
|
<tile id="21">
|
||||||
|
<objectgroup draworder="index" id="2">
|
||||||
|
<object id="1" x="0" y="0" width="16" height="16"/>
|
||||||
|
</objectgroup>
|
||||||
|
</tile>
|
||||||
|
<tile id="22"/>
|
||||||
|
<tile id="23"/>
|
||||||
|
<tile id="24"/>
|
||||||
|
<tile id="25"/>
|
||||||
|
<tile id="26"/>
|
||||||
|
<tile id="27"/>
|
||||||
|
<tile id="28">
|
||||||
|
<objectgroup draworder="index" id="2">
|
||||||
|
<object id="1" x="0" y="0" width="16" height="16"/>
|
||||||
|
</objectgroup>
|
||||||
|
</tile>
|
||||||
|
<tile id="29"/>
|
||||||
|
<tile id="30"/>
|
||||||
|
<tile id="31"/>
|
||||||
|
<tile id="32"/>
|
||||||
|
<tile id="33"/>
|
||||||
|
<tile id="34"/>
|
||||||
|
<tile id="35"/>
|
||||||
|
<tile id="36"/>
|
||||||
|
<tile id="37"/>
|
||||||
|
<tile id="38"/>
|
||||||
|
<tile id="39"/>
|
||||||
|
<tile id="40"/>
|
||||||
|
<tile id="41"/>
|
||||||
|
<tile id="42"/>
|
||||||
|
<tile id="43">
|
||||||
|
<objectgroup draworder="index" id="2">
|
||||||
|
<object id="2" x="0" y="0" width="16" height="16"/>
|
||||||
|
<object id="3" x="0.96875" y="0.875" width="14.4375" height="14.2813"/>
|
||||||
|
</objectgroup>
|
||||||
|
</tile>
|
||||||
|
<tile id="44">
|
||||||
|
<objectgroup draworder="index" id="2">
|
||||||
|
<object id="1" x="0" y="0" width="16" height="16"/>
|
||||||
|
</objectgroup>
|
||||||
|
</tile>
|
||||||
|
<tile id="45">
|
||||||
|
<objectgroup draworder="index" id="2">
|
||||||
|
<object id="1" x="0" y="0" width="16" height="16"/>
|
||||||
|
</objectgroup>
|
||||||
|
</tile>
|
||||||
|
<tile id="46"/>
|
||||||
|
<tile id="47"/>
|
||||||
|
<tile id="48"/>
|
||||||
|
<tile id="49"/>
|
||||||
|
</tileset>
|
BIN
assets/textures/ui/font.ase
Normal file
BIN
assets/textures/ui/ui-element-cloud.aseprite
Normal file
BIN
assets/textures/ui/ui-element-cloud.png
Normal file
After Width: | Height: | Size: 357 B |
BIN
assets/textures/ui/ui-font-cloud-sans.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
1
build/.cmake/api/v1/query/client-kdevelop/query.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"requests": [{"kind": "codemodel", "version": 2}, {"kind": "cmakeFiles", "version": 1}]}
|
BIN
build/.ninja_deps
Normal file
66
build/.ninja_log
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
# ninja log v5
|
||||||
|
5 1257 1680995986388821260 CMakeFiles/BeagleRescue.dir/src/ecs/ECS.cpp.o 2b68ee632af548aa
|
||||||
|
4 4614 1680995989752187549 CMakeFiles/BeagleRescue.dir/src/assetmgr/AssetManager.cpp.o eb4c2e382e340f10
|
||||||
|
4 68 1666035599307923948 libtmx-parser/liblibtmxparser.a 4a03bfde239caf5d
|
||||||
|
1829 5506 1680995990645529632 CMakeFiles/BeagleRescue.dir/src/ui/UIText.cpp.o 2e1a08cbe2ad039c
|
||||||
|
5 803 1665858094321634764 CMakeFiles/BeagleRescue.dir/libtmx-parser/src/base64.cpp.o 4bbee0e045ced8b2
|
||||||
|
8176 8273 1680995073021895354 libtmx-parser/liblibtmxparser.so 9df69ecfe8aa882a
|
||||||
|
3771 6588 1680995071338547771 libtmx-parser/CMakeFiles/libtmxparser.dir/libs/tinyxml2/tinyxml2.cpp.o 96043e32043d331c
|
||||||
|
13 8224 1680995993362222899 CMakeFiles/BeagleRescue.dir/src/game/Game.cpp.o 4ba02c1268a57ad0
|
||||||
|
5 3446 1665858096961659219 CMakeFiles/BeagleRescue.dir/libtmx-parser/src/tmxparser.cpp.o 15f574a728100366
|
||||||
|
4 1896 1680995987032160899 CMakeFiles/BeagleRescue.dir/src/cjson/cJSON.c.o 77f7fe5671dba050
|
||||||
|
5 4075 1680995989215515625 CMakeFiles/BeagleRescue.dir/src/assetmgr/TextureManager.cpp.o 811f88fdfc09263c
|
||||||
|
6990 7109 1680995071858552173 libtmx-parser/libs/tinyxml2/xmltest c7f1f4ebf26757c2
|
||||||
|
4036 6875 1680995071625216864 libtmx-parser/libs/tinyxml2/CMakeFiles/tinyxml2.dir/tinyxml2.cpp.o 660491a0c7495e62
|
||||||
|
1258 5876 1680995991015533256 CMakeFiles/BeagleRescue.dir/src/ui/UINineSlice.cpp.o 203c7ee19411f630
|
||||||
|
2059 8176 1680995072928561230 libtmx-parser/CMakeFiles/libtmxparser.dir/src/tmxparser.cpp.o ead5f95e0e72b1e0
|
||||||
|
4 794 1665858094311634671 CMakeFiles/BeagleRescue.dir/libtmx-parser/libs/tinyxml2/xmltest.cpp.o ee2e170a3bac274c
|
||||||
|
6978 6990 1680995071728551073 libtmx-parser/libs/tinyxml2/libtinyxml2.so d0fad9500a04c852
|
||||||
|
4 1088 1665858094604970721 CMakeFiles/BeagleRescue.dir/libtmx-parser/main.cpp.o 86331d80cf701d8d
|
||||||
|
13 638 1680995985768815183 CMakeFiles/BeagleRescue.dir/src/game/GameStateManager.cpp.o e18efa52ba3b4829
|
||||||
|
638 874 1680995986008817536 CMakeFiles/BeagleRescue.dir/src/game/StateMachine.cpp.o c995c41f2f407d79
|
||||||
|
5 3575 1680995988715510727 CMakeFiles/BeagleRescue.dir/src/assetmgr/MusicManager.cpp.o 743e525b8bc7e022
|
||||||
|
874 1829 1680995986968826945 CMakeFiles/BeagleRescue.dir/src/game/Vector2D.cpp.o d6bbbe0fad885aeb
|
||||||
|
6978 6990 1680995071728551073 libtmx-parser/libs/tinyxml2/libtinyxml2.so.2 d0fad9500a04c852
|
||||||
|
5127 6527 1680995071278547263 libtmx-parser/libs/tinyxml2/CMakeFiles/xmltest.dir/xmltest.cpp.o 88e42020838dcd8e
|
||||||
|
2957 4036 1680995068778526099 libtmx-parser/CMakeFiles/libtmxparser.dir/src/base64.cpp.o e84a5ef1b712902d
|
||||||
|
9777 9902 1680995074651909151 BeagleRescue e5cb768adc438473
|
||||||
|
4 4132 1680995989272182847 CMakeFiles/BeagleRescue.dir/src/assetmgr/GameObject.cpp.o ced4d92dc065c0bf
|
||||||
|
2 730 1681062043486327943 build.ninja bd959f8df49bfbdd
|
||||||
|
6 3453 1680995988588842819 CMakeFiles/BeagleRescue.dir/src/game/Collision.cpp.o d59bce856486c23e
|
||||||
|
6875 6978 1680995071728551073 libtmx-parser/libs/tinyxml2/libtinyxml2.so.2.2.0 8aed3caeabaa38d5
|
||||||
|
20 4401 1680995989538852126 CMakeFiles/BeagleRescue.dir/src/game/Main.cpp.o c1352eaae73a833f
|
||||||
|
4 2192 1665858095708314276 CMakeFiles/BeagleRescue.dir/libtmx-parser/libs/tinyxml2/tinyxml2.cpp.o 60acd5a4117a4833
|
||||||
|
4 2488 1681062059289774035 CMakeFiles/BeagleRescue.dir/src/assetmgr/MusicManager.cpp.o 743e525b8bc7e022
|
||||||
|
4 2608 1681062059413108248 CMakeFiles/BeagleRescue.dir/src/assetmgr/TextureManager.cpp.o 811f88fdfc09263c
|
||||||
|
4 2703 1681062059509775604 CMakeFiles/BeagleRescue.dir/src/game/Collision.cpp.o d59bce856486c23e
|
||||||
|
3 2706 1681062059513108961 CMakeFiles/BeagleRescue.dir/src/assetmgr/GameObject.cpp.o ced4d92dc065c0bf
|
||||||
|
5 2815 1681062059623109746 CMakeFiles/BeagleRescue.dir/src/game/Main.cpp.o c1352eaae73a833f
|
||||||
|
5 2962 1681062059769777459 CMakeFiles/BeagleRescue.dir/src/ui/UIText.cpp.o 2e1a08cbe2ad039c
|
||||||
|
5 3207 1681062060013112528 CMakeFiles/BeagleRescue.dir/src/ui/UINineSlice.cpp.o 203c7ee19411f630
|
||||||
|
3 3347 1681062060153113527 CMakeFiles/BeagleRescue.dir/src/assetmgr/AssetManager.cpp.o eb4c2e382e340f10
|
||||||
|
5 4194 1681062060999786234 CMakeFiles/BeagleRescue.dir/src/game/Game.cpp.o 4ba02c1268a57ad0
|
||||||
|
4194 4286 1681062061093120232 BeagleRescue e58e98489844e561
|
||||||
|
6 591 1681062457555937468 CMakeFiles/BeagleRescue.dir/src/game/GameStateManager.cpp.o e18efa52ba3b4829
|
||||||
|
591 742 1681062457719271959 CMakeFiles/BeagleRescue.dir/src/game/StateMachine.cpp.o c995c41f2f407d79
|
||||||
|
5 1761 1681062458725945758 CMakeFiles/BeagleRescue.dir/src/ecs/ECS.cpp.o 2b68ee632af548aa
|
||||||
|
3 1777 1681062458739279185 CMakeFiles/BeagleRescue.dir/src/cjson/cJSON.c.o 77f7fe5671dba050
|
||||||
|
742 1911 1681062458882613534 CMakeFiles/BeagleRescue.dir/src/game/Vector2D.cpp.o d6bbbe0fad885aeb
|
||||||
|
4 2480 1681062459459284286 CMakeFiles/BeagleRescue.dir/src/assetmgr/TextureManager.cpp.o 811f88fdfc09263c
|
||||||
|
4 2628 1681062459609285349 CMakeFiles/BeagleRescue.dir/src/assetmgr/MusicManager.cpp.o 743e525b8bc7e022
|
||||||
|
4 2658 1681062459635952204 CMakeFiles/BeagleRescue.dir/src/assetmgr/GameObject.cpp.o ced4d92dc065c0bf
|
||||||
|
5 2882 1681062459862620477 CMakeFiles/BeagleRescue.dir/src/game/Collision.cpp.o d59bce856486c23e
|
||||||
|
13 3065 1681062460045955109 CMakeFiles/BeagleRescue.dir/src/game/Main.cpp.o c1352eaae73a833f
|
||||||
|
3 3323 1681062460302623594 CMakeFiles/BeagleRescue.dir/src/assetmgr/AssetManager.cpp.o eb4c2e382e340f10
|
||||||
|
1777 4185 1681062461165963044 CMakeFiles/BeagleRescue.dir/src/ui/UIText.cpp.o 2e1a08cbe2ad039c
|
||||||
|
1761 4194 1681062461172629758 CMakeFiles/BeagleRescue.dir/src/ui/UINineSlice.cpp.o 203c7ee19411f630
|
||||||
|
5 4476 1681062461455965099 CMakeFiles/BeagleRescue.dir/src/game/Game.cpp.o 4ba02c1268a57ad0
|
||||||
|
4476 4568 1681062461545965736 BeagleRescue e58e98489844e561
|
||||||
|
6 3541 1689099824178728855 CMakeFiles/BeagleRescue.dir/src/assetmgr/GameObject.cpp.o ced4d92dc065c0bf
|
||||||
|
7 3541 1689099824178728855 CMakeFiles/BeagleRescue.dir/src/assetmgr/TextureManager.cpp.o 811f88fdfc09263c
|
||||||
|
7 3604 1689099824242062276 CMakeFiles/BeagleRescue.dir/src/assetmgr/MusicManager.cpp.o 743e525b8bc7e022
|
||||||
|
8 3817 1689099824455395905 CMakeFiles/BeagleRescue.dir/src/game/Main.cpp.o c1352eaae73a833f
|
||||||
|
7 3968 1689099824605396113 CMakeFiles/BeagleRescue.dir/src/game/Collision.cpp.o d59bce856486c23e
|
||||||
|
14 4213 1689099824852063121 CMakeFiles/BeagleRescue.dir/src/ui/UIText.cpp.o 2e1a08cbe2ad039c
|
||||||
|
6 4495 1689099825135396846 CMakeFiles/BeagleRescue.dir/src/assetmgr/AssetManager.cpp.o eb4c2e382e340f10
|
||||||
|
9 4558 1689099825195396929 CMakeFiles/BeagleRescue.dir/src/ui/UINineSlice.cpp.o 203c7ee19411f630
|
27
design/collision-PseudoCode.txt
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
|
||||||
|
checkCollision(movingRect, moveVector, solidRect)
|
||||||
|
{
|
||||||
|
// Need to make additional similar checks for each side
|
||||||
|
if (moveVector.x > 0)
|
||||||
|
{
|
||||||
|
if (movingRect.xMax < solidRect.xMin &&
|
||||||
|
movingRect.xMax + moveVector.x > solidRect.xMin)
|
||||||
|
{
|
||||||
|
xHitRatio = (solidRect.xMin - moveingRect.xMax) / moveVector.x
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Also find hit ratio of y movement and see which one will hit first if either does.
|
||||||
|
if (xHitRatio < yHitRatio)
|
||||||
|
{
|
||||||
|
yHitPosMin = movingRect.yMin + moveVector.y * xHitRatio
|
||||||
|
yHitPosMax = movingRect.yMax + moveVector.y * xHitRatio
|
||||||
|
if (yHitPosMin < solidRect.yMax &&
|
||||||
|
yHitPosMax > solidRect.yMin)
|
||||||
|
{
|
||||||
|
// We know here now where we should collide, however if we stop here the collision will feel 'sticky'
|
||||||
|
// rather than just applying the ratio to the movement vector, we want to instead slide along the collision
|
||||||
|
output.x = movingRect.xOrigin + moveVector.x * xHitRatio
|
||||||
|
output.y = movingRect.yOrigin + moveVector.y // Here is where we should split off a new movement vector to check collision again really, since it is a new direction to check, so return the hit position with a new smaller vector to 'finish' the movement.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
7
design/debug.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
Collision Stats:
|
||||||
|
Player Center
|
||||||
|
x: 871
|
||||||
|
y: 690
|
||||||
|
ObjectCollider Center
|
||||||
|
x: 872
|
||||||
|
y: 696
|
70
src/assetmgr/AssetManager.cpp
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
/*
|
||||||
|
* AssetManager.cpp
|
||||||
|
*
|
||||||
|
* Created on: Apr 4, 2020
|
||||||
|
* Author: ayoungblood
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "AssetManager.h"
|
||||||
|
#include "../ecs/Components.h"
|
||||||
|
#include "../ecs/ECS.h"
|
||||||
|
|
||||||
|
|
||||||
|
class Manager;
|
||||||
|
|
||||||
|
AssetManager::AssetManager(Manager* man) : manager(man)
|
||||||
|
{}
|
||||||
|
|
||||||
|
AssetManager::~AssetManager()
|
||||||
|
{}
|
||||||
|
|
||||||
|
// void AssetManager::CreateProjectile(Vector2D pos, Vector2D vel, int range, int speed, std::string id)
|
||||||
|
// {
|
||||||
|
// auto& projectile(manager->addEntity());
|
||||||
|
// projectile.addComponent<TransformComponent>(pos.x, pos.y, 32, 32, 1);
|
||||||
|
// projectile.addComponent<SpriteComponent>(id);
|
||||||
|
// projectile.addComponent<ProjectileComponent>(range,speed,vel);
|
||||||
|
// projectile.addComponent<ColliderComponent>("projectile");
|
||||||
|
// projectile.addGroup(Game::groupProjectiles);
|
||||||
|
// ;}
|
||||||
|
|
||||||
|
//void AssetManager::CreateText(Vector2D pos, std::string textToDisplay, std::string id)
|
||||||
|
//{
|
||||||
|
// auto& text(manager->addEntity());
|
||||||
|
// text.addComponent<TransformComponent>(pos.x,pos.y,32,32,1);
|
||||||
|
//
|
||||||
|
// text.addGroup(Game::groupUI);
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
void AssetManager::AddTexture(std::string id, const char* path)
|
||||||
|
{
|
||||||
|
textures.emplace(id, TextureManager::LoadTexture(path));
|
||||||
|
}
|
||||||
|
|
||||||
|
SDL_Texture* AssetManager::GetTexture(std::string id)
|
||||||
|
{
|
||||||
|
return textures[id];
|
||||||
|
}
|
||||||
|
|
||||||
|
//Sound Mixer
|
||||||
|
|
||||||
|
//Sound Clips
|
||||||
|
void AssetManager::AddSoundClip(std::string id, const char* path)
|
||||||
|
{
|
||||||
|
soundClips.emplace(id, MusicManager::LoadSound(path));
|
||||||
|
}
|
||||||
|
Mix_Chunk* AssetManager::GetSoundClip(std::string id)
|
||||||
|
{
|
||||||
|
return soundClips[id];
|
||||||
|
}
|
||||||
|
|
||||||
|
//Music
|
||||||
|
void AssetManager::AddMusicTrack(std::string id, const char* path)
|
||||||
|
{
|
||||||
|
musicTracks.emplace(id, MusicManager::LoadMusic(path));
|
||||||
|
}
|
||||||
|
Mix_Music* AssetManager::GetMusicTrack(std::string id)
|
||||||
|
{
|
||||||
|
return musicTracks[id];
|
||||||
|
}
|
54
src/assetmgr/AssetManager.h
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
/*
|
||||||
|
* AssetManager.h
|
||||||
|
*
|
||||||
|
* Created on: Apr 4, 2020
|
||||||
|
* Author: ayoungblood
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SRC_ASSETMANAGER_H_
|
||||||
|
#define SRC_ASSETMANAGER_H_
|
||||||
|
|
||||||
|
#include <map>
|
||||||
|
#include <string>
|
||||||
|
#include "TextureManager.h"
|
||||||
|
#include "../game/Vector2D.h"
|
||||||
|
#include "../ecs/ECS.h"
|
||||||
|
#include "../game/Game.hpp"
|
||||||
|
#include "MusicManager.h"
|
||||||
|
|
||||||
|
class AssetManager
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
AssetManager(Manager* man);
|
||||||
|
~AssetManager();
|
||||||
|
|
||||||
|
|
||||||
|
//gameobjects
|
||||||
|
// void CreateProjectile(Vector2D pos, Vector2D vel, int range, int speed, std::string id);
|
||||||
|
void CreateText(Vector2D pos, std::string textToDisplay, std::string id);
|
||||||
|
|
||||||
|
//texture management
|
||||||
|
void AddTexture(std::string id, const char* path);
|
||||||
|
SDL_Texture* GetTexture(std::string id);
|
||||||
|
|
||||||
|
//Sound Mixer
|
||||||
|
//Sound Clips
|
||||||
|
void AddSoundClip(std::string id, const char* path);
|
||||||
|
Mix_Chunk* GetSoundClip(std::string id);
|
||||||
|
|
||||||
|
//Music
|
||||||
|
void AddMusicTrack(std::string id, const char* path);
|
||||||
|
Mix_Music* GetMusicTrack(std::string id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
Manager* manager;
|
||||||
|
std::map<std::string, SDL_Texture*> textures;
|
||||||
|
std::map<std::string, Mix_Chunk*> soundClips;
|
||||||
|
std::map<std::string, Mix_Music*> musicTracks;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* SRC_ASSETMANAGER_H_ */
|
41
src/assetmgr/GameObject.cpp
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/*
|
||||||
|
* GameObject.cpp
|
||||||
|
*
|
||||||
|
* Created on: Feb 11, 2020
|
||||||
|
* Author: ayoungblood
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "GameObject.h"
|
||||||
|
#include "TextureManager.h"
|
||||||
|
|
||||||
|
GameObject::GameObject(const char* texturesheet, int x, int y)
|
||||||
|
{
|
||||||
|
|
||||||
|
objTexture = TextureManager::LoadTexture(texturesheet);
|
||||||
|
|
||||||
|
xpos = x;
|
||||||
|
ypos = y;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GameObject::Update()
|
||||||
|
{
|
||||||
|
xpos++;
|
||||||
|
// ypos = 0;
|
||||||
|
|
||||||
|
srcRect.h = 40;
|
||||||
|
srcRect.w = 30;
|
||||||
|
srcRect.x = 0;
|
||||||
|
srcRect.y = 0;
|
||||||
|
|
||||||
|
destRect.x = xpos;
|
||||||
|
destRect.y = ypos;
|
||||||
|
destRect.w = srcRect.w * 2;
|
||||||
|
destRect.h = srcRect.h * 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GameObject::Render()
|
||||||
|
{
|
||||||
|
SDL_RenderCopy(Game::renderer, objTexture, &srcRect, &destRect);
|
||||||
|
}
|
34
src/assetmgr/GameObject.h
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* GameObject.h
|
||||||
|
*
|
||||||
|
* Created on: Feb 11, 2020
|
||||||
|
* Author: ayoungblood
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SRC_GAMEOBJECT_H_
|
||||||
|
#define SRC_GAMEOBJECT_H_
|
||||||
|
|
||||||
|
#include "../game/Game.hpp"
|
||||||
|
|
||||||
|
class GameObject
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
GameObject(const char* texturesheet, int x, int y);
|
||||||
|
~GameObject();
|
||||||
|
|
||||||
|
void Update();
|
||||||
|
void Render();
|
||||||
|
|
||||||
|
private:
|
||||||
|
int xpos;
|
||||||
|
int ypos;
|
||||||
|
|
||||||
|
SDL_Texture* objTexture;
|
||||||
|
SDL_Rect srcRect, destRect;
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* SRC_GAMEOBJECT_H_ */
|
76
src/assetmgr/Map.cpp
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
/*
|
||||||
|
* Map.cpp
|
||||||
|
*
|
||||||
|
* Created on: Feb 13, 2020
|
||||||
|
* Author: ayoungblood
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "Map.h"
|
||||||
|
#include "../game/Game.hpp"
|
||||||
|
#include <fstream>
|
||||||
|
#include "../ecs/ECS.h"
|
||||||
|
#include "../ecs/Components.h"
|
||||||
|
#include <string>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
extern Manager manager;
|
||||||
|
|
||||||
|
Map::Map(std::string tID, int ms, int ts) : texID(tID), mapScale(ms), tileSize(ts)
|
||||||
|
{
|
||||||
|
scaledSize = ms* ts;
|
||||||
|
width = 0;
|
||||||
|
height = 0;
|
||||||
|
tSize = ts;
|
||||||
|
}
|
||||||
|
|
||||||
|
Map::~Map()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Map::LoadMap(std::string path, int sizeX, int sizeY, int scale)
|
||||||
|
{
|
||||||
|
char c;
|
||||||
|
std::fstream mapFile;
|
||||||
|
mapFile.open(path);
|
||||||
|
int srcX, srcY;
|
||||||
|
|
||||||
|
width = tSize*scale*sizeX;
|
||||||
|
height = tSize*scale*sizeY;
|
||||||
|
|
||||||
|
for (int y = 0; y < sizeY; y++)
|
||||||
|
{
|
||||||
|
for (int x = 0; x < sizeX; x++)
|
||||||
|
{
|
||||||
|
mapFile.get(c);
|
||||||
|
srcY = atoi(&c) * tileSize;
|
||||||
|
mapFile.get(c);
|
||||||
|
srcX = atoi(&c) * tileSize;
|
||||||
|
mapFile.ignore(2,',');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mapFile.ignore();
|
||||||
|
// colliders
|
||||||
|
for (int y =0; y < sizeY; y++)
|
||||||
|
{
|
||||||
|
for (int x = 0; x < sizeX; x++)
|
||||||
|
{
|
||||||
|
mapFile.get(c);
|
||||||
|
if (c == '1')
|
||||||
|
{
|
||||||
|
auto& tcol(manager.addEntity());
|
||||||
|
tcol.addComponent<ColliderComponent>("terrain",x*scaledSize,y*scaledSize,tileSize,scale,texID);
|
||||||
|
tcol.addGroup(Game::groupColliders);
|
||||||
|
}
|
||||||
|
mapFile.ignore(2,',');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mapFile.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Map::AddTile(int srcX, int srcY, int xpos, int ypos)
|
||||||
|
{
|
||||||
|
auto& tile(manager.addEntity());
|
||||||
|
tile.addComponent<TileComponent>(srcX,srcY,xpos,ypos,tileSize, mapScale, texID);
|
||||||
|
tile.addGroup(Game::groupMap);
|
||||||
|
}
|
33
src/assetmgr/Map.h
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
/*
|
||||||
|
* Map.h
|
||||||
|
*
|
||||||
|
* Created on: Feb 13, 2020
|
||||||
|
* Author: ayoungblood
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SRC_MAP_H_
|
||||||
|
#define SRC_MAP_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
class Map
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Map(std::string tID, int ms, int ts);
|
||||||
|
~Map();
|
||||||
|
|
||||||
|
void LoadMap(std::string path, int sizeX, int sizeY, int scale);
|
||||||
|
void AddTile(int srcX, int srcY, int xpos, int ypos);
|
||||||
|
|
||||||
|
int width;
|
||||||
|
int height;
|
||||||
|
int tSize;
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string texID;
|
||||||
|
int mapScale;
|
||||||
|
int tileSize;
|
||||||
|
int scaledSize;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* SRC_MAP_H_ */
|
26
src/assetmgr/MusicManager.cpp
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
* MusicManager.cpp
|
||||||
|
*
|
||||||
|
* Created on: Apr 9, 2020
|
||||||
|
* Author: ayoungblood
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "MusicManager.h"
|
||||||
|
#include <SDL2/SDL_mixer.h>
|
||||||
|
|
||||||
|
Mix_Music* MusicManager::LoadMusic(const char* path){
|
||||||
|
Mix_Music* music = Mix_LoadMUS(path);
|
||||||
|
return music;
|
||||||
|
}
|
||||||
|
|
||||||
|
Mix_Chunk* MusicManager::LoadSound(const char* path){
|
||||||
|
Mix_Chunk* sfx = Mix_LoadWAV(path);
|
||||||
|
return sfx;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Play(Mix_Music* music, int replay)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
void Pause(Mix_Music* music){}
|
||||||
|
void Stop(Mix_Music* music){}
|
25
src/assetmgr/MusicManager.h
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* MusicManager.h
|
||||||
|
*
|
||||||
|
* Created on: Apr 9, 2020
|
||||||
|
* Author: ayoungblood
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SRC_MUSICMANAGER_H_
|
||||||
|
#define SRC_MUSICMANAGER_H_
|
||||||
|
|
||||||
|
#include "../game/Game.hpp"
|
||||||
|
#include <SDL2/SDL_mixer.h>
|
||||||
|
|
||||||
|
class MusicManager
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static Mix_Music* LoadMusic(const char* path);
|
||||||
|
static void Play(Mix_Music* music);
|
||||||
|
static void Pause(Mix_Music* music);
|
||||||
|
static void Stop(Mix_Music* music);
|
||||||
|
static Mix_Chunk* LoadSound(const char* path);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* SRC_MUSICMANAGER_H_ */
|
34
src/assetmgr/TextureManager.cpp
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* TextureManager.cpp
|
||||||
|
*
|
||||||
|
* Created on: Feb 11, 2020
|
||||||
|
* Author: ayoungblood
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "TextureManager.h"
|
||||||
|
|
||||||
|
SDL_Texture* TextureManager::LoadTexture(const char* texture)
|
||||||
|
{
|
||||||
|
SDL_Surface* tempSurface = IMG_Load(texture);
|
||||||
|
SDL_Texture* tex = SDL_CreateTextureFromSurface(Game::renderer, tempSurface);
|
||||||
|
SDL_FreeSurface(tempSurface);
|
||||||
|
return tex;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TextureManager::Draw(SDL_Texture* tex, SDL_Rect src, SDL_Rect dest, SDL_RendererFlip flip)
|
||||||
|
{
|
||||||
|
SDL_RenderCopyEx(Game::renderer, tex, &src, &dest, NULL, NULL, flip);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TextureManager::DrawCollider(SDL_Rect colliderRect)
|
||||||
|
{
|
||||||
|
Vector2D pt1, pt2, pt3, pt4;
|
||||||
|
pt1 = Vector2D(colliderRect.x,colliderRect.y);
|
||||||
|
pt2 = Vector2D(colliderRect.w-2,colliderRect.y);
|
||||||
|
pt3 = Vector2D(colliderRect.x,colliderRect.h-2);
|
||||||
|
pt4 = Vector2D(colliderRect.w-2,colliderRect.h-2);
|
||||||
|
Game::drawLine(pt1,pt2,255,0,255);
|
||||||
|
Game::drawLine(pt1,pt3,255,255,0);
|
||||||
|
Game::drawLine(pt2,pt4,0,0,255);
|
||||||
|
Game::drawLine(pt3,pt4,0,255,0);
|
||||||
|
}
|
22
src/assetmgr/TextureManager.h
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
/*
|
||||||
|
* TextureManager.h
|
||||||
|
*
|
||||||
|
* Created on: Feb 11, 2020
|
||||||
|
* Author: ayoungblood
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SRC_TEXTUREMANAGER_H_
|
||||||
|
#define SRC_TEXTUREMANAGER_H_
|
||||||
|
|
||||||
|
// #include <SDL2/SDL_image.h>
|
||||||
|
#include "../game/Game.hpp"
|
||||||
|
|
||||||
|
class TextureManager
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static SDL_Texture* LoadTexture(const char* fileName);
|
||||||
|
static void Draw(SDL_Texture* tex, SDL_Rect src, SDL_Rect dest, SDL_RendererFlip flip);
|
||||||
|
static void DrawCollider(SDL_Rect colliderRect);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* SRC_TEXTUREMANAGER_H_ */
|
3096
src/cjson/cJSON.c
Normal file
293
src/cjson/cJSON.h
Normal file
@ -0,0 +1,293 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) 2009-2017 Dave Gamble and cJSON contributors
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef cJSON__h
|
||||||
|
#define cJSON__h
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(__WINDOWS__) && (defined(WIN32) || defined(WIN64) || defined(_MSC_VER) || defined(_WIN32))
|
||||||
|
#define __WINDOWS__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __WINDOWS__
|
||||||
|
|
||||||
|
/* When compiling for windows, we specify a specific calling convention to avoid issues where we are being called from a project with a different default calling convention. For windows you have 3 define options:
|
||||||
|
|
||||||
|
CJSON_HIDE_SYMBOLS - Define this in the case where you don't want to ever dllexport symbols
|
||||||
|
CJSON_EXPORT_SYMBOLS - Define this on library build when you want to dllexport symbols (default)
|
||||||
|
CJSON_IMPORT_SYMBOLS - Define this if you want to dllimport symbol
|
||||||
|
|
||||||
|
For *nix builds that support visibility attribute, you can define similar behavior by
|
||||||
|
|
||||||
|
setting default visibility to hidden by adding
|
||||||
|
-fvisibility=hidden (for gcc)
|
||||||
|
or
|
||||||
|
-xldscope=hidden (for sun cc)
|
||||||
|
to CFLAGS
|
||||||
|
|
||||||
|
then using the CJSON_API_VISIBILITY flag to "export" the same symbols the way CJSON_EXPORT_SYMBOLS does
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define CJSON_CDECL __cdecl
|
||||||
|
#define CJSON_STDCALL __stdcall
|
||||||
|
|
||||||
|
/* export symbols by default, this is necessary for copy pasting the C and header file */
|
||||||
|
#if !defined(CJSON_HIDE_SYMBOLS) && !defined(CJSON_IMPORT_SYMBOLS) && !defined(CJSON_EXPORT_SYMBOLS)
|
||||||
|
#define CJSON_EXPORT_SYMBOLS
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(CJSON_HIDE_SYMBOLS)
|
||||||
|
#define CJSON_PUBLIC(type) type CJSON_STDCALL
|
||||||
|
#elif defined(CJSON_EXPORT_SYMBOLS)
|
||||||
|
#define CJSON_PUBLIC(type) __declspec(dllexport) type CJSON_STDCALL
|
||||||
|
#elif defined(CJSON_IMPORT_SYMBOLS)
|
||||||
|
#define CJSON_PUBLIC(type) __declspec(dllimport) type CJSON_STDCALL
|
||||||
|
#endif
|
||||||
|
#else /* !__WINDOWS__ */
|
||||||
|
#define CJSON_CDECL
|
||||||
|
#define CJSON_STDCALL
|
||||||
|
|
||||||
|
#if (defined(__GNUC__) || defined(__SUNPRO_CC) || defined (__SUNPRO_C)) && defined(CJSON_API_VISIBILITY)
|
||||||
|
#define CJSON_PUBLIC(type) __attribute__((visibility("default"))) type
|
||||||
|
#else
|
||||||
|
#define CJSON_PUBLIC(type) type
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* project version */
|
||||||
|
#define CJSON_VERSION_MAJOR 1
|
||||||
|
#define CJSON_VERSION_MINOR 7
|
||||||
|
#define CJSON_VERSION_PATCH 14
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
|
/* cJSON Types: */
|
||||||
|
#define cJSON_Invalid (0)
|
||||||
|
#define cJSON_False (1 << 0)
|
||||||
|
#define cJSON_True (1 << 1)
|
||||||
|
#define cJSON_NULL (1 << 2)
|
||||||
|
#define cJSON_Number (1 << 3)
|
||||||
|
#define cJSON_String (1 << 4)
|
||||||
|
#define cJSON_Array (1 << 5)
|
||||||
|
#define cJSON_Object (1 << 6)
|
||||||
|
#define cJSON_Raw (1 << 7) /* raw json */
|
||||||
|
|
||||||
|
#define cJSON_IsReference 256
|
||||||
|
#define cJSON_StringIsConst 512
|
||||||
|
|
||||||
|
/* The cJSON structure: */
|
||||||
|
typedef struct cJSON
|
||||||
|
{
|
||||||
|
/* next/prev allow you to walk array/object chains. Alternatively, use GetArraySize/GetArrayItem/GetObjectItem */
|
||||||
|
struct cJSON *next;
|
||||||
|
struct cJSON *prev;
|
||||||
|
/* An array or object item will have a child pointer pointing to a chain of the items in the array/object. */
|
||||||
|
struct cJSON *child;
|
||||||
|
|
||||||
|
/* The type of the item, as above. */
|
||||||
|
int type;
|
||||||
|
|
||||||
|
/* The item's string, if type==cJSON_String and type == cJSON_Raw */
|
||||||
|
char *valuestring;
|
||||||
|
/* writing to valueint is DEPRECATED, use cJSON_SetNumberValue instead */
|
||||||
|
int valueint;
|
||||||
|
/* The item's number, if type==cJSON_Number */
|
||||||
|
double valuedouble;
|
||||||
|
|
||||||
|
/* The item's name string, if this item is the child of, or is in the list of subitems of an object. */
|
||||||
|
char *string;
|
||||||
|
} cJSON;
|
||||||
|
|
||||||
|
typedef struct cJSON_Hooks
|
||||||
|
{
|
||||||
|
/* malloc/free are CDECL on Windows regardless of the default calling convention of the compiler, so ensure the hooks allow passing those functions directly. */
|
||||||
|
void *(CJSON_CDECL *malloc_fn)(size_t sz);
|
||||||
|
void (CJSON_CDECL *free_fn)(void *ptr);
|
||||||
|
} cJSON_Hooks;
|
||||||
|
|
||||||
|
typedef int cJSON_bool;
|
||||||
|
|
||||||
|
/* Limits how deeply nested arrays/objects can be before cJSON rejects to parse them.
|
||||||
|
* This is to prevent stack overflows. */
|
||||||
|
#ifndef CJSON_NESTING_LIMIT
|
||||||
|
#define CJSON_NESTING_LIMIT 1000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* returns the version of cJSON as a string */
|
||||||
|
CJSON_PUBLIC(const char*) cJSON_Version(void);
|
||||||
|
|
||||||
|
/* Supply malloc, realloc and free functions to cJSON */
|
||||||
|
CJSON_PUBLIC(void) cJSON_InitHooks(cJSON_Hooks* hooks);
|
||||||
|
|
||||||
|
/* Memory Management: the caller is always responsible to free the results from all variants of cJSON_Parse (with cJSON_Delete) and cJSON_Print (with stdlib free, cJSON_Hooks.free_fn, or cJSON_free as appropriate). The exception is cJSON_PrintPreallocated, where the caller has full responsibility of the buffer. */
|
||||||
|
/* Supply a block of JSON, and this returns a cJSON object you can interrogate. */
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_Parse(const char *value);
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_ParseWithLength(const char *value, size_t buffer_length);
|
||||||
|
/* ParseWithOpts allows you to require (and check) that the JSON is null terminated, and to retrieve the pointer to the final byte parsed. */
|
||||||
|
/* If you supply a ptr in return_parse_end and parsing fails, then return_parse_end will contain a pointer to the error so will match cJSON_GetErrorPtr(). */
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_ParseWithOpts(const char *value, const char **return_parse_end, cJSON_bool require_null_terminated);
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_ParseWithLengthOpts(const char *value, size_t buffer_length, const char **return_parse_end, cJSON_bool require_null_terminated);
|
||||||
|
|
||||||
|
/* Render a cJSON entity to text for transfer/storage. */
|
||||||
|
CJSON_PUBLIC(char *) cJSON_Print(const cJSON *item);
|
||||||
|
/* Render a cJSON entity to text for transfer/storage without any formatting. */
|
||||||
|
CJSON_PUBLIC(char *) cJSON_PrintUnformatted(const cJSON *item);
|
||||||
|
/* Render a cJSON entity to text using a buffered strategy. prebuffer is a guess at the final size. guessing well reduces reallocation. fmt=0 gives unformatted, =1 gives formatted */
|
||||||
|
CJSON_PUBLIC(char *) cJSON_PrintBuffered(const cJSON *item, int prebuffer, cJSON_bool fmt);
|
||||||
|
/* Render a cJSON entity to text using a buffer already allocated in memory with given length. Returns 1 on success and 0 on failure. */
|
||||||
|
/* NOTE: cJSON is not always 100% accurate in estimating how much memory it will use, so to be safe allocate 5 bytes more than you actually need */
|
||||||
|
CJSON_PUBLIC(cJSON_bool) cJSON_PrintPreallocated(cJSON *item, char *buffer, const int length, const cJSON_bool format);
|
||||||
|
/* Delete a cJSON entity and all subentities. */
|
||||||
|
CJSON_PUBLIC(void) cJSON_Delete(cJSON *item);
|
||||||
|
|
||||||
|
/* Returns the number of items in an array (or object). */
|
||||||
|
CJSON_PUBLIC(int) cJSON_GetArraySize(const cJSON *array);
|
||||||
|
/* Retrieve item number "index" from array "array". Returns NULL if unsuccessful. */
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_GetArrayItem(const cJSON *array, int index);
|
||||||
|
/* Get item "string" from object. Case insensitive. */
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_GetObjectItem(const cJSON * const object, const char * const string);
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_GetObjectItemCaseSensitive(const cJSON * const object, const char * const string);
|
||||||
|
CJSON_PUBLIC(cJSON_bool) cJSON_HasObjectItem(const cJSON *object, const char *string);
|
||||||
|
/* For analysing failed parses. This returns a pointer to the parse error. You'll probably need to look a few chars back to make sense of it. Defined when cJSON_Parse() returns 0. 0 when cJSON_Parse() succeeds. */
|
||||||
|
CJSON_PUBLIC(const char *) cJSON_GetErrorPtr(void);
|
||||||
|
|
||||||
|
/* Check item type and return its value */
|
||||||
|
CJSON_PUBLIC(char *) cJSON_GetStringValue(const cJSON * const item);
|
||||||
|
CJSON_PUBLIC(double) cJSON_GetNumberValue(const cJSON * const item);
|
||||||
|
|
||||||
|
/* These functions check the type of an item */
|
||||||
|
CJSON_PUBLIC(cJSON_bool) cJSON_IsInvalid(const cJSON * const item);
|
||||||
|
CJSON_PUBLIC(cJSON_bool) cJSON_IsFalse(const cJSON * const item);
|
||||||
|
CJSON_PUBLIC(cJSON_bool) cJSON_IsTrue(const cJSON * const item);
|
||||||
|
CJSON_PUBLIC(cJSON_bool) cJSON_IsBool(const cJSON * const item);
|
||||||
|
CJSON_PUBLIC(cJSON_bool) cJSON_IsNull(const cJSON * const item);
|
||||||
|
CJSON_PUBLIC(cJSON_bool) cJSON_IsNumber(const cJSON * const item);
|
||||||
|
CJSON_PUBLIC(cJSON_bool) cJSON_IsString(const cJSON * const item);
|
||||||
|
CJSON_PUBLIC(cJSON_bool) cJSON_IsArray(const cJSON * const item);
|
||||||
|
CJSON_PUBLIC(cJSON_bool) cJSON_IsObject(const cJSON * const item);
|
||||||
|
CJSON_PUBLIC(cJSON_bool) cJSON_IsRaw(const cJSON * const item);
|
||||||
|
|
||||||
|
/* These calls create a cJSON item of the appropriate type. */
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_CreateNull(void);
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_CreateTrue(void);
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_CreateFalse(void);
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_CreateBool(cJSON_bool boolean);
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_CreateNumber(double num);
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_CreateString(const char *string);
|
||||||
|
/* raw json */
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_CreateRaw(const char *raw);
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_CreateArray(void);
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_CreateObject(void);
|
||||||
|
|
||||||
|
/* Create a string where valuestring references a string so
|
||||||
|
* it will not be freed by cJSON_Delete */
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_CreateStringReference(const char *string);
|
||||||
|
/* Create an object/array that only references it's elements so
|
||||||
|
* they will not be freed by cJSON_Delete */
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_CreateObjectReference(const cJSON *child);
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_CreateArrayReference(const cJSON *child);
|
||||||
|
|
||||||
|
/* These utilities create an Array of count items.
|
||||||
|
* The parameter count cannot be greater than the number of elements in the number array, otherwise array access will be out of bounds.*/
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_CreateIntArray(const int *numbers, int count);
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_CreateFloatArray(const float *numbers, int count);
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_CreateDoubleArray(const double *numbers, int count);
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_CreateStringArray(const char *const *strings, int count);
|
||||||
|
|
||||||
|
/* Append item to the specified array/object. */
|
||||||
|
CJSON_PUBLIC(cJSON_bool) cJSON_AddItemToArray(cJSON *array, cJSON *item);
|
||||||
|
CJSON_PUBLIC(cJSON_bool) cJSON_AddItemToObject(cJSON *object, const char *string, cJSON *item);
|
||||||
|
/* Use this when string is definitely const (i.e. a literal, or as good as), and will definitely survive the cJSON object.
|
||||||
|
* WARNING: When this function was used, make sure to always check that (item->type & cJSON_StringIsConst) is zero before
|
||||||
|
* writing to `item->string` */
|
||||||
|
CJSON_PUBLIC(cJSON_bool) cJSON_AddItemToObjectCS(cJSON *object, const char *string, cJSON *item);
|
||||||
|
/* Append reference to item to the specified array/object. Use this when you want to add an existing cJSON to a new cJSON, but don't want to corrupt your existing cJSON. */
|
||||||
|
CJSON_PUBLIC(cJSON_bool) cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item);
|
||||||
|
CJSON_PUBLIC(cJSON_bool) cJSON_AddItemReferenceToObject(cJSON *object, const char *string, cJSON *item);
|
||||||
|
|
||||||
|
/* Remove/Detach items from Arrays/Objects. */
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_DetachItemViaPointer(cJSON *parent, cJSON * const item);
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromArray(cJSON *array, int which);
|
||||||
|
CJSON_PUBLIC(void) cJSON_DeleteItemFromArray(cJSON *array, int which);
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromObject(cJSON *object, const char *string);
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromObjectCaseSensitive(cJSON *object, const char *string);
|
||||||
|
CJSON_PUBLIC(void) cJSON_DeleteItemFromObject(cJSON *object, const char *string);
|
||||||
|
CJSON_PUBLIC(void) cJSON_DeleteItemFromObjectCaseSensitive(cJSON *object, const char *string);
|
||||||
|
|
||||||
|
/* Update array items. */
|
||||||
|
CJSON_PUBLIC(cJSON_bool) cJSON_InsertItemInArray(cJSON *array, int which, cJSON *newitem); /* Shifts pre-existing items to the right. */
|
||||||
|
CJSON_PUBLIC(cJSON_bool) cJSON_ReplaceItemViaPointer(cJSON * const parent, cJSON * const item, cJSON * replacement);
|
||||||
|
CJSON_PUBLIC(cJSON_bool) cJSON_ReplaceItemInArray(cJSON *array, int which, cJSON *newitem);
|
||||||
|
CJSON_PUBLIC(cJSON_bool) cJSON_ReplaceItemInObject(cJSON *object,const char *string,cJSON *newitem);
|
||||||
|
CJSON_PUBLIC(cJSON_bool) cJSON_ReplaceItemInObjectCaseSensitive(cJSON *object,const char *string,cJSON *newitem);
|
||||||
|
|
||||||
|
/* Duplicate a cJSON item */
|
||||||
|
CJSON_PUBLIC(cJSON *) cJSON_Duplicate(const cJSON *item, cJSON_bool recurse);
|
||||||
|
/* Duplicate will create a new, identical cJSON item to the one you pass, in new memory that will
|
||||||
|
* need to be released. With recurse!=0, it will duplicate any children connected to the item.
|
||||||
|
* The item->next and ->prev pointers are always zero on return from Duplicate. */
|
||||||
|
/* Recursively compare two cJSON items for equality. If either a or b is NULL or invalid, they will be considered unequal.
|
||||||
|
* case_sensitive determines if object keys are treated case sensitive (1) or case insensitive (0) */
|
||||||
|
CJSON_PUBLIC(cJSON_bool) cJSON_Compare(const cJSON * const a, const cJSON * const b, const cJSON_bool case_sensitive);
|
||||||
|
|
||||||
|
/* Minify a strings, remove blank characters(such as ' ', '\t', '\r', '\n') from strings.
|
||||||
|
* The input pointer json cannot point to a read-only address area, such as a string constant,
|
||||||
|
* but should point to a readable and writable adress area. */
|
||||||
|
CJSON_PUBLIC(void) cJSON_Minify(char *json);
|
||||||
|
|
||||||
|
/* Helper functions for creating and adding items to an object at the same time.
|
||||||
|
* They return the added item or NULL on failure. */
|
||||||
|
CJSON_PUBLIC(cJSON*) cJSON_AddNullToObject(cJSON * const object, const char * const name);
|
||||||
|
CJSON_PUBLIC(cJSON*) cJSON_AddTrueToObject(cJSON * const object, const char * const name);
|
||||||
|
CJSON_PUBLIC(cJSON*) cJSON_AddFalseToObject(cJSON * const object, const char * const name);
|
||||||
|
CJSON_PUBLIC(cJSON*) cJSON_AddBoolToObject(cJSON * const object, const char * const name, const cJSON_bool boolean);
|
||||||
|
CJSON_PUBLIC(cJSON*) cJSON_AddNumberToObject(cJSON * const object, const char * const name, const double number);
|
||||||
|
CJSON_PUBLIC(cJSON*) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string);
|
||||||
|
CJSON_PUBLIC(cJSON*) cJSON_AddRawToObject(cJSON * const object, const char * const name, const char * const raw);
|
||||||
|
CJSON_PUBLIC(cJSON*) cJSON_AddObjectToObject(cJSON * const object, const char * const name);
|
||||||
|
CJSON_PUBLIC(cJSON*) cJSON_AddArrayToObject(cJSON * const object, const char * const name);
|
||||||
|
|
||||||
|
/* When assigning an integer value, it needs to be propagated to valuedouble too. */
|
||||||
|
#define cJSON_SetIntValue(object, number) ((object) ? (object)->valueint = (object)->valuedouble = (number) : (number))
|
||||||
|
/* helper for the cJSON_SetNumberValue macro */
|
||||||
|
CJSON_PUBLIC(double) cJSON_SetNumberHelper(cJSON *object, double number);
|
||||||
|
#define cJSON_SetNumberValue(object, number) ((object != NULL) ? cJSON_SetNumberHelper(object, (double)number) : (number))
|
||||||
|
/* Change the valuestring of a cJSON_String object, only takes effect when type of object is cJSON_String */
|
||||||
|
CJSON_PUBLIC(char*) cJSON_SetValuestring(cJSON *object, const char *valuestring);
|
||||||
|
|
||||||
|
/* Macro for iterating over an array or object */
|
||||||
|
#define cJSON_ArrayForEach(element, array) for(element = (array != NULL) ? (array)->child : NULL; element != NULL; element = element->next)
|
||||||
|
|
||||||
|
/* malloc/free objects using the malloc/free functions that have been set with cJSON_InitHooks */
|
||||||
|
CJSON_PUBLIC(void *) cJSON_malloc(size_t size);
|
||||||
|
CJSON_PUBLIC(void) cJSON_free(void *object);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
7
src/config/config.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"GameName":"Beagle Rescue",
|
||||||
|
"WindowName":"Beagle Rescue",
|
||||||
|
"WindowSize":{"w":427,"h":240},
|
||||||
|
"WindowFullScreen": 0,
|
||||||
|
"GlobalScale": 2
|
||||||
|
}
|
6
src/config/credits.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"GameName":"Beagle Rescue",
|
||||||
|
"Developers": "Alan Youngblood, Simon Zaleski, Daniel Rinaldi",
|
||||||
|
"LibraryDevelopers": "Sam Lantinga, Dave Gamble, Carl Birch, Job Vranish, David Lafreniere, Bayle Jonathan, Robin Berg Pettersen",
|
||||||
|
"SpecialThanks":"Nic Allen, Brian Lhota, Rodrigo Monteiro"
|
||||||
|
}
|
28
src/ecs/Animation.h
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
* Animation.h
|
||||||
|
*
|
||||||
|
* Created on: Mar 27, 2020
|
||||||
|
* Author: ayoungblood
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SRC_ECS_ANIMATION_H_
|
||||||
|
#define SRC_ECS_ANIMATION_H_
|
||||||
|
|
||||||
|
struct Animation
|
||||||
|
{
|
||||||
|
int index;
|
||||||
|
int frames;
|
||||||
|
int speed;
|
||||||
|
|
||||||
|
Animation() {}
|
||||||
|
Animation(int i, int f, int s)
|
||||||
|
{
|
||||||
|
index = i;
|
||||||
|
frames = f;
|
||||||
|
speed = s;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* SRC_ECS_ANIMATION_H_ */
|
125
src/ecs/ColliderComponent.h
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
/*
|
||||||
|
* ColliderComponent.h
|
||||||
|
*
|
||||||
|
* Created on: Mar 8, 2020
|
||||||
|
* Author: ayoungblood
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SRC_ECS_COLLIDERCOMPONENT_H_
|
||||||
|
#define SRC_ECS_COLLIDERCOMPONENT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <SDL2/SDL.h>
|
||||||
|
#include "Components.h"
|
||||||
|
#include "ECS.h"
|
||||||
|
#include "../assetmgr/TextureManager.h"
|
||||||
|
#include <iostream>
|
||||||
|
#include "../game/Vector2D.h"
|
||||||
|
|
||||||
|
class ColliderComponent : public Component
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
SDL_Rect collider;
|
||||||
|
std::string tag;
|
||||||
|
|
||||||
|
SDL_Texture* tex;
|
||||||
|
SDL_Rect srcR, destR;
|
||||||
|
|
||||||
|
int offsetX = 0;
|
||||||
|
int offsetY = 0;
|
||||||
|
|
||||||
|
bool hidden = true;
|
||||||
|
|
||||||
|
Vector2D center;
|
||||||
|
|
||||||
|
TransformComponent* transform;
|
||||||
|
|
||||||
|
ColliderComponent()
|
||||||
|
{
|
||||||
|
center.Zero();
|
||||||
|
}
|
||||||
|
|
||||||
|
ColliderComponent(std::string t)
|
||||||
|
{
|
||||||
|
tag = t;
|
||||||
|
}
|
||||||
|
|
||||||
|
ColliderComponent(std::string t, int xpos, int ypos, int size, int scale, std::string texture)
|
||||||
|
{
|
||||||
|
tag = t;
|
||||||
|
collider.x = xpos;
|
||||||
|
collider.y = ypos;
|
||||||
|
collider.w = collider.h = size*scale;
|
||||||
|
setTex(texture);
|
||||||
|
center.x = collider.x+collider.w/2;
|
||||||
|
center.y = collider.y+collider.h/2;
|
||||||
|
}
|
||||||
|
|
||||||
|
ColliderComponent(std::string t, int width, int height, bool hasOffset, int oX, int oY, std::string texture)
|
||||||
|
{
|
||||||
|
tag = t;
|
||||||
|
collider.w = width;
|
||||||
|
collider.h = height;
|
||||||
|
offsetX = oX;
|
||||||
|
offsetY = oY;
|
||||||
|
setTex(texture);
|
||||||
|
center.x = collider.x+collider.w/2;
|
||||||
|
center.y = collider.y+collider.h/2;
|
||||||
|
}
|
||||||
|
|
||||||
|
void init() override
|
||||||
|
{
|
||||||
|
if (!entity->hasComponent<TransformComponent>())
|
||||||
|
{
|
||||||
|
entity->addComponent<TransformComponent>();
|
||||||
|
}
|
||||||
|
transform = &entity->getComponent<TransformComponent>();
|
||||||
|
collider.x = collider.x + offsetX;
|
||||||
|
collider.y = collider.y + offsetX;
|
||||||
|
tex = TextureManager::LoadTexture("assets/ColTex.png");
|
||||||
|
srcR = { 0, 0, 16, 16};
|
||||||
|
destR = { collider.x, collider.y, collider.w, collider.h };
|
||||||
|
}
|
||||||
|
|
||||||
|
void update() override
|
||||||
|
{
|
||||||
|
if(tag != "terrain")
|
||||||
|
{
|
||||||
|
collider.x = static_cast<int>(transform->position.x+offsetX);
|
||||||
|
collider.y = static_cast<int>(transform->position.y+offsetY);
|
||||||
|
}
|
||||||
|
destR.x = collider.x - Game::camera.x;
|
||||||
|
destR.y = collider.y - Game::camera.y;
|
||||||
|
center.x = collider.x+collider.w/2;
|
||||||
|
center.y = collider.y+collider.h/2;
|
||||||
|
// collider.x = transform->position.x;
|
||||||
|
// collider.y = transform->position.y;
|
||||||
|
}
|
||||||
|
|
||||||
|
void draw() override
|
||||||
|
{
|
||||||
|
// if(tag == "terrain")
|
||||||
|
// {
|
||||||
|
// TextureManager::Draw(tex, srcR, destR, SDL_FLIP_NONE);
|
||||||
|
// }
|
||||||
|
if(hidden == false)
|
||||||
|
{
|
||||||
|
// TextureManager::Draw(tex, srcR,destR,SDL_FLIP_NONE);
|
||||||
|
SDL_SetRenderDrawColor(Game::renderer,255,0,255,134);
|
||||||
|
SDL_RenderDrawRect(Game::renderer, &destR);
|
||||||
|
// SDL_RenderDrawPoint(Game::renderer, center.x, center.y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void setTex(std::string id)
|
||||||
|
{
|
||||||
|
tex = Game::assets->GetTexture(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* SRC_ECS_COLLIDERCOMPONENT_H_ */
|
22
src/ecs/Components.h
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
/*
|
||||||
|
* Components.h
|
||||||
|
*
|
||||||
|
* Created on: Feb 21, 2020
|
||||||
|
* Author: ayoungblood
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SRC_COMPONENTS_H_
|
||||||
|
#define SRC_COMPONENTS_H_
|
||||||
|
|
||||||
|
#include "ECS.h"
|
||||||
|
#include "TransformComponent.h"
|
||||||
|
#include "SpriteComponent.h"
|
||||||
|
#include "KeyboardController.h"
|
||||||
|
#include "ColliderComponent.h"
|
||||||
|
#include "PlayerController.h"
|
||||||
|
#include "ProjectileComponent.h"
|
||||||
|
#include "TileComponent.h"
|
||||||
|
#include "TileMapComponent.h"
|
||||||
|
#include "UITextComponent.h"
|
||||||
|
|
||||||
|
#endif /* SRC_COMPONENTS_H_ */
|
19
src/ecs/ECS.cpp
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
/*
|
||||||
|
* ECS.cpp
|
||||||
|
*
|
||||||
|
* Created on: Mar 24, 2020
|
||||||
|
* Author: ayoungblood
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "ECS.h"
|
||||||
|
|
||||||
|
void Entity::addGroup(Group mGroup)
|
||||||
|
{
|
||||||
|
groupBitset[mGroup] = true;
|
||||||
|
manager.AddToGroup(this, mGroup);
|
||||||
|
}
|
||||||
|
void Entity::setTag(std::string t)
|
||||||
|
{
|
||||||
|
this->tag = t;
|
||||||
|
}
|
||||||
|
|
200
src/ecs/ECS.h
Normal file
@ -0,0 +1,200 @@
|
|||||||
|
/*
|
||||||
|
* ECS.h
|
||||||
|
*
|
||||||
|
* Created on: Feb 21, 2020
|
||||||
|
* Author: ayoungblood
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SRC_ECS_H_
|
||||||
|
#define SRC_ECS_H_
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
#include <vector>
|
||||||
|
#include <memory>
|
||||||
|
#include <algorithm>
|
||||||
|
#include <bitset>
|
||||||
|
#include <array>
|
||||||
|
|
||||||
|
class Component;
|
||||||
|
class Entity;
|
||||||
|
class Manager;
|
||||||
|
|
||||||
|
using ComponentID = std::size_t;
|
||||||
|
using Group = std::size_t;
|
||||||
|
|
||||||
|
inline ComponentID getNewComponentTypeID()
|
||||||
|
{
|
||||||
|
static ComponentID lastID = 0u;
|
||||||
|
return lastID++;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template <typename T> inline ComponentID getComponentTypeID() noexcept
|
||||||
|
{
|
||||||
|
static_assert (std::is_base_of<Component, T>::value, "");
|
||||||
|
static ComponentID typeID = getNewComponentTypeID();
|
||||||
|
return typeID;
|
||||||
|
}
|
||||||
|
|
||||||
|
constexpr std::size_t maxComponents = 32;
|
||||||
|
constexpr std::size_t maxGroups = 32;
|
||||||
|
constexpr std::size_t maxEntities = 32;
|
||||||
|
|
||||||
|
using ComponentBitSet = std::bitset<maxComponents>;
|
||||||
|
using GroupBitset = std::bitset<maxGroups>;
|
||||||
|
|
||||||
|
using ComponentArray = std::array<Component*, maxComponents>;
|
||||||
|
|
||||||
|
class Component
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Entity* entity;
|
||||||
|
|
||||||
|
virtual void init() {}
|
||||||
|
virtual void update() {}
|
||||||
|
virtual void draw() {}
|
||||||
|
|
||||||
|
virtual ~Component() {}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
class Entity
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
Manager& manager;
|
||||||
|
bool active = true;
|
||||||
|
std::vector<std::unique_ptr<Component>> components;
|
||||||
|
ComponentArray componentArray;
|
||||||
|
ComponentBitSet componentBitSet;
|
||||||
|
GroupBitset groupBitset;
|
||||||
|
|
||||||
|
public:
|
||||||
|
Entity(Manager& mManager) : manager(mManager) {}
|
||||||
|
|
||||||
|
void update()
|
||||||
|
{
|
||||||
|
for(auto& c : components) c->update();
|
||||||
|
}
|
||||||
|
void draw()
|
||||||
|
{
|
||||||
|
for(auto& c : components) c->draw();
|
||||||
|
}
|
||||||
|
bool isActive() const { return active; }
|
||||||
|
void destroy() { active = false; }
|
||||||
|
bool hasGroup(Group mGroup)
|
||||||
|
{
|
||||||
|
return groupBitset[mGroup];
|
||||||
|
}
|
||||||
|
|
||||||
|
void addGroup(Group mGroup);
|
||||||
|
void delGroup(Group mGroup)
|
||||||
|
{
|
||||||
|
groupBitset[mGroup] = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string tag;
|
||||||
|
void setTag(std::string t);
|
||||||
|
|
||||||
|
Entity* getEntity()
|
||||||
|
{
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T> bool hasComponent() const
|
||||||
|
{
|
||||||
|
return componentBitSet[getComponentTypeID<T>()];
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T, typename... TArgs>
|
||||||
|
T& addComponent(TArgs&&... mArgs)
|
||||||
|
{
|
||||||
|
T* c(new T(std::forward<TArgs>(mArgs)...));
|
||||||
|
c->entity = this;
|
||||||
|
std::unique_ptr<Component> uPtr{ c };
|
||||||
|
components.emplace_back(std::move(uPtr));
|
||||||
|
|
||||||
|
componentArray[getComponentTypeID<T>()] = c;
|
||||||
|
componentBitSet[getComponentTypeID<T>()] = true;
|
||||||
|
|
||||||
|
c->init();
|
||||||
|
return *c;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename T> T& getComponent() const
|
||||||
|
{
|
||||||
|
auto ptr(componentArray[getComponentTypeID<T>()]);
|
||||||
|
return *static_cast<T*>(ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
class Manager
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
std::vector<std::unique_ptr<Entity>> entities;
|
||||||
|
std::array<std::vector<Entity*>, maxGroups> groupedEntities;
|
||||||
|
std::vector<std::vector<Entity*>> taggedEntities;
|
||||||
|
public:
|
||||||
|
void update()
|
||||||
|
{
|
||||||
|
for (auto& e : entities) e->update();
|
||||||
|
}
|
||||||
|
void draw()
|
||||||
|
{
|
||||||
|
for (auto& e : entities) e->draw();
|
||||||
|
}
|
||||||
|
void refresh()
|
||||||
|
{
|
||||||
|
for (auto i(0u); i < maxGroups; i++)
|
||||||
|
{
|
||||||
|
auto& v(groupedEntities[i]);
|
||||||
|
v.erase(
|
||||||
|
std::remove_if(std::begin(v), std::end(v),
|
||||||
|
[i](Entity* mEntity)
|
||||||
|
{
|
||||||
|
return !mEntity->isActive() || !mEntity->hasGroup(i);
|
||||||
|
}),
|
||||||
|
std::end(v));
|
||||||
|
}
|
||||||
|
|
||||||
|
entities.erase(std::remove_if(std::begin(entities), std::end(entities),
|
||||||
|
[](const std::unique_ptr<Entity> &mEntity)
|
||||||
|
{
|
||||||
|
return !mEntity->isActive();
|
||||||
|
}),
|
||||||
|
std::end(entities));
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddToGroup(Entity* mEntity, Group mGroup)
|
||||||
|
{
|
||||||
|
groupedEntities[mGroup].emplace_back(mEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<Entity*> getEntitiesByTag(std::string t)
|
||||||
|
{
|
||||||
|
std::vector<Entity*> taggedEntities;
|
||||||
|
for (int e = 0; e<=entities.size(); e++)
|
||||||
|
{
|
||||||
|
if (entities[e]->tag == t)
|
||||||
|
{
|
||||||
|
taggedEntities.emplace_back(entities[e]->getEntity());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return taggedEntities;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<Entity*>& getGroup(Group mGroup)
|
||||||
|
{
|
||||||
|
return groupedEntities[mGroup];
|
||||||
|
}
|
||||||
|
|
||||||
|
Entity& addEntity()
|
||||||
|
{
|
||||||
|
Entity* e = new Entity(*this);
|
||||||
|
std::unique_ptr<Entity> uPtr{ e };
|
||||||
|
entities.emplace_back(std::move(uPtr));
|
||||||
|
return *e;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* SRC_ECS_H_ */
|
281
src/ecs/KeyboardController.h
Normal file
@ -0,0 +1,281 @@
|
|||||||
|
/*
|
||||||
|
* KeyboardController.h
|
||||||
|
*
|
||||||
|
* Created on: Mar 1, 2020
|
||||||
|
* Author: ayoungblood
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SRC_ECS_KEYBOARDCONTROLLER_H_
|
||||||
|
#define SRC_ECS_KEYBOARDCONTROLLER_H_
|
||||||
|
|
||||||
|
#include "../game/Game.hpp"
|
||||||
|
#include "ECS.h"
|
||||||
|
#include "Components.h"
|
||||||
|
#include "PlayerController.h"
|
||||||
|
#include "../assetmgr/AssetManager.h"
|
||||||
|
#include "ColliderComponent.h"
|
||||||
|
#include <cmath>
|
||||||
|
// #include "../game/Vector2D.h"
|
||||||
|
|
||||||
|
class KeyboardController : public Component
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
TransformComponent *transform;
|
||||||
|
SpriteComponent *sprite;
|
||||||
|
PlayerController *playerCtrl;
|
||||||
|
ColliderComponent *collider;
|
||||||
|
|
||||||
|
Game *game;
|
||||||
|
|
||||||
|
void init() override
|
||||||
|
{
|
||||||
|
transform = &entity->getComponent<TransformComponent>();
|
||||||
|
sprite = &entity->getComponent<SpriteComponent>();
|
||||||
|
// collider = &entity->getComponent<ColliderComponent>();
|
||||||
|
// playerCtrl = &entity->getComponent<PlayerController>();
|
||||||
|
}
|
||||||
|
|
||||||
|
void update() override
|
||||||
|
{
|
||||||
|
if (Game::event.type == SDL_KEYDOWN)
|
||||||
|
{
|
||||||
|
switch (Game::event.key.keysym.sym)
|
||||||
|
{
|
||||||
|
case SDLK_UP:
|
||||||
|
if(Game::gsm->currentState == GameStateManager::ST_COREGAME){
|
||||||
|
// if(transform->position.y>0){
|
||||||
|
// ====== Get Player.yTile and scan column up ScreenTilesHeight/2 on Player.xTile-1, Player.xTile, and Player.xTile+1 return first hit that is > 0 for each row.
|
||||||
|
// transform->tilePos.x
|
||||||
|
transform->velocity.y = -1;
|
||||||
|
// if(Game::playerIsGrounded){
|
||||||
|
sprite->Play("Walk");
|
||||||
|
// }
|
||||||
|
sprite->spriteFlip = SDL_FLIP_NONE;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case SDLK_DOWN:
|
||||||
|
if(Game::gsm->currentState == GameStateManager::ST_COREGAME){
|
||||||
|
if(transform->position.y<Game::levelMap.h){
|
||||||
|
transform->velocity.y = 1;
|
||||||
|
// if(Game::playerIsGrounded){
|
||||||
|
sprite->Play("Walk");
|
||||||
|
// }
|
||||||
|
int *borders;
|
||||||
|
borders = Game::predictCollisions();
|
||||||
|
sprite->spriteFlip = SDL_FLIP_NONE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case SDLK_LEFT:
|
||||||
|
if(Game::gsm->currentState == GameStateManager::ST_COREGAME){
|
||||||
|
if(transform->position.x>Game::levelMap.x){
|
||||||
|
transform->velocity.x = -1;
|
||||||
|
// if(Game::playerIsGrounded){
|
||||||
|
sprite->Play("Walk");
|
||||||
|
// }
|
||||||
|
sprite->spriteFlip = SDL_FLIP_NONE;
|
||||||
|
}
|
||||||
|
// if (playerCtrl == NULL){
|
||||||
|
// printf("No player controller found\n");
|
||||||
|
// } else {
|
||||||
|
// printf("playerctrl.lastsafepos .x: %g .y: %g \n",playerCtrl->lastSafePosition.x,playerCtrl->lastSafePosition.y);
|
||||||
|
// playerCtrl->lastSafePosition.x = transform->position.x;
|
||||||
|
// }
|
||||||
|
// transform->lastSafePos = Vector2D(transform->position.x,transform->position.y);
|
||||||
|
// printf("lastSafePos .x: %g .y: %g \n",transform->lastSafePos.x,transform->lastSafePos.y);
|
||||||
|
// Game::pTileX
|
||||||
|
// if(transform->position.x>0){
|
||||||
|
|
||||||
|
/*int *borders;
|
||||||
|
borders = Game::predictCollisions();
|
||||||
|
float max = borders[0];
|
||||||
|
for (int b=0;b<3;b++){
|
||||||
|
if (borders[b]>max){
|
||||||
|
max = borders[b];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
float desiredMovement = -1*transform->speed*0.016; // 0.016 is the FrameTime from the Main.cpp core game loop. later, we will pass in the variable
|
||||||
|
float difference = std::abs(max-transform->position.x);
|
||||||
|
if(max*transform->scale<desiredMovement+transform->position.x){
|
||||||
|
Game::playerIsGrounded = false;
|
||||||
|
transform->velocity.x = -1;
|
||||||
|
sprite->Play("Walk");
|
||||||
|
sprite->spriteFlip = SDL_FLIP_NONE;
|
||||||
|
}else{
|
||||||
|
// transform->velocity.x = -difference/desiredMovement;
|
||||||
|
Game::playerIsGrounded = true;
|
||||||
|
transform->velocity.x = 0;
|
||||||
|
sprite->Play("Idle");
|
||||||
|
sprite->spriteFlip = SDL_FLIP_NONE;
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case SDLK_RIGHT:
|
||||||
|
if(Game::gsm->currentState == GameStateManager::ST_COREGAME){
|
||||||
|
// &entity->getComponent<PlayerController>().setLastSafePos(Vector2D(transform->position.x,transform->position.y));
|
||||||
|
// playerCtrl->lastSafePosition.x = transform->position.x;
|
||||||
|
// transform->lastSafePos = Vector2D(transform->position.x,transform->position.y);
|
||||||
|
// =========
|
||||||
|
// Do a pre-check for tile-based smooth algorithm
|
||||||
|
// =========
|
||||||
|
// int intersectionTileX = collider->center.x;
|
||||||
|
if(transform->position.x<Game::levelMap.w){
|
||||||
|
transform->velocity.x = 1;
|
||||||
|
// if(Game::playerIsGrounded){
|
||||||
|
sprite->Play("Walk");
|
||||||
|
// }
|
||||||
|
sprite->spriteFlip = SDL_FLIP_HORIZONTAL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
// case SDLK_a:
|
||||||
|
// if(Game::gsm->currentState == GameStateManager::ST_COREGAME){
|
||||||
|
// transform->velocity.x = -1;
|
||||||
|
// if(Game::playerIsGrounded){
|
||||||
|
// sprite->Play("Walk");
|
||||||
|
// }
|
||||||
|
// sprite->spriteFlip = SDL_FLIP_NONE;
|
||||||
|
// }
|
||||||
|
// break;
|
||||||
|
// case SDLK_d:
|
||||||
|
// if(Game::gsm->currentState == GameStateManager::ST_COREGAME){
|
||||||
|
// transform->velocity.x = 1;
|
||||||
|
// if(Game::playerIsGrounded){
|
||||||
|
// sprite->Play("Walk");
|
||||||
|
// }
|
||||||
|
// sprite->spriteFlip = SDL_FLIP_HORIZONTAL;
|
||||||
|
// }
|
||||||
|
// break;
|
||||||
|
case SDLK_k:
|
||||||
|
if (!Game::debugCollisionBoxes)
|
||||||
|
{ Game::debugCollisionBoxes = true; }
|
||||||
|
else
|
||||||
|
{Game::debugCollisionBoxes = false; }
|
||||||
|
if (!Game::debugMenu)
|
||||||
|
{ Game::debugMenu = true; }
|
||||||
|
else
|
||||||
|
{ Game::debugMenu = false; }
|
||||||
|
break;
|
||||||
|
case SDLK_j:
|
||||||
|
if(Game::playerIsGrounded){
|
||||||
|
if(Game::gsm->currentState == GameStateManager::ST_COREGAME){
|
||||||
|
if (Mix_PlayChannel(-1, Game::assets->GetSoundClip("bwoop"),0) == 0)
|
||||||
|
{
|
||||||
|
Mix_PlayChannel(-1, Game::assets->GetSoundClip("bwoop"),0);
|
||||||
|
}
|
||||||
|
// transform->lastSafePos = Vector2D(transform->position.x,transform->position.y);
|
||||||
|
Game::gravityOnPlayer = true;
|
||||||
|
sprite->Play("Jump");
|
||||||
|
transform->velocity.y = -2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case SDLK_u:
|
||||||
|
Game::gsm->AdvanceState();
|
||||||
|
break;
|
||||||
|
case SDLK_i:
|
||||||
|
Game::gsm->GameOver();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ===============================================
|
||||||
|
// ON KEY UP
|
||||||
|
// ===============================================
|
||||||
|
else if (Game::event.type == SDL_KEYUP)
|
||||||
|
{
|
||||||
|
switch (Game::event.key.keysym.sym)
|
||||||
|
{
|
||||||
|
case SDLK_LEFT:
|
||||||
|
if(Game::gsm->currentState == GameStateManager::ST_COREGAME){
|
||||||
|
transform->velocity.x = 0;
|
||||||
|
sprite->Play("Idle");
|
||||||
|
Game::playerIsGrounded = false;
|
||||||
|
// if (!Game::gravityOnPlayer){
|
||||||
|
// Game::gravityOnPlayer = true;
|
||||||
|
// // sprite->Play("Fall");
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case SDLK_RIGHT:
|
||||||
|
if(Game::gsm->currentState == GameStateManager::ST_COREGAME){
|
||||||
|
transform->velocity.x = 0;
|
||||||
|
sprite->Play("Idle");
|
||||||
|
// if (!Game::gravityOnPlayer){
|
||||||
|
// Game::gravityOnPlayer = true;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case SDLK_UP:
|
||||||
|
if(Game::gsm->currentState == GameStateManager::ST_COREGAME){
|
||||||
|
transform->velocity.y = 0;
|
||||||
|
sprite->Play("Idle");
|
||||||
|
// if (!Game::gravityOnPlayer){
|
||||||
|
// Game::gravityOnPlayer = true;
|
||||||
|
// // sprite->Play("Fall");
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case SDLK_DOWN:
|
||||||
|
if(Game::gsm->currentState == GameStateManager::ST_COREGAME){
|
||||||
|
transform->velocity.y = 0;
|
||||||
|
sprite->Play("Idle");
|
||||||
|
// if (!Game::gravityOnPlayer){
|
||||||
|
// Game::gravityOnPlayer = true;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
// case SDLK_a:
|
||||||
|
// if(Game::gsm->currentState == GameStateManager::ST_COREGAME){
|
||||||
|
// transform->velocity.x = 0;
|
||||||
|
// sprite->Play("Idle");
|
||||||
|
// if (!Game::gravityOnPlayer){
|
||||||
|
// Game::gravityOnPlayer = true;
|
||||||
|
// // sprite->Play("Fall");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// break;
|
||||||
|
// case SDLK_d:
|
||||||
|
// if(Game::gsm->currentState == GameStateManager::ST_COREGAME){
|
||||||
|
// transform->velocity.x = 0;
|
||||||
|
// sprite->Play("Idle");
|
||||||
|
// if (!Game::gravityOnPlayer){
|
||||||
|
// Game::gravityOnPlayer = true;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// break;
|
||||||
|
case SDLK_k:
|
||||||
|
break;
|
||||||
|
case SDLK_j:
|
||||||
|
if(Game::gsm->currentState == GameStateManager::ST_COREGAME){
|
||||||
|
transform->velocity.y = 0;
|
||||||
|
sprite->Play("Fall");
|
||||||
|
Game::gravityOnPlayer = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case SDLK_u:
|
||||||
|
break;
|
||||||
|
case SDLK_i:
|
||||||
|
break;
|
||||||
|
// case SDLK_d:
|
||||||
|
// if (Game::debugMenu == false){
|
||||||
|
// Game::debugMenu = true;}
|
||||||
|
// else {
|
||||||
|
// Game::debugMenu = false;
|
||||||
|
// }
|
||||||
|
// break;
|
||||||
|
case SDLK_ESCAPE: // exit the game when Escape pressed
|
||||||
|
Game::isRunning = false;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* SRC_ECS_KEYBOARDCONTROLLER_H_ */
|
77
src/ecs/PlayerController.h
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
/*
|
||||||
|
* PlayerController.h
|
||||||
|
*
|
||||||
|
* Created on: Aug 27, 2021
|
||||||
|
* Author: ayoungblood
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SRC_ECS_PlayerController_H_
|
||||||
|
#define SRC_ECS_PlayerController_H_
|
||||||
|
|
||||||
|
#include "Components.h"
|
||||||
|
#include "../game/Vector2D.h"
|
||||||
|
|
||||||
|
class PlayerController : public Component
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
Vector2D lastSafePosition;
|
||||||
|
float jumpTime;
|
||||||
|
float jumpForce;
|
||||||
|
|
||||||
|
bool isJumping;
|
||||||
|
bool isGrounded;
|
||||||
|
|
||||||
|
PlayerController()
|
||||||
|
{
|
||||||
|
jumpTime = 0.0f;
|
||||||
|
jumpForce = 0.0f;
|
||||||
|
|
||||||
|
bool isJumping = false;
|
||||||
|
bool isGrounded = false;
|
||||||
|
|
||||||
|
lastSafePosition = Vector2D();
|
||||||
|
}
|
||||||
|
|
||||||
|
PlayerController(float jumpT, float jumpF, bool jumping, bool grounded, Vector2D lastPos)
|
||||||
|
{
|
||||||
|
jumpTime = jumpT;
|
||||||
|
jumpForce = jumpF;
|
||||||
|
|
||||||
|
bool isJumping = jumping;
|
||||||
|
bool isGrounded = grounded;
|
||||||
|
|
||||||
|
lastSafePosition = lastPos;
|
||||||
|
}
|
||||||
|
|
||||||
|
~PlayerController()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void init() override
|
||||||
|
{
|
||||||
|
lastSafePosition.Zero();
|
||||||
|
}
|
||||||
|
|
||||||
|
void update() override
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void setLastSafePos(Vector2D prevSafePos)
|
||||||
|
{
|
||||||
|
lastSafePosition = prevSafePos;
|
||||||
|
}
|
||||||
|
|
||||||
|
// void init() override
|
||||||
|
// {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* SRC_ECS_PlayerController_H_ */
|
||||||
|
|
57
src/ecs/ProjectileComponent.h
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*
|
||||||
|
* Projectile.h
|
||||||
|
*
|
||||||
|
* Created on: Apr 4, 2020
|
||||||
|
* Author: ayoungblood
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SRC_ECS_PROJECTILECOMPONENT_H_
|
||||||
|
#define SRC_ECS_PROJECTILECOMPONENT_H_
|
||||||
|
|
||||||
|
#include "ECS.h"
|
||||||
|
#include "Components.h"
|
||||||
|
#include "../game/Vector2D.h"
|
||||||
|
|
||||||
|
class ProjectileComponent : public Component
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ProjectileComponent(int rng, int sp, Vector2D vel) : range(rng), speed(sp), velocity(vel)
|
||||||
|
{}
|
||||||
|
~ProjectileComponent()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void init() override
|
||||||
|
{
|
||||||
|
transform = &entity->getComponent<TransformComponent>();
|
||||||
|
transform->velocity = velocity;
|
||||||
|
}
|
||||||
|
|
||||||
|
void update() override
|
||||||
|
{
|
||||||
|
distance += speed;
|
||||||
|
if (distance > range)
|
||||||
|
{
|
||||||
|
entity->destroy();
|
||||||
|
}
|
||||||
|
else if (transform->position.x > Game::camera.x + Game::camera.w ||
|
||||||
|
transform->position.x < Game::camera.x ||
|
||||||
|
transform->position.y > Game::camera.y +Game::camera.h ||
|
||||||
|
transform->position.y < Game::camera.y)
|
||||||
|
{
|
||||||
|
entity->destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
TransformComponent* transform;
|
||||||
|
|
||||||
|
int range;
|
||||||
|
int speed;
|
||||||
|
int distance;
|
||||||
|
Vector2D velocity;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* SRC_ECS_PROJECTILECOMPONENT_H_ */
|
195
src/ecs/SpriteComponent.h
Normal file
@ -0,0 +1,195 @@
|
|||||||
|
/*
|
||||||
|
* SpriteComponent.h
|
||||||
|
*
|
||||||
|
* Created on: Feb 22, 2020
|
||||||
|
* Author: ayoungblood
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SRC_ECS_SPRITECOMPONENT_H_
|
||||||
|
#define SRC_ECS_SPRITECOMPONENT_H_
|
||||||
|
|
||||||
|
#include "Components.h"
|
||||||
|
#include <SDL2/SDL.h>
|
||||||
|
#include "../assetmgr/TextureManager.h"
|
||||||
|
#include "Animation.h"
|
||||||
|
#include <map>
|
||||||
|
#include "../assetmgr/AssetManager.h"
|
||||||
|
#include "../cjson/cJSON.h"
|
||||||
|
#include <iostream>
|
||||||
|
#include <fstream>
|
||||||
|
#include <sstream>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
class SpriteComponent : public Component
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
TransformComponent *transform;
|
||||||
|
SDL_Texture *texture;
|
||||||
|
SDL_Rect srcRect, destRect;
|
||||||
|
char letter;
|
||||||
|
int frames = 0;
|
||||||
|
int speed = 100;
|
||||||
|
int letterWidth, letterHeight;
|
||||||
|
int scale = 1;
|
||||||
|
|
||||||
|
public:
|
||||||
|
enum SpriteType : std::size_t
|
||||||
|
{
|
||||||
|
spriteUIL0,
|
||||||
|
spriteUIL1,
|
||||||
|
spriteText,
|
||||||
|
spriteObject,
|
||||||
|
spriteTileMap,
|
||||||
|
spriteBackground,
|
||||||
|
spriteActor,
|
||||||
|
spriteAnimation,
|
||||||
|
spriteAtlas
|
||||||
|
};
|
||||||
|
SpriteType spriteType;
|
||||||
|
int animIndex = 0;
|
||||||
|
bool ui = false;
|
||||||
|
std::map<const char*, Animation> animations;
|
||||||
|
|
||||||
|
SDL_RendererFlip spriteFlip = SDL_FLIP_NONE;
|
||||||
|
|
||||||
|
// SpriteComponent() = default;
|
||||||
|
SpriteComponent(std::string id, SpriteType sType)
|
||||||
|
{
|
||||||
|
spriteType = sType;
|
||||||
|
setTex(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
// One initializer to rule them all
|
||||||
|
SpriteComponent(std::string id, SpriteType sType, std::string json)
|
||||||
|
{
|
||||||
|
spriteType = sType;
|
||||||
|
if(sType == spriteAnimation)
|
||||||
|
{
|
||||||
|
std::ifstream fin(json);
|
||||||
|
|
||||||
|
if(fin.is_open()){
|
||||||
|
} else {
|
||||||
|
std::cout<<"json file is NOT open"<<std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(fin.fail()){
|
||||||
|
std::cout<<"json file open fail"<<std::endl;
|
||||||
|
} else{
|
||||||
|
}
|
||||||
|
|
||||||
|
std::ifstream jsonText(json);
|
||||||
|
std::ostringstream tmp;
|
||||||
|
tmp << jsonText.rdbuf();
|
||||||
|
std::string aJson = tmp.str();
|
||||||
|
cJSON * animJson = cJSON_Parse(aJson.c_str());
|
||||||
|
cJSON * meta = cJSON_GetObjectItem(animJson, "meta");
|
||||||
|
cJSON * frameTags = cJSON_GetObjectItem(meta,"frameTags");
|
||||||
|
int tagsCount = cJSON_GetArraySize(frameTags);
|
||||||
|
|
||||||
|
for (int t = 0; t < tagsCount; t++)
|
||||||
|
{
|
||||||
|
cJSON * animItem = cJSON_GetArrayItem(frameTags,t);
|
||||||
|
cJSON * nameJson = cJSON_GetObjectItem(animItem, "name");
|
||||||
|
const char * name = cJSON_Print(nameJson);
|
||||||
|
int fromFrame = cJSON_GetObjectItem(animItem, "from")->valueint;
|
||||||
|
int toFrame = cJSON_GetObjectItem(animItem, "to")->valueint;
|
||||||
|
Animation anim = Animation(fromFrame,toFrame,100);
|
||||||
|
animations.emplace(name, anim);
|
||||||
|
Play(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
Animation idle = Animation(0,3,100);
|
||||||
|
animations.emplace("Idle", idle);
|
||||||
|
Animation walk = Animation(1,3,100);
|
||||||
|
animations.emplace("Walk", walk);
|
||||||
|
Animation jump = Animation(2,1,100);
|
||||||
|
animations.emplace("Jump", jump);
|
||||||
|
Animation fall = Animation(3,1,100);
|
||||||
|
animations.emplace("Fall",fall);
|
||||||
|
Play("Idle");
|
||||||
|
}
|
||||||
|
setTex(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
SpriteComponent(std::string id, SpriteType sType, SDL_Rect srcR, SDL_Rect destR)
|
||||||
|
{
|
||||||
|
spriteType = sType;
|
||||||
|
setTex(id);
|
||||||
|
srcRect = srcR;
|
||||||
|
destRect = destR;
|
||||||
|
}
|
||||||
|
|
||||||
|
~SpriteComponent()
|
||||||
|
{
|
||||||
|
SDL_DestroyTexture(texture);
|
||||||
|
}
|
||||||
|
|
||||||
|
void setTex(std::string id)
|
||||||
|
{
|
||||||
|
texture = Game::assets->GetTexture(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
void init() override
|
||||||
|
{
|
||||||
|
transform = &entity->getComponent<TransformComponent>();
|
||||||
|
|
||||||
|
switch(spriteType)
|
||||||
|
{
|
||||||
|
case spriteUIL0: case spriteUIL1: case spriteBackground:
|
||||||
|
break;
|
||||||
|
case spriteActor: case spriteAnimation: case spriteAtlas: case spriteObject: case spriteTileMap:
|
||||||
|
srcRect.x = srcRect.y = 0;
|
||||||
|
srcRect.w = transform->width;
|
||||||
|
srcRect.h = transform->height;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void update() override
|
||||||
|
{
|
||||||
|
switch(spriteType)
|
||||||
|
{
|
||||||
|
case spriteUIL0: case spriteUIL1: case spriteText: case spriteBackground:
|
||||||
|
destRect.x = static_cast<int>(transform->position.x);
|
||||||
|
destRect.y = static_cast<int>(transform->position.y);
|
||||||
|
break;
|
||||||
|
case spriteActor: case spriteObject: case spriteAtlas:
|
||||||
|
srcRect.y = animIndex * transform->height;
|
||||||
|
destRect.x = static_cast<int>(transform->position.x) - Game::camera.x;
|
||||||
|
destRect.y = static_cast<int>(transform->position.y) - Game::camera.y;
|
||||||
|
destRect.w = transform->width * transform->scale;
|
||||||
|
destRect.h = transform->height * transform->scale;
|
||||||
|
break;
|
||||||
|
case spriteTileMap:
|
||||||
|
break;
|
||||||
|
case spriteAnimation:
|
||||||
|
srcRect.x = srcRect.w * static_cast<int>((SDL_GetTicks()/speed) % frames);
|
||||||
|
srcRect.y = animIndex * transform->height;
|
||||||
|
destRect.x = static_cast<int>(transform->position.x) - Game::camera.x;
|
||||||
|
destRect.y = static_cast<int>(transform->position.y) - Game::camera.y;
|
||||||
|
destRect.w = transform->width * transform->scale;
|
||||||
|
destRect.h = transform->height * transform->scale;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void draw() override
|
||||||
|
{
|
||||||
|
TextureManager::Draw(texture, srcRect, destRect, spriteFlip);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Play(const char* animName)
|
||||||
|
{
|
||||||
|
frames = animations[animName].frames;
|
||||||
|
animIndex = animations[animName].index;
|
||||||
|
speed = animations[animName].speed;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* SRC_ECS_SPRITECOMPONENT_H_ */
|
58
src/ecs/TileComponent.h
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
* TileComponent.h
|
||||||
|
*
|
||||||
|
* Created on: Mar 21, 2020
|
||||||
|
* Author: ayoungblood
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SRC_ECS_TILECOMPONENT_H_
|
||||||
|
#define SRC_ECS_TILECOMPONENT_H_
|
||||||
|
|
||||||
|
#include "ECS.h"
|
||||||
|
#include <SDL2/SDL.h>
|
||||||
|
#include "../assetmgr/AssetManager.h"
|
||||||
|
|
||||||
|
class TileComponent : public Component
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
SDL_Texture* texture;
|
||||||
|
SDL_Rect srcRect, destRect;
|
||||||
|
Vector2D position;
|
||||||
|
|
||||||
|
TileComponent() = default;
|
||||||
|
|
||||||
|
~TileComponent()
|
||||||
|
{
|
||||||
|
SDL_DestroyTexture(texture);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TileComponent(int srcX, int srcY, int xpos, int ypos, int tsize, int tscale, std::string id)
|
||||||
|
{
|
||||||
|
texture = Game::assets->GetTexture(id);
|
||||||
|
position.x = xpos;
|
||||||
|
position.y = ypos;
|
||||||
|
|
||||||
|
srcRect.x = srcX;
|
||||||
|
srcRect.y = srcY;
|
||||||
|
srcRect.w = srcRect.h = tsize;
|
||||||
|
|
||||||
|
destRect.x = xpos;
|
||||||
|
destRect.y = ypos;
|
||||||
|
destRect.w = destRect.h = tsize * tscale;
|
||||||
|
}
|
||||||
|
|
||||||
|
void update() override
|
||||||
|
{
|
||||||
|
destRect.x = position.x - Game::camera.x;
|
||||||
|
destRect.y = position.y - Game::camera.y;
|
||||||
|
}
|
||||||
|
|
||||||
|
void draw() override
|
||||||
|
{
|
||||||
|
TextureManager::Draw(texture, srcRect, destRect, SDL_FLIP_NONE);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* SRC_ECS_TILECOMPONENT_H_ */
|
163
src/ecs/TileMapComponent.h
Normal file
@ -0,0 +1,163 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* TileMapComponent.h
|
||||||
|
*
|
||||||
|
* Created on: Mar 21, 2020
|
||||||
|
* Author: ayoungblood
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SRC_ECS_TILEMAPCOMPONENT_H_
|
||||||
|
#define SRC_ECS_TILEMAPCOMPONENT_H_
|
||||||
|
|
||||||
|
#include "ECS.h"
|
||||||
|
#include <SDL2/SDL.h>
|
||||||
|
#include "../assetmgr/AssetManager.h"
|
||||||
|
#include <fstream>
|
||||||
|
#include <iostream>
|
||||||
|
#include <string>
|
||||||
|
#include <tuple>
|
||||||
|
#include "../tileson/tileson.hpp"
|
||||||
|
|
||||||
|
class TileMapComponent : public Component
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
SDL_Texture* texture;
|
||||||
|
SDL_Rect srcRect, destRect;
|
||||||
|
tson::Tileson t;
|
||||||
|
std::unique_ptr<tson::Map> map;
|
||||||
|
int globalScale;
|
||||||
|
std::vector<SDL_Rect> tileSet;
|
||||||
|
std::vector<SDL_Rect> destRects;
|
||||||
|
std::vector<std::tuple<int,int>> initialPositions;
|
||||||
|
int tileSetTotal;
|
||||||
|
std::vector<std::vector<int>> colliders;
|
||||||
|
int tilesWide;
|
||||||
|
int tilesHigh;
|
||||||
|
int tileWidth;
|
||||||
|
|
||||||
|
TileMapComponent() = default;
|
||||||
|
|
||||||
|
~TileMapComponent()
|
||||||
|
{
|
||||||
|
SDL_DestroyTexture(texture);
|
||||||
|
}
|
||||||
|
|
||||||
|
TileMapComponent(std::string mapPath, int gScale, int offsetX, int offsetY)
|
||||||
|
{
|
||||||
|
// TILESON ~~~~~~~~~~~
|
||||||
|
|
||||||
|
const std::filesystem::path jsonPath = std::filesystem::u8path(mapPath);
|
||||||
|
map = t.parse(jsonPath);
|
||||||
|
|
||||||
|
if(map->getStatus() == tson::ParseStatus::OK)
|
||||||
|
{
|
||||||
|
tson::Tileset *tileset = map->getTileset("br-tiles");
|
||||||
|
std::string fullPath = tileset->getImage();
|
||||||
|
|
||||||
|
size_t charPos = fullPath.find("assets");
|
||||||
|
fullPath.erase(0,charPos);
|
||||||
|
tson::Layer *tileLayer = map->getLayer("Tile Layer 1"); //This is a Layer
|
||||||
|
std::string texName = tileLayer->getName();
|
||||||
|
Game::assets->AddTexture(texName, fullPath.c_str());
|
||||||
|
setTex(texName);
|
||||||
|
globalScale = gScale;
|
||||||
|
|
||||||
|
tson::Layer *collisionLayer = map->getLayer("Collision");
|
||||||
|
|
||||||
|
tilesWide = map->getSize().x;
|
||||||
|
tilesHigh = map->getSize().y;
|
||||||
|
tileWidth = map->getTileSize().x;
|
||||||
|
|
||||||
|
Game::levelMap.w = tilesWide*tileWidth*globalScale;
|
||||||
|
Game::levelMap.h = tilesHigh*tileWidth*globalScale;
|
||||||
|
|
||||||
|
|
||||||
|
// =========== Setup Tile Set ===========
|
||||||
|
|
||||||
|
tileSetTotal = tileset->getTileCount();
|
||||||
|
tileSet.resize(tileSetTotal);
|
||||||
|
int tileSetCols = tileset->getColumns();
|
||||||
|
int tileSetRows = tileSetTotal/tileSetCols;
|
||||||
|
|
||||||
|
for (int r=0;r<tileSetRows;r++){
|
||||||
|
for (int c=0;c<tileSetCols;c++){
|
||||||
|
srcRect.x = c*tileWidth;
|
||||||
|
srcRect.y = r*tileWidth;
|
||||||
|
srcRect.w = srcRect.h = tileWidth;
|
||||||
|
int element = r*tileSetCols+c;
|
||||||
|
tileSet[element] = srcRect;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tileLayer->getType() == tson::LayerType::TileLayer)
|
||||||
|
{
|
||||||
|
destRects.resize(tilesWide*tilesHigh);
|
||||||
|
initialPositions.resize(tilesWide*tilesHigh);
|
||||||
|
for (int r=0;r<tilesHigh;r++){
|
||||||
|
for (int c=0;c<tilesWide;c++){
|
||||||
|
int elem = c+r*tilesWide;
|
||||||
|
SDL_Rect thisRect = SDL_Rect();
|
||||||
|
thisRect.x = c*tileWidth*globalScale;
|
||||||
|
thisRect.y = r*tileWidth*globalScale;
|
||||||
|
thisRect.w = thisRect.h = tileWidth*globalScale;
|
||||||
|
std::tuple<int,int> ogPos = std::make_tuple(thisRect.x,thisRect.y);
|
||||||
|
initialPositions[elem] = ogPos;
|
||||||
|
thisRect.x = thisRect.x-offsetX*globalScale;
|
||||||
|
thisRect.y = thisRect.y=offsetY*globalScale;
|
||||||
|
destRects[elem] = thisRect;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
destRect.w = destRect.h = tileWidth * gScale;
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
printf("Failed to load Tileson map\n");
|
||||||
|
std::cout << map->getStatusMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void update() override
|
||||||
|
{
|
||||||
|
// if (Game::gsm->currentState == GameStateManager::ST_COREGAME){
|
||||||
|
|
||||||
|
for (int i=0;i<destRects.size();i++){
|
||||||
|
destRects[i].x = std::get<0>(initialPositions[i]) - Game::camera.x;
|
||||||
|
destRects[i].y = std::get<1>(initialPositions[i]) - Game::camera.y;
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
void draw() override
|
||||||
|
{
|
||||||
|
//iterate through rows and columns of the map to draw the tiles
|
||||||
|
// First cycle through rows
|
||||||
|
tson::Layer *myLayer = map->getLayer("Tile Layer 1");
|
||||||
|
tson::Layer *collisionLayer = map->getLayer("Collision");
|
||||||
|
for (int r = 0;r<map->getSize().y;r++){
|
||||||
|
// Next cycle through each column or tile in that row:
|
||||||
|
for (int c = 0;c<map->getSize().x;c++){
|
||||||
|
int i = r*map->getSize().x+c;
|
||||||
|
int elem = c+r*map->getSize().x;
|
||||||
|
tson::Tile *myTile = myLayer->getTileData(c,r);
|
||||||
|
int tid = myTile->getId()-1;
|
||||||
|
int tileToDraw = tid;
|
||||||
|
TextureManager::Draw(texture, tileSet[tileToDraw], destRects[elem], SDL_FLIP_NONE);
|
||||||
|
if (Game::debugMenu){
|
||||||
|
if (collisionLayer->getTileData(c,r)) {
|
||||||
|
SDL_SetRenderDrawColor(Game::renderer,255,0,255,134);
|
||||||
|
SDL_RenderDrawRect(Game::renderer, &destRects[elem]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void setTex(std::string id)
|
||||||
|
{
|
||||||
|
texture = Game::assets->GetTexture(id);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* SRC_ECS_TILEMAPCOMPONENT_H_ */
|
||||||
|
|
86
src/ecs/TransformComponent.h
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
/*
|
||||||
|
* TransformComponent.h
|
||||||
|
*
|
||||||
|
* Created on: Feb 22, 2020
|
||||||
|
* Author: ayoungblood
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SRC_ECS_TransformComponent_H_
|
||||||
|
#define SRC_ECS_TransformComponent_H_
|
||||||
|
|
||||||
|
#include "Components.h"
|
||||||
|
#include "../game/Vector2D.h"
|
||||||
|
|
||||||
|
class TransformComponent : public Component
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
Vector2D position;
|
||||||
|
Vector2D velocity;
|
||||||
|
// Vector2D lastSafePos;
|
||||||
|
Vector2D tilePos;
|
||||||
|
|
||||||
|
int height = 40;
|
||||||
|
int width = 30;
|
||||||
|
int scale = 1;
|
||||||
|
int speed = 1;
|
||||||
|
|
||||||
|
TransformComponent()
|
||||||
|
{
|
||||||
|
position.Zero();
|
||||||
|
}
|
||||||
|
|
||||||
|
TransformComponent(int sc)
|
||||||
|
{
|
||||||
|
position.x = 64*sc;
|
||||||
|
position.y = 80*sc;
|
||||||
|
scale = sc;
|
||||||
|
speed = speed*sc;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TransformComponent(float x, float y)
|
||||||
|
// {
|
||||||
|
// position.Zero();
|
||||||
|
// }
|
||||||
|
|
||||||
|
TransformComponent(int x, int y, int w, int h, int sc)
|
||||||
|
{
|
||||||
|
position.x = x;
|
||||||
|
position.y = y;
|
||||||
|
width = w;
|
||||||
|
height = h;
|
||||||
|
scale = sc;
|
||||||
|
speed = speed*sc;
|
||||||
|
}
|
||||||
|
|
||||||
|
TransformComponent(int x, int y, int w, int h, int sc, int spd)
|
||||||
|
{
|
||||||
|
position.x = x;
|
||||||
|
position.y = y;
|
||||||
|
width = w;
|
||||||
|
height = h;
|
||||||
|
scale = sc;
|
||||||
|
speed = spd*sc;
|
||||||
|
}
|
||||||
|
|
||||||
|
void init() override
|
||||||
|
{
|
||||||
|
velocity.Zero();
|
||||||
|
tilePos.Zero();
|
||||||
|
// lastSafePos.Zero();
|
||||||
|
}
|
||||||
|
void update() override
|
||||||
|
{
|
||||||
|
position.x += velocity.x * speed;
|
||||||
|
position.y += velocity.y * speed;
|
||||||
|
}
|
||||||
|
|
||||||
|
void updateTilePosition(int x,int y){
|
||||||
|
tilePos.x = x;
|
||||||
|
tilePos.y = y;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* SRC_ECS_TransformComponent_H_ */
|
101
src/ecs/UITextComponent.h
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
/*
|
||||||
|
* UITextComponent.h
|
||||||
|
*
|
||||||
|
* Created on: Feb 22, 2020
|
||||||
|
* Author: ayoungblood
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SRC_ECS_UITEXTCOMPONENT_H_
|
||||||
|
#define SRC_ECS_UITEXTCOMPONENT_H_
|
||||||
|
|
||||||
|
#define ASCII_START_IDX 32
|
||||||
|
#define ASCII_COUNT 96
|
||||||
|
#define ASCII_ROW_COUNT 16
|
||||||
|
|
||||||
|
#include "Components.h"
|
||||||
|
#include <SDL2/SDL.h>
|
||||||
|
#include "../assetmgr/TextureManager.h"
|
||||||
|
#include "../assetmgr/AssetManager.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string>
|
||||||
|
#include <iostream>
|
||||||
|
#include <tuple>
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
|
class UITextComponent : public Component
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
TransformComponent *transform;
|
||||||
|
SDL_Texture *texture;
|
||||||
|
SDL_Rect srcRect, destRect;
|
||||||
|
std::string text;
|
||||||
|
int letterWidth, letterHeight;
|
||||||
|
int scale = 1;
|
||||||
|
SDL_RendererFlip spriteFlip = SDL_FLIP_NONE;
|
||||||
|
std::tuple <SDL_Rect, SDL_Rect> letter;
|
||||||
|
|
||||||
|
public:
|
||||||
|
UITextComponent(std::string id, std::string textToPrint, int letterW, int letterH, int letterScale)
|
||||||
|
{
|
||||||
|
setTex(id);
|
||||||
|
text = textToPrint;
|
||||||
|
letterWidth = letterW;
|
||||||
|
letterHeight = letterH;
|
||||||
|
scale = letterScale;
|
||||||
|
}
|
||||||
|
|
||||||
|
~UITextComponent()
|
||||||
|
{
|
||||||
|
SDL_DestroyTexture(texture);
|
||||||
|
}
|
||||||
|
|
||||||
|
void setTex(std::string id)
|
||||||
|
{
|
||||||
|
texture = Game::assets->GetTexture(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
void init() override
|
||||||
|
{
|
||||||
|
transform = &entity->getComponent<TransformComponent>();
|
||||||
|
}
|
||||||
|
|
||||||
|
void update() override
|
||||||
|
{
|
||||||
|
destRect.x = static_cast<int>(transform->position.x);
|
||||||
|
destRect.y = static_cast<int>(transform->position.y);
|
||||||
|
}
|
||||||
|
|
||||||
|
void draw() override
|
||||||
|
{
|
||||||
|
for (int l = 0; l < text.length(); l++)
|
||||||
|
{
|
||||||
|
std::tuple<SDL_Rect, SDL_Rect> lttr = getLetterTexture(text[l],l);
|
||||||
|
TextureManager::Draw(texture, std::get<0>(lttr), std::get<1>(lttr), spriteFlip);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
std::tuple<SDL_Rect, SDL_Rect> getLetterTexture(char currentLetter, int i)
|
||||||
|
{
|
||||||
|
std::tuple<SDL_Rect, SDL_Rect> letterTuple;
|
||||||
|
int charsPerLine = std::floor(transform->width/(letterWidth*scale));
|
||||||
|
srcRect.x = ((currentLetter-ASCII_START_IDX) % ASCII_ROW_COUNT)*letterWidth;
|
||||||
|
srcRect.y = ((currentLetter-ASCII_START_IDX)/ASCII_ROW_COUNT)*letterHeight;
|
||||||
|
srcRect.w = letterWidth;
|
||||||
|
srcRect.h = letterHeight;
|
||||||
|
destRect.x = static_cast<int>(transform->position.x)*scale+(i%charsPerLine)*letterWidth*scale;
|
||||||
|
destRect.y = static_cast<int>(transform->position.y)*scale+std::floor(i/charsPerLine)*letterHeight*scale*1.1;
|
||||||
|
destRect.w = letterWidth*scale;
|
||||||
|
destRect.h = letterHeight*scale;
|
||||||
|
letterTuple = std::make_tuple(srcRect,destRect);
|
||||||
|
return letterTuple;
|
||||||
|
}
|
||||||
|
|
||||||
|
void updateString(std::string newString)
|
||||||
|
{
|
||||||
|
text = newString;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* SRC_ECS_UITEXTCOMPONENT_H_ */
|
||||||
|
|
35
src/game/Collision.cpp
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* Collision.cpp
|
||||||
|
*
|
||||||
|
* Created on: Mar 8, 2020
|
||||||
|
* Author: ayoungblood
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "Collision.h"
|
||||||
|
#include "../ecs/ColliderComponent.h"
|
||||||
|
|
||||||
|
bool Collision::AABB(const SDL_Rect& recA, const SDL_Rect& recB)
|
||||||
|
{
|
||||||
|
if(
|
||||||
|
recA.x + recA.w > recB.x &&
|
||||||
|
recB.x + recB.w > recA.x &&
|
||||||
|
recA.y + recA.h > recB.y &&
|
||||||
|
recB.y + recB.h > recA.y
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Collision::AABB(const ColliderComponent& colA, const ColliderComponent& colB)
|
||||||
|
{
|
||||||
|
if(AABB(colA.collider, colB.collider))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
24
src/game/Collision.h
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* Collision.h
|
||||||
|
*
|
||||||
|
* Created on: Mar 8, 2020
|
||||||
|
* Author: ayoungblood
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SRC_COLLISION_H_
|
||||||
|
#define SRC_COLLISION_H_
|
||||||
|
|
||||||
|
#include <SDL2/SDL.h>
|
||||||
|
// #include "Vector2D.h"
|
||||||
|
|
||||||
|
class ColliderComponent;
|
||||||
|
|
||||||
|
class Collision
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static bool AABB(const SDL_Rect& recA, const SDL_Rect& recB);
|
||||||
|
static bool AABB(const ColliderComponent& colA, const ColliderComponent& colB);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* SRC_COLLISION_H_ */
|
554
src/game/Game.cpp
Normal file
@ -0,0 +1,554 @@
|
|||||||
|
/*
|
||||||
|
* Game.cpp
|
||||||
|
*
|
||||||
|
* Created on: Feb 9, 2020
|
||||||
|
* Author: ayoungblood
|
||||||
|
* Special Thanks to: Carl Birch of Let's Make Games
|
||||||
|
* Nic Allen
|
||||||
|
* Brian Lhota
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "Game.hpp"
|
||||||
|
#include "../assetmgr/TextureManager.h"
|
||||||
|
#include "../assetmgr/Map.h"
|
||||||
|
#include "../ecs/Components.h"
|
||||||
|
#include "Collision.h"
|
||||||
|
#include <string>
|
||||||
|
#include <iostream>
|
||||||
|
#include <fstream>
|
||||||
|
#include <sstream>
|
||||||
|
#include "../assetmgr/AssetManager.h"
|
||||||
|
#include "../ui/UIText.h"
|
||||||
|
#include "../ui/UINineSlice.h"
|
||||||
|
#include "../cjson/cJSON.h"
|
||||||
|
#include "../tileson/tileson.hpp"
|
||||||
|
#include <cmath>
|
||||||
|
#include <filesystem>
|
||||||
|
|
||||||
|
Manager manager;
|
||||||
|
UINineSlice* my9Slice;
|
||||||
|
UINineSlice* scoreboard9Slice;
|
||||||
|
UINineSlice* debugBox;
|
||||||
|
|
||||||
|
GameStateManager* Game::gsm = new GameStateManager();
|
||||||
|
|
||||||
|
SDL_Renderer* Game::renderer = nullptr;
|
||||||
|
SDL_Event Game::event;
|
||||||
|
|
||||||
|
SDL_Rect Game::camera;
|
||||||
|
SDL_Rect Game::levelMap;
|
||||||
|
|
||||||
|
AssetManager* Game::assets = new AssetManager(&manager);
|
||||||
|
|
||||||
|
bool Game::isRunning = false;
|
||||||
|
bool Game::debugMenu = false;
|
||||||
|
|
||||||
|
auto& player(manager.addEntity());
|
||||||
|
Vector2D Game::playerPosition;
|
||||||
|
Vector2D Game::pVel;
|
||||||
|
|
||||||
|
// auto& enemy(manager.addEntity());
|
||||||
|
auto& puppy(manager.addEntity());
|
||||||
|
|
||||||
|
// auto& scoreboard(manager.addEntity());
|
||||||
|
auto& uiInfo(manager.addEntity());
|
||||||
|
auto& uiJumpInfo(manager.addEntity());
|
||||||
|
auto& uiCamXInfo(manager.addEntity());
|
||||||
|
auto& uiCamYInfo(manager.addEntity());
|
||||||
|
auto& uiPlayerXInfo(manager.addEntity());
|
||||||
|
auto& uiPlayerYInfo(manager.addEntity());
|
||||||
|
auto& uiBoundary1Info(manager.addEntity());
|
||||||
|
auto& uiBoundary2Info(manager.addEntity());
|
||||||
|
auto& uiBoundary3Info(manager.addEntity());
|
||||||
|
|
||||||
|
auto& uiTextInstructions(manager.addEntity());
|
||||||
|
|
||||||
|
auto& gameScene(manager.addEntity());
|
||||||
|
|
||||||
|
bool Game::debugCollisionBoxes = false;
|
||||||
|
bool Game::gravityOnPlayer = true;
|
||||||
|
bool Game::playerIsGrounded = false;
|
||||||
|
bool Game::playerIsJumping = false;
|
||||||
|
|
||||||
|
int gScale = 0;
|
||||||
|
int last_time;
|
||||||
|
int current_time;
|
||||||
|
int diff_time;
|
||||||
|
|
||||||
|
tson::Tileson t;
|
||||||
|
|
||||||
|
int Game::pTileX = 0;
|
||||||
|
int Game::pTileY = 0;
|
||||||
|
|
||||||
|
std::string Game::BoolToString(bool b) {
|
||||||
|
std::string myString;
|
||||||
|
if (b) {
|
||||||
|
myString = "true";
|
||||||
|
} else {
|
||||||
|
myString = "false";
|
||||||
|
}
|
||||||
|
return myString;
|
||||||
|
}
|
||||||
|
|
||||||
|
Game::Game() {
|
||||||
|
// TODO Auto-generated constructor stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Game::~Game() {
|
||||||
|
// TODO Auto-generated destructor stub
|
||||||
|
}
|
||||||
|
|
||||||
|
void Game::init(const char *title, int width, int height, bool fullscreen, int globalScale)
|
||||||
|
{
|
||||||
|
camera = { 0, 0, width, height };
|
||||||
|
int flags = 0;
|
||||||
|
gScale = globalScale;
|
||||||
|
if(fullscreen)
|
||||||
|
{
|
||||||
|
flags = SDL_WINDOW_FULLSCREEN;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(SDL_Init(SDL_INIT_EVERYTHING) == 0)
|
||||||
|
{
|
||||||
|
window = SDL_CreateWindow(title, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, width, height, flags);
|
||||||
|
SDL_SetWindowBordered(window,SDL_FALSE);
|
||||||
|
if(!window)
|
||||||
|
{
|
||||||
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,"Couldn't create window: %s", SDL_GetError());
|
||||||
|
}
|
||||||
|
renderer = SDL_CreateRenderer(window, -1, 0);
|
||||||
|
if(!renderer)
|
||||||
|
{
|
||||||
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create renderer: %s", SDL_GetError());
|
||||||
|
isRunning = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SDL_SetRenderDrawColor(renderer, 255,255,255,255);
|
||||||
|
SDL_SetHint(SDL_HINT_RENDER_VSYNC, "1");
|
||||||
|
isRunning = true;
|
||||||
|
}
|
||||||
|
//Initialize SDL_mixer
|
||||||
|
if (Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 2, 2048)<0)
|
||||||
|
{
|
||||||
|
SDL_LogError(SDL_LOG_CATEGORY_ERROR, "Couldn't initialize SDL audio mixer!, Error: %s", SDL_GetError());
|
||||||
|
}
|
||||||
|
|
||||||
|
assets->AddTexture("player", "assets/textures/actors/firefighter.png");
|
||||||
|
assets->AddTexture("font", "assets/textures/ui/ui-font-cloud-sans.png");
|
||||||
|
assets->AddTexture("textBox", "assets/textures/ui/ui-element-cloud.png");
|
||||||
|
assets->AddTexture("puppy","assets/textures/actors/beaglepuppy.png");
|
||||||
|
assets->AddTexture("collider","assets/textures/ColTex.png");
|
||||||
|
|
||||||
|
assets->AddMusicTrack("simonZ","assets/audio/music/sillypuppy.ogg");
|
||||||
|
assets->AddMusicTrack("simonZ","assets/audio/music/victory.ogg");
|
||||||
|
|
||||||
|
assets->AddSoundClip("bwoop","assets/audio/sfx/bwoop.wav");
|
||||||
|
assets->AddSoundClip("bark1","assets/audio/sfx/Bark1.wav");
|
||||||
|
assets->AddSoundClip("bark2","assets/audio/sfx/Bark2.wav");
|
||||||
|
|
||||||
|
// map = new Map("terrain",globalScale,16);
|
||||||
|
// std::string myText = "Find lost puppies!\nThey need your help!";
|
||||||
|
std::string myText = "Press U to Start";
|
||||||
|
|
||||||
|
uiTextInstructions.addComponent<TransformComponent>(18,22,138*gScale,20*gScale,gScale);
|
||||||
|
uiTextInstructions.addComponent<UITextComponent>("font",myText,8,12,gScale);
|
||||||
|
uiTextInstructions.addGroup(groupUI_Layer1);
|
||||||
|
|
||||||
|
SDL_Rect myDestRect = SDL_Rect();
|
||||||
|
myDestRect.x = 12;
|
||||||
|
myDestRect.y = 8;
|
||||||
|
myDestRect.w = 160;
|
||||||
|
myDestRect.h = 40;
|
||||||
|
my9Slice = new UINineSlice("textBox");
|
||||||
|
my9Slice->MakeSlices("textBox",32,32,14,16,14,16,myDestRect,globalScale,Game::groupUI_Layer0);
|
||||||
|
|
||||||
|
// std::cout << "camera.w " << camera.w << std::endl;
|
||||||
|
|
||||||
|
uiInfo.addComponent<TransformComponent>(camera.w/gScale-94,10,72*gScale,96*gScale,gScale);
|
||||||
|
// uiInfo.addComponent<UITextComponent>("font", "CollisionHori: Vert: Jump: P.y : P.dy: YVec: ", 8, 12, 1);
|
||||||
|
// uiInfo.addComponent<UITextComponent>("font", "Player PTiX: PTiY: P.x: P.y : coll: Px2: tson: ", 8, 12, gScale);
|
||||||
|
uiInfo.addComponent<UITextComponent>("font", "Player PTiX: PTiY: P.x: P.y : coll: ", 8, 12, gScale);
|
||||||
|
uiInfo.addGroup(groupUI_Layer3);
|
||||||
|
|
||||||
|
uiCamXInfo.addComponent<TransformComponent>(camera.w/gScale-48,23,40*gScale,12*gScale,gScale);
|
||||||
|
uiCamXInfo.addComponent<UITextComponent>("font", "nan", 8, 12, gScale);
|
||||||
|
uiCamXInfo.addGroup(groupUI_Layer3);
|
||||||
|
|
||||||
|
uiCamYInfo.addComponent<TransformComponent>(camera.w/gScale-48,36,40*gScale,12*gScale,gScale);
|
||||||
|
uiCamYInfo.addComponent<UITextComponent>("font", "nan", 8, 12, gScale);
|
||||||
|
uiCamYInfo.addGroup(groupUI_Layer3);
|
||||||
|
|
||||||
|
uiPlayerXInfo.addComponent<TransformComponent>(camera.w/gScale-49,49,40*gScale,12*gScale,gScale);
|
||||||
|
uiPlayerXInfo.addComponent<UITextComponent>("font", "nan", 8, 12, gScale);
|
||||||
|
uiPlayerXInfo.addGroup(groupUI_Layer3);
|
||||||
|
|
||||||
|
uiPlayerYInfo.addComponent<TransformComponent>(camera.w/gScale-48,62,40*gScale,12*gScale,gScale);
|
||||||
|
uiPlayerYInfo.addComponent<UITextComponent>("font", "nan", 8, 12, gScale);
|
||||||
|
uiPlayerYInfo.addGroup(groupUI_Layer3);
|
||||||
|
|
||||||
|
uiBoundary1Info.addComponent<TransformComponent>(camera.w/gScale-48,75,128*gScale,12*gScale,gScale);
|
||||||
|
uiBoundary1Info.addComponent<UITextComponent>("font", "nan", 8, 12, gScale);
|
||||||
|
uiBoundary1Info.addGroup(groupUI_Layer3);
|
||||||
|
|
||||||
|
// uiBoundary2Info.addComponent<TransformComponent>(camera.w/gScale-64,88,128*gScale,12*gScale,gScale);
|
||||||
|
// uiBoundary2Info.addComponent<UITextComponent>("font", "nan", 8, 12, gScale);
|
||||||
|
// uiBoundary2Info.addGroup(groupUI_Layer3);
|
||||||
|
//
|
||||||
|
// uiBoundary3Info.addComponent<TransformComponent>(camera.w/gScale-64,101,128*gScale,12*gScale,gScale);
|
||||||
|
// uiBoundary3Info.addComponent<UITextComponent>("font", "nan", 8, 12, gScale);
|
||||||
|
// uiBoundary3Info.addGroup(groupUI_Layer3);
|
||||||
|
|
||||||
|
// debug UI box
|
||||||
|
SDL_Rect debugBoxRect = SDL_Rect();
|
||||||
|
debugBoxRect.x = camera.w-(100*gScale);
|
||||||
|
debugBoxRect.y = 4*gScale;
|
||||||
|
debugBoxRect.w = 98*gScale;
|
||||||
|
debugBoxRect.h = 112*gScale;
|
||||||
|
debugBox = new UINineSlice("textBox");
|
||||||
|
debugBox->MakeSlices("textBox",32,32,14,16,14,16,debugBoxRect,1,Game::groupUI_Layer2);
|
||||||
|
|
||||||
|
//ecs implementation
|
||||||
|
|
||||||
|
// player.addComponent<TransformComponent>(860*globalScale,640*globalScale,22,42,globalScale);
|
||||||
|
player.addComponent<TransformComponent>(150*gScale,100*gScale,22,42,globalScale,3); // 180,120
|
||||||
|
player.addComponent<SpriteComponent>("player", SpriteComponent::spriteAnimation, "assets/textures/actors/firefighter.json");
|
||||||
|
|
||||||
|
// player.addComponent<PlayerController>(0.0,0.0,false,false,Vector2D().Zero());
|
||||||
|
player.addComponent<ColliderComponent>("player",16*globalScale,32*globalScale, true, 2*globalScale,10*globalScale, "collider");
|
||||||
|
player.addComponent<KeyboardController>();
|
||||||
|
player.addGroup(groupPlayers);
|
||||||
|
|
||||||
|
levelMap.x = 0;
|
||||||
|
levelMap.y = 0;
|
||||||
|
|
||||||
|
gameScene.addComponent<TileMapComponent>("assets/maps/testmap.json",gScale,player.getComponent<TransformComponent>().position.x+player.getComponent<TransformComponent>().width/2,player.getComponent<TransformComponent>().position.y+player.getComponent<TransformComponent>().height/2); //150,100
|
||||||
|
gameScene.addGroup(groupMap);
|
||||||
|
|
||||||
|
playerPosition = Vector2D().Zero();
|
||||||
|
pVel = Vector2D().Zero();
|
||||||
|
|
||||||
|
puppy.addComponent<TransformComponent>(1024*globalScale,210*globalScale,36,30,globalScale);
|
||||||
|
puppy.addComponent<SpriteComponent>("puppy", SpriteComponent::spriteObject);
|
||||||
|
puppy.addGroup(groupObjects);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't Initialize SDL: %s", SDL_GetError());
|
||||||
|
isRunning = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ====== Setup groups
|
||||||
|
auto& tiles(manager.getGroup(Game::groupMap));
|
||||||
|
auto& players(manager.getGroup(Game::groupPlayers));
|
||||||
|
auto& colliders(manager.getGroup(Game::groupColliders));
|
||||||
|
auto& objects(manager.getGroup(Game::groupObjects));
|
||||||
|
// auto& enemies(manager.getGroup(Game::groupEnemies));
|
||||||
|
// auto& projectiles(manager.getGroup(Game::groupProjectiles));
|
||||||
|
auto& gui(manager.getGroup(Game::groupUI_Layer0));
|
||||||
|
auto& uiText(manager.getGroup(Game::groupUI_Layer1));
|
||||||
|
auto& debugBG(manager.getGroup(Game::groupUI_Layer2));
|
||||||
|
auto& debugText(manager.getGroup(Game::groupUI_Layer3));
|
||||||
|
|
||||||
|
void Game::handleEvents()
|
||||||
|
{
|
||||||
|
SDL_PollEvent(&event);
|
||||||
|
switch (event.type)
|
||||||
|
{
|
||||||
|
case SDL_QUIT:
|
||||||
|
isRunning = false;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Game::update()
|
||||||
|
{
|
||||||
|
SDL_Rect playerCol = player.getComponent<ColliderComponent>().collider;
|
||||||
|
Vector2D playerPos = player.getComponent<TransformComponent>().position;
|
||||||
|
|
||||||
|
// if (gsm->currentState == GameStateManager::ST_INIT)
|
||||||
|
// {
|
||||||
|
// const char* initText = "Loading...";
|
||||||
|
// text->ParseString(initText,12,22,gScale,"init");
|
||||||
|
// const char* titleText = "Beagle Rescue";
|
||||||
|
// const char* gameOverText = "Game Over";
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (Mix_PlayingMusic() == 0 && gsm->currentState == GameStateManager::ST_COREGAME)
|
||||||
|
{
|
||||||
|
// std::cout << "Play Music Now" << std::endl;
|
||||||
|
// Mix_PlayMusic(assets->GetMusicTrack("simonZ"), -1);
|
||||||
|
}
|
||||||
|
if (Mix_PlayingMusic() != 0 && gsm->currentState != GameStateManager::ST_COREGAME)
|
||||||
|
{
|
||||||
|
Mix_HaltMusic();
|
||||||
|
}
|
||||||
|
// if (Mix_PlayChannel(-1, Game::assets->GetSoundClip("bark1"),0) == 0)
|
||||||
|
// {
|
||||||
|
// Mix_PlayChannel(-1, Game::assets->GetSoundClip("bark1"),0);
|
||||||
|
// }
|
||||||
|
|
||||||
|
manager.refresh();
|
||||||
|
manager.update();
|
||||||
|
|
||||||
|
for (auto& c : colliders)
|
||||||
|
{
|
||||||
|
SDL_Rect cCol = c->getComponent<ColliderComponent>().collider;
|
||||||
|
if(Collision::AABB(cCol, playerCol))
|
||||||
|
{
|
||||||
|
// if(!playerIsGrounded){
|
||||||
|
// player.getComponent<SpriteComponent>().Play("Idle");
|
||||||
|
// }
|
||||||
|
// playerIsGrounded = true;
|
||||||
|
// player.getComponent<TransformComponent>().position.y = player.getComponent<TransformComponent>().lastSafePos.y;
|
||||||
|
// gravityOnPlayer = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Gravity
|
||||||
|
// if (gravityOnPlayer){
|
||||||
|
// player.getComponent<TransformComponent>().position.y += 3*gScale;
|
||||||
|
// uiJumpInfo.getComponent<UITextComponent>().updateString("true");
|
||||||
|
// } else {
|
||||||
|
// uiJumpInfo.getComponent<UITextComponent>().updateString("false");
|
||||||
|
// }
|
||||||
|
// for(auto& p: projectiles)
|
||||||
|
// {
|
||||||
|
// if(Collision::AABB(player.getComponent<ColliderComponent>().collider, p->getComponent<ColliderComponent>().collider))
|
||||||
|
// {
|
||||||
|
// std::cout << "Projectile hit player" << std::endl;
|
||||||
|
// p->destroy();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
auto& tileMap = gameScene.getComponent<TileMapComponent>();
|
||||||
|
|
||||||
|
camera.x = player.getComponent<TransformComponent>().position.x - camera.w/2 + player.getComponent<TransformComponent>().width/2;
|
||||||
|
camera.y = player.getComponent<TransformComponent>().position.y - camera.h/2 + player.getComponent<TransformComponent>().height/2;
|
||||||
|
|
||||||
|
pTileX = (player.getComponent<TransformComponent>().position.x+player.getComponent<TransformComponent>().width/2)/gScale/tileMap.tileWidth;
|
||||||
|
pTileY = (player.getComponent<TransformComponent>().position.y+player.getComponent<TransformComponent>().height/2)/gScale/tileMap.tileWidth;
|
||||||
|
|
||||||
|
player.getComponent<TransformComponent>().updateTilePosition(pTileX,pTileY);
|
||||||
|
|
||||||
|
uiCamXInfo.getComponent<UITextComponent>().updateString(std::to_string((int)player.getComponent<TransformComponent>().tilePos.x));
|
||||||
|
uiCamYInfo.getComponent<UITextComponent>().updateString(std::to_string((int)player.getComponent<TransformComponent>().tilePos.y));
|
||||||
|
int playerX = player.getComponent<TransformComponent>().position.x;
|
||||||
|
int playerY = player.getComponent<TransformComponent>().position.y;
|
||||||
|
|
||||||
|
uiPlayerXInfo.getComponent<UITextComponent>().updateString(std::to_string(playerX));
|
||||||
|
uiPlayerYInfo.getComponent<UITextComponent>().updateString(std::to_string(playerY));
|
||||||
|
|
||||||
|
// int * foundBoundaries = predictCollisions();
|
||||||
|
// int max = foundBoundaries[0];
|
||||||
|
// for (int b=0;b<3;b++){
|
||||||
|
// if (foundBoundaries[b]>max){
|
||||||
|
// max = foundBoundaries[b];
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
float desiredMovementX = -1*player.getComponent<TransformComponent>().speed*0.016;
|
||||||
|
// int desiredMovementY = player.getComponent<TransformComponent>().velocity.y*player.getComponent<TransformComponent>().speed*player.getComponent<TransformComponent>().scale;
|
||||||
|
// uiBoundary1Info.getComponent<UITextComponent>().updateString(std::to_string((int)foundBoundaries[0]));
|
||||||
|
// uiBoundary1Info.getComponent<UITextComponent>().updateString(std::to_string((float)desiredMovementX));
|
||||||
|
if (playerIsGrounded) {
|
||||||
|
uiBoundary1Info.getComponent<UITextComponent>().updateString("yes");
|
||||||
|
} else {
|
||||||
|
uiBoundary1Info.getComponent<UITextComponent>().updateString("no");
|
||||||
|
}
|
||||||
|
// uiBoundary2Info.getComponent<UITextComponent>().updateString(std::to_string((int)foundBoundaries[1]));
|
||||||
|
float difference = player.getComponent<TransformComponent>().position.x+desiredMovementX;
|
||||||
|
//uiBoundary2Info.getComponent<UITextComponent>().updateString(std::to_string((float)difference));
|
||||||
|
//uiBoundary3Info.getComponent<UITextComponent>().updateString(std::to_string((int)(max*gScale)));
|
||||||
|
|
||||||
|
// uiBoundary3Info.getComponent<UITextComponent>().updateString(std::to_string((int)foundBoundaries[2]));
|
||||||
|
|
||||||
|
playerPosition.x = playerX;
|
||||||
|
playerPosition.y = playerY;
|
||||||
|
|
||||||
|
pVel.x = player.getComponent<TransformComponent>().velocity.x;
|
||||||
|
pVel.y = player.getComponent<TransformComponent>().velocity.y;
|
||||||
|
|
||||||
|
if(camera.x < 0)
|
||||||
|
camera.x = 0;
|
||||||
|
if (camera.y < 0)
|
||||||
|
camera.y = 0;
|
||||||
|
if (camera.x > levelMap.w-camera.w)
|
||||||
|
camera.x = levelMap.w-camera.w;
|
||||||
|
if (camera.y > levelMap.h-camera.h)
|
||||||
|
camera.y = levelMap.h-camera.h;
|
||||||
|
if (Game::debugCollisionBoxes)
|
||||||
|
{
|
||||||
|
for (auto& c: colliders)
|
||||||
|
{
|
||||||
|
c->getComponent<ColliderComponent>().hidden = false;
|
||||||
|
}
|
||||||
|
for (auto& p: players)
|
||||||
|
{
|
||||||
|
p->getComponent<ColliderComponent>().hidden = false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (auto& c: colliders)
|
||||||
|
{
|
||||||
|
c->getComponent<ColliderComponent>().hidden = true;
|
||||||
|
}
|
||||||
|
for (auto& p: players)
|
||||||
|
{
|
||||||
|
p->getComponent<ColliderComponent>().hidden = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Game::render()
|
||||||
|
{
|
||||||
|
SDL_RenderClear(renderer);
|
||||||
|
// if (gsm->currentState==GameStateManager::ST_COREGAME)
|
||||||
|
// {
|
||||||
|
// printf("Core Game state\n");
|
||||||
|
// }
|
||||||
|
for (auto& t : tiles)
|
||||||
|
{
|
||||||
|
t->draw();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (auto& c : colliders)
|
||||||
|
{
|
||||||
|
c->draw();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (auto& o : objects)
|
||||||
|
{
|
||||||
|
o->draw();
|
||||||
|
}
|
||||||
|
//
|
||||||
|
// for (auto& e : enemies)
|
||||||
|
// {
|
||||||
|
// e->draw();
|
||||||
|
// }
|
||||||
|
|
||||||
|
for (auto& p : players)
|
||||||
|
{
|
||||||
|
p->draw();
|
||||||
|
}
|
||||||
|
if (gsm->currentState==GameStateManager::ST_TITLESCREEN||gsm->currentState==GameStateManager::ST_INIT||gsm->currentState==GameStateManager::ST_GAMEOVER){
|
||||||
|
for (auto& guiElement : gui)
|
||||||
|
{
|
||||||
|
guiElement->draw();
|
||||||
|
}
|
||||||
|
for (auto& text : uiText)
|
||||||
|
{
|
||||||
|
text->draw();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (debugMenu)
|
||||||
|
{
|
||||||
|
for (auto& guiElement : debugBG)
|
||||||
|
{
|
||||||
|
guiElement->draw();
|
||||||
|
}
|
||||||
|
for (auto& text : debugText)
|
||||||
|
{
|
||||||
|
text->draw();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SDL_RenderPresent(renderer);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Game::clean()
|
||||||
|
{
|
||||||
|
SDL_DestroyWindow(window);
|
||||||
|
SDL_DestroyRenderer(renderer);
|
||||||
|
IMG_Quit();
|
||||||
|
Mix_Quit();
|
||||||
|
SDL_Quit();
|
||||||
|
printf("Game Cleaned\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
void Game::drawLine(Vector2D srcpt, Vector2D destpt, int red, int green, int blue)
|
||||||
|
{
|
||||||
|
SDL_SetRenderDrawColor(renderer, red, green, blue, 200);
|
||||||
|
SDL_RenderDrawLine(renderer, srcpt.x, srcpt.y, destpt.x, destpt.y);
|
||||||
|
}
|
||||||
|
|
||||||
|
int * Game::predictCollisions(){
|
||||||
|
static int boundaries[3];
|
||||||
|
// ===== LEFT =====
|
||||||
|
/*if (player.getComponent<TransformComponent>().velocity.x<0){
|
||||||
|
// ====== For Each Row ====
|
||||||
|
int i = 0;
|
||||||
|
for (int r=Game::pTileY-1;r<=Game::pTileY+1;r++){
|
||||||
|
// ====== For Each Tile (Column) =====
|
||||||
|
if(r<0){r=0;}
|
||||||
|
for (int c=Game::pTileX;c>Game::pTileX-Game::camera.w/gameScene.getComponent<TileMapComponent>().tileWidth;c--){
|
||||||
|
if(c<0){c=0;}
|
||||||
|
if(gameScene.getComponent<TileMapComponent>().colliders[r][c]>0){
|
||||||
|
boundaries[i] = c*gameScene.getComponent<TileMapComponent>().tileWidth+gameScene.getComponent<TileMapComponent>().tileWidth;
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
/*
|
||||||
|
// ====== RIGHT ====
|
||||||
|
if (player.getComponent<TransformComponent>().velocity.x>0){
|
||||||
|
// ====== For Each Row ====
|
||||||
|
int i = 0;
|
||||||
|
for (int r=Game::pTileY-1;r<=Game::pTileY+1;r++){
|
||||||
|
if(r<0){r=0;}
|
||||||
|
// ====== For Each Tile (Column) =====
|
||||||
|
for (int c=Game::pTileX;c<Game::pTileX+Game::camera.w/gameScene.getComponent<TileMapComponent>().tileWidth;c++){
|
||||||
|
if(c<0){c=0;}
|
||||||
|
if(gameScene.getComponent<TileMapComponent>().colliders[r][c]>0){
|
||||||
|
boundaries[i] = c*gameScene.getComponent<TileMapComponent>().tileWidth;
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ===== UP ====
|
||||||
|
if (player.getComponent<TransformComponent>().velocity.y<0){
|
||||||
|
// ====== For Each Column ====
|
||||||
|
int i = 0;
|
||||||
|
for (int c=Game::pTileX-1;c<=Game::pTileX+1;c++){
|
||||||
|
if(c<0){c=0;}
|
||||||
|
// ====== For Each Tile (Row) =====
|
||||||
|
for (int r=Game::pTileY;r>Game::pTileY-Game::camera.h/gameScene.getComponent<TileMapComponent>().tileWidth;r--){
|
||||||
|
if(r<0){r=0;}
|
||||||
|
if(gameScene.getComponent<TileMapComponent>().colliders[r][c]>0){
|
||||||
|
boundaries[i] = r*gameScene.getComponent<TileMapComponent>().tileWidth+gameScene.getComponent<TileMapComponent>().tileWidth;
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
// ===== DOWN ====
|
||||||
|
if (player.getComponent<TransformComponent>().velocity.y>0){
|
||||||
|
// ====== For Each Column ====
|
||||||
|
int i = 0;
|
||||||
|
for (int c=Game::pTileX-1;c<=Game::pTileX+1;c++){
|
||||||
|
if(c<0){c=0;}
|
||||||
|
// ====== For Each Tile (Row) =====
|
||||||
|
for (int r=Game::pTileY;r<Game::pTileY+Game::camera.h/gameScene.getComponent<TileMapComponent>().tileWidth;r++){
|
||||||
|
if(r<0){r=0;}
|
||||||
|
if(gameScene.getComponent<TileMapComponent>().colliders[r][c]>0){
|
||||||
|
boundaries[i] = r*gameScene.getComponent<TileMapComponent>().tileWidth+gameScene.getComponent<TileMapComponent>().tileWidth;
|
||||||
|
i++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
return boundaries;
|
||||||
|
}
|
81
src/game/Game.hpp
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
/*
|
||||||
|
* Game.hpp
|
||||||
|
*
|
||||||
|
* Created on: Feb 9, 2020
|
||||||
|
* Author: ayoungblood
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef GAME_HPP_
|
||||||
|
#define GAME_HPP_
|
||||||
|
#include <SDL2/SDL.h>
|
||||||
|
#include <SDL2/SDL_image.h>
|
||||||
|
#include <SDL2/SDL_mixer.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <iostream>
|
||||||
|
#include <vector>
|
||||||
|
#include "Vector2D.h"
|
||||||
|
#include "../assetmgr/AssetManager.h"
|
||||||
|
#include "GameStateManager.h"
|
||||||
|
//#include "../../libtmx-parser/src/tmxparser.h"
|
||||||
|
//#include "libtmx-parser/src/tmxparser.h"
|
||||||
|
//#include <tmxparser.h>
|
||||||
|
|
||||||
|
class ColliderComponent;
|
||||||
|
class AssetManager;
|
||||||
|
|
||||||
|
class Game {
|
||||||
|
public:
|
||||||
|
Game();
|
||||||
|
virtual ~Game();
|
||||||
|
void init(const char* title, int width, int height, bool fullscreen, int globalScale);
|
||||||
|
void handleEvents();
|
||||||
|
void update();
|
||||||
|
void render();
|
||||||
|
void clean();
|
||||||
|
// void printDebug(std::string debugInfo);
|
||||||
|
static void drawLine(Vector2D srcpt, Vector2D destpt, int red, int green, int blue);
|
||||||
|
static int * predictCollisions();
|
||||||
|
bool running() { return isRunning; }
|
||||||
|
// static void AddTile(int srcX, int srcY, int xpos, int ypos);
|
||||||
|
static SDL_Renderer *renderer;
|
||||||
|
static SDL_Event event;
|
||||||
|
// static std::vector<ColliderComponent*> colliders;
|
||||||
|
// static tmxparser::TmxMap map;
|
||||||
|
// gameScene;
|
||||||
|
|
||||||
|
static bool debugMenu;
|
||||||
|
static bool isRunning;
|
||||||
|
static bool debugCollisionBoxes;
|
||||||
|
static bool gravityOnPlayer;
|
||||||
|
static bool playerIsGrounded;
|
||||||
|
static bool playerIsJumping;
|
||||||
|
static Vector2D playerPosition;
|
||||||
|
static Vector2D pVel;
|
||||||
|
static SDL_Rect camera;
|
||||||
|
static SDL_Rect levelMap;
|
||||||
|
static AssetManager* assets;
|
||||||
|
static GameStateManager* gsm;
|
||||||
|
static int pTileX;
|
||||||
|
static int pTileY;
|
||||||
|
std::string BoolToString(bool b);
|
||||||
|
enum groupLabels : std::size_t
|
||||||
|
{
|
||||||
|
groupMap,
|
||||||
|
groupPlayers,
|
||||||
|
groupEnemies,
|
||||||
|
groupColliders,
|
||||||
|
groupProjectiles,
|
||||||
|
groupObjects,
|
||||||
|
groupBackground,
|
||||||
|
groupUI_Layer0,
|
||||||
|
groupUI_Layer1,
|
||||||
|
groupUI_Layer2,
|
||||||
|
groupUI_Layer3
|
||||||
|
};
|
||||||
|
private:
|
||||||
|
int counter = 0;
|
||||||
|
// bool isRunning = false;
|
||||||
|
SDL_Window *window;
|
||||||
|
// SDL_Renderer *renderer;
|
||||||
|
};
|
||||||
|
#endif /* GAME_HPP_ */
|
95
src/game/GameStateManager.cpp
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
#include <assert.h>
|
||||||
|
#include "GameStateManager.h"
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
void GameStateManager::AdvanceState()
|
||||||
|
{
|
||||||
|
//given the AdvanceState event transition to a new state based on current state and gameData
|
||||||
|
BEGIN_TRANSITION_MAP // (Next State) // - Current State -
|
||||||
|
TRANSITION_MAP_ENTRY (ST_TITLESCREEN) // ST_Init
|
||||||
|
TRANSITION_MAP_ENTRY (ST_COREGAME) // ST_TitleScreen
|
||||||
|
TRANSITION_MAP_ENTRY (EVENT_IGNORED) // ST_Instructions
|
||||||
|
TRANSITION_MAP_ENTRY (EVENT_IGNORED) // ST_HiScoreList
|
||||||
|
TRANSITION_MAP_ENTRY (EVENT_IGNORED) // ST_Credits
|
||||||
|
TRANSITION_MAP_ENTRY (EVENT_IGNORED) // ST_CoreGame
|
||||||
|
TRANSITION_MAP_ENTRY (ST_COREGAME) // ST_PauseScreen
|
||||||
|
TRANSITION_MAP_ENTRY (ST_INIT) // ST_GameOver
|
||||||
|
END_TRANSITION_MAP(NULL)
|
||||||
|
}
|
||||||
|
|
||||||
|
void GameStateManager::PauseGame(GameData* gameData)
|
||||||
|
{
|
||||||
|
// given the PauseGame event transition to a new state based on current state and gameData
|
||||||
|
// printf("gameData->isPaused: %d\n",gameData->isPaused);
|
||||||
|
BEGIN_TRANSITION_MAP // - Current State -
|
||||||
|
TRANSITION_MAP_ENTRY (EVENT_IGNORED) // ST_Init
|
||||||
|
TRANSITION_MAP_ENTRY (EVENT_IGNORED) // ST_TitleScreen
|
||||||
|
TRANSITION_MAP_ENTRY (EVENT_IGNORED) // ST_Instructions
|
||||||
|
TRANSITION_MAP_ENTRY (EVENT_IGNORED) // ST_HiScoreList
|
||||||
|
TRANSITION_MAP_ENTRY (EVENT_IGNORED) // ST_Credits
|
||||||
|
TRANSITION_MAP_ENTRY (EVENT_IGNORED) // ST_CoreGame
|
||||||
|
TRANSITION_MAP_ENTRY (ST_INSTRUCTIONS) // ST_PauseScreen
|
||||||
|
TRANSITION_MAP_ENTRY (CANNOT_HAPPEN) // ST_GameOver
|
||||||
|
END_TRANSITION_MAP(gameData)
|
||||||
|
|
||||||
|
}
|
||||||
|
void GameStateManager::GameOver()
|
||||||
|
{
|
||||||
|
//given the PauseGame event transition to a new state based on current state and gameData
|
||||||
|
// printf("GameOver triggered\n");
|
||||||
|
BEGIN_TRANSITION_MAP // - Current State -
|
||||||
|
TRANSITION_MAP_ENTRY (EVENT_IGNORED) // ST_Init
|
||||||
|
TRANSITION_MAP_ENTRY (EVENT_IGNORED) // ST_TitleScreen
|
||||||
|
TRANSITION_MAP_ENTRY (EVENT_IGNORED) // ST_Instructions
|
||||||
|
TRANSITION_MAP_ENTRY (EVENT_IGNORED) // ST_HiScoreList
|
||||||
|
TRANSITION_MAP_ENTRY (EVENT_IGNORED) // ST_Credits
|
||||||
|
TRANSITION_MAP_ENTRY (ST_GAMEOVER) // ST_CoreGame
|
||||||
|
TRANSITION_MAP_ENTRY (EVENT_IGNORED) // ST_PauseScreen
|
||||||
|
TRANSITION_MAP_ENTRY (EVENT_IGNORED) // ST_GameOver
|
||||||
|
END_TRANSITION_MAP(NULL)
|
||||||
|
}
|
||||||
|
|
||||||
|
void GameStateManager::ST_Init(EventData*)
|
||||||
|
{
|
||||||
|
printf("GameStateManager::ST_Init\n");
|
||||||
|
// InternalEvent(ST_TITLESCREEN);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GameStateManager::ST_TitleScreen(EventData*)
|
||||||
|
{
|
||||||
|
printf("GameStateManager::ST_TitleScreen\n");
|
||||||
|
// InternalEvent(ST_TITLESCREEN);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GameStateManager::ST_Instructions(GameData*)
|
||||||
|
{
|
||||||
|
printf("GameStateManager::ST_Instructions\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
void GameStateManager::ST_HiScoreList(GameData*)
|
||||||
|
{
|
||||||
|
printf("GameStateManager::ST_HiScoreList\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
void GameStateManager::ST_Credits(GameData*)
|
||||||
|
{
|
||||||
|
printf("GameStateManager::ST_Credits\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
void GameStateManager::ST_CoreGame(EventData*)
|
||||||
|
{
|
||||||
|
printf("GameStateManager::ST_CoreGame\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
void GameStateManager::ST_PauseScreen(EventData*)
|
||||||
|
{
|
||||||
|
printf("GameStateManager::ST_PauseScreen\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
void GameStateManager::ST_GameOver(GameData*)
|
||||||
|
{
|
||||||
|
printf("GameStateManager::ST_GameOver\n");
|
||||||
|
}
|
||||||
|
|
57
src/game/GameStateManager.h
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "StateMachine.h"
|
||||||
|
|
||||||
|
// Structure to hold event data passed into state StateMachine
|
||||||
|
struct GameData : public EventData
|
||||||
|
{
|
||||||
|
char* menuId;
|
||||||
|
bool win;
|
||||||
|
};
|
||||||
|
|
||||||
|
// The Game State Machine Class
|
||||||
|
class GameStateManager : public StateMachine
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
GameStateManager() : StateMachine(ST_MAX_STATES) {}
|
||||||
|
|
||||||
|
// external events taken by this state machine
|
||||||
|
void AdvanceState();
|
||||||
|
void GameOver();
|
||||||
|
void PauseGame(GameData* gameData);
|
||||||
|
private:
|
||||||
|
//state machine state functions
|
||||||
|
void ST_Init(EventData*);
|
||||||
|
void ST_TitleScreen(EventData*);
|
||||||
|
void ST_Instructions(GameData*);
|
||||||
|
void ST_HiScoreList(GameData*);
|
||||||
|
void ST_Credits(GameData*);
|
||||||
|
void ST_CoreGame(EventData*);
|
||||||
|
void ST_PauseScreen(EventData*);
|
||||||
|
void ST_GameOver(GameData*);
|
||||||
|
|
||||||
|
//state map to define state function order
|
||||||
|
BEGIN_STATE_MAP
|
||||||
|
STATE_MAP_ENTRY(&GameStateManager::ST_Init)
|
||||||
|
STATE_MAP_ENTRY(&GameStateManager::ST_TitleScreen)
|
||||||
|
STATE_MAP_ENTRY(&GameStateManager::ST_Instructions)
|
||||||
|
STATE_MAP_ENTRY(&GameStateManager::ST_HiScoreList)
|
||||||
|
STATE_MAP_ENTRY(&GameStateManager::ST_Credits)
|
||||||
|
STATE_MAP_ENTRY(&GameStateManager::ST_CoreGame)
|
||||||
|
STATE_MAP_ENTRY(&GameStateManager::ST_PauseScreen)
|
||||||
|
STATE_MAP_ENTRY(&GameStateManager::ST_GameOver)
|
||||||
|
END_STATE_MAP
|
||||||
|
|
||||||
|
//state enumeration order must match order of state method entries on state map
|
||||||
|
enum E_States {
|
||||||
|
ST_INIT = 0,
|
||||||
|
ST_TITLESCREEN,
|
||||||
|
ST_INSTRUCTIONS,
|
||||||
|
ST_HISCORELIST,
|
||||||
|
ST_CREDITS,
|
||||||
|
ST_COREGAME,
|
||||||
|
ST_PAUSESCREEN,
|
||||||
|
ST_GAMEOVER,
|
||||||
|
ST_MAX_STATES
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
85
src/game/Main.cpp
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
/*
|
||||||
|
* main.cpp
|
||||||
|
*
|
||||||
|
* Created on: Feb 9, 2020
|
||||||
|
* Author: ayoungblood
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "Game.hpp"
|
||||||
|
#include "../cjson/cJSON.h"
|
||||||
|
#include <string>
|
||||||
|
#include <iostream>
|
||||||
|
#include <fstream>
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
|
Game *game = nullptr;
|
||||||
|
|
||||||
|
int main(int argc, const char * argv[])
|
||||||
|
{
|
||||||
|
const int FPS = 60;
|
||||||
|
const int frameDelay = 1000 / FPS;
|
||||||
|
|
||||||
|
Uint64 frameStart;
|
||||||
|
int frameTime;
|
||||||
|
|
||||||
|
// =============================
|
||||||
|
// Load cJSON config.json file
|
||||||
|
// =============================
|
||||||
|
// Starting with Error Checking
|
||||||
|
std::string configPath = "src/config/config.json";
|
||||||
|
std::ifstream fin(configPath);
|
||||||
|
|
||||||
|
if(fin.is_open()){
|
||||||
|
std::ifstream jsonText("src/config/config.json");
|
||||||
|
std::ostringstream tmp;
|
||||||
|
tmp << jsonText.rdbuf();
|
||||||
|
std::string json = tmp.str();
|
||||||
|
cJSON * myJSON = cJSON_Parse(json.c_str());
|
||||||
|
cJSON * windowName = cJSON_GetObjectItemCaseSensitive(myJSON, "WindowName");
|
||||||
|
cJSON * windowSize = cJSON_GetObjectItem(myJSON, "WindowSize");
|
||||||
|
int windowWidth = cJSON_GetObjectItem(windowSize, "w")->valueint;
|
||||||
|
int windowHeight = cJSON_GetObjectItem(windowSize, "h")->valueint;
|
||||||
|
int windowFS = cJSON_GetObjectItem(myJSON, "WindowFullScreen")->valueint;
|
||||||
|
int globalScale = cJSON_GetObjectItem(myJSON, "GlobalScale")->valueint;
|
||||||
|
bool isWindowFS;
|
||||||
|
if (windowFS==0)
|
||||||
|
{
|
||||||
|
isWindowFS = false;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
isWindowFS = true;
|
||||||
|
}
|
||||||
|
windowWidth = windowWidth*globalScale;
|
||||||
|
windowHeight = windowHeight*globalScale;
|
||||||
|
game = new Game();
|
||||||
|
game->init(windowName->valuestring, windowWidth, windowHeight, isWindowFS, globalScale);
|
||||||
|
// cJSON memory management
|
||||||
|
cJSON_Delete(myJSON);
|
||||||
|
|
||||||
|
while (game->running())
|
||||||
|
{
|
||||||
|
frameStart = SDL_GetTicks64();
|
||||||
|
|
||||||
|
game->handleEvents();
|
||||||
|
game->update();
|
||||||
|
game->render();
|
||||||
|
|
||||||
|
frameTime = SDL_GetTicks64() - frameStart;
|
||||||
|
|
||||||
|
if(frameDelay > frameTime)
|
||||||
|
{
|
||||||
|
SDL_Delay(frameDelay - frameTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
game->clean();
|
||||||
|
} else {
|
||||||
|
std::cout<<"config.json not found or opened"<<std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(fin.fail()){
|
||||||
|
std::cout<<"config.json load failed"<<std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
76
src/game/StateMachine.cpp
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
#include <assert.h>
|
||||||
|
#include "StateMachine.h"
|
||||||
|
// =============================================================================
|
||||||
|
// Do NOT modify this file, instead make custom changes in the GameStateManager
|
||||||
|
// or create your own StateMachine including and implementing this header
|
||||||
|
// =============================================================================
|
||||||
|
|
||||||
|
StateMachine::StateMachine(unsigned char maxStates) :
|
||||||
|
currentState(0),
|
||||||
|
_maxStates(maxStates),
|
||||||
|
_eventGenerated(false),
|
||||||
|
_pEventData(NULL)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// generates an external event. called once per external event
|
||||||
|
// to start the state machine executing
|
||||||
|
void StateMachine::ExternalEvent(unsigned char newState,
|
||||||
|
EventData* pData)
|
||||||
|
{
|
||||||
|
// if we are supposed to ignore this event
|
||||||
|
if (newState == EVENT_IGNORED) {
|
||||||
|
// just delete the event data, if any
|
||||||
|
if (pData)
|
||||||
|
delete pData;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// TODO - capture software lock here for thread-safety if necessary
|
||||||
|
|
||||||
|
// generate the event and execute the state engine
|
||||||
|
InternalEvent(newState, pData);
|
||||||
|
StateEngine();
|
||||||
|
|
||||||
|
// TODO - release software lock here
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// generates an internal event. called from within a state
|
||||||
|
// function to transition to a new state
|
||||||
|
void StateMachine::InternalEvent(unsigned char newState,
|
||||||
|
EventData* pData)
|
||||||
|
{
|
||||||
|
if (pData == NULL)
|
||||||
|
pData = new EventData();
|
||||||
|
|
||||||
|
_pEventData = pData;
|
||||||
|
_eventGenerated = true;
|
||||||
|
currentState = newState;
|
||||||
|
}
|
||||||
|
|
||||||
|
// the state engine executes the state machine states
|
||||||
|
void StateMachine::StateEngine(void)
|
||||||
|
{
|
||||||
|
EventData* pDataTemp = NULL;
|
||||||
|
|
||||||
|
// while events are being generated keep executing states
|
||||||
|
while (_eventGenerated) {
|
||||||
|
pDataTemp = _pEventData; // copy of event data pointer
|
||||||
|
_pEventData = NULL; // event data used up, reset ptr
|
||||||
|
_eventGenerated = false; // event used up, reset flag
|
||||||
|
|
||||||
|
assert(currentState < _maxStates);
|
||||||
|
|
||||||
|
// get state map
|
||||||
|
const StateStruct* pStateMap = GetStateMap();
|
||||||
|
|
||||||
|
// execute the state passing in event data, if any
|
||||||
|
(this->*pStateMap[currentState].pStateFunc)(pDataTemp);
|
||||||
|
|
||||||
|
// if event data was used, then delete it
|
||||||
|
if (pDataTemp) {
|
||||||
|
delete pDataTemp;
|
||||||
|
pDataTemp = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|