From ce91b12e7f82fbb1954a415eac51ca79a6d1daf3 Mon Sep 17 00:00:00 2001 From: dox Date: Sun, 12 Feb 2023 00:09:02 -0500 Subject: [PATCH] screenshots --- CMakeLists.txt | 68 +++ LICENSE | 674 +++++++++++++++++++++++ README.md | 53 ++ screenshots/1.png | Bin 0 -> 48905 bytes screenshots/2.png | Bin 0 -> 50967 bytes screenshots/3.png | Bin 0 -> 32065 bytes screenshots/4.png | Bin 0 -> 32962 bytes src/COMMON.h | 38 ++ src/engine/atlas.c | 43 ++ src/engine/atlas.h | 18 + src/engine/circle.c | 28 + src/engine/circle.h | 18 + src/engine/event.c | 44 ++ src/engine/event.h | 24 + src/engine/font.c | 15 + src/engine/font.h | 8 + src/engine/keyboard.c | 36 ++ src/engine/keyboard.h | 241 ++++++++ src/engine/mouse.c | 45 ++ src/engine/mouse.h | 28 + src/engine/music.c | 39 ++ src/engine/music.h | 12 + src/engine/rectangle.c | 30 + src/engine/rectangle.h | 6 + src/engine/renderer.c | 88 +++ src/engine/renderer.h | 12 + src/engine/sound.c | 22 + src/engine/sound.h | 9 + src/engine/sprite.c | 144 +++++ src/engine/sprite.h | 49 ++ src/engine/text.c | 100 ++++ src/engine/text.h | 6 + src/engine/texture.c | 37 ++ src/engine/texture.h | 11 + src/engine/tick.c | 11 + src/engine/tick.h | 15 + src/engine/window.c | 85 +++ src/engine/window.h | 14 + src/game/GAME_COMMON.h | 509 +++++++++++++++++ src/game/GAME_STRINGS.h | 71 +++ src/game/ending/ending.c | 164 ++++++ src/game/ending/ending.h | 63 +++ src/game/game.c | 100 ++++ src/game/game.h | 24 + src/game/game_ending.c | 102 ++++ src/game/game_ending.h | 49 ++ src/game/game_font.c | 37 ++ src/game/game_font.h | 32 ++ src/game/game_info.c | 106 ++++ src/game/game_info.h | 51 ++ src/game/game_intro.c | 102 ++++ src/game/game_intro.h | 48 ++ src/game/game_music.c | 36 ++ src/game/game_music.h | 24 + src/game/game_play.c | 103 ++++ src/game/game_play.h | 100 ++++ src/game/game_results.c | 102 ++++ src/game/game_results.h | 44 ++ src/game/game_sound.c | 37 ++ src/game/game_sound.h | 41 ++ src/game/game_state.c | 381 +++++++++++++ src/game/game_state.h | 24 + src/game/game_texture.c | 37 ++ src/game/game_texture.h | 62 +++ src/game/game_title.c | 102 ++++ src/game/game_title.h | 48 ++ src/game/gui/button.c | 67 +++ src/game/gui/button.h | 17 + src/game/gui/cursor.c | 73 +++ src/game/gui/cursor.h | 25 + src/game/info/info.c | 239 ++++++++ src/game/info/info.h | 52 ++ src/game/intro/intro.c | 46 ++ src/game/intro/intro.h | 40 ++ src/game/play/collectible/berserk.c | 35 ++ src/game/play/collectible/berserk.h | 13 + src/game/play/collectible/bullions.c | 29 + src/game/play/collectible/bullions.h | 13 + src/game/play/collectible/collectible.c | 158 ++++++ src/game/play/collectible/collectible.h | 28 + src/game/play/collectible/collectibles.c | 73 +++ src/game/play/collectible/collectibles.h | 16 + src/game/play/collectible/dollars.c | 29 + src/game/play/collectible/dollars.h | 13 + src/game/play/collectible/dynamite.c | 46 ++ src/game/play/collectible/dynamite.h | 13 + src/game/play/collectible/miracle_cure.c | 44 ++ src/game/play/collectible/miracle_cure.h | 13 + src/game/play/collectible/sack.c | 29 + src/game/play/collectible/sack.h | 13 + src/game/play/enemy/chip.c | 116 ++++ src/game/play/enemy/chip.h | 27 + src/game/play/enemy/chipper.c | 209 +++++++ src/game/play/enemy/chipper.h | 34 ++ src/game/play/enemy/crumbler.c | 125 +++++ src/game/play/enemy/crumbler.h | 31 ++ src/game/play/enemy/cupper.c | 151 +++++ src/game/play/enemy/cupper.h | 33 ++ src/game/play/enemy/enemies.c | 95 ++++ src/game/play/enemy/enemies.h | 15 + src/game/play/enemy/enemy.c | 245 ++++++++ src/game/play/enemy/enemy.h | 32 ++ src/game/play/gui/gui.c | 62 +++ src/game/play/gui/gui.h | 21 + src/game/play/gui/gui_bounty.c | 116 ++++ src/game/play/gui/gui_bounty.h | 25 + src/game/play/gui/gui_cash.c | 118 ++++ src/game/play/gui/gui_cash.h | 31 ++ src/game/play/gui/gui_ready.c | 78 +++ src/game/play/gui/gui_ready.h | 27 + src/game/play/gui/gui_redirect.c | 94 ++++ src/game/play/gui/gui_redirect.h | 25 + src/game/play/gui/gui_snake.c | 107 ++++ src/game/play/gui/gui_snake.h | 26 + src/game/play/gui/gui_upgrade.c | 496 +++++++++++++++++ src/game/play/gui/gui_upgrade.h | 43 ++ src/game/play/gui/gui_wave.c | 121 ++++ src/game/play/gui/gui_wave.h | 25 + src/game/play/message/message.c | 331 +++++++++++ src/game/play/message/message.h | 41 ++ src/game/play/message/messages.c | 60 ++ src/game/play/message/messages.h | 13 + src/game/play/pause/pause.c | 25 + src/game/play/pause/pause.h | 11 + src/game/play/play.c | 116 ++++ src/game/play/play.h | 33 ++ src/game/play/player/player.c | 92 ++++ src/game/play/player/player.h | 24 + src/game/play/player/player_cash.c | 41 ++ src/game/play/player/player_cash.h | 13 + src/game/play/player/player_defeat.c | 60 ++ src/game/play/player/player_defeat.h | 15 + src/game/play/player/player_direction.c | 63 +++ src/game/play/player/player_direction.h | 17 + src/game/play/player/player_fatness.c | 104 ++++ src/game/play/player/player_fatness.h | 15 + src/game/play/player/player_fire.c | 165 ++++++ src/game/play/player/player_fire.h | 16 + src/game/play/player/player_movement.c | 190 +++++++ src/game/play/player/player_movement.h | 30 + src/game/play/player/player_power_up.c | 42 ++ src/game/play/player/player_power_up.h | 13 + src/game/play/player/player_price.c | 89 +++ src/game/play/player/player_price.h | 15 + src/game/play/player/player_shadow.c | 34 ++ src/game/play/player/player_shadow.h | 22 + src/game/play/player/player_snakes.c | 401 ++++++++++++++ src/game/play/player/player_snakes.h | 41 ++ src/game/play/player/player_sprite.c | 112 ++++ src/game/play/player/player_sprite.h | 24 + src/game/play/player/player_tail.c | 129 +++++ src/game/play/player/player_tail.h | 28 + src/game/play/player/player_upgrades.c | 85 +++ src/game/play/player/player_upgrades.h | 18 + src/game/play/shadow/shadow.c | 27 + src/game/play/shadow/shadow.h | 10 + src/game/play/spawn/spawn.c | 166 ++++++ src/game/play/spawn/spawn.h | 19 + src/game/play/tutorial/tutorial.c | 79 +++ src/game/play/tutorial/tutorial.h | 21 + src/game/play/wave/wave.c | 359 ++++++++++++ src/game/play/wave/wave.h | 100 ++++ src/game/results/results.c | 279 ++++++++++ src/game/results/results.h | 37 ++ src/game/scene/scene.c | 177 ++++++ src/game/scene/scene.h | 22 + src/game/title/title.c | 177 ++++++ src/game/title/title.h | 34 ++ src/main.c | 56 ++ src/main.h | 9 + src/sdl/SDL_COMMON.h | 17 + src/sdl/sdl.c | 56 ++ src/sdl/sdl.h | 6 + src/util/list.c | 191 +++++++ src/util/list.h | 22 + src/util/math.c | 34 ++ src/util/math.h | 13 + src/util/node.c | 28 + src/util/node.h | 13 + src/util/random.c | 29 + src/util/random.h | 11 + 181 files changed, 12842 insertions(+) create mode 100755 CMakeLists.txt create mode 100755 LICENSE create mode 100755 README.md create mode 100644 screenshots/1.png create mode 100644 screenshots/2.png create mode 100644 screenshots/3.png create mode 100644 screenshots/4.png create mode 100755 src/COMMON.h create mode 100755 src/engine/atlas.c create mode 100755 src/engine/atlas.h create mode 100755 src/engine/circle.c create mode 100755 src/engine/circle.h create mode 100755 src/engine/event.c create mode 100755 src/engine/event.h create mode 100755 src/engine/font.c create mode 100755 src/engine/font.h create mode 100755 src/engine/keyboard.c create mode 100755 src/engine/keyboard.h create mode 100755 src/engine/mouse.c create mode 100755 src/engine/mouse.h create mode 100755 src/engine/music.c create mode 100755 src/engine/music.h create mode 100755 src/engine/rectangle.c create mode 100755 src/engine/rectangle.h create mode 100755 src/engine/renderer.c create mode 100755 src/engine/renderer.h create mode 100755 src/engine/sound.c create mode 100755 src/engine/sound.h create mode 100755 src/engine/sprite.c create mode 100755 src/engine/sprite.h create mode 100755 src/engine/text.c create mode 100755 src/engine/text.h create mode 100755 src/engine/texture.c create mode 100755 src/engine/texture.h create mode 100755 src/engine/tick.c create mode 100755 src/engine/tick.h create mode 100755 src/engine/window.c create mode 100755 src/engine/window.h create mode 100755 src/game/GAME_COMMON.h create mode 100755 src/game/GAME_STRINGS.h create mode 100755 src/game/ending/ending.c create mode 100755 src/game/ending/ending.h create mode 100755 src/game/game.c create mode 100755 src/game/game.h create mode 100755 src/game/game_ending.c create mode 100755 src/game/game_ending.h create mode 100755 src/game/game_font.c create mode 100755 src/game/game_font.h create mode 100755 src/game/game_info.c create mode 100755 src/game/game_info.h create mode 100755 src/game/game_intro.c create mode 100755 src/game/game_intro.h create mode 100755 src/game/game_music.c create mode 100755 src/game/game_music.h create mode 100755 src/game/game_play.c create mode 100755 src/game/game_play.h create mode 100755 src/game/game_results.c create mode 100755 src/game/game_results.h create mode 100755 src/game/game_sound.c create mode 100755 src/game/game_sound.h create mode 100755 src/game/game_state.c create mode 100755 src/game/game_state.h create mode 100755 src/game/game_texture.c create mode 100755 src/game/game_texture.h create mode 100755 src/game/game_title.c create mode 100755 src/game/game_title.h create mode 100755 src/game/gui/button.c create mode 100755 src/game/gui/button.h create mode 100755 src/game/gui/cursor.c create mode 100755 src/game/gui/cursor.h create mode 100755 src/game/info/info.c create mode 100755 src/game/info/info.h create mode 100755 src/game/intro/intro.c create mode 100755 src/game/intro/intro.h create mode 100755 src/game/play/collectible/berserk.c create mode 100755 src/game/play/collectible/berserk.h create mode 100755 src/game/play/collectible/bullions.c create mode 100755 src/game/play/collectible/bullions.h create mode 100755 src/game/play/collectible/collectible.c create mode 100755 src/game/play/collectible/collectible.h create mode 100755 src/game/play/collectible/collectibles.c create mode 100755 src/game/play/collectible/collectibles.h create mode 100755 src/game/play/collectible/dollars.c create mode 100755 src/game/play/collectible/dollars.h create mode 100755 src/game/play/collectible/dynamite.c create mode 100755 src/game/play/collectible/dynamite.h create mode 100755 src/game/play/collectible/miracle_cure.c create mode 100755 src/game/play/collectible/miracle_cure.h create mode 100755 src/game/play/collectible/sack.c create mode 100755 src/game/play/collectible/sack.h create mode 100755 src/game/play/enemy/chip.c create mode 100755 src/game/play/enemy/chip.h create mode 100755 src/game/play/enemy/chipper.c create mode 100755 src/game/play/enemy/chipper.h create mode 100755 src/game/play/enemy/crumbler.c create mode 100755 src/game/play/enemy/crumbler.h create mode 100755 src/game/play/enemy/cupper.c create mode 100755 src/game/play/enemy/cupper.h create mode 100755 src/game/play/enemy/enemies.c create mode 100755 src/game/play/enemy/enemies.h create mode 100755 src/game/play/enemy/enemy.c create mode 100755 src/game/play/enemy/enemy.h create mode 100755 src/game/play/gui/gui.c create mode 100755 src/game/play/gui/gui.h create mode 100755 src/game/play/gui/gui_bounty.c create mode 100755 src/game/play/gui/gui_bounty.h create mode 100755 src/game/play/gui/gui_cash.c create mode 100755 src/game/play/gui/gui_cash.h create mode 100755 src/game/play/gui/gui_ready.c create mode 100755 src/game/play/gui/gui_ready.h create mode 100755 src/game/play/gui/gui_redirect.c create mode 100755 src/game/play/gui/gui_redirect.h create mode 100755 src/game/play/gui/gui_snake.c create mode 100755 src/game/play/gui/gui_snake.h create mode 100755 src/game/play/gui/gui_upgrade.c create mode 100755 src/game/play/gui/gui_upgrade.h create mode 100755 src/game/play/gui/gui_wave.c create mode 100755 src/game/play/gui/gui_wave.h create mode 100755 src/game/play/message/message.c create mode 100755 src/game/play/message/message.h create mode 100755 src/game/play/message/messages.c create mode 100755 src/game/play/message/messages.h create mode 100755 src/game/play/pause/pause.c create mode 100755 src/game/play/pause/pause.h create mode 100755 src/game/play/play.c create mode 100755 src/game/play/play.h create mode 100755 src/game/play/player/player.c create mode 100755 src/game/play/player/player.h create mode 100755 src/game/play/player/player_cash.c create mode 100755 src/game/play/player/player_cash.h create mode 100755 src/game/play/player/player_defeat.c create mode 100755 src/game/play/player/player_defeat.h create mode 100755 src/game/play/player/player_direction.c create mode 100755 src/game/play/player/player_direction.h create mode 100755 src/game/play/player/player_fatness.c create mode 100755 src/game/play/player/player_fatness.h create mode 100755 src/game/play/player/player_fire.c create mode 100755 src/game/play/player/player_fire.h create mode 100755 src/game/play/player/player_movement.c create mode 100755 src/game/play/player/player_movement.h create mode 100755 src/game/play/player/player_power_up.c create mode 100755 src/game/play/player/player_power_up.h create mode 100755 src/game/play/player/player_price.c create mode 100755 src/game/play/player/player_price.h create mode 100755 src/game/play/player/player_shadow.c create mode 100755 src/game/play/player/player_shadow.h create mode 100755 src/game/play/player/player_snakes.c create mode 100755 src/game/play/player/player_snakes.h create mode 100755 src/game/play/player/player_sprite.c create mode 100755 src/game/play/player/player_sprite.h create mode 100755 src/game/play/player/player_tail.c create mode 100755 src/game/play/player/player_tail.h create mode 100755 src/game/play/player/player_upgrades.c create mode 100755 src/game/play/player/player_upgrades.h create mode 100755 src/game/play/shadow/shadow.c create mode 100755 src/game/play/shadow/shadow.h create mode 100755 src/game/play/spawn/spawn.c create mode 100755 src/game/play/spawn/spawn.h create mode 100755 src/game/play/tutorial/tutorial.c create mode 100755 src/game/play/tutorial/tutorial.h create mode 100755 src/game/play/wave/wave.c create mode 100755 src/game/play/wave/wave.h create mode 100755 src/game/results/results.c create mode 100755 src/game/results/results.h create mode 100755 src/game/scene/scene.c create mode 100755 src/game/scene/scene.h create mode 100755 src/game/title/title.c create mode 100755 src/game/title/title.h create mode 100755 src/main.c create mode 100755 src/main.h create mode 100755 src/sdl/SDL_COMMON.h create mode 100755 src/sdl/sdl.c create mode 100755 src/sdl/sdl.h create mode 100755 src/util/list.c create mode 100755 src/util/list.h create mode 100755 src/util/math.c create mode 100755 src/util/math.h create mode 100755 src/util/node.c create mode 100755 src/util/node.h create mode 100755 src/util/random.c create mode 100755 src/util/random.h diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100755 index 0000000..6154ed1 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,68 @@ +cmake_minimum_required(VERSION 3.10) + +project(calamitycobra C) + +set_target_properties(PROPERTIES LINKER_LANGUAGE C) + +include_directories(${PROJECT_SOURCE_DIR}/src) + +file(GLOB src + "${PROJECT_SOURCE_DIR}/src/*.c" + "${PROJECT_SOURCE_DIR}/src/engine/*.c" + "${PROJECT_SOURCE_DIR}/src/game/*.c" + "${PROJECT_SOURCE_DIR}/src/game/ending/*.c" + "${PROJECT_SOURCE_DIR}/src/game/gui/*.c" + "${PROJECT_SOURCE_DIR}/src/game/info/*.c" + "${PROJECT_SOURCE_DIR}/src/game/intro/*.c" + "${PROJECT_SOURCE_DIR}/src/game/play/*.c" + "${PROJECT_SOURCE_DIR}/src/game/play/collectible/*.c" + "${PROJECT_SOURCE_DIR}/src/game/play/enemy/*.c" + "${PROJECT_SOURCE_DIR}/src/game/play/gui/*.c" + "${PROJECT_SOURCE_DIR}/src/game/play/message/*.c" + "${PROJECT_SOURCE_DIR}/src/game/play/pause/*.c" + "${PROJECT_SOURCE_DIR}/src/game/play/player/*.c" + "${PROJECT_SOURCE_DIR}/src/game/play/shadow/*.c" + "${PROJECT_SOURCE_DIR}/src/game/play/spawn/*.c" + "${PROJECT_SOURCE_DIR}/src/game/play/tutorial/*.c" + "${PROJECT_SOURCE_DIR}/src/game/play/wave/*.c" + "${PROJECT_SOURCE_DIR}/src/game/results/*.c" + "${PROJECT_SOURCE_DIR}/src/game/results/*.c" + "${PROJECT_SOURCE_DIR}/src/game/scene/*.c" + "${PROJECT_SOURCE_DIR}/src/game/title/*.c" + "${PROJECT_SOURCE_DIR}/src/sdl/*.c" + "${PROJECT_SOURCE_DIR}/src/util/*.c" +) + +add_executable(calamitycobra ${src}) + +if (EMSCRIPTEN) + set (CMAKE_C_FLAGS "-O2 --preload-file res --use-preload-plugins -s NO_DYNAMIC_EXECUTION=1 -s ALLOW_MEMORY_GROWTH=1 -s ASSERTIONS=1 -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=0 -s USE_SDL=2 -s USE_SDL_IMAGE=2 -s SDL2_IMAGE_FORMATS='['png']' -s USE_SDL_MIXER=2 -s SDL2_MIXER_FORMATS='['ogg']' -s USE_SDL_TTF=2") + + if (CMAKE_BUILD_TYPE STREQUAL "Debug") + set (CMAKE_C_FLAGS "-DDEBUG -g -Wno-unused-command-line-argument" ${CMAKE_C_FLAGS}) + else() + set (CMAKE_BUILD_TyPE "Release") + endif() + + set(CMAKE_EXECUTABLE_SUFFIX ".html") +else() + set (CMAKE_C_FLAGS "-O2") + + if (CMAKE_BUILD_TYPE STREQUAL "Debug") + set (CMAKE_C_FLAGS "-DDEBUG -g -O2 -Wno-unused-variable -Wno-unused-parameter -Wall -Wextra -pedantic" ${CMAKE_C_FLAGS}) + else() + set (CMAKE_BUILD_TYPE "Release") + endif() + + if (WIN32) + set (CMAKE_C_FLAGS "-mwindows ${CMAKE_C_FLAGS}") + target_link_libraries(${PROJECT_NAME} mingw32 m SDL2main SDL2 SDL2_ttf SDL2_image SDL2_mixer) + else() + target_link_libraries(${PROJECT_NAME} m SDL2 SDL2_ttf SDL2_image SDL2_mixer) + endif() +endif() + +message("System: ${CMAKE_SYSTEM_NAME}") +message("Project: ${PROJECT_NAME}") +message("Build: ${CMAKE_BUILD_TYPE}") +message("Flags: ${CMAKE_C_FLAGS}") diff --git a/LICENSE b/LICENSE new file mode 100755 index 0000000..fe2fe8a --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/README.md b/README.md new file mode 100755 index 0000000..e6f0e57 --- /dev/null +++ b/README.md @@ -0,0 +1,53 @@ +# "Calamity Cobra in "A Sweet Surprise" + +![1](/screenshots/1.png) + +![2](/screenshots/2.png) + +![3](/screenshots/3.png) + +![4](/screenshots/4.png) + +My entry for the 2022 WeightGaming Gain Jam. A top down arcade shooter with some fetishy elements. + +## Build + +### Dependencies + + - SDL2 + - SDL_image + - SDL_mixer + - SDL_ttf + - emscripten (Web only) + +### Linux + +This repository uses CMake to compile, so: + +`mkdir build` + +`cd build` + +`cmake ..` + +`make` + +### Windows + +I used MinGW for the Windows build, so basically the same as Linux but you'll need to use MSYS, MinGW, etc. to compile it. + +### Web (Emscripten) + +Make sure you have Emscripten all configured with all the needed ports (see above). + +Then: + +`mkdir build` + +`cd build` + +`emcmake cmake ..` + +`emmake make` + +Make sure you've got the resources folder and that it's placed in the same directory as the executable. You can get that [here](https://shweetz.net/files/games/calamity-cobra-resources-1.2.7z). diff --git a/screenshots/1.png b/screenshots/1.png new file mode 100644 index 0000000000000000000000000000000000000000..02e9b0cd13c58cf0c536888e2747fd738ceebd53 GIT binary patch literal 48905 zcmbrkg;QM36E3_s!QCB#EfAdG?!j$wcMI+k2=49{To-oDFyy3Ur2tS+007kI0DPXeel?*q9g? znAjvZc%Op=NK8)rc>!rzzEXc>p_SnJ_KizIQA|io(NIIf(8I|iJ9`%D|L+Gr`T&@S z&>$EJ7$_Ik5A0ki14w%tK8l<3zm&N`41(A9{b?MJQ zW1(IFx`r4>F-qjf3=J`Kt%`mVq=Ay?i*X`KiLxdjArTR=SH9RHLv9S%Tt9@;7A2r= zuOqD`q7h6X>1GoW2n7p-hep9kl}cntq=^JW)xxWaXfnu}7DDMmYcj`6nY5P$;)y~N zibDa6aA~Ulrb5aJEGEkfs4ND8mKX=}SM@a96ssxgF_ba!fL}ubDOkf#ka2BR zXgJLo+EC+=##C{kf}o8gl(jV)Cw`GY!@33;7srMS{+Ph12n)nuP_2)`1B{64;DLq4 z2|4-p*QHF$ld`&prt7{=`j^o62+8x+%CO2{5Qs6ZhUH&+D3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vV!%QZLruAq5-+v@0&5_Lkt*vtsK(D$kE_2*>E+p%G zm3xw?cI7m7-DnqI=rv{*=%;oO#lD@ literal 0 HcmV?d00001 diff --git a/screenshots/2.png b/screenshots/2.png new file mode 100644 index 0000000000000000000000000000000000000000..b3e6aa8f4cf53c3458136814ea2a87291a55ba2a GIT binary patch literal 50967 zcmY(qby$=C_dm{nk&?18Qc?s45`r|+-L)Yx7$Bi^cOxMZG64alq;VspVYGxIAt9ll zbP7rPH5S;(Q zwDOLST1h4SS0+tO4t^0UmKYGrs6$FO@jPlkWYCT*ld1L@>5c3m*bSICGYhtR6y-#i zO;FIRnBVs9ME+!SeL?)Shf9Tnt*!0KpGCL*F{ImWN6zPw;Q8u~o^hw*N0)1^V>+mU z3ox0T;*^&!ghppkY7+V8iu@t5df)i;ltaK*pL_v6&V8M@XuB%51Pj4DLpe;GdL! zZlOm0T9j}PXqkZXG7f3;;sKR4QxD>XX&>S9vk}^hAN$|lI@MCtiSP{Tk}%N5w9w&| z>A}n2Js|&1-EX;SI<|=3yCg;6;iq%m^q$LF9XVW482i`LqZo$T{?8Dxw(QhP0b<4) z9=%C90v9;VGn%Df6<%w)BU)4x?)#$)p3fRa<1P)G8m>;OxCVxcduB9{n-*M=ah`bJ zpW;GX$f^OyDN`{_!6T7!w7#=5VKp!TQDmGJRkowBqSvz4fDQQQsY|xJ+0{_)dDWB$ z(zbQOwPRM_R0-a)ftD3o=}IfeSLSyPwF+Uwgpj|iF=0u_M~^mbBI z;vG)u3Y=o+g{0dSpN3zA7(dwc32LU^%&_wIQ%{k0H&UPUs<*ezy8{r#DWwiOu^cj` zeX@E=xl%&-Q1tJxo6qK3x~#(_XzG9pr%PZI=bsmTZXA3!K2YtU#e}s z@@t#OXb%rZw~?V58?EkA?j_x>T?(7$A#aW>h19ROI-MY;RO8cxA7}LOE6q@^aRrps zEhWCK8;)L$t^Jz&a3p$FtOEXLjrrI+qCduh^j=!+0s+D~ zGh?MxA2%^Pti(}Q@AF@}!uH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diff --git a/screenshots/3.png b/screenshots/3.png new file mode 100644 index 0000000000000000000000000000000000000000..a52267b3818a065f04afe5649d8aa3a961437f3f GIT binary patch literal 32065 zcmX`S1ys}j_dmYTjdTerVZe}(5(E^al~6WDj}{P-7Dh}$qy^t21*BsmMoN!V0qO3P z?#}&Re!jo+KZhN5Ug!0E-gw^UjmNzU)74g^rQ)Olfk3nx>d#++K*YB}AR;&g5%7eC zndKe`E>BgheuubBTt@?zvW*D-wAQ#)|zN&$Vjb zY5zqW#PQZD=<>_WuntyM!SDQf6k_U#8yyI|jd9KZMgEQ3B$kY~$tdqUy&e2Ca(n67 z&-~nzquSZC^`W!vC$q?&E8OwEV0ek<$n~sW&(3y3uL5kbK{#i;&QZuoz$f=zv6NZh zrAb8tUva~PT&t5`dGt<-hi|sdu{$sMysqP&ZdMgJkGN}6FQ+Fyqa9gx+Hylq3yL`> z86m-vR6OybUoUq;p6P+KO7&;4i;kKG!Nh{!KYOpYU zVGMbnUrj~$uw-qYUFJ>`bq;1t3`rM)e5BIp7iObeV7^$et-5?)6jl6dv+U+Dl!B$m zS9nAgB@q(ZfeU>Zu5QpmLj+-`R!q3}Ogx;^RJGdto^Z(%*f&da?7GF9g-+s93i9}@ zWc&V3Bd0neqvsu(`*fdV&w^DUc-iAp4G?PtXChiev0#@Oae@3x9f9*vy%zepUJ~xF zFDm2GZcN_ApdoeV{KpibBmZe<(kSapSV14Cl>JE-V^p)YKEg_D( znNv&5?bmz1bS7E-Tq2JRSaa|{Xg4*Ysm_N1?nfn>S4Ik7L?xRSp=GXh$AEvwOyMLKD*-Z26-L|J`+IWijrmt)N;7YHVhS9*< zGwWpeM`We?jy_DzR`Qd7lk-ZkpPbj3So~z5!5w*g7e)6!;pnt_p|T)Ap_r^qv%Lp` zFxk#t*a?;mRk<@Rk3o*a+%1m2bk}CgN3pP#zmhB;h1@iX(dB)+-~Pa0l+H1BrU1*Q z`q~h9lcIK_+HG__O%hyyUCpIMu9@$>9|Awh7UBj)RGo1C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L1fdY zH~v<1x}Np^(z!&-iQ;wlVt69CJ{z-%@XN&hT0&FcP9rAdLog5U=I|3JDKora@Wtf9;%(SM%oZHf==AhE6&tZsS9d`bgz4g9r8p4B5U`!)1}mptFYnLclHLQf UMso0b2>3JBzj&@f7a#Ti02tQ;Pyhe` literal 0 HcmV?d00001 diff --git a/src/COMMON.h b/src/COMMON.h new file mode 100755 index 0000000..1e6d0e6 --- /dev/null +++ b/src/COMMON.h @@ -0,0 +1,38 @@ +#pragma once + +#include +#include +#include +#include + +#define FALSE 0 +#define TRUE !FALSE + +#define PI 3.14159265358979323846 +#define SECOND 1000 +#define MINUTE 60000 + +#define RAD_TO_DEG (180 / PI) +#define DEG_TO_RAD (PI / 180) + +#define ROTATION_MAX_DEG 360 +#define ROTATION_MAX_RAD (2 * PI) + +#define FLOOR(x, f) x < f ? f : x +#define CEIL(x, c) x > c ? c : x +#define CLAMP(x, f, c) FLOOR(CEIL(x, c), f) + +typedef uint8_t u8; +typedef uint16_t u16; +typedef uint32_t u32; +typedef uint64_t u64; + +typedef int8_t s8; +typedef int16_t s16; +typedef int32_t s32; +typedef int64_t s64; + +typedef float f32; +typedef double f64; + +typedef u8 bool_u8; diff --git a/src/engine/atlas.c b/src/engine/atlas.c new file mode 100755 index 0000000..18ba375 --- /dev/null +++ b/src/engine/atlas.c @@ -0,0 +1,43 @@ +#include "atlas.h" + +/* + * Initializes a given atlas, provided a + * texture, rows, columns, each frame's width, and + * each frame's height. +*/ +void +atlas_init(Atlas* _a, SDL_Texture* _t, s32 _r, s32 _c, s32 _fW, s32 _fH) +{ + memset(_a, '\0', sizeof(Atlas)); + + _a->texture = _t; + _a->rows = _r; + _a->cols = _c; + _a->frameW = _fW; + _a->frameH = _fH; +} + +/* + * Returns the source rectangle of an atlas provided a frame; + * where it's currently "focused" on. +*/ +SDL_Rect +atlas_source_rect_get(Atlas* _a, s32 _f) +{ + SDL_Rect r; + + r.w = _a->frameW; + r.h = _a->frameH; + + if (_a->cols == 1) + r.x = 0; + else + r.x = (_f % _a->cols) * _a->frameW; + + if (_a->rows == 1) + r.y = 0; + else + r.y = (_f / _a->rows) * _a->frameH; + + return r; +} diff --git a/src/engine/atlas.h b/src/engine/atlas.h new file mode 100755 index 0000000..78c8010 --- /dev/null +++ b/src/engine/atlas.h @@ -0,0 +1,18 @@ +#pragma once + +#include "texture.h" + +#define ATLAS_ROWS_DEFAULT 1 +#define ATLAS_COLUMNS_DEFAULT 1 + +typedef struct Atlas +{ + SDL_Texture* texture; + s32 rows; + s32 cols; + s32 frameW; + s32 frameH; +} Atlas; + +void atlas_init(Atlas* _a, SDL_Texture* _t, s32 _r, s32 _c, s32 _fW, s32 _fH); +SDL_Rect atlas_source_rect_get(Atlas* _a, s32 _f); diff --git a/src/engine/circle.c b/src/engine/circle.c new file mode 100755 index 0000000..1c25940 --- /dev/null +++ b/src/engine/circle.c @@ -0,0 +1,28 @@ +/* + * DESCRIPTION: + * Circle code. +*/ + +#include "circle.h" + +/* Are two circles colliding? */ +bool_u8 +circle_collide(Circle* _a, Circle* _b) +{ + f64 sum; + f64 distance; + + distance = math_distance + ( + _a->x, + _a->y, + _b->x, + _b->y + ); + + sum = _a->r + _b->r; + + if (distance < sum) + return TRUE; + return FALSE; +} diff --git a/src/engine/circle.h b/src/engine/circle.h new file mode 100755 index 0000000..312b79e --- /dev/null +++ b/src/engine/circle.h @@ -0,0 +1,18 @@ +/* + * DESCRIPTION: + * Header file for circle.h. +*/ + +#pragma once + +#include "../util/math.h" +#include "../COMMON.h" + +typedef struct Circle +{ + f64 r; + f64 x; + f64 y; +} Circle; + +bool_u8 circle_collide(Circle* _a, Circle* _b); diff --git a/src/engine/event.c b/src/engine/event.c new file mode 100755 index 0000000..0dd6946 --- /dev/null +++ b/src/engine/event.c @@ -0,0 +1,44 @@ +#include "event.h" + +/* Updates events. */ +void +event_update(Event* _e) +{ + SDL_Event event; + + memcpy(&_e->prev, &_e->curr, EVENT_MAX); + memset(&_e->curr, '\0', EVENT_MAX); + + while (SDL_PollEvent(&event)) + { + switch (event.type) + { + case SDL_QUIT: + _e->curr[EVENT_QUIT] = TRUE; + break; + default: + break; + } + } +} + +/* Is a given event pressed? */ +bool_u8 +event_press(Event* _e, EventType _t) +{ + return (_e->curr[_t] && !_e->prev[_t]); +} + +/* Is a given event held? */ +bool_u8 +event_held(Event* _e, EventType _t) +{ + return (_e->curr[_t] && _e->prev[_t]); +} + +/* Is a given event released? */ +bool_u8 +event_release(Event* _e, EventType _t) +{ + return (!_e->curr[_t] && _e->prev[_t]); +} diff --git a/src/engine/event.h b/src/engine/event.h new file mode 100755 index 0000000..49aa088 --- /dev/null +++ b/src/engine/event.h @@ -0,0 +1,24 @@ +#pragma once + +#include + +#include "../COMMON.h" + +#define EVENT_MAX 2 + +typedef enum EventType +{ + EVENT_NONE, + EVENT_QUIT +} EventType; + +typedef struct Event +{ + bool_u8 curr[EVENT_MAX]; + bool_u8 prev[EVENT_MAX]; +} Event; + +void event_update(Event* _e); +bool_u8 event_press(Event* _e, EventType _t); +bool_u8 event_held(Event* _e, EventType _t); +bool_u8 event_release(Event* _e, EventType _t); diff --git a/src/engine/font.c b/src/engine/font.c new file mode 100755 index 0000000..d81aae1 --- /dev/null +++ b/src/engine/font.c @@ -0,0 +1,15 @@ +#include "font.h" + +/* Loads a given font, with a filepath and a font size specified. */ +void +font_init(TTF_Font** _x, char* _p, s32 _s) +{ + *_x = TTF_OpenFont(_p, _s); +} + +/* Frees a given font. */ +void +font_free(TTF_Font* _x) +{ + TTF_CloseFont(_x); +} diff --git a/src/engine/font.h b/src/engine/font.h new file mode 100755 index 0000000..541e11c --- /dev/null +++ b/src/engine/font.h @@ -0,0 +1,8 @@ +#pragma once + +#include + +#include "../COMMON.h" + +void font_init(TTF_Font** _x, char* _p, s32 _s); +void font_free(TTF_Font* _x); diff --git a/src/engine/keyboard.c b/src/engine/keyboard.c new file mode 100755 index 0000000..6539a4f --- /dev/null +++ b/src/engine/keyboard.c @@ -0,0 +1,36 @@ +#include "keyboard.h" + +/* Updates the keyboard. */ +void +keyboard_update(Keyboard* _k) +{ + const u8* state; + + memcpy(&_k->prev, &_k->curr, KEYBOARD_MAX); + memset(&_k->curr, '\0', KEYBOARD_MAX); + + state = SDL_GetKeyboardState(NULL); + + memcpy(&_k->curr, state, KEYBOARD_MAX); +} + +/* Is the given key pressed? */ +bool_u8 +keyboard_press(Keyboard* _k, KeyboardType _t) +{ + return (_k->curr[_t] && !_k->prev[_t]); +} + +/* Is the given key held? */ +bool_u8 +keyboard_held(Keyboard* _k, KeyboardType _t) +{ + return (_k->curr[_t] && _k->prev[_t]); +} + +/* Is the given key released? */ +bool_u8 +keyboard_release(Keyboard* _k, KeyboardType _t) +{ + return (!_k->curr[_t] && _k->prev[_t]); +} diff --git a/src/engine/keyboard.h b/src/engine/keyboard.h new file mode 100755 index 0000000..3cfcad2 --- /dev/null +++ b/src/engine/keyboard.h @@ -0,0 +1,241 @@ +#pragma once + +#include + +#include "../COMMON.h" + +#define KEYBOARD_MAX 0xFF + +typedef enum KeyboardType +{ + KEYBOARD_UNKNOWN = 0, + KEYBOARD_UNKNOWN_TWO = 1, + KEYBOARD_UNKNOWN_THREE = 2, + KEYBOARD_UNKNOWN_FOUR = 3, + KEYBOARD_A = 4, + KEYBOARD_B = 5, + KEYBOARD_C = 6, + KEYBOARD_D = 7, + KEYBOARD_E = 8, + KEYBOARD_F = 9, + KEYBOARD_G = 10, + KEYBOARD_H = 11, + KEYBOARD_I = 12, + KEYBOARD_J = 13, + KEYBOARD_K = 14, + KEYBOARD_L = 15, + KEYBOARD_M = 16, + KEYBOARD_N = 17, + KEYBOARD_O = 18, + KEYBOARD_P = 19, + KEYBOARD_Q = 20, + KEYBOARD_R = 21, + KEYBOARD_S = 22, + KEYBOARD_T = 23, + KEYBOARD_U = 24, + KEYBOARD_V = 25, + KEYBOARD_W = 26, + KEYBOARD_X = 27, + KEYBOARD_Y = 28, + KEYBOARD_Z = 29, + KEYBOARD_1 = 30, + KEYBOARD_2 = 31, + KEYBOARD_3 = 32, + KEYBOARD_4 = 33, + KEYBOARD_5 = 34, + KEYBOARD_6 = 35, + KEYBOARD_7 = 36, + KEYBOARD_8 = 37, + KEYBOARD_9 = 38, + KEYBOARD_0 = 39, + KEYBOARD_RETURN = 40, + KEYBOARD_ESCAPE = 41, + KEYBOARD_BACKSPACE = 42, + KEYBOARD_TAB = 43, + KEYBOARD_SPACE = 44, + KEYBOARD_MINUS = 45, + KEYBOARD_EQUALS = 46, + KEYBOARD_LEFTBRACKET = 47, + KEYBOARD_RIGHTBRACKET = 48, + KEYBOARD_BACKSLASH = 49, + KEYBOARD_NONUSHASH = 50, + KEYBOARD_SEMICOLON = 51, + KEYBOARD_APOSTROPHE = 52, + KEYBOARD_GRAVE = 53, + KEYBOARD_COMMA = 54, + KEYBOARD_PERIOD = 55, + KEYBOARD_SLASH = 56, + KEYBOARD_CAPSLOCK = 57, + KEYBOARD_F1 = 58, + KEYBOARD_F2 = 59, + KEYBOARD_F3 = 60, + KEYBOARD_F4 = 61, + KEYBOARD_F5 = 62, + KEYBOARD_F6 = 63, + KEYBOARD_F7 = 64, + KEYBOARD_F8 = 65, + KEYBOARD_F9 = 66, + KEYBOARD_F10 = 67, + KEYBOARD_F11 = 68, + KEYBOARD_F12 = 69, + KEYBOARD_PRINTSCREEN = 70, + KEYBOARD_SCROLLLOCK = 71, + KEYBOARD_PAUSE = 72, + KEYBOARD_INSERT = 73, + KEYBOARD_HOME = 74, + KEYBOARD_PAGEUP = 75, + KEYBOARD_DELETE = 76, + KEYBOARD_END = 77, + KEYBOARD_PAGEDOWN = 78, + KEYBOARD_RIGHT = 79, + KEYBOARD_LEFT = 80, + KEYBOARD_DOWN = 81, + KEYBOARD_UP = 82, + KEYBOARD_NUMLOCKCLEAR = 83, + KEYBOARD_KP_DIVIDE = 84, + KEYBOARD_KP_MULTIPLY = 85, + KEYBOARD_KP_MINUS = 86, + KEYBOARD_KP_PLUS = 87, + KEYBOARD_KP_ENTER = 88, + KEYBOARD_KP_1 = 89, + KEYBOARD_KP_2 = 90, + KEYBOARD_KP_3 = 91, + KEYBOARD_KP_4 = 92, + KEYBOARD_KP_5 = 93, + KEYBOARD_KP_6 = 94, + KEYBOARD_KP_7 = 95, + KEYBOARD_KP_8 = 96, + KEYBOARD_KP_9 = 97, + KEYBOARD_KP_0 = 98, + KEYBOARD_KP_PERIOD = 99, + KEYBOARD_NONUSBACKSLASH = 100, + KEYBOARD_APPLICATION = 101, + KEYBOARD_POWER = 102, + KEYBOARD_KP_EQUALS = 103, + KEYBOARD_F13 = 104, + KEYBOARD_F14 = 105, + KEYBOARD_F15 = 106, + KEYBOARD_F16 = 107, + KEYBOARD_F17 = 108, + KEYBOARD_F18 = 109, + KEYBOARD_F19 = 110, + KEYBOARD_F20 = 111, + KEYBOARD_F21 = 112, + KEYBOARD_F22 = 113, + KEYBOARD_F23 = 114, + KEYBOARD_F24 = 115, + KEYBOARD_EXECUTE = 116, + KEYBOARD_HELP = 117, + KEYBOARD_MENU = 118, + KEYBOARD_SELECT = 119, + KEYBOARD_STOP = 120, + KEYBOARD_AGAIN = 121, + KEYBOARD_UNDO = 122, + KEYBOARD_CUT = 123, + KEYBOARD_COPY = 124, + KEYBOARD_PASTE = 125, + KEYBOARD_FIND = 126, + KEYBOARD_MUTE = 127, + KEYBOARD_VOLUMEUP = 128, + KEYBOARD_VOLUMEDOWN = 129, + KEYBOARD_LOCKINGCAPSLOCK = 130, + KEYBOARD_LOCKINGNUMLOCK = 131, + KEYBOARD_LOCKINGSCROLLLOCK = 132, + KEYBOARD_KP_COMMA = 133, + KEYBOARD_KP_EQUALSAS400 = 134, + KEYBOARD_INTERNATIONAL1 = 135, + KEYBOARD_INTERNATIONAL2 = 136, + KEYBOARD_INTERNATIONAL3 = 137, + KEYBOARD_INTERNATIONAL4 = 138, + KEYBOARD_INTERNATIONAL5 = 139, + KEYBOARD_INTERNATIONAL6 = 140, + KEYBOARD_INTERNATIONAL7 = 141, + KEYBOARD_INTERNATIONAL8 = 142, + KEYBOARD_INTERNATIONAL9 = 143, + KEYBOARD_LANG1 = 144, + KEYBOARD_LANG2 = 145, + KEYBOARD_LANG3 = 146, + KEYBOARD_LANG4 = 147, + KEYBOARD_LANG5 = 148, + KEYBOARD_LANG6 = 149, + KEYBOARD_LANG7 = 150, + KEYBOARD_LANG8 = 151, + KEYBOARD_LANG9 = 152, + KEYBOARD_ALTERASE = 153, + KEYBOARD_SYSREQ = 154, + KEYBOARD_CANCEL = 155, + KEYBOARD_CLEAR = 156, + KEYBOARD_PRIOR = 157, + KEYBOARD_RETURN2 = 158, + KEYBOARD_SEPARATOR = 159, + KEYBOARD_OUT = 160, + KEYBOARD_OPER = 161, + KEYBOARD_CLEARAGAIN = 162, + KEYBOARD_CRSEL = 163, + KEYBOARD_EXSEL = 164, + KEYBOARD_KP_00 = 176, + KEYBOARD_KP_000 = 177, + KEYBOARD_THOUSANDSSEPARATOR = 178, + KEYBOARD_DECIMALSEPARATOR = 179, + KEYBOARD_CURRENCYUNIT = 180, + KEYBOARD_CURRENCYSUBUNIT = 181, + KEYBOARD_KP_LEFTPAREN = 182, + KEYBOARD_KP_RIGHTPAREN = 183, + KEYBOARD_KP_LEFTBRACE = 184, + KEYBOARD_KP_RIGHTBRACE = 185, + KEYBOARD_KP_TAB = 186, + KEYBOARD_KP_BACKSPACE = 187, + KEYBOARD_KP_A = 188, + KEYBOARD_KP_B = 189, + KEYBOARD_KP_C = 190, + KEYBOARD_KP_D = 191, + KEYBOARD_KP_E = 192, + KEYBOARD_KP_F = 193, + KEYBOARD_KP_XOR = 194, + KEYBOARD_KP_POWER = 195, + KEYBOARD_KP_PERCENT = 196, + KEYBOARD_KP_LESS = 197, + KEYBOARD_KP_GREATER = 198, + KEYBOARD_KP_AMPERSAND = 199, + KEYBOARD_KP_DBLAMPERSAND = 200, + KEYBOARD_KP_VERTICALBAR = 201, + KEYBOARD_KP_DBLVERTICALBAR = 202, + KEYBOARD_KP_COLON = 203, + KEYBOARD_KP_HASH = 204, + KEYBOARD_KP_SPACE = 205, + KEYBOARD_KP_AT = 206, + KEYBOARD_KP_EXCLAM = 207, + KEYBOARD_KP_MEMSTORE = 208, + KEYBOARD_KP_MEMRECALL = 209, + KEYBOARD_KP_MEMCLEAR = 210, + KEYBOARD_KP_MEMADD = 211, + KEYBOARD_KP_MEMSUBTRACT = 212, + KEYBOARD_KP_MEMMULTIPLY = 213, + KEYBOARD_KP_MEMDIVIDE = 214, + KEYBOARD_KP_PLUSMINUS = 215, + KEYBOARD_KP_CLEAR = 216, + KEYBOARD_KP_CLEARENTRY = 217, + KEYBOARD_KP_BINARY = 218, + KEYBOARD_KP_OCTAL = 219, + KEYBOARD_KP_DECIMAL = 220, + KEYBOARD_KP_HEXADECIMAL = 221, + KEYBOARD_LCTRL = 224, + KEYBOARD_LSHIFT = 225, + KEYBOARD_LALT = 226, + KEYBOARD_LGUI = 227, + KEYBOARD_RCTRL = 228, + KEYBOARD_RSHIFT = 229, + KEYBOARD_RALT = 230, + KEYBOARD_RGUI = 231 +} KeyboardType; + +typedef struct Keyboard +{ + bool_u8 curr[KEYBOARD_MAX]; + bool_u8 prev[KEYBOARD_MAX]; +} Keyboard; + +void keyboard_update(Keyboard* _k); +bool_u8 keyboard_press(Keyboard* _k, KeyboardType _t); +bool_u8 keyboard_held(Keyboard* _k, KeyboardType _t); +bool_u8 keyboard_release(Keyboard* _k, KeyboardType _t); diff --git a/src/engine/mouse.c b/src/engine/mouse.c new file mode 100755 index 0000000..32d410e --- /dev/null +++ b/src/engine/mouse.c @@ -0,0 +1,45 @@ +#include "mouse.h" + +/* Updates the mouse. */ +void +mouse_update(Mouse* _m) +{ + s32 state; + + memcpy(&_m->prev, &_m->curr, MOUSE_MAX); + memset(&_m->curr, '\0', MOUSE_MAX); + + state = SDL_GetMouseState(NULL, NULL); + + if ((state & SDL_BUTTON_LMASK) != 0) + _m->curr[MOUSE_LEFT] = TRUE; + + if ((state & SDL_BUTTON_MMASK) != 0) + _m->curr[MOUSE_MIDDLE] = TRUE; + + if ((state & SDL_BUTTON_RMASK) != 0) + _m->curr[MOUSE_RIGHT] = TRUE; + + SDL_GetMouseState(&_m->x, &_m->y); +} + +/* Is a given mouse button pressed? */ +bool_u8 +mouse_press(Mouse* _m, MouseType _t) +{ + return (_m->curr[_t] && !_m->prev[_t]); +} + +/* Is a given mouse button held? */ +bool_u8 +mouse_held(Mouse* _m, MouseType _t) +{ + return (_m->curr[_t] && _m->prev[_t]); +} + +/* Is a given mouse button released? */ +bool_u8 +mouse_release(Mouse* _m, MouseType _t) +{ + return (!_m->curr[_t] && _m->prev[_t]); +} diff --git a/src/engine/mouse.h b/src/engine/mouse.h new file mode 100755 index 0000000..052eda0 --- /dev/null +++ b/src/engine/mouse.h @@ -0,0 +1,28 @@ +#pragma once + +#include + +#include "../COMMON.h" + +#define MOUSE_MAX 4 + +typedef enum MouseType +{ + MOUSE_NONE, + MOUSE_LEFT, + MOUSE_MIDDLE, + MOUSE_RIGHT +} MouseType; + +typedef struct Mouse +{ + s32 x; + s32 y; + bool_u8 curr[MOUSE_MAX]; + bool_u8 prev[MOUSE_MAX]; +} Mouse; + +void mouse_update(Mouse* _m); +bool_u8 mouse_press(Mouse* _m, MouseType _t); +bool_u8 mouse_held(Mouse* _m, MouseType _t); +bool_u8 mouse_release(Mouse* _m, MouseType _t); diff --git a/src/engine/music.c b/src/engine/music.c new file mode 100755 index 0000000..1651df7 --- /dev/null +++ b/src/engine/music.c @@ -0,0 +1,39 @@ +#include "music.h" + +/* Returns music from a filepath. */ +void +music_init(Mix_Music** _x, char* _p) +{ + *_x = Mix_LoadMUS(_p); +} + +/* Frees given music. */ +void +music_free(Mix_Music* _x) +{ + Mix_FreeMusic(_x); +} + +/* Plays a given music. */ +void +music_play(Mix_Music* _x, bool_u8 _l) +{ + if (_l) + Mix_PlayMusic(_x, -1); + else + Mix_PlayMusic(_x, 0); +} + +/* Stops whatever music is playing. */ +void +music_stop(void) +{ + Mix_HaltMusic(); +} + +/* Is music currently playing? */ +bool_u8 +music_playing(void) +{ + return Mix_PlayingMusic(); +} diff --git a/src/engine/music.h b/src/engine/music.h new file mode 100755 index 0000000..ea9c551 --- /dev/null +++ b/src/engine/music.h @@ -0,0 +1,12 @@ +#pragma once + +#include + +#include "../COMMON.h" + + +void music_init(Mix_Music** _x, char* _path); +void music_free(Mix_Music* _x); +void music_play(Mix_Music* _x, bool_u8 _l); +void music_stop(void); +bool_u8 music_playing(void); diff --git a/src/engine/rectangle.c b/src/engine/rectangle.c new file mode 100755 index 0000000..46c71a8 --- /dev/null +++ b/src/engine/rectangle.c @@ -0,0 +1,30 @@ +#include "rectangle.h" + +/* Draws a rectangle onto a renderer, given a rectangle and color. */ +void +rectangle_draw(SDL_Rect* _x, SDL_Renderer* _r, SDL_Color _c) +{ + SDL_Color c; + + c = renderer_color_get(_r); + + renderer_color_set(_r, _c); + + SDL_RenderFillRect(_r, _x); + + renderer_color_set(_r, c); +} + +/* Is a point colliding with a rectangle? */ +bool_u8 +rectangle_point_collide(SDL_Rect* _r, f64 _x, f64 _y) +{ + SDL_Point p; + + p.x = _x; + p.y = _y; + + if (SDL_PointInRect(&p, _r)) + return TRUE; + return FALSE; +} diff --git a/src/engine/rectangle.h b/src/engine/rectangle.h new file mode 100755 index 0000000..29476c2 --- /dev/null +++ b/src/engine/rectangle.h @@ -0,0 +1,6 @@ +#pragma once + +#include "renderer.h" + +void rectangle_draw(SDL_Rect* _x, SDL_Renderer* _renderer, SDL_Color _c); +bool_u8 rectangle_point_collide(SDL_Rect* _r, f64 _x, f64 _y); diff --git a/src/engine/renderer.c b/src/engine/renderer.c new file mode 100755 index 0000000..f41d3c0 --- /dev/null +++ b/src/engine/renderer.c @@ -0,0 +1,88 @@ +#include "renderer.h" + +/* Initializes a renderer, given a window and renderer flags. */ +void +renderer_init(SDL_Renderer** _x, SDL_Window* _w, s32 _f) +{ + *_x = SDL_CreateRenderer + ( + _w, + -1, + _f + ); + + SDL_SetRenderDrawBlendMode(*_x, SDL_BLENDMODE_BLEND); +} + +/* Frees a given renderer. */ +void +renderer_free(SDL_Renderer* _x) +{ + SDL_DestroyRenderer(_x); +} + +/* Clears the renderer. */ +void +renderer_clear(SDL_Renderer* _x) +{ + SDL_RenderClear(_x); +} + +/* Presents the renderer to the screen. */ +void +renderer_present(SDL_Renderer* _x) +{ + SDL_RenderPresent(_x); +} + +/* Gets the renderer's current draw color. */ +SDL_Color +renderer_color_get(SDL_Renderer* _r) +{ + SDL_Color c; + + memset(&c, '\0', sizeof(SDL_Color)); + + SDL_GetRenderDrawColor + ( + _r, + &c.r, + &c.g, + &c.b, + &c.a + ); + + return c; +} + +/* Sets the renderer's current draw color. */ +void +renderer_color_set(SDL_Renderer* _x, SDL_Color _c) +{ + SDL_SetRenderDrawColor + ( + _x, + _c.r, + _c.g, + _c.b, + _c.a + ); +} + +/* Set's the renderer's viewport; e.g., where it's going to be drawing to. */ +void +renderer_viewport_set(SDL_Renderer* _x, SDL_Rect _r) +{ + SDL_RenderSetViewport(_x, &_r); +} + +/* Sets the renderer's viewport to the window's. */ +void +renderer_viewport_window_set(SDL_Renderer* _x, SDL_Window* _w) +{ + SDL_Rect r; + + r = window_rect_get(_w); + + renderer_viewport_set(_x, r); +} diff --git a/src/engine/renderer.h b/src/engine/renderer.h new file mode 100755 index 0000000..0c9f26f --- /dev/null +++ b/src/engine/renderer.h @@ -0,0 +1,12 @@ +#pragma once + +#include "window.h" + +SDL_Color renderer_color_get(SDL_Renderer* _r); +void renderer_clear(SDL_Renderer* _x); +void renderer_color_set(SDL_Renderer* _x, SDL_Color _c); +void renderer_free(SDL_Renderer* _x); +void renderer_init(SDL_Renderer** _x, SDL_Window* _w, s32 _f); +void renderer_present(SDL_Renderer* _x); +void renderer_viewport_set(SDL_Renderer* _x, SDL_Rect _r); +void renderer_viewport_window_set(SDL_Renderer* _x, SDL_Window* _w); diff --git a/src/engine/sound.c b/src/engine/sound.c new file mode 100755 index 0000000..be584d0 --- /dev/null +++ b/src/engine/sound.c @@ -0,0 +1,22 @@ +#include "sound.h" + +/* Initializes a sound from a given filepath. */ +void +sound_init(Mix_Chunk** _x, char* _path) +{ + *_x = Mix_LoadWAV(_path); +} + +/* Frees a given sound. */ +void +sound_free(Mix_Chunk* _x) +{ + Mix_FreeChunk(_x); +} + +/* Plays a given sound, with its channel specified. */ +void +sound_play(Mix_Chunk* _x, s32 _channel) +{ + Mix_PlayChannel(_channel, _x, 0); +} diff --git a/src/engine/sound.h b/src/engine/sound.h new file mode 100755 index 0000000..cddf250 --- /dev/null +++ b/src/engine/sound.h @@ -0,0 +1,9 @@ +#pragma once + +#include + +#include "../COMMON.h" + +void sound_init(Mix_Chunk** _x, char* _path); +void sound_free(Mix_Chunk* _x); +void sound_play(Mix_Chunk* _x, s32 _channel); diff --git a/src/engine/sprite.c b/src/engine/sprite.c new file mode 100755 index 0000000..de83426 --- /dev/null +++ b/src/engine/sprite.c @@ -0,0 +1,144 @@ +#include "sprite.h" + +/* Gets the sprite's current rectangle. */ +SDL_Rect +sprite_rect_get(Sprite* _x) +{ + SDL_Rect r; + + memset(&r, '\0', sizeof(SDL_Rect)); + + r.w = _x->w * _x->scale * _x->squash; + r.h = _x->h * _x->scale * _x->stretch; + + switch (_x->origin) + { + case ORIGIN_TOP_LEFT: + r.x = _x->x; + r.y = _x->y; + break; + /* FALLTHROUGH */ + case ORIGIN_MIDDLE: + default: + r.x = _x->x - (r.w / 2); + r.y = _x->y - (r.h / 2); + break; + } + + return r; +} + +/* + * Initializes a sprite with an atlas, its origin, + * its width and its height. +*/ +void +sprite_atlas_init(Sprite* _x, Atlas* _a, OriginType _o, s32 _w, s32 _h) +{ + memset(_x, '\0', sizeof(Sprite)); + + _x->atlas = *_a; + _x->origin = _o; + _x->w = _w; + _x->h = _h; + _x->rotation = SPRITE_ROTATION_DEFAULT; + _x->frame = SPRITE_FRAME_DEFAULT; + _x->scale = SPRITE_SCALE_DEFAULT; + _x->squash = SPRITE_SQUASH_DEFAULT; + _x->stretch = SPRITE_STRETCH_DEFAULT; + _x->color = SPRITE_COLOR_DEFAULT; + _x->flip = FLIP_NONE; +} + +/* + * Initializes a sprite, given a texture, an origin, + * its width and its height. +*/ +void +sprite_init(Sprite* _x, SDL_Texture* _t, OriginType _o, s32 _w, s32 _h) +{ + Atlas a; + + atlas_init + ( + &a, + _t, + ATLAS_ROWS_DEFAULT, + ATLAS_COLUMNS_DEFAULT, + _w, + _h + ); + + sprite_atlas_init + ( + _x, + &a, + _o, + _w, + _h + ); +} + +/* Draws the sprite. */ +void +sprite_draw(Sprite* _x, SDL_Renderer* _r) +{ + SDL_Rect sourceRect; + SDL_Rect destRect; + s32 flip; + + destRect = sprite_rect_get(_x); + + if (_x->atlas.rows == 1 && _x->atlas.cols == 1) + { + sourceRect.x = 0; + sourceRect.y = 0; + sourceRect.w = texture_w_get(_x->atlas.texture); + sourceRect.h = texture_h_get(_x->atlas.texture); + } + else + sourceRect = atlas_source_rect_get(&_x->atlas, _x->frame); + + switch (_x->flip) + { + case FLIP_HORIZONTAL: + flip = SDL_FLIP_HORIZONTAL; + break; + case FLIP_VERTICAL: + flip = SDL_FLIP_VERTICAL; + break; + case FLIP_HORIZONTAL_VERTICAL: + flip = SDL_FLIP_HORIZONTAL | SDL_FLIP_VERTICAL; + break; + /* FALLTHROUGH */ + case FLIP_NONE: + default: + flip = SDL_FLIP_NONE; + break; + } + + SDL_SetTextureAlphaMod + ( + _x->atlas.texture, + _x->color.a + ); + + SDL_SetTextureColorMod + ( + _x->atlas.texture, + _x->color.r, + _x->color.g, + _x->color.b + ); + + SDL_RenderCopyEx + ( + _r, + _x->atlas.texture, + &sourceRect, + &destRect, + _x->rotation, + NULL, + flip + ); +} diff --git a/src/engine/sprite.h b/src/engine/sprite.h new file mode 100755 index 0000000..50255fd --- /dev/null +++ b/src/engine/sprite.h @@ -0,0 +1,49 @@ +#pragma once + +#include "atlas.h" + +#define SPRITE_SCALE_DEFAULT 1.0 +#define SPRITE_SQUASH_DEFAULT 1.0 +#define SPRITE_STRETCH_DEFAULT 1.0 +#define SPRITE_FRAME_DEFAULT 0 +#define SPRITE_ROTATION_DEFAULT 0.0 + +typedef enum OriginType +{ + ORIGIN_NONE, + ORIGIN_TOP_LEFT, + ORIGIN_MIDDLE +} OriginType; + +typedef enum FlipType +{ + FLIP_NONE, + FLIP_HORIZONTAL, + FLIP_VERTICAL, + FLIP_HORIZONTAL_VERTICAL +} FlipType; + +typedef struct Sprite +{ + FlipType flip; + OriginType origin; + f64 rotation; + f64 scale; + f64 squash; + f64 stretch; + f64 x; + f64 y; + s32 frame; + s32 h; + s32 w; + Atlas atlas; + SDL_Color color; +} Sprite; + +static const SDL_Color SPRITE_COLOR_DEFAULT = {255, 255, 255, 255}; + +SDL_Rect sprite_rect_get(Sprite* _x); +void sprite_atlas_init(Sprite* _x, Atlas* _a, OriginType _o, s32 _w, s32 _h); +void sprite_init(Sprite* _x, SDL_Texture* _t, OriginType _o, s32 _w, s32 _h); +void sprite_draw(Sprite* _x, SDL_Renderer* _r); +void sprite_free(Sprite* _x); diff --git a/src/engine/text.c b/src/engine/text.c new file mode 100755 index 0000000..65ccae4 --- /dev/null +++ b/src/engine/text.c @@ -0,0 +1,100 @@ +#include "text.h" + +static void text_surface_init(SDL_Surface** _x, SDL_Renderer* _r, TTF_Font* _f, SDL_Color _c, char* _s, s32 _w); +static void text_texture_init(SDL_Texture** _x, SDL_Renderer* _r, TTF_Font* _f, SDL_Color _c, char* _s, s32 _w); + +/* + * Initializes a SDL_Surface with text, given + * a renderer, a font, a color, a string, + * and a text wrap width. +*/ +static void +text_surface_init +( + SDL_Surface** _x, + SDL_Renderer* _r, + TTF_Font* _f, + SDL_Color _c, + char* _s, + s32 _w +) +{ + *_x = TTF_RenderText_Blended_Wrapped + ( + _f, + _s, + _c, + _w + ); +} + +/* + * Initializes a SDL_Texture with text, + * given a renderer, a font, a color, a string, and a + * text wrap width. +*/ +static void +text_texture_init +( + SDL_Texture** _x, + SDL_Renderer* _r, + TTF_Font* _f, + SDL_Color _c, + char* _s, + s32 _w +) +{ + SDL_Surface* s; + + text_surface_init + ( + &s, + _r, + _f, + _c, + _s, + _w + ); + + *_x = SDL_CreateTextureFromSurface(_r, s); + + SDL_FreeSurface(s); +} + +/* Initializes a sprite with text, + * given a renderer, a font, a color, a string, an origin, + * and a text wrap width. +*/ +void +text_sprite_init +( + Sprite* _x, + SDL_Renderer* _r, + TTF_Font* _f, + SDL_Color _c, + OriginType _o, + char* _s, + s32 _w +) +{ + SDL_Texture* t; + + text_texture_init + ( + &t, + _r, + _f, + _c, + _s, + _w + ); + + sprite_init + ( + _x, + t, + _o, + texture_w_get(t), + texture_h_get(t) + ); +} diff --git a/src/engine/text.h b/src/engine/text.h new file mode 100755 index 0000000..9447eae --- /dev/null +++ b/src/engine/text.h @@ -0,0 +1,6 @@ +#pragma once + +#include "font.h" +#include "sprite.h" + +void text_sprite_init(Sprite* _x, SDL_Renderer* _r, TTF_Font* _f, SDL_Color _c, OriginType _o, char* _s, s32 _w); diff --git a/src/engine/texture.c b/src/engine/texture.c new file mode 100755 index 0000000..d6b6bc6 --- /dev/null +++ b/src/engine/texture.c @@ -0,0 +1,37 @@ +#include "texture.h" + +/* Initializes a texture, given a renderer and a path. */ +void +texture_init(SDL_Texture** _x, SDL_Renderer* _r, char* _p) +{ + *_x = IMG_LoadTexture(_r, _p); +} + +/* Frees a given texture. */ +void +texture_free(SDL_Texture* _x) +{ + SDL_DestroyTexture(_x); +} + +/* Returns a texture's width. */ +s32 +texture_w_get(SDL_Texture* _x) +{ + s32 w; + + SDL_QueryTexture(_x, NULL, NULL, &w, NULL); + + return w; +} + +/* Returns a texture's height. */ +s32 +texture_h_get(SDL_Texture* _x) +{ + s32 h; + + SDL_QueryTexture(_x, NULL, NULL, NULL, &h); + + return h; +} diff --git a/src/engine/texture.h b/src/engine/texture.h new file mode 100755 index 0000000..ccf683f --- /dev/null +++ b/src/engine/texture.h @@ -0,0 +1,11 @@ +#pragma once + +#include +#include + +#include "../COMMON.h" + +void texture_init(SDL_Texture** _x, SDL_Renderer* _r, char* _p); +void texture_free(SDL_Texture* _x); +s32 texture_w_get(SDL_Texture* _x); +s32 texture_h_get(SDL_Texture* _x); diff --git a/src/engine/tick.c b/src/engine/tick.c new file mode 100755 index 0000000..6e1f018 --- /dev/null +++ b/src/engine/tick.c @@ -0,0 +1,11 @@ +#include "tick.h" + +/* Update ticks. */ +void +tick_update(Tick* _x) +{ + _x->prev = _x->curr; + _x->curr = SDL_GetTicks64(); + _x->delta = _x->curr - _x->prev; + _x->cum += _x->delta; +} diff --git a/src/engine/tick.h b/src/engine/tick.h new file mode 100755 index 0000000..ca8ff61 --- /dev/null +++ b/src/engine/tick.h @@ -0,0 +1,15 @@ +#pragma once + +#include + +#include "../COMMON.h" + +typedef struct Tick +{ + u64 curr; + u64 prev; + u64 delta; + u64 cum; +} Tick; + +void tick_update(Tick* _x); diff --git a/src/engine/window.c b/src/engine/window.c new file mode 100755 index 0000000..568cc50 --- /dev/null +++ b/src/engine/window.c @@ -0,0 +1,85 @@ +#include "window.h" + +/* + * Initializes a window, given a window title, + * a width, a height, and window flags. +*/ +void +window_init(SDL_Window** _x, char* _s, s32 _w, s32 _h, s32 _f) +{ + *_x = SDL_CreateWindow + ( + _s, + SDL_WINDOWPOS_UNDEFINED, + SDL_WINDOWPOS_UNDEFINED, + _w, + _h, + _f + ); +} + +/* Frees a given window. */ +void +window_free(SDL_Window* _x) +{ + SDL_DestroyWindow(_x); +} + +/* Gets the window's width. */ +s32 +window_w_get(SDL_Window* _x) +{ + s32 w; + + SDL_GetWindowSize(_x, &w, NULL); + + return w; +} + +/* Get's the window's height. */ +s32 +window_h_get(SDL_Window* _x) +{ + s32 h; + + SDL_GetWindowSize(_x, NULL, &h); + + return h; +} + +/* Gets the window's rectangle. */ +SDL_Rect +window_rect_get(SDL_Window* _x) +{ + SDL_Rect r; + + memset(&r, '\0', sizeof(SDL_Rect)); + + r.x = 0; + r.y = 0; + r.w = window_w_get(_x); + r.h = window_h_get(_x); + + return r; +} + +/* Sets video mode to fullscreen. */ +void +window_fullscreen_enter(SDL_Window* _x) +{ + SDL_SetWindowFullscreen(_x, SDL_WINDOW_FULLSCREEN); +} + +/* Entering fake fullscreen (desktop). */ +void +window_fullscreen_desktop_enter(SDL_Window* _x) +{ + SDL_SetWindowFullscreen(_x, SDL_WINDOW_FULLSCREEN_DESKTOP); +} + +/* Exiting fullscreen. */ +void +window_fullscreen_exit(SDL_Window* _x) +{ + SDL_SetWindowFullscreen(_x, 0); +} diff --git a/src/engine/window.h b/src/engine/window.h new file mode 100755 index 0000000..61de8f6 --- /dev/null +++ b/src/engine/window.h @@ -0,0 +1,14 @@ +#pragma once + +#include + +#include "../COMMON.h" + +void window_init(SDL_Window** _x, char* _s, s32 _w, s32 _h, s32 _f); +void window_free(SDL_Window* _x); +void window_fullscreen_enter(SDL_Window* _x); +void window_fullscreen_desktop_enter(SDL_Window* _x); +void window_fullscreen_exit(SDL_Window* _x); +s32 window_w_get(SDL_Window* _x); +s32 window_h_get(SDL_Window* _x); +SDL_Rect window_rect_get(SDL_Window* _x); diff --git a/src/game/GAME_COMMON.h b/src/game/GAME_COMMON.h new file mode 100755 index 0000000..490ed54 --- /dev/null +++ b/src/game/GAME_COMMON.h @@ -0,0 +1,509 @@ +/* + * DESCRIPTION: + * Common file for "game" directory. +*/ + +#pragma once + +#include "../engine/circle.h" +#include "../engine/event.h" +#include "../engine/font.h" +#include "../engine/keyboard.h" +#include "../engine/mouse.h" +#include "../engine/music.h" +#include "../engine/rectangle.h" +#include "../engine/renderer.h" +#include "../engine/sound.h" +#include "../engine/text.h" +#include "../engine/tick.h" +#include "../engine/window.h" +#include "../util/list.h" +#include "../util/math.h" +#include "../util/random.h" + +#define TEXTURE_COUNT 46 +#define SOUND_COUNT 25 +#define FONT_COUNT 6 +#define MUSIC_COUNT 8 + +#define PLAYER_FATNESS_MAX 3 +#define PLAYER_FATNESS_THRESHOLD 2 + +typedef enum TextureType +{ + TEXTURE_NONE, + TEXTURE_LOGO, + TEXTURE_GUI_CURSOR, + TEXTURE_GUI_SNAKE, + TEXTURE_GUI_REDIRECT, + TEXTURE_GUI_CASH, + TEXTURE_GUI_UPGRADE_SNAKE, + TEXTURE_GUI_UPGRADE_LIFETIME, + TEXTURE_GUI_UPGRADE_REDIRECT, + TEXTURE_GUI_SIGN_SMALL, + TEXTURE_GUI_SIGN_BIG, + TEXTURE_SHADOW, + TEXTURE_ARC, + TEXTURE_PLAY_BG, + TEXTURE_PLAYER_STAGE_ONE, + TEXTURE_PLAYER_STAGE_TWO, + TEXTURE_PLAYER_STAGE_THREE, + TEXTURE_PLAYER_TAIL_STAGE_ONE, + TEXTURE_PLAYER_TAIL_STAGE_TWO, + TEXTURE_PLAYER_TAIL_STAGE_THREE, + TEXTURE_PLAYER_SNAKE, + TEXTURE_ENEMY_CUPPER, + TEXTURE_ENEMY_CHIPPER, + TEXTURE_ENEMY_CHIP, + TEXTURE_ENEMY_CRUMBLER, + TEXTURE_COLLECTIBLE_DOLLARS, + TEXTURE_COLLECTIBLE_SACK, + TEXTURE_COLLECTIBLE_BULLIONS, + TEXTURE_COLLECTIBLE_MIRACLE_CURE, + TEXTURE_COLLECTIBLE_DYNAMITE, + TEXTURE_COLLECTIBLE_BERSERK, + TEXTURE_INFO_THEME, + TEXTURE_INFO_WILDCARD_ADMIN, + TEXTURE_INFO_WILDCARD_PATREON, + TEXTURE_INFO_WILDCARD_COMMUNITY, + TEXTURE_INTRO_SCENE_ONE, + TEXTURE_INTRO_SCENE_TWO, + TEXTURE_INTRO_SCENE_THREE, + TEXTURE_INTRO_SCENE_FOUR, + TEXTURE_INTRO_SCENE_FIVE, + TEXTURE_ENDING_FAIL, + TEXTURE_ENDING_ONE, + TEXTURE_ENDING_TWO, + TEXTURE_ENDING_THREE, + TEXTURE_TITLE_BACKGROUND, + TEXTURE_RESULTS, +} TextureType; + +typedef enum SoundType +{ + SOUND_NONE, + SOUND_MENU, + SOUND_BLIP, + SOUND_SNAKE_FIRE, + SOUND_SNAKE_REDIRECT, + SOUND_SNAKE_RETURN, + SOUND_ENEMY_HURT, + SOUND_CUPPER_KILL, + SOUND_CHIPPER_KILL, + SOUND_CRUMBLER_KILL, + SOUND_CHIP_KILL, + SOUND_RUMBLE, + SOUND_COLLECTIBLE, + SOUND_DOLLARS, + SOUND_SACK, + SOUND_BULLIONS, + SOUND_PURCHASE, + SOUND_MIRACLE_CURE, + SOUND_DYNAMITE, + SOUND_BERSERK, + SOUND_SWALLOW, + SOUND_GROWTH, + SOUND_ERROR, + SOUND_GO, + SOUND_SPIT, +} SoundType; + +typedef enum MusicType +{ + MUSIC_NONE, + MUSIC_WIND, + MUSIC_PLAY, + MUSIC_WAVE_CLEAR, + MUSIC_WAVE_FAIL, + MUSIC_RESULTS, + MUSIC_TITLE, + MUSIC_INTRO, +} MusicType; + +typedef enum FontType +{ + FONT_NONE, + FONT_TINY, + FONT_SMALL, + FONT_MEDIUM, + FONT_BIG, + FONT_MEGA, +} FontType; + +typedef enum StateType +{ + STATE_NONE, + STATE_TITLE, + STATE_INTRO, + STATE_PLAY, + STATE_INFO, + STATE_ENDING_FAIL, + STATE_ENDING_ONE, + STATE_ENDING_TWO, + STATE_ENDING_THREE, + STATE_RESULTS +} StateType; + +typedef enum EnemyType +{ + ENEMY_NONE, + ENEMY_CUPPER, + ENEMY_CHIPPER, + ENEMY_CRUMBLER, + ENEMY_CHIP +} EnemyType; + +typedef enum CollectibleType +{ + COLLECTIBLE_NONE, + COLLECTIBLE_DOLLARS, + COLLECTIBLE_SACK, + COLLECTIBLE_BULLIONS, + COLLECTIBLE_MIRACLE_CURE, + COLLECTIBLE_DYNAMITE, + COLLECTIBLE_BERSERK +} CollectibleType; + +typedef enum PowerupType +{ + POWERUP_NONE, + +} PowerupType; + +typedef enum Direction +{ + DIRECTION_LEFT, + DIRECTION_RIGHT, + DIRECTION_UP, + DIRECTION_DOWN +} Direction; + +typedef enum SnakeFrameType +{ + SNAKE_NONE, + SNAKE_REDIRECT, + SNAKE_RETURN +} SnakeFrameType; + +typedef enum ButtonStateType +{ + BUTTON_STATE_NONE, + BUTTON_STATE_HOVER, + BUTTON_STATE_HOVERING, + BUTTON_STATE_PRESS, + BUTTON_STATE_HELD +} ButtonStateType; + +typedef enum EndingType +{ + ENDING_FAIL, + ENDING_ONE, + ENDING_TWO, + ENDING_THREE +} EndingType; + +typedef struct Game Game; + +typedef struct Button +{ + Sprite sprite; + ButtonStateType state; +} Button; + +typedef struct Cursor +{ + Sprite sprite; +} Cursor; + +typedef struct Snake +{ + Sprite sprite; + Circle shadow; + Sprite arc; + f64 dX; + f64 dY; + s32 damage; + s32 lifetime; + s32 animationTimer; + s32 returnTimer; + s32 redirectCount; + s32 redirectTimer; + bool_u8 isReturning; +} Snake; + +typedef struct Collectible +{ + Sprite sprite; + Circle shadow; + s32 lifetime; + bool_u8 isActive; + s32 activeTimer; + f64 dX; + f64 dY; + CollectibleType type; + bool_u8 isAttached; + Snake* attachedSnake; +} Collectible; + +typedef struct Enemy +{ + EnemyType type; + Sprite sprite; + Circle shadow; + bool_u8 isActing; + bool_u8 isActive; + List snakesHit; /* Snake* */ + List returnSnakesHit; /* Snake* */ + f64 range; + s32 attackTimer; + s32 animationTimer; + s32 lifetime; + s32 hitTimer; + s32 hitTimerMax; + s32 health; + f64 dX; + f64 dY; +} Enemy; + +typedef struct Message +{ + Sprite sprite; + f64 x; + f64 y; + f64 dX; + f64 dY; + f64 dR; + s32 lifetime; +} Message; + +typedef struct Player +{ + Circle shadow; + Direction direction; + List snakes; + Sprite sprite; + Sprite tailSprite; + bool_u8 isAbleToFire; + bool_u8 isAbleToMove; + bool_u8 isBeingFattened; + bool_u8 isCashUpdate; + bool_u8 isBeingDefeated; + bool_u8 isDefeat; + bool_u8 isFatnessUpdate; + bool_u8 isLifetimeUpgradeUpdate; + bool_u8 isPowerUp; + bool_u8 isRedirectUpdate; + bool_u8 isRedirectUpgradeUpdate; + bool_u8 isSnakeUpdate; + bool_u8 isSnakeUpgradeUpdate; + bool_u8 isTailAnimate; + bool_u8 isStationary; + bool_u8 isKeyboardMove; + f64 dX; + f64 dY; + s32 cash; + s32 enemiesKilled; + s32 fatness; + s32 fatnessTimer; + s32 cashCollected; + s32 lifetime; + s32 lifetimeUpgradeLevel; + s32 powerUpTimer; + s32 redirectMax; + s32 redirectTimer; + s32 redirectUpgradeLevel; + s32 redirects; + s32 snakeMax; + s32 snakeReserve; + s32 snakeUpgradeLevel; + s32 defeatTimer; + s32 tailTimer; + s32 waveEnemiesKilled; + s32 redirectRechargeTimer; + s32 redirectUpgradePrice; + s32 snakeUpgradePrice; + s32 lifetimeUpgradePrice; +} Player; + +typedef struct GUI +{ + Cursor cursor; + Sprite snakeSprite; + Sprite snakeText; + Sprite redirectSprite; + Sprite redirectText; + Sprite cashSprite; + Sprite cashText; + Sprite snakeUpgradeText; + Sprite lifetimeUpgradeText; + Sprite redirectUpgradeText; + Sprite upgradeText; + Button snakeUpgradeButton; + Button lifetimeUpgradeButton; + Button redirectUpgradeButton; + Button readyButton; + Sprite waveText; + Sprite snakeUpgradeBackgroundSprite; + Sprite redirectUpgradeBackgroundSprite; + Sprite lifetimeUpgradeBackgroundSprite; + Sprite upgradeBackgroundSprite; + Sprite readyBackgroundSprite; + Sprite cashBackgroundSprite; + Sprite cashTextBackgroundSprite; + Sprite waveBackgroundSprite; + Sprite bountyBackgroundSprite; + Sprite bountyText; +} GUI; + +typedef struct Play +{ + struct Game* g; + Sprite pauseText; + GUI gui; + Player player; + bool_u8 isWaveFailed; + bool_u8 isWaveCleared; + bool_u8 isGameCleared; + bool_u8 isPaused; + bool_u8 isBetweenWaves; + bool_u8 isReady; + bool_u8 isCountdown; + bool_u8 isCountdownComplete; + bool_u8 isWaveClearMusicComplete; + bool_u8 isWaveUpdate; + bool_u8 isUpgradesActive; + bool_u8 isUpgradeUpdate; + bool_u8 isBountyUpdate; + bool_u8 isGameClearing; + bool_u8 isGracePeriod; + bool_u8 isTutorial; + Sprite tutorialText; + Sprite bg; + s32 gameClearTimer; + s32 countdownTimer; + s32 tutorialTimer; + s32 wave; + s32 game; + s32 spawnTimer; + s32 enemyMax; + s32 gracePeriodTimer; + List enemies; /* Enemy */ + List spawnEnemies; /* EnemyType */ + List collectibles; /* Collectible */ + List messages; /* Message */ +} Play; + +typedef struct Title +{ + struct Game* g; + Cursor cursor; + Sprite startBackgroundSprite; + Sprite infoBackgroundSprite; + Sprite backgroundSprite; + Button startButton; + Button infoButton; + bool_u8 isInfoPressed; + bool_u8 isStartPressed; + Sprite logoSprite; +} Title; + +typedef struct Scene +{ + char* text; + TextureType textureType; +} Scene; + +typedef struct SceneHandler +{ + struct Game* g; + Scene* scenes; + Sprite sprite; + Sprite text; + bool_u8 isTextEnd; + bool_u8 isEnd; + s32 updateTimer; + s32 sceneCount; + s32 sceneIndex; + s32 textIndex; + s32 textLength; +} SceneHandler; + +typedef struct Intro +{ + Game* g; + SceneHandler sceneHandler; +} Intro; + +typedef struct Info +{ + struct Game* g; + bool_u8 isBackPressed; + Sprite licenseText; + Sprite themeText; + Sprite themeSprite; + Sprite wildcardAdminSprite; + Sprite wildcardAdminText; + Sprite wildcardPatreonSprite; + Sprite wildcardPatreonText; + Sprite wildcardCommunitySprite; + Sprite wildcardCommunityText; + Sprite backBackgroundSprite; + Button backButton; + Cursor cursor; +} Info; + +typedef struct Ending +{ + Game* g; + SceneHandler sceneHandler; + EndingType type; + Button plusButton; + Button endButton; + bool_u8 isActualEnding; + bool_u8 isNewGamePlus; + bool_u8 isResults; + Cursor cursor; +} Ending; + +typedef struct Results +{ + struct Game* g; + bool_u8 isEnd; + Sprite highestWave; + Sprite cashCollected; + Sprite cashHeld; + Sprite bountiesHunted; + Sprite thanksText; + Sprite resultsText; + Sprite sprite; +} Results; + +typedef struct Game +{ + Ending ending; + Event event; + Info info; + Intro intro; + Keyboard keyboard; + Mix_Chunk* sounds[SOUND_COUNT]; + Mix_Music* music[MUSIC_COUNT]; + Mouse mouse; + Play play; + Results results; + SDL_Renderer* renderer; + SDL_Texture* textures[TEXTURE_COUNT]; + SDL_Window* window; + StateType state; + StateType stateNext; + TTF_Font* fonts[FONT_COUNT]; + Tick tick; + Title title; + bool_u8 isStateTransition; + bool_u8 isStateTransitioning; + bool_u8 isNextStateWillBeInit; + bool_u8 isPrevStateWillBeFreed; + bool_u8 isNextStateResourcesWillBeInit; + bool_u8 isPrevStateResourcesWillBeFreed; + bool_u8 isFullScreen; + s32 stateTimer; +} Game; diff --git a/src/game/GAME_STRINGS.h b/src/game/GAME_STRINGS.h new file mode 100755 index 0000000..f09bb64 --- /dev/null +++ b/src/game/GAME_STRINGS.h @@ -0,0 +1,71 @@ +/* + * DESCRIPTION: + * Game's strings, in English. +*/ + +#pragma once + +#define STRING_WINDOW_TITLE "Calamity Cobra in \"A Sweet Surprise\"" + +#define STRING_PLAY_WAVE "Wave " +#define STRING_PLAY_WAVE_PLUS "+" + +#define STRING_INTRO_SCENE_ONE "On an dry, summer evening in the hottest dunes of the West, a lone silhouette clashes against the gradient of the skyline." +#define STRING_INTRO_SCENE_TWO "Calamity Cobra, rugged sharpshooter and bounty hunter extraordinaire, the fiestiest femme fatale in the region, is on the prowl for a new bounty. Clutching a wanted poster within her claws, her shielded eyes read the page...just one more time. Its message is vague; it says something about some troublesome pests that oddly resemble...baked goods?" +#define STRING_INTRO_SCENE_THREE "Peering out into the distance, Calamity Cobra spies a lonesome wooden sign with nothing but the words \"Dessert Desert\". The place was covered in assorted sweet goods, and giant towers of pudding adorned the horizon. It was just where the poster said those sugary bastards would be!!" +#define STRING_INTRO_SCENE_FOUR "Suddenly, without a moment's notice...herds of those high-calorie vermin burst out into the scene and surround Calamity Cobra!!" +#define STRING_INTRO_SCENE_FIVE "With the quickest draw in all of the land, Calamity Cobra arms herself with her very own Snekgun (patent pending), and prepares to bring justice to all the waistlines those high-calorie miscreants have ruined and to remind those not-so-sweet sweets why her name is CALAMITY COBRA!!" + +#define STRING_ENDING_FAIL "Calamity Cobra had misjudged how vicious the denizens of the Dessert Desert would be. Held captive by a thick, mountainous layer of flab, Calamity Cobra lays immobile in the midst of the cream-covered land, helplessly awaiting further feedings...(Try again!!)" +#define STRING_ENDING_ONE "Having cleared out all the troublesome treats in her sight, Calamity Cobra departs from the cursed cream-covered lands, with a nice haul to boot. She just wishes that she wouldn't have to spend some of it on a new tailor... (Ending 1. Shoot for $50,000 on hand!!)" +#define STRING_ENDING_TWO "After destroying an army's worth of those conniving confections, creamy viscera coated Calamity Cobra's shredded outfit. Absolutely exhausted from her relentless slaughter, Calamity Cobra begins the long trip back to town with her bundles of cash. It's not going to be easy, seeing how she's also got to carry the weight of her sized-up body... (Ending 2. Shoot for $100,000 on hand!)" +#define STRING_ENDING_THREE "Did Cecillia do it for the money? Partly. For the fame, for the glory? Sure. But this was the bounty she'd been looking for her whole life, and it brought her something else that those two could hardly bring: immense pleasure. Having suffered the consequences of her vicious, unrelenting slaughter, Cecillia languished her new enormity with pride. Plucking the lollipop from her mouth, Cecilla decided the reward could wait...enjoying her new size was priority number one. (Best Ending. Congratulations!!!)" + +#define STRING_PLAY_UPGRADE "UPGRADES - Use the dough you've earned and buy shweet upgrades for your Snekgun!!" +#define STRING_PLAY_UPGRADE_SNAKES "SNAKES+ - You can now have more snakes on screen." +#define STRING_PLAY_UPGRADE_LIFETIME "LIFETIME+ - Your snakes will last longer before tiring out." +#define STRING_PLAY_UPGRADE_REDIRECT "REDIRECTS+ - You can now redirect your snakes an additional time, for more damage." + +#define STRING_INFO_LICENSES "Thank you for playing Calamity Cobra in \"A Sweet Surprise\"! 2022 Weightgaming.com Gain Jam. Software by @ShweetMagnet licensed under GNU GPLv3. Art licensed under CC0, by @ShweetMagnet. Sound and music licensed under CC0, by @bugsinplanters. \"Jackwrite\" font licensed under OFL, by Jack Daw from dafont.com. \"Sheet of old paper\" graphic licensed under CC0, by Q-x from opengameart.org" + +#define STRING_INFO_THEME "Theme: \"Greed\"\nThe game centers around a greedy miscreant bounty hunter on the hunt. Money can drop from enemies, and greed can be your downfall if you waltz into a hoard of them to collect some chump change or carelessly fire a snake to collect goodies. You can use said money to pay for shweet upgrades, and the endings certainly highlight Calamity Cobra's avarice." + +#define STRING_INFO_WILDCARD_ADMIN "Wildcard (Admin): \"New Game+\"\nAfter beating the first batch of waves, you can start over the beginning, keeping your cash and upgrades. Be wary though, as enemies will be beefier, faster and spawn sooner!! Luckily, you get a cash multiplier and goodies are more common!!" + +#define STRING_INFO_WILDCARD_PATREON "Wildcard (Patreon): \"Progress Through Failure\"\nIf you either screw up (or intentionally get hit), the wave will be instantly cleared, allowing you to proceed to the next one. However, you'll be punished with a fattening, meaning you move slower and become easier to hit!!" + +#define STRING_INFO_WILDCARD_COMMUNITY "Wildcard (Community): \"Minions\"\nCalamity Cobra's patented Snekgun fires friendly serpent minions that can be redirected on her command. Use them to dispatch your foes, and collect goodies, just as good minions should!!" + +#define STRING_INFO_BACK "Back" + +#define STRING_PLAY_TUTORIAL_MOUSE "Hold RIGHT MOUSE to move. Press LEFT MOUSE to fire snakes, and press RIGHT MOUSE/R to redirect snakes, which deal more damage. Collect cash, hunt bounties, and watch your waistline!!" +#define STRING_PLAY_TUTORIAL_KEYBOARD "Use arrow keys/WASD to move. Press LEFT MOUSE to fire snakes, and press RIGHT MOUSE/R to redirect snakes, which deal more damage. Collect cash, hunt bounties, and watch your waistline!!" + +#define STRING_PLAY_PAUSE "PAUSE!!" +#define STRING_PLAY_GUI_SNAKE_POWER_UP "INFINITE" +#define STRING_PLAY_MESSAGE_WAVE_CLEAR "WAVE CLEARED!!" +#define STRING_PLAY_MESSAGE_WAVE_FAIL "WAVE FAILED..." +#define STRING_PLAY_MESSAGE_PURCHASE_NO_CASH "YOU'RE BROKE!!" +#define STRING_PLAY_MESSAGE_PURCHASE_MAXED "MAXED!!" +#define STRING_PLAY_MESSAGE_GAME_CLEAR "GAME CLEARED!!" +#define STRING_PLAY_MESSAGE_POWER_UP "BERSERK!!" +#define STRING_PLAY_MESSAGE_POWER_DOWN "BERSERK OVER..." +#define STRING_PLAY_MESSAGE_MIRACLE_CURE "-1 FATNESS!!" +#define STRING_PLAY_MESSAGE_DYNAMITE "KABOOM!!" +#define STRING_PLAY_GUI_WAVE "WAVE " +#define STRING_PLAY_GUI_READY "LET'S WRASSLE!!" +#define STRING_PLAY_GUI_BOUNTY_NONE "..." +#define STRING_PLAY_GUI_BOUNTY_DEAD "X-X" + +#define STRING_ENDING_NEW_GAME_PLUS "New Game+" +#define STRING_ENDING_RESULTS "Forfeit" + +#define STRING_RESULTS "RESULTS" +#define STRING_RESULTS_BOUNTIES_HUNTED "Bounties Hunted: " +#define STRING_RESULTS_CASH_COLLECTED "Cash Collected: " +#define STRING_RESULTS_CASH_HELD "Cash Held:" +#define STRING_RESULTS_HIGHEST_WAVE "Highest Wave: " +#define STRING_RESULTS_THANKS "Thanks for playing!! c:" + +#define STRING_TITLE_START "Start!!" +#define STRING_TITLE_INFO "Credits / Info" diff --git a/src/game/ending/ending.c b/src/game/ending/ending.c new file mode 100755 index 0000000..daf8b43 --- /dev/null +++ b/src/game/ending/ending.c @@ -0,0 +1,164 @@ +/* + * DESCRIPTION: + * Fail ending code. +*/ + +#include "ending.h" + +/* Initializes ending. */ +void +ending_init(Ending* _e, Game* _g, EndingType _t) +{ + Sprite plusButtonSprite; + Sprite endButtonSprite; + + memset(_e, '\0', sizeof(Intro)); + + _e->g = _g; + _e->type = _t; + + switch (_e->type) + { + case ENDING_FAIL: + scene_init + ( + &_e->sceneHandler, + _e->g, + (Scene*)ENDING_FAIL_SCENES, + ENDING_FAIL_SCENE_COUNT + ); + break; + case ENDING_ONE: + scene_init + ( + &_e->sceneHandler, + _e->g, + (Scene*)ENDING_ONE_SCENES, + ENDING_ONE_SCENE_COUNT + ); + _e->isActualEnding = TRUE; + break; + case ENDING_TWO: + scene_init + ( + &_e->sceneHandler, + _e->g, + (Scene*)ENDING_TWO_SCENES, + ENDING_TWO_SCENE_COUNT + ); + _e->isActualEnding = TRUE; + break; + case ENDING_THREE: + scene_init + ( + &_e->sceneHandler, + _e->g, + (Scene*)ENDING_THREE_SCENES, + ENDING_THREE_SCENE_COUNT + ); + _e->isActualEnding = TRUE; + break; + default: + break; + } + + text_sprite_init + ( + &plusButtonSprite, + _e->g->renderer, + _e->g->fonts[FONT_BIG], + ENDING_TEXT_COLOR, + ORIGIN_MIDDLE, + STRING_ENDING_NEW_GAME_PLUS, + 0 + ); + + plusButtonSprite.x = ENDING_PLUS_BUTTON_OFFSET_X; + plusButtonSprite.y = ENDING_PLUS_BUTTON_OFFSET_Y; + + text_sprite_init + ( + &endButtonSprite, + _e->g->renderer, + _e->g->fonts[FONT_BIG], + ENDING_TEXT_COLOR, + ORIGIN_MIDDLE, + STRING_ENDING_RESULTS, + 0 + ); + + endButtonSprite.x = ENDING_END_BUTTON_OFFSET_X; + endButtonSprite.y = ENDING_END_BUTTON_OFFSET_Y; + + button_init(&_e->plusButton, &plusButtonSprite); + button_init(&_e->endButton, &endButtonSprite); + + cursor_init(&_e->cursor, &_e->g->mouse, _e->g->textures[TEXTURE_GUI_CURSOR]); + + music_play(_e->g->music[MUSIC_WIND], TRUE); +} + +/* Frees ending. */ +void +ending_free(Ending* _e) +{ + if (_e->plusButton.sprite.atlas.texture) + texture_free(_e->plusButton.sprite.atlas.texture); + + if (_e->endButton.sprite.atlas.texture) + texture_free(_e->endButton.sprite.atlas.texture); + + scene_free(&_e->sceneHandler, _e->g); +} + +/* Updates ending. */ +void +ending_update(Ending* _e) +{ + scene_update(&_e->sceneHandler, _e->g); + + cursor_update(&_e->cursor, &_e->g->mouse); + + if (_e->sceneHandler.isEnd) + { + if (_e->isActualEnding) + { + button_update(&_e->plusButton, &_e->g->mouse); + button_update(&_e->endButton, &_e->g->mouse); + + if (_e->plusButton.state == BUTTON_STATE_PRESS) + { + _e->isNewGamePlus = TRUE; + sound_play(_e->g->sounds[SOUND_MENU], -1); + } + else if (_e->endButton.state == BUTTON_STATE_PRESS) + { + _e->isResults = TRUE; + sound_play(_e->g->sounds[SOUND_MENU], -1); + } + } + else + { + if (mouse_press(&_e->g->mouse, MOUSE_LEFT)) + { + _e->isResults = TRUE; + sound_play(_e->g->sounds[SOUND_MENU], -1); + } + } + } +} + +/* Draws ending. */ +void +ending_draw(Ending* _e) +{ + scene_draw(&_e->sceneHandler, _e->g); + + cursor_draw(&_e->cursor, _e->g->renderer); + + if (_e->isActualEnding && _e->sceneHandler.isEnd) + { + button_draw(&_e->plusButton, _e->g->renderer); + button_draw(&_e->endButton, _e->g->renderer); + } +} diff --git a/src/game/ending/ending.h b/src/game/ending/ending.h new file mode 100755 index 0000000..cb1baf9 --- /dev/null +++ b/src/game/ending/ending.h @@ -0,0 +1,63 @@ +/* + * DESCRIPTION: + * Header file for ending_fail.c. +*/ + +#pragma once + +#include "../gui/button.h" +#include "../gui/cursor.h" +#include "../scene/scene.h" +#include "../GAME_STRINGS.h" + +#define ENDING_FAIL_SCENE_COUNT 1 +#define ENDING_ONE_SCENE_COUNT 1 +#define ENDING_TWO_SCENE_COUNT 1 +#define ENDING_THREE_SCENE_COUNT 1 + +#define ENDING_PLUS_BUTTON_OFFSET_X 150 +#define ENDING_PLUS_BUTTON_OFFSET_Y 550 +#define ENDING_END_BUTTON_OFFSET_X 600 +#define ENDING_END_BUTTON_OFFSET_Y 550 + +#define ENDING_TWO_CASH_THRESHOLD 50000 +#define ENDING_THREE_CASH_THRESHOLD 100000 + +static const Scene ENDING_FAIL_SCENES[ENDING_FAIL_SCENE_COUNT] = +{ + { + .textureType = TEXTURE_ENDING_FAIL, + .text = STRING_ENDING_FAIL + } +}; + +static const Scene ENDING_ONE_SCENES[ENDING_ONE_SCENE_COUNT] = +{ + { + .textureType = TEXTURE_ENDING_ONE, + .text = STRING_ENDING_ONE + } +}; + +static const Scene ENDING_TWO_SCENES[ENDING_TWO_SCENE_COUNT] = +{ + { + .textureType = TEXTURE_ENDING_TWO, + .text = STRING_ENDING_TWO + } +}; + +static const Scene ENDING_THREE_SCENES[ENDING_THREE_SCENE_COUNT] = +{ + { + .textureType = TEXTURE_ENDING_THREE, + .text = STRING_ENDING_THREE + } +}; + +static const SDL_Color ENDING_TEXT_COLOR = {255, 255, 255, 255}; + +void ending_update(Ending* _e); +void ending_init(Ending* _e, Game* _g, EndingType _t); +void ending_draw(Ending* _e); +void ending_free(Ending* _e); diff --git a/src/game/game.c b/src/game/game.c new file mode 100755 index 0000000..f0e122a --- /dev/null +++ b/src/game/game.c @@ -0,0 +1,100 @@ +/* + * DESCRIPTION: + * Main game functions. +*/ + +#include "game.h" + +static void game_update(Game* _g); +static void game_draw(Game* _g); + +/* Updates the game. */ +static void +game_update(Game* _g) +{ + event_update(&_g->event); + mouse_update(&_g->mouse); + keyboard_update(&_g->keyboard); + + game_state_update(_g); + + /* + if (keyboard_press(&_g->keyboard, KEYBOARD_F)) + { + if (_g->isFullScreen) + window_fullscreen_enter(_g->window); + else + window_fullscreen_exit(_g->window); + + + _g->isFullScreen = !_g->isFullScreen; + } + */ +} + +/* Draws the game. */ +static void +game_draw(Game* _g) +{ + renderer_color_set(_g->renderer, RENDERER_COLOR); + renderer_clear(_g->renderer); + + game_state_draw(_g); + + renderer_present(_g->renderer); +} + +/* Initializes game. */ +void +game_init(Game* _g) +{ + memset(_g, '\0', sizeof(Game)); + + window_init + ( + &_g->window, + WINDOW_TITLE, + WINDOW_WIDTH, + WINDOW_HEIGHT, + WINDOW_FLAGS + ); + + renderer_init + ( + &_g->renderer, + _g->window, + RENDERER_FLAGS + ); + + SDL_ShowCursor(SDL_DISABLE); + + game_state_transition(_g, STATE_TITLE, TRUE, TRUE, TRUE, TRUE); + + _g->stateTimer = STATE_TRANSITION_TIMER_MAX; +} + +/* Frees game resources. */ +void +game_free(Game* _g) +{ + game_state_free(_g); + game_music_clear(_g); + game_font_clear(_g); + game_sound_clear(_g); + game_texture_clear(_g); +} + +/* Main game loop. */ +void +game_loop(Game* _g) +{ + tick_update(&_g->tick); + + while (_g->tick.cum > FRAME_DELAY) + { + game_update(_g); + _g->tick.cum -= FRAME_DELAY; + } + + game_draw(_g); +} diff --git a/src/game/game.h b/src/game/game.h new file mode 100755 index 0000000..c472e7e --- /dev/null +++ b/src/game/game.h @@ -0,0 +1,24 @@ +/* + * DESCRIPTION: + * Header file for game.c. +*/ + +#pragma once + +#include "GAME_STRINGS.h" + +#include "game_state.h" + +#define WINDOW_WIDTH 800 +#define WINDOW_HEIGHT 600 +#define WINDOW_FLAGS 0 +#define WINDOW_TITLE STRING_WINDOW_TITLE +#define RENDERER_FLAGS SDL_RENDERER_ACCELERATED +#define FPS 60 +#define FRAME_DELAY (SECOND / FPS) + +static const SDL_Color RENDERER_COLOR = {0, 0, 0, 255}; + +void game_free(Game* _g); +void game_init(Game* _g); +void game_loop(Game* _g); diff --git a/src/game/game_ending.c b/src/game/game_ending.c new file mode 100755 index 0000000..3f0f7a5 --- /dev/null +++ b/src/game/game_ending.c @@ -0,0 +1,102 @@ +/* + * DESCRIPTION: + * The "Title" state's meta functions. +*/ + +#include "game_ending.h" + +/* Initializes the Intro state's resources. */ +void +game_ending_init(Game* _g) +{ + for (s32 i = 0; i < ENDING_TEXTURE_COUNT; i++) + { + s32 index; + + index = ENDING_TEXTURES[i]; + + game_texture_init(_g, (TextureType)index); + } + + for (s32 i = 0; i < ENDING_SOUND_COUNT; i++) + { + s32 index; + + index = ENDING_SOUNDS[i]; + + game_sound_init(_g, (SoundType)index); + } + + for (s32 i = 0; i < ENDING_FONT_COUNT; i++) + { + s32 index; + + index = ENDING_FONTS[i]; + + game_font_init(_g, (FontType)index); + } + + for (s32 i = 0; i < ENDING_MUSIC_COUNT; i++) + { + s32 index; + + index = ENDING_MUSIC[i]; + + game_music_init(_g, (MusicType)index); + } +} + +/* Frees the Intro state's resources. */ +void +game_ending_free(Game* _g) +{ + for (s32 i = 0; i < ENDING_TEXTURE_COUNT; i++) + { + s32 index; + + index = ENDING_TEXTURES[i]; + + game_texture_free(_g, (TextureType)index); + } + + for (s32 i = 0; i < ENDING_SOUND_COUNT; i++) + { + s32 index; + + index = ENDING_SOUNDS[i]; + + game_sound_free(_g, (SoundType)index); + } + + for (s32 i = 0; i < ENDING_FONT_COUNT; i++) + { + s32 index; + + index = ENDING_FONTS[i]; + + game_font_free(_g, (FontType)index); + } + + for (s32 i = 0; i < ENDING_MUSIC_COUNT; i++) + { + s32 index; + + index = ENDING_MUSIC[i]; + + game_music_free(_g, (MusicType)index); + } +} + +/* Updates the Intro state. */ +void +game_ending_update(Game* _g) +{ + ending_update(&_g->ending); +} + +/* Draws the Intro state. */ +void +game_ending_draw(Game* _g) +{ + ending_draw(&_g->ending); +} diff --git a/src/game/game_ending.h b/src/game/game_ending.h new file mode 100755 index 0000000..cdb8b7b --- /dev/null +++ b/src/game/game_ending.h @@ -0,0 +1,49 @@ +/* + * DESCRIPTION: + * Header file for game_ending.c. +*/ + +#pragma once + +#include "ending/ending.h" + +#include "game_font.h" +#include "game_music.h" +#include "game_sound.h" +#include "game_texture.h" + +#define ENDING_TEXTURE_COUNT 5 +#define ENDING_SOUND_COUNT 2 +#define ENDING_MUSIC_COUNT 1 +#define ENDING_FONT_COUNT 2 + +static const TextureType ENDING_TEXTURES[ENDING_TEXTURE_COUNT] = +{ + TEXTURE_ENDING_FAIL, + TEXTURE_ENDING_ONE, + TEXTURE_ENDING_TWO, + TEXTURE_ENDING_THREE, + TEXTURE_GUI_CURSOR +}; + +static const SoundType ENDING_SOUNDS[ENDING_SOUND_COUNT] = +{ + SOUND_BLIP, + SOUND_MENU +}; + +static const MusicType ENDING_MUSIC[ENDING_MUSIC_COUNT] = +{ + MUSIC_WIND +}; + +static const FontType ENDING_FONTS[ENDING_FONT_COUNT] = +{ + FONT_SMALL, + FONT_BIG +}; + +void game_ending_draw(Game* _g); +void game_ending_free(Game* _g); +void game_ending_init(Game* _g); +void game_ending_update(Game* _g); diff --git a/src/game/game_font.c b/src/game/game_font.c new file mode 100755 index 0000000..cd5ccc3 --- /dev/null +++ b/src/game/game_font.c @@ -0,0 +1,37 @@ +/* + * DESCRIPTION: + * Loads/frees game fonts. +*/ + +#include "game_font.h" + +/* Loads a game font. */ +void +game_font_init(Game* _g, FontType _f) +{ + if (!_g->fonts[_f]) + font_init(&_g->fonts[_f], (char*)FONT_PATHS[_f], (s32)FONT_SIZES[_f]); +} + +/* Frees a game font. */ +void +game_font_free(Game* _g, FontType _f) +{ + if (_g->fonts[_f]) + { + font_free(_g->fonts[_f]); + _g->fonts[_f] = NULL; + } +} + +/* Clears all fonts. */ +void +game_font_clear(Game* _g) +{ + for (s32 i = 0; i < FONT_COUNT; i++) + { + if (_g->fonts[i]) + game_font_free(_g, (FontType)i); + } +} + diff --git a/src/game/game_font.h b/src/game/game_font.h new file mode 100755 index 0000000..23d7efb --- /dev/null +++ b/src/game/game_font.h @@ -0,0 +1,32 @@ +/* + * DESCRIPTION: + * Header file for game_font.h. +*/ + +#pragma once + +#include "GAME_COMMON.h" + +static const char* FONT_PATHS[FONT_COUNT] = +{ + "", + "res/font/fontJackwrite.ttf", + "res/font/fontJackwrite.ttf", + "res/font/fontJackwrite.ttf", + "res/font/fontJackwrite.ttf", + "res/font/fontJackwrite.ttf", +}; + +static const s32 FONT_SIZES[FONT_COUNT] = +{ + 0, + 12, + 16, + 24, + 32, + 48 +}; + +void game_font_init(Game* _g, FontType _f); +void game_font_free(Game* _g, FontType _f); +void game_font_clear(Game* _g); diff --git a/src/game/game_info.c b/src/game/game_info.c new file mode 100755 index 0000000..0130890 --- /dev/null +++ b/src/game/game_info.c @@ -0,0 +1,106 @@ +/* + * DESCRIPTION: + * The "Info" state's meta functions. +*/ + +#include "game_info.h" + +/* Initializes the Play state's resources. */ +void +game_info_init(Game* _g) +{ + for (s32 i = 0; i < INFO_TEXTURE_COUNT; i++) + { + s32 index; + + index = INFO_TEXTURES[i]; + + game_texture_init(_g, (TextureType)index); + } + + for (s32 i = 0; i < INFO_SOUND_COUNT; i++) + { + s32 index; + + index = INFO_SOUNDS[i]; + + game_sound_init(_g, (SoundType)index); + } + + for (s32 i = 0; i < INFO_FONT_COUNT; i++) + { + s32 index; + + index = INFO_FONTS[i]; + + game_font_init(_g, (FontType)index); + } + + for (s32 i = 0; i < INFO_MUSIC_COUNT; i++) + { + s32 index; + + index = INFO_MUSIC[i]; + + game_music_init(_g, (MusicType)index); + } + + info_init(&_g->info, _g); +} + +/* Frees the Play state's resources. */ +void +game_info_free(Game* _g) +{ + info_free(&_g->info); + + for (s32 i = 0; i < INFO_TEXTURE_COUNT; i++) + { + s32 index; + + index = INFO_TEXTURES[i]; + + game_texture_free(_g, (TextureType)index); + } + + for (s32 i = 0; i < INFO_SOUND_COUNT; i++) + { + s32 index; + + index = INFO_SOUNDS[i]; + + game_sound_free(_g, (SoundType)index); + } + + for (s32 i = 0; i < INFO_FONT_COUNT; i++) + { + s32 index; + + index = INFO_FONTS[i]; + + game_font_free(_g, (FontType)index); + } + + for (s32 i = 0; i < INFO_MUSIC_COUNT; i++) + { + s32 index; + + index = INFO_MUSIC[i]; + + game_music_free(_g, (MusicType)index); + } +} + +/* Updates the Play state. */ +void +game_info_update(Game* _g) +{ + info_update(&_g->info); +} + +/* Draws the Play state. */ +void +game_info_draw(Game* _g) +{ + info_draw(&_g->info); +} diff --git a/src/game/game_info.h b/src/game/game_info.h new file mode 100755 index 0000000..e121404 --- /dev/null +++ b/src/game/game_info.h @@ -0,0 +1,51 @@ +/* + * DESCRIPTION: + * Header file for game_info.c. +*/ + +#pragma once + +#include "info/info.h" + +#include "game_font.h" +#include "game_music.h" +#include "game_sound.h" +#include "game_texture.h" + +#define INFO_TEXTURE_COUNT 6 +#define INFO_SOUND_COUNT 1 +#define INFO_MUSIC_COUNT 1 +#define INFO_FONT_COUNT 4 + +static const TextureType INFO_TEXTURES[INFO_TEXTURE_COUNT] = +{ + TEXTURE_GUI_SIGN_SMALL, + TEXTURE_GUI_CURSOR, + TEXTURE_INFO_THEME, + TEXTURE_INFO_WILDCARD_ADMIN, + TEXTURE_INFO_WILDCARD_PATREON, + TEXTURE_INFO_WILDCARD_COMMUNITY +}; + +static const SoundType INFO_SOUNDS[INFO_SOUND_COUNT] = +{ + SOUND_MENU +}; + +static const MusicType INFO_MUSIC[INFO_MUSIC_COUNT] = +{ + MUSIC_TITLE +}; + +static const FontType INFO_FONTS[INFO_FONT_COUNT] = +{ + FONT_TINY, + FONT_SMALL, + FONT_MEDIUM, + FONT_BIG +}; + +void game_info_draw(Game* _g); +void game_info_free(Game* _g); +void game_info_init(Game* _g); +void game_info_update(Game* _g); diff --git a/src/game/game_intro.c b/src/game/game_intro.c new file mode 100755 index 0000000..5df5633 --- /dev/null +++ b/src/game/game_intro.c @@ -0,0 +1,102 @@ +/* + * DESCRIPTION: + * The "Title" state's meta functions. +*/ + +#include "game_intro.h" + +/* Initializes the Intro state's resources. */ +void +game_intro_init(Game* _g) +{ + for (s32 i = 0; i < INTRO_TEXTURE_COUNT; i++) + { + s32 index; + + index = INTRO_TEXTURES[i]; + + game_texture_init(_g, (TextureType)index); + } + + for (s32 i = 0; i < INTRO_SOUND_COUNT; i++) + { + s32 index; + + index = INTRO_SOUNDS[i]; + + game_sound_init(_g, (SoundType)index); + } + + for (s32 i = 0; i < INTRO_FONT_COUNT; i++) + { + s32 index; + + index = INTRO_FONTS[i]; + + game_font_init(_g, (FontType)index); + } + + for (s32 i = 0; i < INTRO_MUSIC_COUNT; i++) + { + s32 index; + + index = INTRO_MUSIC[i]; + + game_music_init(_g, (MusicType)index); + } +} + +/* Frees the Intro state's resources. */ +void +game_intro_free(Game* _g) +{ + for (s32 i = 0; i < INTRO_TEXTURE_COUNT; i++) + { + s32 index; + + index = INTRO_TEXTURES[i]; + + game_texture_free(_g, (TextureType)index); + } + + for (s32 i = 0; i < INTRO_SOUND_COUNT; i++) + { + s32 index; + + index = INTRO_SOUNDS[i]; + + game_sound_free(_g, (SoundType)index); + } + + for (s32 i = 0; i < INTRO_FONT_COUNT; i++) + { + s32 index; + + index = INTRO_FONTS[i]; + + game_font_free(_g, (FontType)index); + } + + for (s32 i = 0; i < INTRO_MUSIC_COUNT; i++) + { + s32 index; + + index = INTRO_MUSIC[i]; + + game_music_free(_g, (MusicType)index); + } +} + +/* Updates the Intro state. */ +void +game_intro_update(Game* _g) +{ + intro_update(&_g->intro); +} + +/* Draws the Intro state. */ +void +game_intro_draw(Game* _g) +{ + intro_draw(&_g->intro); +} diff --git a/src/game/game_intro.h b/src/game/game_intro.h new file mode 100755 index 0000000..9914fe7 --- /dev/null +++ b/src/game/game_intro.h @@ -0,0 +1,48 @@ +/* + * DESCRIPTION: + * Header file for game_intro.c. +*/ + +#pragma once + +#include "intro/intro.h" + +#include "game_font.h" +#include "game_music.h" +#include "game_sound.h" +#include "game_texture.h" + +#define INTRO_TEXTURE_COUNT 5 +#define INTRO_SOUND_COUNT 2 +#define INTRO_MUSIC_COUNT 1 +#define INTRO_FONT_COUNT 1 + +static const TextureType INTRO_TEXTURES[INTRO_TEXTURE_COUNT] = +{ + TEXTURE_INTRO_SCENE_ONE, + TEXTURE_INTRO_SCENE_TWO, + TEXTURE_INTRO_SCENE_THREE, + TEXTURE_INTRO_SCENE_FOUR, + TEXTURE_INTRO_SCENE_FIVE, +}; + +static const SoundType INTRO_SOUNDS[INTRO_SOUND_COUNT] = +{ + SOUND_BLIP, + SOUND_MENU +}; + +static const MusicType INTRO_MUSIC[INTRO_MUSIC_COUNT] = +{ + MUSIC_INTRO +}; + +static const FontType INTRO_FONTS[INTRO_FONT_COUNT] = +{ + FONT_SMALL +}; + +void game_intro_draw(Game* _g); +void game_intro_free(Game* _g); +void game_intro_init(Game* _g); +void game_intro_update(Game* _g); diff --git a/src/game/game_music.c b/src/game/game_music.c new file mode 100755 index 0000000..40184bf --- /dev/null +++ b/src/game/game_music.c @@ -0,0 +1,36 @@ +/* + * DESCRIPTION: + * Loads/frees game music. +*/ + +#include "game_music.h" + +/* Loads a game music. */ +void +game_music_init(Game* _g, MusicType _m) +{ + if (!_g->music[_m]) + music_init(&_g->music[_m], (char*)MUSIC_PATHS[_m]); +} + +/* Frees a game music. */ +void +game_music_free(Game* _g, MusicType _m) +{ + if (_g->music[_m]) + { + music_free(_g->music[_m]); + _g->music[_m] = NULL; + } +} + +/* Clears all music. */ +void +game_music_clear(Game* _g) +{ + for (s32 i = 0; i < MUSIC_COUNT; i++) + { + if (_g->music[i]) + game_music_free(_g, (MusicType)i); + } +} diff --git a/src/game/game_music.h b/src/game/game_music.h new file mode 100755 index 0000000..6f5fdfd --- /dev/null +++ b/src/game/game_music.h @@ -0,0 +1,24 @@ +/* + * DESCRIPTION: + * Header file for game_music.h +*/ + +#pragma once + +#include "GAME_COMMON.h" + +static const char* MUSIC_PATHS[MUSIC_COUNT] = +{ + "", + "res/audio/music/musWind.ogg", + "res/audio/music/musPlay.ogg", + "res/audio/music/musWaveClear.ogg", + "res/audio/music/musWaveFail.ogg", + "res/audio/music/musResults.ogg", + "res/audio/music/musTitle.ogg", + "res/audio/music/musIntro.ogg", +}; + +void game_music_init(Game* _g, MusicType _m); +void game_music_free(Game* _g, MusicType _m); +void game_music_clear(Game* _g); diff --git a/src/game/game_play.c b/src/game/game_play.c new file mode 100755 index 0000000..544d0fa --- /dev/null +++ b/src/game/game_play.c @@ -0,0 +1,103 @@ +/* + * DESCRIPTION: + * The "Play" state's meta functions. +*/ + +#include "game_play.h" + +/* Initializes the Play state's resources. */ +void +game_play_init(Game* _g) +{ + for (s32 i = 0; i < PLAY_TEXTURE_COUNT; i++) + { + s32 index; + + index = PLAY_TEXTURES[i]; + + game_texture_init(_g, (TextureType)index); + } + + for (s32 i = 0; i < PLAY_SOUND_COUNT; i++) + { + s32 index; + + index = PLAY_SOUNDS[i]; + + game_sound_init(_g, (SoundType)index); + } + + for (s32 i = 0; i < PLAY_FONT_COUNT; i++) + { + s32 index; + + index = PLAY_FONTS[i]; + + game_font_init(_g, (FontType)index); + } + + for (s32 i = 0; i < PLAY_MUSIC_COUNT; i++) + { + s32 index; + + index = PLAY_MUSIC[i]; + + game_music_init(_g, (MusicType)index); + } +} + +/* Frees the Play state's resources. */ +void +game_play_free(Game* _g) +{ + for (s32 i = 0; i < PLAY_TEXTURE_COUNT; i++) + { + s32 index; + + index = PLAY_TEXTURES[i]; + + game_texture_free(_g, (TextureType)index); + } + + for (s32 i = 0; i < PLAY_SOUND_COUNT; i++) + { + s32 index; + + index = PLAY_SOUNDS[i]; + + game_sound_free(_g, (SoundType)index); + } + + for (s32 i = 0; i < PLAY_FONT_COUNT; i++) + { + s32 index; + + index = PLAY_FONTS[i]; + + game_font_free(_g, (FontType)index); + } + + for (s32 i = 0; i < PLAY_MUSIC_COUNT; i++) + { + s32 index; + + index = PLAY_MUSIC[i]; + + game_music_free(_g, (MusicType)index); + } + +} + +/* Updates the Play state. */ +void +game_play_update(Game* _g) +{ + play_update(&_g->play); +} + +/* Draws the Play state. */ +void +game_play_draw(Game* _g) +{ + play_draw(&_g->play); +} diff --git a/src/game/game_play.h b/src/game/game_play.h new file mode 100755 index 0000000..487aa31 --- /dev/null +++ b/src/game/game_play.h @@ -0,0 +1,100 @@ +/* + * DESCRIPTION: + * Header file for game_play.c. +*/ + +#pragma once + +#include "play/play.h" + +#include "game_font.h" +#include "game_music.h" +#include "game_sound.h" +#include "game_texture.h" + +#define PLAY_TEXTURE_COUNT 29 +#define PLAY_SOUND_COUNT 23 +#define PLAY_MUSIC_COUNT 4 +#define PLAY_FONT_COUNT 5 + +static const TextureType PLAY_TEXTURES[PLAY_TEXTURE_COUNT] = +{ + TEXTURE_GUI_CURSOR, + TEXTURE_GUI_SNAKE, + TEXTURE_GUI_REDIRECT, + TEXTURE_GUI_CASH, + TEXTURE_GUI_UPGRADE_SNAKE, + TEXTURE_GUI_UPGRADE_LIFETIME, + TEXTURE_GUI_UPGRADE_REDIRECT, + TEXTURE_GUI_SIGN_SMALL, + TEXTURE_GUI_SIGN_BIG, + TEXTURE_SHADOW, + TEXTURE_ARC, + TEXTURE_PLAY_BG, + TEXTURE_PLAYER_STAGE_ONE, + TEXTURE_PLAYER_STAGE_TWO, + TEXTURE_PLAYER_STAGE_THREE, + TEXTURE_PLAYER_TAIL_STAGE_ONE, + TEXTURE_PLAYER_TAIL_STAGE_TWO, + TEXTURE_PLAYER_TAIL_STAGE_THREE, + TEXTURE_PLAYER_SNAKE, + TEXTURE_ENEMY_CUPPER, + TEXTURE_ENEMY_CHIPPER, + TEXTURE_ENEMY_CHIP, + TEXTURE_ENEMY_CRUMBLER, + TEXTURE_COLLECTIBLE_DOLLARS, + TEXTURE_COLLECTIBLE_SACK, + TEXTURE_COLLECTIBLE_BULLIONS, + TEXTURE_COLLECTIBLE_MIRACLE_CURE, + TEXTURE_COLLECTIBLE_DYNAMITE, + TEXTURE_COLLECTIBLE_BERSERK +}; + +static const SoundType PLAY_SOUNDS[PLAY_SOUND_COUNT] = +{ + SOUND_MENU, + SOUND_SNAKE_FIRE, + SOUND_SNAKE_REDIRECT, + SOUND_SNAKE_RETURN, + SOUND_ENEMY_HURT, + SOUND_CUPPER_KILL, + SOUND_CHIPPER_KILL, + SOUND_CRUMBLER_KILL, + SOUND_CHIP_KILL, + SOUND_RUMBLE, + SOUND_COLLECTIBLE, + SOUND_DOLLARS, + SOUND_SACK, + SOUND_BULLIONS, + SOUND_PURCHASE, + SOUND_MIRACLE_CURE, + SOUND_DYNAMITE, + SOUND_BERSERK, + SOUND_SWALLOW, + SOUND_GROWTH, + SOUND_ERROR, + SOUND_GO, + SOUND_SPIT +}; + +static const MusicType PLAY_MUSIC[PLAY_MUSIC_COUNT] = +{ + MUSIC_WIND, + MUSIC_PLAY, + MUSIC_WAVE_CLEAR, + MUSIC_WAVE_FAIL +}; + +static const FontType PLAY_FONTS[PLAY_FONT_COUNT] = +{ + FONT_TINY, + FONT_SMALL, + FONT_MEDIUM, + FONT_BIG, + FONT_MEGA +}; + +void game_play_draw(Game* _g); +void game_play_free(Game* _g); +void game_play_init(Game* _g); +void game_play_update(Game* _g); diff --git a/src/game/game_results.c b/src/game/game_results.c new file mode 100755 index 0000000..b9a0bd6 --- /dev/null +++ b/src/game/game_results.c @@ -0,0 +1,102 @@ +/* + * DESCRIPTION: + * The "Title" state's meta functions. +*/ + +#include "game_results.h" + +/* Initializes the Intro state's resources. */ +void +game_results_init(Game* _g) +{ + for (s32 i = 0; i < RESULTS_TEXTURE_COUNT; i++) + { + s32 index; + + index = RESULTS_TEXTURES[i]; + + game_texture_init(_g, (TextureType)index); + } + + for (s32 i = 0; i < RESULTS_SOUND_COUNT; i++) + { + s32 index; + + index = RESULTS_SOUNDS[i]; + + game_sound_init(_g, (SoundType)index); + } + + for (s32 i = 0; i < RESULTS_FONT_COUNT; i++) + { + s32 index; + + index = RESULTS_FONTS[i]; + + game_font_init(_g, (FontType)index); + } + + for (s32 i = 0; i < RESULTS_MUSIC_COUNT; i++) + { + s32 index; + + index = RESULTS_MUSIC[i]; + + game_music_init(_g, (MusicType)index); + } +} + +/* Frees the Intro state's resources. */ +void +game_results_free(Game* _g) +{ + for (s32 i = 0; i < RESULTS_TEXTURE_COUNT; i++) + { + s32 index; + + index = RESULTS_TEXTURES[i]; + + game_texture_free(_g, (TextureType)index); + } + + for (s32 i = 0; i < RESULTS_SOUND_COUNT; i++) + { + s32 index; + + index = RESULTS_SOUNDS[i]; + + game_sound_free(_g, (SoundType)index); + } + + for (s32 i = 0; i < RESULTS_FONT_COUNT; i++) + { + s32 index; + + index = RESULTS_FONTS[i]; + + game_font_free(_g, (FontType)index); + } + + for (s32 i = 0; i < RESULTS_MUSIC_COUNT; i++) + { + s32 index; + + index = RESULTS_MUSIC[i]; + + game_music_free(_g, (MusicType)index); + } +} + +/* Updates the Intro state. */ +void +game_results_update(Game* _g) +{ + results_update(&_g->results); +} + +/* Draws the Intro state. */ +void +game_results_draw(Game* _g) +{ + results_draw(&_g->results); +} diff --git a/src/game/game_results.h b/src/game/game_results.h new file mode 100755 index 0000000..9285166 --- /dev/null +++ b/src/game/game_results.h @@ -0,0 +1,44 @@ +/* + * DESCRIPTION: + * Header file for game_results.c. +*/ + +#pragma once + +#include "results/results.h" + +#include "game_font.h" +#include "game_music.h" +#include "game_sound.h" +#include "game_texture.h" + +#define RESULTS_TEXTURE_COUNT 1 +#define RESULTS_SOUND_COUNT 1 +#define RESULTS_MUSIC_COUNT 1 +#define RESULTS_FONT_COUNT 2 + +static const TextureType RESULTS_TEXTURES[RESULTS_TEXTURE_COUNT] = +{ + TEXTURE_RESULTS +}; + +static const SoundType RESULTS_SOUNDS[RESULTS_SOUND_COUNT] = +{ + SOUND_MENU +}; + +static const MusicType RESULTS_MUSIC[RESULTS_MUSIC_COUNT] = +{ + MUSIC_RESULTS +}; + +static const FontType RESULTS_FONTS[RESULTS_FONT_COUNT] = +{ + FONT_BIG, + FONT_MEGA +}; + +void game_results_draw(Game* _g); +void game_results_free(Game* _g); +void game_results_init(Game* _g); +void game_results_update(Game* _g); diff --git a/src/game/game_sound.c b/src/game/game_sound.c new file mode 100755 index 0000000..d9a0b3f --- /dev/null +++ b/src/game/game_sound.c @@ -0,0 +1,37 @@ +/* + * DESCRIPTION: + * Loads/frees game sounds. +*/ + +#include "game_sound.h" + +/* Loads a game sound. */ +void +game_sound_init(Game* _g, SoundType _s) +{ + if (!_g->sounds[_s]) + sound_init(&_g->sounds[_s], (char*)SOUND_PATHS[_s]); +} + +/* Frees a game sound. */ +void +game_sound_free(Game* _g, SoundType _s) +{ + if (_g->sounds[_s]) + { + sound_free(_g->sounds[_s]); + _g->sounds[_s] = NULL; + } +} + +/* Clears all sounds. */ +void +game_sound_clear(Game* _g) +{ + for (s32 i = 0; i < SOUND_COUNT; i++) + { + if (_g->sounds[i]) + game_sound_free(_g, (SoundType)i); + } +} + diff --git a/src/game/game_sound.h b/src/game/game_sound.h new file mode 100755 index 0000000..7276d9f --- /dev/null +++ b/src/game/game_sound.h @@ -0,0 +1,41 @@ +/* + * DESCRIPTION: + * Header file for game_sound.h +*/ + +#pragma once + +#include "GAME_COMMON.h" + +static const char* SOUND_PATHS[SOUND_COUNT] = +{ + "", + "res/audio/sfx/sfxMenu.ogg", + "res/audio/sfx/sfxBlip.ogg", + "res/audio/sfx/sfxSnakeFire.ogg", + "res/audio/sfx/sfxSnakeRedirect.ogg", + "res/audio/sfx/sfxSnakeReturn.ogg", + "res/audio/sfx/sfxEnemyHurt.ogg", + "res/audio/sfx/sfxCupperKill.ogg", + "res/audio/sfx/sfxChipperKill.ogg", + "res/audio/sfx/sfxCrumblerKill.ogg", + "res/audio/sfx/sfxChipKill.ogg", + "res/audio/sfx/sfxRumble.ogg", + "res/audio/sfx/sfxCollectible.ogg", + "res/audio/sfx/sfxDollars.ogg", + "res/audio/sfx/sfxSack.ogg", + "res/audio/sfx/sfxBullions.ogg", + "res/audio/sfx/sfxPurchase.ogg", + "res/audio/sfx/sfxMiracleCure.ogg", + "res/audio/sfx/sfxDynamite.ogg", + "res/audio/sfx/sfxBerserk.ogg", + "res/audio/sfx/sfxSwallow.ogg", + "res/audio/sfx/sfxGrowth.ogg", + "res/audio/sfx/sfxError.ogg", + "res/audio/sfx/sfxGo.ogg", + "res/audio/sfx/sfxSpit.ogg", +}; + +void game_sound_init(Game* _g, SoundType _s); +void game_sound_free(Game* _g, SoundType _s); +void game_sound_clear(Game* _g); diff --git a/src/game/game_state.c b/src/game/game_state.c new file mode 100755 index 0000000..9e46e10 --- /dev/null +++ b/src/game/game_state.c @@ -0,0 +1,381 @@ +/* + * DESCRIPTION: + * Game states. +*/ + +#include "game_state.h" + +static void game_state_transition_update(Game* _g); +static void game_state_set(Game* _g, StateType _s); + +/* Update state change transition. */ +static void +game_state_transition_update(Game* _g) +{ + if (_g->isStateTransitioning) + { + _g->stateTimer++; + + if (_g->stateTimer >= STATE_TRANSITION_TIMER_MAX) + { + game_state_set(_g, _g->stateNext); + _g->stateNext = STATE_NONE; + _g->isStateTransitioning = FALSE; + } + } + else + { + _g->stateTimer--; + + if (_g->stateTimer <= 0) + _g->isStateTransition = FALSE; + } +} + +/* Sets the game's state to a specified one. */ +static void +game_state_set(Game* _g, StateType _s) +{ + game_state_free(_g); + + _g->state = _s; + + if (_g->isNextStateResourcesWillBeInit) + { + switch (_g->state) + { + case STATE_TITLE: + game_title_init(_g); + break; + case STATE_INTRO: + game_intro_init(_g); + break; + case STATE_PLAY: + game_play_init(_g); + break; + case STATE_INFO: + game_info_init(_g); + break; + case STATE_ENDING_FAIL: + case STATE_ENDING_ONE: + case STATE_ENDING_TWO: + case STATE_ENDING_THREE: + game_ending_init(_g); + break; + case STATE_RESULTS: + game_results_init(_g); + break; + default: + break; + } + + _g->isNextStateResourcesWillBeInit = FALSE; + } + + if (_g->isNextStateWillBeInit) + { + switch (_g->state) + { + case STATE_TITLE: + title_init(&_g->title, _g); + break; + case STATE_INTRO: + intro_init(&_g->intro, _g); + break; + case STATE_PLAY: + play_init(&_g->play, _g); + break; + case STATE_INFO: + info_init(&_g->info, _g); + break; + case STATE_ENDING_FAIL: + ending_init(&_g->ending, _g, ENDING_FAIL); + break; + case STATE_ENDING_ONE: + ending_init(&_g->ending, _g, ENDING_ONE); + break; + case STATE_ENDING_TWO: + ending_init(&_g->ending, _g, ENDING_TWO); + break; + case STATE_ENDING_THREE: + ending_init(&_g->ending, _g, ENDING_THREE); + break; + case STATE_RESULTS: + results_init(&_g->results, _g); + break; + default: + break; + } + + _g->isNextStateWillBeInit = FALSE; + } +} + +/* Transition the a state type with a fade-in/fade-out. */ +void +game_state_transition(Game* _g, StateType _s, bool_u8 _i, bool_u8 _f, bool_u8 _rI, bool_u8 _rF) +{ + _g->stateTimer = 0; + _g->stateNext = _s; + _g->isNextStateWillBeInit = _i; + _g->isPrevStateWillBeFreed = _f; + _g->isNextStateResourcesWillBeInit = _rI; + _g->isPrevStateResourcesWillBeFreed = _rF; + _g->isStateTransitioning = TRUE; + _g->isStateTransition = TRUE; +} + +/* Frees everything related to the game's current state. */ +void +game_state_free(Game* _g) +{ + if (_g->isPrevStateResourcesWillBeFreed) + { + switch (_g->state) + { + case STATE_TITLE: + game_title_free(_g); + break; + case STATE_INTRO: + game_intro_free(_g); + break; + case STATE_PLAY: + game_play_free(_g); + break; + case STATE_INFO: + game_info_free(_g); + break; + case STATE_ENDING_FAIL: + case STATE_ENDING_ONE: + case STATE_ENDING_TWO: + case STATE_ENDING_THREE: + game_ending_free(_g); + break; + case STATE_RESULTS: + game_results_free(_g); + break; + default: + break; + + } + + _g->isPrevStateResourcesWillBeFreed = FALSE; + } + + if (_g->isPrevStateWillBeFreed) + { + switch (_g->state) + { + case STATE_TITLE: + title_free(&_g->title); + break; + case STATE_INTRO: + intro_free(&_g->intro); + break; + case STATE_PLAY: + play_free(&_g->play); + break; + case STATE_INFO: + info_free(&_g->info); + break; + case STATE_ENDING_FAIL: + case STATE_ENDING_ONE: + case STATE_ENDING_TWO: + case STATE_ENDING_THREE: + ending_free(&_g->ending); + break; + case STATE_RESULTS: + results_free(&_g->results); + break; + default: + break; + } + + _g->isPrevStateWillBeFreed = FALSE; + } +} + +/* Updates the game's state. */ +void +game_state_update(Game* _g) +{ + if (_g->isStateTransition) + game_state_transition_update(_g); + + switch (_g->state) + { + case STATE_TITLE: + game_title_update(_g); + + if + ( + _g->title.isStartPressed && + !_g->isStateTransition + ) + { + _g->title.isStartPressed = FALSE; + game_state_transition(_g, STATE_INTRO, TRUE, TRUE, TRUE, TRUE); + } + + if + ( + _g->title.isInfoPressed && + !_g->isStateTransition + ) + { + _g->title.isInfoPressed = FALSE; + game_state_transition(_g, STATE_INFO, TRUE, TRUE, TRUE, TRUE); + } + break; + case STATE_INTRO: + game_intro_update(_g); + + if + ( + _g->intro.sceneHandler.isEnd && + !_g->isStateTransition + ) + game_state_transition(_g, STATE_PLAY, TRUE, TRUE, TRUE, TRUE); + break; + case STATE_PLAY: + game_play_update(_g); + + + if + ( + keyboard_press(&_g->keyboard, KEYBOARD_ESCAPE) && + _g->play.isPaused && + !_g->isStateTransition + ) + game_state_transition(_g, STATE_TITLE, TRUE, TRUE, TRUE, TRUE); + else if + ( + _g->play.player.isDefeat && + !_g->isStateTransition + ) + game_state_transition(_g, STATE_ENDING_FAIL, TRUE, TRUE, TRUE, TRUE); + else if + ( + _g->play.isGameCleared && + !_g->isStateTransition + ) + { + if (_g->play.player.cash >= ENDING_THREE_CASH_THRESHOLD) + game_state_transition(_g, STATE_ENDING_THREE, TRUE, FALSE, TRUE, FALSE); + else if (_g->play.player.cash >= ENDING_TWO_CASH_THRESHOLD) + game_state_transition(_g, STATE_ENDING_TWO, TRUE, FALSE, TRUE, FALSE); + else + game_state_transition(_g, STATE_ENDING_ONE, TRUE, FALSE, TRUE, FALSE); + } + break; + case STATE_INFO: + game_info_update(_g); + + if + ( + _g->info.isBackPressed && + !_g->isStateTransition + ) + { + _g->info.isBackPressed = FALSE; + game_state_transition(_g, STATE_TITLE, TRUE, TRUE, TRUE, TRUE); + } + break; + case STATE_ENDING_FAIL: + game_ending_update(_g); + + if + ( + _g->ending.sceneHandler.isEnd && + !_g->isStateTransition + ) + game_state_transition(_g, STATE_RESULTS, TRUE, TRUE, TRUE, TRUE); + break; + case STATE_ENDING_ONE: + case STATE_ENDING_TWO: + case STATE_ENDING_THREE: + game_ending_update(_g); + + if (!_g->isStateTransition) + { + if (_g->ending.isNewGamePlus) + { + game_state_transition(_g, STATE_PLAY, FALSE, TRUE, FALSE, FALSE); + wave_new_game_plus(&_g->play); + _g->ending.isNewGamePlus = FALSE; + _g->ending.isActualEnding = FALSE; + } + else if (_g->ending.isResults) + { + game_state_transition(_g, STATE_RESULTS, TRUE, TRUE, TRUE, TRUE); + _g->ending.isResults = FALSE; + _g->ending.isActualEnding = FALSE; + } + } + + break; + case STATE_RESULTS: + game_results_update(_g); + + if + ( + _g->results.isEnd && + !_g->isStateTransition + ) + game_state_transition(_g, STATE_TITLE, TRUE, TRUE, TRUE, TRUE); + break; + default: + break; + } +} + +/* Draws the game's state. */ +void +game_state_draw(Game* _g) +{ + switch (_g->state) + { + case STATE_TITLE: + game_title_draw(_g); + break; + case STATE_INTRO: + game_intro_draw(_g); + break; + case STATE_PLAY: + game_play_draw(_g); + break; + case STATE_INFO: + game_info_draw(_g); + break; + case STATE_ENDING_FAIL: + case STATE_ENDING_ONE: + case STATE_ENDING_TWO: + case STATE_ENDING_THREE: + game_ending_draw(_g); + break; + case STATE_RESULTS: + game_results_draw(_g); + break; + default: + break; + } + + if (_g->isStateTransition) + { + f64 progress; + SDL_Rect rect; + SDL_Color color; + + progress = (f64)_g->stateTimer / STATE_TRANSITION_TIMER_MAX; + + rect.x = 0; + rect.y = 0; + rect.w = STATE_TRANSITION_RECTANGLE_WIDTH; + rect.h = STATE_TRANSITION_RECTANGLE_HEIGHT; + + color = STATE_TRANSITION_COLOR; + color.a = SDL_ALPHA_OPAQUE * progress; + + rectangle_draw(&rect, _g->renderer, color); + } +} diff --git a/src/game/game_state.h b/src/game/game_state.h new file mode 100755 index 0000000..692d57d --- /dev/null +++ b/src/game/game_state.h @@ -0,0 +1,24 @@ +/* + * DESCRIPTION: + * Header file for game_state.c. +*/ + +#pragma once + +#include "game_ending.h" +#include "game_info.h" +#include "game_play.h" +#include "game_intro.h" +#include "game_title.h" +#include "game_results.h" + +#define STATE_TRANSITION_TIMER_MAX 30 +#define STATE_TRANSITION_RECTANGLE_WIDTH 800 +#define STATE_TRANSITION_RECTANGLE_HEIGHT 600 + +static const SDL_Color STATE_TRANSITION_COLOR = {0, 0, 0, 255}; + +void game_state_free(Game* _g); +void game_state_update(Game* _g); +void game_state_draw(Game* _g); +void game_state_transition(Game* _g, StateType _s, bool_u8 _i, bool_u8 _f, bool_u8 _rI, bool_u8 _rF); diff --git a/src/game/game_texture.c b/src/game/game_texture.c new file mode 100755 index 0000000..e8a11f8 --- /dev/null +++ b/src/game/game_texture.c @@ -0,0 +1,37 @@ +/* + * DESCRIPTION: + * Loads/frees game textures. +*/ + +#include "game_texture.h" + +/* Loads a game texture. */ +void +game_texture_init(Game* _g, TextureType _t) +{ + if (!_g->textures[_t]) + texture_init(&_g->textures[_t], _g->renderer, (char*)TEXTURE_PATHS[_t]); +} + +/* Frees a game texture. */ +void +game_texture_free(Game* _g, TextureType _t) +{ + if (_g->textures[_t]) + { + texture_free(_g->textures[_t]); + _g->textures[_t] = NULL; + } +} + +/* Clears all textures. */ +void +game_texture_clear(Game* _g) +{ + for (s32 i = 0; i < TEXTURE_COUNT; i++) + { + if (_g->textures[i]) + game_texture_free(_g, (TextureType)i); + } +} + diff --git a/src/game/game_texture.h b/src/game/game_texture.h new file mode 100755 index 0000000..beaa760 --- /dev/null +++ b/src/game/game_texture.h @@ -0,0 +1,62 @@ +/* + * DESCRIPTION: + * Header file for game_texture.c. +*/ + +#pragma once + +#include "GAME_COMMON.h" + +static const char* TEXTURE_PATHS[TEXTURE_COUNT] = +{ + "", + "res/gfx/title/gfxLogo.png", + "res/gfx/gui/gfxGuiCursor.png", + "res/gfx/play/gui/gfxGuiSnake.png", + "res/gfx/play/gui/gfxGuiRedirect.png", + "res/gfx/play/gui/gfxGuiCash.png", + "res/gfx/play/gui/gfxGuiUpgradeSnake.png", + "res/gfx/play/gui/gfxGuiUpgradeLifetime.png", + "res/gfx/play/gui/gfxGuiUpgradeRedirect.png", + "res/gfx/gui/gfxGuiSignSmall.png", + "res/gfx/gui/gfxGuiSignBig.png", + "res/gfx/play/gfxShadow.png", + "res/gfx/play/player/gfxArc.png", + "res/gfx/play/bg/gfxPlayBG.png", + "res/gfx/play/player/gfxPlayerStageOne.png", + "res/gfx/play/player/gfxPlayerStageTwo.png", + "res/gfx/play/player/gfxPlayerStageThree.png", + "res/gfx/play/player/gfxPlayerTailStageOne.png", + "res/gfx/play/player/gfxPlayerTailStageTwo.png", + "res/gfx/play/player/gfxPlayerTailStageThree.png", + "res/gfx/play/player/gfxPlayerSnake.png", + "res/gfx/play/enemy/gfxEnemyCupper.png", + "res/gfx/play/enemy/gfxEnemyChipper.png", + "res/gfx/play/enemy/gfxEnemyChip.png", + "res/gfx/play/enemy/gfxEnemyCrumbler.png", + "res/gfx/play/collectible/gfxCollectibleDollars.png", + "res/gfx/play/collectible/gfxCollectibleSack.png", + "res/gfx/play/collectible/gfxCollectibleBullions.png", + "res/gfx/play/collectible/gfxCollectibleMiracleCure.png", + "res/gfx/play/collectible/gfxCollectibleDynamite.png", + "res/gfx/play/collectible/gfxCollectibleBerserk.png", + "res/gfx/info/gfxTheme.png", + "res/gfx/info/gfxWildcardAdmin.png", + "res/gfx/info/gfxWildcardPatreon.png", + "res/gfx/info/gfxWildcardCommunity.png", + "res/gfx/intro/gfxIntroSceneOne.png", + "res/gfx/intro/gfxIntroSceneTwo.png", + "res/gfx/intro/gfxIntroSceneThree.png", + "res/gfx/intro/gfxIntroSceneFour.png", + "res/gfx/intro/gfxIntroSceneFive.png", + "res/gfx/ending/gfxEndingFail.png", + "res/gfx/ending/gfxEndingOne.png", + "res/gfx/ending/gfxEndingTwo.png", + "res/gfx/ending/gfxEndingThree.png", + "res/gfx/title/gfxTitleBG.png", + "res/gfx/results/gfxResults.png", +}; + +void game_texture_init(Game* _g, TextureType _t); +void game_texture_free(Game* _g, TextureType _t); +void game_texture_clear(Game* _g); diff --git a/src/game/game_title.c b/src/game/game_title.c new file mode 100755 index 0000000..3e64abe --- /dev/null +++ b/src/game/game_title.c @@ -0,0 +1,102 @@ +/* + * DESCRIPTION: + * The "Title" state's meta functions. +*/ + +#include "game_title.h" + +/* Initializes the Play state's resources. */ +void +game_title_init(Game* _g) +{ + for (s32 i = 0; i < TITLE_TEXTURE_COUNT; i++) + { + s32 index; + + index = TITLE_TEXTURES[i]; + + game_texture_init(_g, (TextureType)index); + } + + for (s32 i = 0; i < TITLE_SOUND_COUNT; i++) + { + s32 index; + + index = TITLE_SOUNDS[i]; + + game_sound_init(_g, (SoundType)index); + } + + for (s32 i = 0; i < TITLE_FONT_COUNT; i++) + { + s32 index; + + index = TITLE_FONTS[i]; + + game_font_init(_g, (FontType)index); + } + + for (s32 i = 0; i < TITLE_MUSIC_COUNT; i++) + { + s32 index; + + index = TITLE_MUSIC[i]; + + game_music_init(_g, (MusicType)index); + } +} + +/* Frees the Play state's resources. */ +void +game_title_free(Game* _g) +{ + for (s32 i = 0; i < TITLE_TEXTURE_COUNT; i++) + { + s32 index; + + index = TITLE_TEXTURES[i]; + + game_texture_free(_g, (TextureType)index); + } + + for (s32 i = 0; i < TITLE_SOUND_COUNT; i++) + { + s32 index; + + index = TITLE_SOUNDS[i]; + + game_sound_free(_g, (SoundType)index); + } + + for (s32 i = 0; i < TITLE_FONT_COUNT; i++) + { + s32 index; + + index = TITLE_FONTS[i]; + + game_font_free(_g, (FontType)index); + } + + for (s32 i = 0; i < TITLE_MUSIC_COUNT; i++) + { + s32 index; + + index = TITLE_MUSIC[i]; + + game_music_free(_g, (MusicType)index); + } +} + +/* Updates the Play state. */ +void +game_title_update(Game* _g) +{ + title_update(&_g->title); +} + +/* Draws the Play state. */ +void +game_title_draw(Game* _g) +{ + title_draw(&_g->title); +} diff --git a/src/game/game_title.h b/src/game/game_title.h new file mode 100755 index 0000000..5e0c386 --- /dev/null +++ b/src/game/game_title.h @@ -0,0 +1,48 @@ +/* + * DESCRIPTION: + * Header file for game_title.c. +*/ + +#pragma once + +#include "title/title.h" + +#include "game_font.h" +#include "game_music.h" +#include "game_sound.h" +#include "game_texture.h" + +#define TITLE_TEXTURE_COUNT 5 +#define TITLE_SOUND_COUNT 1 +#define TITLE_MUSIC_COUNT 1 +#define TITLE_FONT_COUNT 2 + +static const TextureType TITLE_TEXTURES[TITLE_TEXTURE_COUNT] = +{ + TEXTURE_LOGO, + TEXTURE_GUI_SIGN_SMALL, + TEXTURE_GUI_SIGN_BIG, + TEXTURE_GUI_CURSOR, + TEXTURE_TITLE_BACKGROUND +}; + +static const SoundType TITLE_SOUNDS[TITLE_SOUND_COUNT] = +{ + SOUND_MENU +}; + +static const MusicType TITLE_MUSIC[TITLE_MUSIC_COUNT] = +{ + MUSIC_TITLE +}; + +static const FontType TITLE_FONTS[TITLE_FONT_COUNT] = +{ + FONT_MEDIUM, + FONT_BIG +}; + +void game_title_draw(Game* _g); +void game_title_free(Game* _g); +void game_title_init(Game* _g); +void game_title_update(Game* _g); diff --git a/src/game/gui/button.c b/src/game/gui/button.c new file mode 100755 index 0000000..2e7c192 --- /dev/null +++ b/src/game/gui/button.c @@ -0,0 +1,67 @@ +/* + * DESCRIPTION: + * Basic GUI button. +*/ + +#include "button.h" + +/* Initializes a button. */ +void +button_init(Button* _b, Sprite* _s) +{ + memset(_b, '\0', sizeof(Button)); + + _b->sprite = *_s; +} + +/* Updates a button. */ +void +button_update(Button* _b, Mouse* _m) +{ + SDL_Rect rect; + + rect = sprite_rect_get(&_b->sprite); + + _b->state = BUTTON_STATE_NONE; + + if (rectangle_point_collide(&rect, _m->x, _m->y)) + { + if (_b->state == BUTTON_STATE_HOVER) + _b->state = BUTTON_STATE_HOVERING; + else + _b->state = BUTTON_STATE_HOVER; + + if (mouse_held(_m, MOUSE_LEFT)) + _b->state = BUTTON_STATE_HELD; + else if (mouse_press(_m, MOUSE_LEFT)) + _b->state = BUTTON_STATE_PRESS; + + } + else + _b->state = BUTTON_STATE_NONE; + + switch (_b->state) + { + case BUTTON_STATE_PRESS: + _b->sprite.color = BUTTON_PRESS_COLOR; + break; + case BUTTON_STATE_HELD: + _b->sprite.color = BUTTON_HELD_COLOR; + break; + case BUTTON_STATE_HOVER: + case BUTTON_STATE_HOVERING: + _b->sprite.color = BUTTON_HOVER_COLOR; + break; + case BUTTON_STATE_NONE: + default: + _b->sprite.color = BUTTON_NONE_COLOR; + break; + } +} + +/* Draws a button. */ +void +button_draw(Button* _b, SDL_Renderer* _r) +{ + sprite_draw(&_b->sprite, _r); +} diff --git a/src/game/gui/button.h b/src/game/gui/button.h new file mode 100755 index 0000000..c1e519c --- /dev/null +++ b/src/game/gui/button.h @@ -0,0 +1,17 @@ +/* + * DESCRIPTION: + * Header file for button.c. +*/ + +#pragma once + +#include "../GAME_COMMON.h" + +static const SDL_Color BUTTON_NONE_COLOR = {255, 255, 255, 255}; +static const SDL_Color BUTTON_HOVER_COLOR = {192, 192, 192, 255}; +static const SDL_Color BUTTON_PRESS_COLOR = {128, 128, 128, 255}; +static const SDL_Color BUTTON_HELD_COLOR = {64, 64, 6, 255}; + +void button_init(Button* _b, Sprite* _s); +void button_update(Button* _b, Mouse* _m); +void button_draw(Button* _b, SDL_Renderer* _r); diff --git a/src/game/gui/cursor.c b/src/game/gui/cursor.c new file mode 100755 index 0000000..75f3e76 --- /dev/null +++ b/src/game/gui/cursor.c @@ -0,0 +1,73 @@ +/* + * DESCRIPTION: + * Gameplay's cursor. +*/ + +#include "cursor.h" + +/* Initializes the cursor. */ +void +cursor_init(Cursor* _c, Mouse* _m, SDL_Texture* _t) +{ + Atlas atlas; + + atlas_init + ( + &atlas, + _t, + CURSOR_ROWS, + CURSOR_COLUMNS, + CURSOR_FRAME_WIDTH, + CURSOR_FRAME_HEIGHT + ); + + sprite_atlas_init + ( + &_c->sprite, + &atlas, + ORIGIN_MIDDLE, + CURSOR_WIDTH, + CURSOR_HEIGHT + ); + + _c->sprite.frame = 0; + _c->sprite.x = _m->x; + _c->sprite.y = _m->y; + + _c->sprite.color.a = CURSOR_ALPHA; +} + +/* Frees cursor resources. */ +void +cursor_free(Cursor* _c) +{ + +} + +/* Updates the cursor. */ +void +cursor_update(Cursor* _c, Mouse* _m) +{ + if (mouse_held(_m, MOUSE_LEFT)) + _c->sprite.frame = 1; + else if (mouse_held(_m, MOUSE_RIGHT)) + _c->sprite.frame = 2; + else + _c->sprite.frame = 0; + + _c->sprite.x = _m->x; + _c->sprite.y = _m->y; + + _c->sprite.x = _c->sprite.x < CURSOR_X_MIN ? CURSOR_X_MIN : _c->sprite.x; + _c->sprite.x = _c->sprite.x > CURSOR_X_MAX ? CURSOR_X_MAX : _c->sprite.x; + _c->sprite.y = _c->sprite.y < CURSOR_Y_MIN ? CURSOR_Y_MIN : _c->sprite.y; + _c->sprite.y = _c->sprite.y > CURSOR_Y_MAX ? CURSOR_Y_MAX : _c->sprite.y; +} + +/* Draws the cursor. */ +void +cursor_draw(Cursor* _c, SDL_Renderer* _r) +{ + sprite_draw(&_c->sprite, _r); + +} diff --git a/src/game/gui/cursor.h b/src/game/gui/cursor.h new file mode 100755 index 0000000..45f0bdd --- /dev/null +++ b/src/game/gui/cursor.h @@ -0,0 +1,25 @@ +/* + * DESCRIPTION: + * Header file for cursor.c. +*/ + +#pragma once + +#include "../GAME_COMMON.h" + +#define CURSOR_WIDTH 32 +#define CURSOR_HEIGHT 32 +#define CURSOR_FRAME_WIDTH 32 +#define CURSOR_FRAME_HEIGHT 32 +#define CURSOR_ROWS 1 +#define CURSOR_COLUMNS 3 +#define CURSOR_ALPHA 128 +#define CURSOR_X_MAX 800 +#define CURSOR_X_MIN 0 +#define CURSOR_Y_MAX 600 +#define CURSOR_Y_MIN 0 + +void cursor_draw(Cursor* _c, SDL_Renderer* _r); +void cursor_free(Cursor* _c); +void cursor_init(Cursor* _c, Mouse* _m, SDL_Texture* _t); +void cursor_update(Cursor* _c, Mouse* _m); diff --git a/src/game/info/info.c b/src/game/info/info.c new file mode 100755 index 0000000..a97e327 --- /dev/null +++ b/src/game/info/info.c @@ -0,0 +1,239 @@ +/* + * DESCRIPTION: + * Displays game info (credits/licenses). +*/ + +#include "info.h" + +/* Initialize info. */ +void +info_init(Info* _i, Game* _g) +{ + Sprite buttonSprite; + + memset(_i, '\0', sizeof(Info)); + + _i->g = _g; + + cursor_init(&_i->cursor, &_i->g->mouse, _i->g->textures[TEXTURE_GUI_CURSOR]); + + text_sprite_init + ( + &_i->licenseText, + _i->g->renderer, + _i->g->fonts[FONT_SMALL], + INFO_TEXT_COLOR, + ORIGIN_MIDDLE, + STRING_INFO_LICENSES, + INFO_LICENSE_TEXT_WRAP + ); + + _i->licenseText.x = INFO_LICENSE_TEXT_OFFSET_X; + _i->licenseText.y = INFO_LICENSE_TEXT_OFFSET_Y; + + sprite_init + ( + &_i->themeSprite, + _i->g->textures[TEXTURE_INFO_THEME], + ORIGIN_MIDDLE, + INFO_THEME_WIDTH, + INFO_THEME_HEIGHT + ); + + _i->themeSprite.x = INFO_THEME_OFFSET_X; + _i->themeSprite.y = INFO_THEME_OFFSET_Y; + + sprite_init + ( + &_i->wildcardAdminSprite, + _i->g->textures[TEXTURE_INFO_WILDCARD_ADMIN], + ORIGIN_MIDDLE, + INFO_WILDCARD_WIDTH, + INFO_WILDCARD_HEIGHT + ); + + _i->wildcardAdminSprite.x = INFO_WILDCARD_ADMIN_OFFSET_X; + _i->wildcardAdminSprite.y = INFO_WILDCARD_ADMIN_OFFSET_Y; + + sprite_init + ( + &_i->wildcardPatreonSprite, + _i->g->textures[TEXTURE_INFO_WILDCARD_PATREON], + ORIGIN_MIDDLE, + INFO_WILDCARD_WIDTH, + INFO_WILDCARD_HEIGHT + ); + + _i->wildcardPatreonSprite.x = INFO_WILDCARD_PATREON_OFFSET_X; + _i->wildcardPatreonSprite.y = INFO_WILDCARD_PATREON_OFFSET_Y; + + sprite_init + ( + &_i->wildcardCommunitySprite, + _i->g->textures[TEXTURE_INFO_WILDCARD_COMMUNITY], + ORIGIN_MIDDLE, + INFO_WILDCARD_WIDTH, + INFO_WILDCARD_HEIGHT + ); + + _i->wildcardCommunitySprite.x = INFO_WILDCARD_COMMUNITY_OFFSET_X; + _i->wildcardCommunitySprite.y = INFO_WILDCARD_COMMUNITY_OFFSET_Y; + + sprite_init + ( + &_i->backBackgroundSprite, + _i->g->textures[TEXTURE_GUI_SIGN_SMALL], + ORIGIN_MIDDLE, + INFO_BUTTON_BACKGROUND_WIDTH, + INFO_BUTTON_BACKGROUND_HEIGHT + ); + + _i->backBackgroundSprite.x = INFO_BUTTON_OFFSET_X; + _i->backBackgroundSprite.y = INFO_BUTTON_OFFSET_Y; + + text_sprite_init + ( + &buttonSprite, + _i->g->renderer, + _i->g->fonts[FONT_MEDIUM], + INFO_TEXT_COLOR, + ORIGIN_MIDDLE, + STRING_INFO_BACK, + 0 + ); + + buttonSprite.rotation = INFO_BUTTON_TEXT_ROTATION; + + buttonSprite.x = _i->backBackgroundSprite.x; + buttonSprite.y = _i->backBackgroundSprite.y; + + button_init(&_i->backButton, &buttonSprite); + + text_sprite_init + ( + &_i->themeText, + _i->g->renderer, + _i->g->fonts[FONT_TINY], + INFO_TEXT_COLOR, + ORIGIN_MIDDLE, + STRING_INFO_THEME, + INFO_THEME_WRAP + ); + + _i->themeText.x = INFO_THEME_TEXT_OFFSET_X; + _i->themeText.y = INFO_THEME_TEXT_OFFSET_Y; + + text_sprite_init + ( + &_i->wildcardAdminText, + _i->g->renderer, + _i->g->fonts[FONT_TINY], + INFO_TEXT_COLOR, + ORIGIN_MIDDLE, + STRING_INFO_WILDCARD_ADMIN, + INFO_WILDCARD_WRAP + ); + + _i->wildcardAdminText.x = INFO_WILDCARD_ADMIN_TEXT_OFFSET_X; + _i->wildcardAdminText.y = INFO_WILDCARD_ADMIN_TEXT_OFFSET_Y; + + text_sprite_init + ( + &_i->wildcardPatreonText, + _i->g->renderer, + _i->g->fonts[FONT_TINY], + INFO_TEXT_COLOR, + ORIGIN_MIDDLE, + STRING_INFO_WILDCARD_PATREON, + INFO_WILDCARD_WRAP + ); + + _i->wildcardPatreonText.x = INFO_WILDCARD_PATREON_TEXT_OFFSET_X; + _i->wildcardPatreonText.y = INFO_WILDCARD_PATREON_TEXT_OFFSET_Y; + + text_sprite_init + ( + &_i->wildcardCommunityText, + _i->g->renderer, + _i->g->fonts[FONT_TINY], + INFO_TEXT_COLOR, + ORIGIN_MIDDLE, + STRING_INFO_WILDCARD_COMMUNITY, + INFO_WILDCARD_WRAP + ); + + _i->wildcardCommunityText.x = INFO_WILDCARD_COMMUNITY_TEXT_OFFSET_X; + _i->wildcardCommunityText.y = INFO_WILDCARD_COMMUNITY_TEXT_OFFSET_Y; +} + +/* Frees info. */ +void +info_free(Info* _i) +{ + if (_i->licenseText.atlas.texture) + texture_free(_i->licenseText.atlas.texture); + + if (_i->backButton.sprite.atlas.texture) + texture_free(_i->backButton.sprite.atlas.texture); + + if (_i->themeText.atlas.texture) + texture_free(_i->themeText.atlas.texture); + + if (_i->wildcardAdminText.atlas.texture) + texture_free(_i->wildcardAdminText.atlas.texture); + + if (_i->wildcardPatreonText.atlas.texture) + texture_free(_i->wildcardPatreonText.atlas.texture); + + if (_i->wildcardCommunityText.atlas.texture) + texture_free(_i->wildcardCommunityText.atlas.texture); + + cursor_free(&_i->cursor); +} + +/* Updates info. */ +void +info_update(Info* _i) +{ + cursor_update(&_i->cursor, &_i->g->mouse); + + button_update(&_i->backButton, &_i->g->mouse); + + if (_i->backButton.state == BUTTON_STATE_PRESS) + { + _i->isBackPressed = TRUE; + + sound_play(_i->g->sounds[SOUND_MENU], -1); + } +} + +/* Draw info. */ +void +info_draw(Info* _i) +{ + SDL_Rect r; + + r.x = 0; + r.y = 0; + r.w = INFO_RECTANGLE_WIDTH; + r.h = INFO_RECTANGLE_HEIGHT; + + rectangle_draw(&r, _i->g->renderer, INFO_BACKGROUND_COLOR); + + sprite_draw(&_i->licenseText, _i->g->renderer); + + sprite_draw(&_i->themeSprite, _i->g->renderer); + sprite_draw(&_i->wildcardAdminSprite, _i->g->renderer); + sprite_draw(&_i->wildcardPatreonSprite, _i->g->renderer); + sprite_draw(&_i->wildcardCommunitySprite, _i->g->renderer); + + sprite_draw(&_i->themeText, _i->g->renderer); + sprite_draw(&_i->wildcardAdminText, _i->g->renderer); + sprite_draw(&_i->wildcardPatreonText, _i->g->renderer); + sprite_draw(&_i->wildcardCommunityText, _i->g->renderer); + + sprite_draw(&_i->backBackgroundSprite, _i->g->renderer); + button_draw(&_i->backButton, _i->g->renderer); + + cursor_draw(&_i->cursor, _i->g->renderer); +} diff --git a/src/game/info/info.h b/src/game/info/info.h new file mode 100755 index 0000000..e111195 --- /dev/null +++ b/src/game/info/info.h @@ -0,0 +1,52 @@ +/* + * DESCRIPTION: + * Header file for info.c. +*/ + +#pragma once + +#include "../GAME_STRINGS.h" +#include "../gui/button.h" +#include "../gui/cursor.h" + +#define INFO_LICENSE_TEXT_OFFSET_X 400 +#define INFO_BUTTON_OFFSET_X 750 +#define INFO_BUTTON_OFFSET_Y 50 +#define INFO_LICENSE_TEXT_OFFSET_X 400 +#define INFO_LICENSE_TEXT_OFFSET_Y 80 +#define INFO_BUTTON_TEXT_ROTATION -5 +#define INFO_BUTTON_BACKGROUND_WIDTH 96 +#define INFO_BUTTON_BACKGROUND_HEIGHT 96 +#define INFO_WILDCARD_WIDTH 175 +#define INFO_WILDCARD_HEIGHT 225 +#define INFO_THEME_WIDTH 225 +#define INFO_THEME_HEIGHT 60 +#define INFO_THEME_OFFSET_X 175 +#define INFO_THEME_OFFSET_Y 200 +#define INFO_WILDCARD_ADMIN_OFFSET_X 100 +#define INFO_WILDCARD_PATREON_OFFSET_X 475 +#define INFO_WILDCARD_COMMUNITY_OFFSET_X 475 +#define INFO_WILDCARD_ADMIN_OFFSET_Y 480 +#define INFO_WILDCARD_PATREON_OFFSET_Y 255 +#define INFO_WILDCARD_COMMUNITY_OFFSET_Y 480 +#define INFO_WILDCARD_ADMIN_TEXT_OFFSET_X 290 +#define INFO_WILDCARD_ADMIN_TEXT_OFFSET_Y 480 +#define INFO_WILDCARD_COMMUNITY_TEXT_OFFSET_X 675 +#define INFO_WILDCARD_COMMUNITY_TEXT_OFFSET_Y 480 +#define INFO_WILDCARD_PATREON_TEXT_OFFSET_X 675 +#define INFO_WILDCARD_PATREON_TEXT_OFFSET_Y 255 +#define INFO_THEME_TEXT_OFFSET_X 200 +#define INFO_THEME_TEXT_OFFSET_Y 300 +#define INFO_THEME_WRAP 350 +#define INFO_WILDCARD_WRAP 200 +#define INFO_LICENSE_TEXT_WRAP 500 +#define INFO_RECTANGLE_WIDTH 800 +#define INFO_RECTANGLE_HEIGHT 600 + +static const SDL_Color INFO_BACKGROUND_COLOR = {0, 0, 0, 255}; +static const SDL_Color INFO_TEXT_COLOR = {255, 255, 255, 255}; + +void info_draw(Info* _i); +void info_free(Info* _i); +void info_init(Info* _i, Game* _g); +void info_update(Info* _i); diff --git a/src/game/intro/intro.c b/src/game/intro/intro.c new file mode 100755 index 0000000..7b5f4f4 --- /dev/null +++ b/src/game/intro/intro.c @@ -0,0 +1,46 @@ +/* + * DESCRIPTION: + * Intro code. +*/ + +#include "intro.h" + +/* Initializes intro. */ +void +intro_init(Intro* _i, Game* _g) +{ + memset(_i, '\0', sizeof(Intro)); + + _i->g = _g; + + scene_init + ( + &_i->sceneHandler, + _i->g, + (Scene*)INTRO_SCENES, + INTRO_SCENE_COUNT + ); + + music_play(_i->g->music[MUSIC_INTRO], TRUE); +} + +/* Frees intro. */ +void +intro_free(Intro* _i) +{ + scene_free(&_i->sceneHandler, _i->g); +} + +/* Updates intro. */ +void +intro_update(Intro* _i) +{ + scene_update(&_i->sceneHandler, _i->g); +} + +/* Draws intro. */ +void +intro_draw(Intro* _i) +{ + scene_draw(&_i->sceneHandler, _i->g); +} diff --git a/src/game/intro/intro.h b/src/game/intro/intro.h new file mode 100755 index 0000000..3afacb2 --- /dev/null +++ b/src/game/intro/intro.h @@ -0,0 +1,40 @@ +/* + * DESCRIPTION: + * Header file for intro.c. +*/ + +#pragma once + +#include "../scene/scene.h" +#include "../GAME_STRINGS.h" + +#define INTRO_SCENE_COUNT 5 + +static const Scene INTRO_SCENES[INTRO_SCENE_COUNT] = +{ + { + .textureType = TEXTURE_INTRO_SCENE_ONE, + .text = STRING_INTRO_SCENE_ONE + }, + { + .textureType = TEXTURE_INTRO_SCENE_TWO, + .text = STRING_INTRO_SCENE_TWO + }, + { + .textureType = TEXTURE_INTRO_SCENE_THREE, + .text = STRING_INTRO_SCENE_THREE + }, + { + .textureType = TEXTURE_INTRO_SCENE_FOUR, + .text = STRING_INTRO_SCENE_FOUR + }, + { + .textureType = TEXTURE_INTRO_SCENE_FIVE, + .text = STRING_INTRO_SCENE_FIVE + } +}; + +void intro_update(Intro* _i); +void intro_init(Intro* _i, Game* _g); +void intro_draw(Intro* _i); +void intro_free(Intro* _i); diff --git a/src/game/play/collectible/berserk.c b/src/game/play/collectible/berserk.c new file mode 100755 index 0000000..24a51dd --- /dev/null +++ b/src/game/play/collectible/berserk.c @@ -0,0 +1,35 @@ +/* + * DESCRIPTION: + * Berserk powerup. +*/ + +#include "berserk.h" + +/* Initializes the berserk. */ +void +berserk_init(Collectible* _c, List* _l, Play* _p) +{ + sprite_init + ( + &_c->sprite, + _p->g->textures[TEXTURE_COLLECTIBLE_BERSERK], + ORIGIN_MIDDLE, + BERSERK_WIDTH, + BERSERK_HEIGHT + ); +} + +/* What happens when you collect the berserk? */ +void +berserk_collect(Collectible* _c, List* _l, Play* _p) +{ + _p->player.isPowerUp = TRUE; + + _p->player.isSnakeUpdate = TRUE; + + _p->player.powerUpTimer = BERSERK_PLAYER_TIMER_MAX; + + sound_play(_p->g->sounds[SOUND_BERSERK], -1); + + message_power_up_add(_c->sprite.x, _c->sprite.y, _p); +} diff --git a/src/game/play/collectible/berserk.h b/src/game/play/collectible/berserk.h new file mode 100755 index 0000000..6708294 --- /dev/null +++ b/src/game/play/collectible/berserk.h @@ -0,0 +1,13 @@ +/* + * DESCRIPTION: + * Header file for berserk.c. +*/ + +#include "../message/message.h" + +#define BERSERK_WIDTH 64 +#define BERSERK_HEIGHT 64 +#define BERSERK_PLAYER_TIMER_MAX 600 + +void berserk_init(Collectible* _c, List* _l, Play* _p); +void berserk_collect(Collectible* _c, List* _l, Play* _p); diff --git a/src/game/play/collectible/bullions.c b/src/game/play/collectible/bullions.c new file mode 100755 index 0000000..02e157d --- /dev/null +++ b/src/game/play/collectible/bullions.c @@ -0,0 +1,29 @@ +/* + * DESCRIPTION: + * Large money collectible. +*/ + +#include "bullions.h" + +/* Initializes the bullions. */ +void +bullions_init(Collectible* _c, List* _l, Play* _p) +{ + sprite_init + ( + &_c->sprite, + _p->g->textures[TEXTURE_COLLECTIBLE_BULLIONS], + ORIGIN_MIDDLE, + BULLIONS_WIDTH, + BULLIONS_HEIGHT + ); +} + +/* What happens when you collect the bullions? */ +void +bullions_collect(Collectible* _c, List* _l, Play* _p) +{ + player_cash_acquire(&_p->player, BULLIONS_CASH_VALUE, _p); + + sound_play(_p->g->sounds[SOUND_BULLIONS], -1); +} diff --git a/src/game/play/collectible/bullions.h b/src/game/play/collectible/bullions.h new file mode 100755 index 0000000..0701cb1 --- /dev/null +++ b/src/game/play/collectible/bullions.h @@ -0,0 +1,13 @@ +/* + * DESCRIPTION: + * Header file for bullions.c. +*/ + +#include "../player/player_cash.h" + +#define BULLIONS_WIDTH 64 +#define BULLIONS_HEIGHT 64 +#define BULLIONS_CASH_VALUE 500 + +void bullions_init(Collectible* _c, List* _l, Play* _p); +void bullions_collect(Collectible* _c, List* _l, Play* _p); diff --git a/src/game/play/collectible/collectible.c b/src/game/play/collectible/collectible.c new file mode 100755 index 0000000..f3f36cc --- /dev/null +++ b/src/game/play/collectible/collectible.c @@ -0,0 +1,158 @@ +/* + * DESCRIPTION: + * Collectible code. +*/ + +#include "collectible.h" + +/* Adds a new collectible. */ +Collectible* +collectible_add(List* _l, CollectibleType _c, f64 _x, f64 _y, Play* _p) +{ + Collectible collectible; + f64 angle; + + memset(&collectible, '\0', sizeof(Collectible)); + + collectible.type = _c; + + switch (collectible.type) + { + case COLLECTIBLE_DOLLARS: + dollars_init(&collectible, _l, _p); + break; + case COLLECTIBLE_SACK: + sack_init(&collectible, _l, _p); + break; + case COLLECTIBLE_BULLIONS: + bullions_init(&collectible, _l, _p); + break; + case COLLECTIBLE_MIRACLE_CURE: + miracle_cure_init(&collectible, _l, _p); + break; + case COLLECTIBLE_DYNAMITE: + dynamite_init(&collectible, _l, _p); + break; + case COLLECTIBLE_BERSERK: + berserk_init(&collectible, _l, _p); + break; + default: + break; + } + + + collectible.sprite.x = _x; + collectible.sprite.y = _y; + + collectible.shadow.x = collectible.sprite.x + COLLECTIBLE_SHADOW_OFFSET_Y; + collectible.shadow.y = collectible.sprite.y + COLLECTIBLE_SHADOW_OFFSET_Y; + + collectible.shadow.r = COLLECTIBLE_SHADOW_RADIUS; + + collectible.lifetime = COLLECTIBLE_LIFETIME; + + collectible.isActive = FALSE; + collectible.activeTimer = COLLECTIBLE_ACTIVE_TIMER_MAX; + + angle = random_f64_in_range_get(0, ROTATION_MAX_RAD); + + collectible.dX = cos(angle) * COLLECTIBLE_VELOCITY; + collectible.dY = sin(angle) * COLLECTIBLE_VELOCITY; + + sound_play(_p->g->sounds[SOUND_COLLECTIBLE], -1); + + return (Collectible*)list_append_new(_l, (void*)&collectible, sizeof(Collectible)); +} + +/* Removes a collectible. */ +void +collectible_remove(Collectible* _c, List* _l, Play* _p) +{ + list_node_from_data_remove(_l, _c, sizeof(Collectible)); +} + +/* A collectible is collected. */ +void +collectible_collect(Collectible* _c, List* _l, Play* _p) +{ + switch (_c->type) + { + case COLLECTIBLE_DOLLARS: + dollars_collect(_c, _l, _p); + break; + case COLLECTIBLE_SACK: + sack_collect(_c, _l, _p); + break; + case COLLECTIBLE_BULLIONS: + bullions_collect(_c, _l, _p); + break; + case COLLECTIBLE_MIRACLE_CURE: + miracle_cure_collect(_c, _l, _p); + break; + case COLLECTIBLE_DYNAMITE: + dynamite_collect(_c, _l, _p); + break; + case COLLECTIBLE_BERSERK: + berserk_collect(_c, _l, _p); + break; + default: + break; + } + + collectible_remove(_c, _l, _p); +} + +/* Updates a collectible. */ +void +collectible_update(Collectible* _c, List* _l, Play* _p) +{ + _c->sprite.x += _c->dX; + _c->sprite.y += _c->dY; + + _c->shadow.x = _c->sprite.x + COLLECTIBLE_SHADOW_OFFSET_X; + _c->shadow.y = _c->sprite.y + COLLECTIBLE_SHADOW_OFFSET_Y; + + _c->dX *= COLLECTIBLE_FRICTION; + _c->dY *= COLLECTIBLE_FRICTION; + + _c->lifetime--; + + if (!_c->isActive) + { + f64 progress; + + _c->activeTimer--; + + progress = (f64)_c->activeTimer / COLLECTIBLE_ACTIVE_TIMER_MAX; + + _c->sprite.color.a = SDL_ALPHA_OPAQUE * (1 - progress); + + if (_c->activeTimer <= 0) + { + _c->sprite.color.a = SDL_ALPHA_OPAQUE; + _c->activeTimer = 0; + _c->isActive = TRUE; + } + } + + if (_c->attachedSnake) + { + _c->sprite.x = _c->attachedSnake->sprite.x; + _c->sprite.y = _c->attachedSnake->sprite.y; + } + + if (circle_collide(&_c->shadow, &_p->player.shadow)) + collectible_collect(_c, _l, _p); + else + { + if (_c->lifetime <= 0) + collectible_remove(_c, _l, _p); + else if (_c->lifetime <= COLLECTIBLE_DISAPPEAR_THRESHOLD) + { + if (_c->lifetime % COLLECTIBLE_DISAPPEAR_MODULO == 0) + _c->sprite.color.a = 0; + else + _c->sprite.color.a = SDL_ALPHA_OPAQUE; + } + } +} diff --git a/src/game/play/collectible/collectible.h b/src/game/play/collectible/collectible.h new file mode 100755 index 0000000..8aaa00b --- /dev/null +++ b/src/game/play/collectible/collectible.h @@ -0,0 +1,28 @@ +/* + * DESCRIPTION: + * Header file for collectible.c. +*/ + +#pragma once + +#include "bullions.h" +#include "dollars.h" +#include "sack.h" +#include "berserk.h" +#include "dynamite.h" +#include "miracle_cure.h" + +#define COLLECTIBLE_ACTIVE_TIMER_MAX 30 +#define COLLECTIBLE_SHADOW_RADIUS 16 +#define COLLECTIBLE_SHADOW_OFFSET_X 0 +#define COLLECTIBLE_SHADOW_OFFSET_Y 16 +#define COLLECTIBLE_FRICTION 0.90 +#define COLLECTIBLE_VELOCITY 3 +#define COLLECTIBLE_DISAPPEAR_THRESHOLD 60 +#define COLLECTIBLE_DISAPPEAR_MODULO 5 +#define COLLECTIBLE_LIFETIME 500 + +Collectible* collectible_add(List* _l, CollectibleType _c, f64 _x, f64 _y, Play* _p); +void collectible_remove(Collectible* _c, List* _l, Play* _p); +void collectible_update(Collectible* _c, List* _l, Play* _p); +void collectible_collect(Collectible* _c, List* _l, Play* _p); diff --git a/src/game/play/collectible/collectibles.c b/src/game/play/collectible/collectibles.c new file mode 100755 index 0000000..b0625b7 --- /dev/null +++ b/src/game/play/collectible/collectibles.c @@ -0,0 +1,73 @@ +/* + * DESCRIPTION: + * Collectbles; the money/powerups that come out of enemies. +*/ + +#include "collectibles.h" + +/* Initializes collectibles. */ +void +collectibles_init(List* _l, Play* _p) +{ + list_init(_l); +} + +/* Initializes collectibles. */ +void +collectibles_free(List* _l, Play* _p) +{ + list_free(_l); +} + +/* Updates collectibles. */ +void +collectibles_update(List* _l, Play* _p) +{ + Collectible** collectibles; + s32 collectibleCount; + + collectibles = (Collectible**)list_data_get(_l); + collectibleCount = _l->count; + + for (s32 i = 0; i < collectibleCount; i++) + { + Collectible* c; + + c = collectibles[i]; + + collectible_update(c, _l, _p); + } + + free(collectibles); +} + +/* Draws all collectibles. */ +void +collectibles_draw(List* _l, Play* _p) +{ + Collectible** collectibles; + s32 collectibleCount; + + collectibles = (Collectible**)list_data_get(_l); + collectibleCount = _l->count; + + for (s32 i = 0; i < collectibleCount; i++) + { + Collectible* c; + + c = collectibles[i]; + + shadow_draw(&c->shadow, _p); + } + + for (s32 i = 0; i < collectibleCount; i++) + { + Collectible* c; + + c = collectibles[i]; + + sprite_draw(&c->sprite, _p->g->renderer); + } + + free(collectibles); +} diff --git a/src/game/play/collectible/collectibles.h b/src/game/play/collectible/collectibles.h new file mode 100755 index 0000000..ee8101f --- /dev/null +++ b/src/game/play/collectible/collectibles.h @@ -0,0 +1,16 @@ +/* + * DESCRIPTION: + * Header file for collectibles.c. +*/ + +#pragma once + +#include "collectible.h" +#include "../shadow/shadow.h" + +static const SDL_Color COLLECTIBLE_SHADOW_COLOR = {0, 0, 0, 64}; + +void collectibles_init(List* _l, Play* _p); +void collectibles_free(List* _l, Play* _p); +void collectibles_update(List* _l, Play* _p); +void collectibles_draw(List* _l, Play* _p); diff --git a/src/game/play/collectible/dollars.c b/src/game/play/collectible/dollars.c new file mode 100755 index 0000000..d0c207d --- /dev/null +++ b/src/game/play/collectible/dollars.c @@ -0,0 +1,29 @@ +/* + * DESCRIPTION: + * Small money collectible. +*/ + +#include "dollars.h" + +/* Initializes the dollars. */ +void +dollars_init(Collectible* _c, List* _l, Play* _p) +{ + sprite_init + ( + &_c->sprite, + _p->g->textures[TEXTURE_COLLECTIBLE_DOLLARS], + ORIGIN_MIDDLE, + DOLLARS_WIDTH, + DOLLARS_HEIGHT + ); +} + +/* What happens when you collect the dollars? */ +void +dollars_collect(Collectible* _c, List* _l, Play* _p) +{ + player_cash_acquire(&_p->player, DOLLARS_CASH_VALUE, _p); + + sound_play(_p->g->sounds[SOUND_DOLLARS], -1); +} diff --git a/src/game/play/collectible/dollars.h b/src/game/play/collectible/dollars.h new file mode 100755 index 0000000..030ea57 --- /dev/null +++ b/src/game/play/collectible/dollars.h @@ -0,0 +1,13 @@ +/* + * DESCRIPTION: + * Header file for dollars.c. +*/ + +#include "../player/player_cash.h" + +#define DOLLARS_WIDTH 32 +#define DOLLARS_HEIGHT 32 +#define DOLLARS_CASH_VALUE 100 + +void dollars_init(Collectible* _c, List* _l, Play* _p); +void dollars_collect(Collectible* _c, List* _l, Play* _p); diff --git a/src/game/play/collectible/dynamite.c b/src/game/play/collectible/dynamite.c new file mode 100755 index 0000000..88d6b0f --- /dev/null +++ b/src/game/play/collectible/dynamite.c @@ -0,0 +1,46 @@ +/* + * DESCRIPTION: + * Dynamite collectible; blows stuff up. +*/ + +#include "dynamite.h" + +/* Initializes the dynamite. */ +void +dynamite_init(Collectible* _c, List* _l, Play* _p) +{ + sprite_init + ( + &_c->sprite, + _p->g->textures[TEXTURE_COLLECTIBLE_DYNAMITE], + ORIGIN_MIDDLE, + DYNAMITE_WIDTH, + DYNAMITE_HEIGHT + ); +} + +/* What happens when you collect the dynamite? */ +void +dynamite_collect(Collectible* _c, List* _l, Play* _p) +{ + Enemy** enemies; + s32 enemyCount; + + enemies = (Enemy**)list_data_get(&_p->enemies); + enemyCount = _p->enemies.count; + + for (s32 i = 0; i < enemyCount; i++) + { + Enemy* e; + + e = enemies[i]; + + enemy_damage(e, DYNAMITE_DAMAGE, &_p->enemies, _p); + } + + free(enemies); + + message_dynamite_add(_c->sprite.x, _c->sprite.y, _p); + + sound_play(_p->g->sounds[SOUND_DYNAMITE], 3); +} diff --git a/src/game/play/collectible/dynamite.h b/src/game/play/collectible/dynamite.h new file mode 100755 index 0000000..280e363 --- /dev/null +++ b/src/game/play/collectible/dynamite.h @@ -0,0 +1,13 @@ +/* + * DESCRIPTION: + * Header file for dynamite.c. +*/ + +#include "../enemy/enemies.h" + +#define DYNAMITE_WIDTH 64 +#define DYNAMITE_HEIGHT 64 +#define DYNAMITE_DAMAGE 10 + +void dynamite_init(Collectible* _c, List* _l, Play* _p); +void dynamite_collect(Collectible* _c, List* _l, Play* _p); diff --git a/src/game/play/collectible/miracle_cure.c b/src/game/play/collectible/miracle_cure.c new file mode 100755 index 0000000..6f06e47 --- /dev/null +++ b/src/game/play/collectible/miracle_cure.c @@ -0,0 +1,44 @@ +/* + * DESCRIPTION: + * "Miracle Cure", heals you for one fatness. +*/ + +#include "miracle_cure.h" + +/* Initializes the miracle cure. */ +void +miracle_cure_init(Collectible* _c, List* _l, Play* _p) +{ + sprite_init + ( + &_c->sprite, + _p->g->textures[TEXTURE_COLLECTIBLE_MIRACLE_CURE], + ORIGIN_MIDDLE, + MIRACLE_CURE_WIDTH, + MIRACLE_CURE_HEIGHT + ); +} + +/* What happens when you collect the miracle cure? */ +void +miracle_cure_collect(Collectible* _c, List* _l, Play* _p) +{ + _p->player.fatness--; + + _p->player.isFatnessUpdate = TRUE; + + if (_p->player.fatness < 0) + { + _p->player.fatness = 0; + + player_cash_acquire(&_p->player, MIRACLE_CURE_CASH_VALUE, _p); + + sound_play(_p->g->sounds[SOUND_BULLIONS], -1); + } + else + { + message_miracle_cure_add(_c->sprite.x, _c->sprite.y, _p); + + sound_play(_p->g->sounds[SOUND_MIRACLE_CURE], -1); + } +} diff --git a/src/game/play/collectible/miracle_cure.h b/src/game/play/collectible/miracle_cure.h new file mode 100755 index 0000000..eac2a2b --- /dev/null +++ b/src/game/play/collectible/miracle_cure.h @@ -0,0 +1,13 @@ +/* + * DESCRIPTION: + * Header file for miracle_cure.c. +*/ + +#include "../player/player_cash.h" + +#define MIRACLE_CURE_WIDTH 64 +#define MIRACLE_CURE_HEIGHT 64 +#define MIRACLE_CURE_CASH_VALUE 1000 + +void miracle_cure_init(Collectible* _c, List* _l, Play* _p); +void miracle_cure_collect(Collectible* _c, List* _l, Play* _p); diff --git a/src/game/play/collectible/sack.c b/src/game/play/collectible/sack.c new file mode 100755 index 0000000..bf40375 --- /dev/null +++ b/src/game/play/collectible/sack.c @@ -0,0 +1,29 @@ +/* + * DESCRIPTION: + * Medium money collectible. +*/ + +#include "sack.h" + +/* Initializes the sack. */ +void +sack_init(Collectible* _c, List* _l, Play* _p) +{ + sprite_init + ( + &_c->sprite, + _p->g->textures[TEXTURE_COLLECTIBLE_SACK], + ORIGIN_MIDDLE, + SACK_WIDTH, + SACK_HEIGHT + ); +} + +/* What happens when you collect the sack? */ +void +sack_collect(Collectible* _c, List* _l, Play* _p) +{ + player_cash_acquire(&_p->player, SACK_CASH_VALUE, _p); + + sound_play(_p->g->sounds[SOUND_SACK], -1); +} diff --git a/src/game/play/collectible/sack.h b/src/game/play/collectible/sack.h new file mode 100755 index 0000000..0d477e1 --- /dev/null +++ b/src/game/play/collectible/sack.h @@ -0,0 +1,13 @@ +/* + * DESCRIPTION: + * Header file for sack.c. +*/ + +#include "../player/player_cash.h" + +#define SACK_WIDTH 64 +#define SACK_HEIGHT 64 +#define SACK_CASH_VALUE 250 + +void sack_init(Collectible* _c, List* _l, Play* _p); +void sack_collect(Collectible* _c, List* _l, Play* _p); diff --git a/src/game/play/enemy/chip.c b/src/game/play/enemy/chip.c new file mode 100755 index 0000000..cb75238 --- /dev/null +++ b/src/game/play/enemy/chip.c @@ -0,0 +1,116 @@ +/* + * DESCRIPTION: + * AI for the "Chip" enemy. +*/ + +#include "chip.h" + +static s32 chip_health_get(Enemy* _e, List* _l, Play* _p); +static f64 chip_velocity_get(Enemy* _e, List* _l, Play* _p); + +/* Gets the health of the Chip. */ +static s32 +chip_health_get(Enemy* _e, List* _l, Play* _p) +{ + s32 health; + + health = CHIP_HEALTH_BASE + ((_p->game - 1) * CHIP_HEALTH_GAME_MULTIPLIER); + + health = CEIL(health, CHIP_HEALTH_MAX); + + return health; +} + +/* Gets the velocity of the Chip. */ +static f64 +chip_velocity_get(Enemy* _e, List* _l, Play* _p) +{ + f64 velocity; + + velocity = CHIP_VELOCITY_BASE + ((_p->game - 1) * CHIP_VELOCITY_GAME_MULTIPLIER); + + velocity = CEIL(velocity, CHIP_VELOCITY_MAX); + + return velocity; +} + +/* Initializes Chip. */ +void +chip_init(Enemy* _e, List* _l, Play* _p) +{ + sprite_init + ( + &_e->sprite, + _p->g->textures[TEXTURE_ENEMY_CHIP], + ORIGIN_MIDDLE, + CHIP_WIDTH, + CHIP_HEIGHT + ); + + _e->shadow.r = CHIP_SHADOW_RADIUS; +} + +/* Sets the Chip. */ +void +chip_set(Enemy* _e, List* _l, f64 _x, f64 _y, Play* _p) +{ + f64 angle; + f64 velocity; + + _e->sprite.x = _x; + _e->sprite.y = _y; + + _e->shadow.x = _e->sprite.x + CHIP_SHADOW_OFFSET_X; + _e->shadow.y = _e->sprite.y + CHIP_SHADOW_OFFSET_Y; + + _e->sprite.rotation = random_f64_in_range_get(0, ROTATION_MAX_DEG); + + velocity = chip_velocity_get(_e, _l, _p); + + angle = math_atan + ( + _e->shadow.x, + _e->shadow.y, + _p->player.shadow.x, + _p->player.shadow.y + ); + + _e->dX = -cos(angle) * velocity; + _e->dY = -sin(angle) * velocity; + + _e->health = chip_health_get(_e, _l, _p); + _e->isActive = TRUE; + _e->lifetime = CHIP_LIFETIME; +} + +/* + * Updates Chip. + * Just flies towards the player, and will remove + * itself if enough time has passed. +*/ +void +chip_update(Enemy* _e, List* _l, Play* _p) +{ + SDL_Rect rect; + SDL_Rect windowRect; + + rect = sprite_rect_get(&_e->sprite); + windowRect = window_rect_get(_p->g->window); + + _e->lifetime--; + + _e->sprite.x += _e->dX; + _e->sprite.y += _e->dY; + + _e->sprite.rotation += CHIP_ROTATION_DELTA; + + _e->shadow.x = _e->sprite.x + CHIP_SHADOW_OFFSET_X; + _e->shadow.y = _e->sprite.y + CHIP_SHADOW_OFFSET_Y; + + if + ( + _e->lifetime <= 0 || + (_e->lifetime < CHIP_LIFETIME / 2 && !SDL_HasIntersection(&rect, &windowRect)) + ) + enemy_remove(_l, _e, _p); +} diff --git a/src/game/play/enemy/chip.h b/src/game/play/enemy/chip.h new file mode 100755 index 0000000..f57ddbd --- /dev/null +++ b/src/game/play/enemy/chip.h @@ -0,0 +1,27 @@ +/* + * DESCRIPTION: + * Header file for chip.c. +*/ + +#pragma once + +#include "../../GAME_COMMON.h" +#include "enemy.h" + +#define CHIP_HEALTH_BASE 1 +#define CHIP_HEALTH_GAME_MULTIPLIER 0 +#define CHIP_HEALTH_MAX 99 +#define CHIP_VELOCITY_GAME_MULTIPLIER 1 +#define CHIP_VELOCITY_MAX 10 +#define CHIP_WIDTH 16 +#define CHIP_HEIGHT 16 +#define CHIP_VELOCITY_BASE 3 +#define CHIP_LIFETIME 300 +#define CHIP_SHADOW_OFFSET_X 0 +#define CHIP_SHADOW_OFFSET_Y 32 +#define CHIP_SHADOW_RADIUS 8 +#define CHIP_ROTATION_DELTA 5 + +void chip_init(Enemy* _e, List* _l, Play* _p); +void chip_set(Enemy* _e, List* _l, f64 _x, f64 _y, Play* _p); +void chip_update(Enemy* _e, List* _l, Play* _p); diff --git a/src/game/play/enemy/chipper.c b/src/game/play/enemy/chipper.c new file mode 100755 index 0000000..88a208d --- /dev/null +++ b/src/game/play/enemy/chipper.c @@ -0,0 +1,209 @@ +/* + * DESCRIPTION: + * AI for the "Chipper" enemy. +*/ + +#include "chipper.h" + +static s32 chipper_health_get(Enemy* _e, List* _l, Play* _p); +static s32 chipper_attack_timer_max_get(Enemy* _e, List* _l, Play* _p); + +/* Gets the Chipper health. */ +static s32 +chipper_health_get(Enemy* _e, List* _l, Play* _p) +{ + s32 health; + + health = (s32)(CHIPPER_HEALTH_BASE + ((_p->game - 1) * CHIPPER_HEALTH_GAME_MULTIPLIER)); + + health = CEIL(health, CHIPPER_HEALTH_MAX); + + return health; +} + +/* Gets the Chipper attack timer max. */ +static s32 +chipper_attack_timer_max_get(Enemy* _e, List* _l, Play* _p) +{ + s32 attackTimerMax; + + attackTimerMax = (s32)(CHIPPER_ATTACK_TIMER_MAX_BASE - ((_p->game - 1) * CHIPPER_ATTACK_TIMER_MAX_GAME_MULTIPLIER)); + + attackTimerMax = FLOOR(attackTimerMax, CHIPPER_ATTACK_TIMER_MAX_MIN); + + return attackTimerMax; +} + +/* Initializes Chipper. */ +void +chipper_init(Enemy* _e, List* _l, Play* _p) +{ + Atlas atlas; + + atlas_init + ( + &atlas, + _p->g->textures[TEXTURE_ENEMY_CHIPPER], + CHIPPER_ROWS, + CHIPPER_COLUMNS, + CHIPPER_WIDTH, + CHIPPER_HEIGHT + ); + + sprite_atlas_init + ( + &_e->sprite, + &atlas, + ORIGIN_MIDDLE, + CHIPPER_WIDTH, + CHIPPER_HEIGHT + ); + + _e->shadow.r = CHIPPER_SHADOW_RADIUS; + + _e->sprite.frame = 2; +} + +/* Sets the Chipper. */ +void +chipper_set(Enemy* _e, List* _l, f64 _x, f64 _y, Play* _p) +{ + _e->sprite.x = _x; + _e->sprite.y = _y; + + _e->shadow.x = _e->sprite.x + CHIPPER_SHADOW_OFFSET_X; + _e->shadow.y = _e->sprite.y + CHIPPER_SHADOW_OFFSET_Y; + + _e->isActive = TRUE; + _e->isActing = FALSE; + _e->range = random_f64_in_range_get(CHIPPER_RANGE_MIN, CHIPPER_RANGE_MAX); + _e->attackTimer = chipper_attack_timer_max_get(_e, _l, _p); + _e->health = chipper_health_get(_e, _l, _p); +} + +/* + * Updates Chipper. + * Basically, it's going to slowly approach the player, + * get into range of them, + * and fire projectiles (chips) at the player. +*/ +void +chipper_update(Enemy* _e, List* _l, Play* _p) +{ + f64 distance; + f64 angle; + SDL_Rect rect; + SDL_Rect windowRect; + + rect = sprite_rect_get(&_e->sprite); + windowRect = window_rect_get(_p->g->window); + + distance = math_distance + ( + _e->shadow.x, + _e->shadow.y, + _p->player.shadow.x, + _p->player.shadow.y + ); + + angle = math_atan + ( + _e->shadow.x, + _e->shadow.y, + _p->player.shadow.x, + _p->player.shadow.y + ); + + if (_p->player.sprite.x < _e->sprite.x) + _e->sprite.flip = FLIP_HORIZONTAL; + else + _e->sprite.flip = FLIP_NONE; + + /* Is this Chipper within range, and is fully on screen? */ + if + ( + distance <= _e->range && + SDL_HasIntersection(&rect, &windowRect) + ) + { + if (!_e->isActing) + _e->animationTimer = 0; + _e->isActing = TRUE; + } + else + { + if (_e->isActing) + _e->animationTimer = 0; + _e->isActing = FALSE; + } + + _e->animationTimer--; + + if (_e->isActing) /* Waiting to shoot */ + { + _e->dX = 0; + _e->dY = 0; + + _e->sprite.frame = 1; + + _e->attackTimer--; + + if (_e->animationTimer > 0) + { + f64 progress; + + _e->sprite.frame = 3; + + progress = 1 - ((f64)_e->animationTimer / CHIPPER_ANIMATION_TIMER_MAX); + + _e->sprite.squash = SPRITE_SQUASH_DEFAULT + (cos(ROTATION_MAX_RAD * progress) * CHIPPER_SQUASH_MULTIPLIER); + _e->sprite.stretch = SPRITE_STRETCH_DEFAULT + (cos(ROTATION_MAX_RAD * progress) * CHIPPER_STRETCH_MULTIPLIER); + + if (_e->animationTimer <= 0) + { + _e->sprite.squash = SPRITE_SQUASH_DEFAULT; + _e->sprite.stretch = SPRITE_STRETCH_DEFAULT; + } + } + + if (_e->attackTimer <= 0) /* Just started shooting */ + { + Enemy* e; + + e = enemy_add(_l, ENEMY_CHIP, _p); + enemy_set(_l, e, _e->shadow.x, _e->shadow.y, _p); + + _e->attackTimer = chipper_attack_timer_max_get(_e, _l, _p); + + _e->animationTimer = CHIPPER_ANIMATION_TIMER_MAX; + + _e->sprite.frame = 3; + + _p->enemyMax++; + + sound_play(_p->g->sounds[SOUND_SPIT], -1); + } + } + else /* Walk */ + { + _e->dX = -cos(angle) * CHIPPER_VELOCITY; + _e->dY = -sin(angle) * CHIPPER_VELOCITY; + + if (_e->animationTimer % CHIPPER_ANIMATION_MODULO == 0) + { + _e->sprite.frame++; + + if (_e->sprite.frame > 2) + _e->sprite.frame = 0; + } + + if (_e->animationTimer <= 0) + _e->animationTimer = CHIPPER_ANIMATION_TIMER_MAX; + } + + _e->sprite.x += _e->dX; + _e->sprite.y += _e->dY; + + _e->shadow.x = _e->sprite.x + CHIPPER_SHADOW_OFFSET_X; + _e->shadow.y = _e->sprite.y + CHIPPER_SHADOW_OFFSET_Y; +} diff --git a/src/game/play/enemy/chipper.h b/src/game/play/enemy/chipper.h new file mode 100755 index 0000000..afaae8a --- /dev/null +++ b/src/game/play/enemy/chipper.h @@ -0,0 +1,34 @@ +/* + * DESCRIPTION: + * Header file for chipper.c. +*/ + +#pragma once + +#include "../../GAME_COMMON.h" +#include "enemy.h" + +#define CHIPPER_ANIMATION_MODULO 5 +#define CHIPPER_ANIMATION_TIMER_MAX 15 +#define CHIPPER_STRETCH_MULTIPLIER 0.05 +#define CHIPPER_SQUASH_MULTIPLIER 0.05 +#define CHIPPER_ATTACK_TIMER_MAX_BASE 120 +#define CHIPPER_ATTACK_TIMER_MAX_GAME_MULTIPLIER 1 +#define CHIPPER_ATTACK_TIMER_MAX_MIN 30 +#define CHIPPER_SHADOW_OFFSET_X 0 +#define CHIPPER_SHADOW_OFFSET_Y 16 +#define CHIPPER_SHADOW_RADIUS 24 +#define CHIPPER_HEALTH_BASE 5 +#define CHIPPER_HEALTH_GAME_MULTIPLIER 2 +#define CHIPPER_HEALTH_MAX 99 +#define CHIPPER_HEIGHT 48 +#define CHIPPER_ROWS 1 +#define CHIPPER_COLUMNS 4 +#define CHIPPER_RANGE_MAX 300 +#define CHIPPER_RANGE_MIN 200 +#define CHIPPER_VELOCITY 1 +#define CHIPPER_WIDTH 64 + +void chipper_init(Enemy* _e, List* _l, Play* _p); +void chipper_set(Enemy* _e, List* _l, f64 _x, f64 _y, Play* _p); +void chipper_update(Enemy* _e, List* _l, Play* _p); diff --git a/src/game/play/enemy/crumbler.c b/src/game/play/enemy/crumbler.c new file mode 100755 index 0000000..82e8f5a --- /dev/null +++ b/src/game/play/enemy/crumbler.c @@ -0,0 +1,125 @@ +/* + * DESCRIPTION: + * AI for the "Crumbler" enemy. +*/ + +#include "crumbler.h" + +static s32 crumbler_health_get(Enemy* _e, List* _l, Play* _p); +static s32 crumbler_attack_timer_max_get(Enemy* _e, List* _l, Play* _p); + +/* Gets the Crumbler health. */ +static s32 +crumbler_health_get(Enemy* _e, List* _l, Play* _p) +{ + s32 health; + + health = CRUMBLER_HEALTH_BASE + ((_p->game - 1) * CRUMBLER_HEALTH_GAME_MULTIPLIER); + + health = CEIL(health, CRUMBLER_HEALTH_MAX); + + return health; +} + +/* Gets the Crumbler attack timer max. */ +static s32 +crumbler_attack_timer_max_get(Enemy* _e, List* _l, Play* _p) +{ + s32 attackTimerMax; + + attackTimerMax = CRUMBLER_ATTACK_TIMER_MAX_BASE - ((_p->game - 1) * CRUMBLER_ATTACK_TIMER_MAX_GAME_MULTIPLIER); + + attackTimerMax = FLOOR(attackTimerMax, CRUMBLER_ATTACK_TIMER_MAX_MIN); + + return attackTimerMax; +} + +/* Initializes the Crumbler. */ +void +crumbler_init(Enemy* _e, List* _l, Play* _p) +{ + Atlas atlas; + + atlas_init + ( + &atlas, + _p->g->textures[TEXTURE_ENEMY_CRUMBLER], + CRUMBLER_ROWS, + CRUMBLER_COLUMNS, + CRUMBLER_WIDTH, + CRUMBLER_HEIGHT + ); + + sprite_atlas_init + ( + &_e->sprite, + &atlas, + ORIGIN_MIDDLE, + CRUMBLER_WIDTH, + CRUMBLER_HEIGHT + ); + + _e->shadow.r = 0; + _e->sprite.frame = 1; +} + +/* Sets the Crumbler. */ +void +crumbler_set(Enemy* _e, List* _l, f64 _x, f64 _y, Play* _p) +{ + _e->shadow.x = _x + CRUMBLER_SHADOW_OFFSET_X; + _e->shadow.y = _y + CRUMBLER_SHADOW_OFFSET_Y; + + _e->sprite.x = _e->shadow.x; + _e->sprite.y = _e->shadow.y - (CRUMBLER_ATTACK_OFFSET_Y + CRUMBLER_SHADOW_OFFSET_Y); + + _e->isActive = FALSE; + _e->isActing = TRUE; + _e->attackTimer = crumbler_attack_timer_max_get(_e, _l, _p); + _e->health = crumbler_health_get(_e, _l, _p); +} + +/* + * Updates Crumbler. + * Falls into the arena and then remains stationary. +*/ +void +crumbler_update(Enemy* _e, List* _l, Play* _p) +{ + if (_e->isActing) + { + f64 progress; + + _e->attackTimer--; + + progress = 1 - ((f64)_e->attackTimer / crumbler_attack_timer_max_get(_e, _l, _p)); + + _e->shadow.r = CRUMBLER_SHADOW_RADIUS * progress; + + _e->sprite.y = _e->shadow.y - CRUMBLER_SHADOW_OFFSET_Y - (CRUMBLER_ATTACK_OFFSET_Y * (1 - progress)); + + if (_e->attackTimer <= 0) + { + _e->isActing = FALSE; + _e->isActive = TRUE; + _e->shadow.r = CRUMBLER_SHADOW_RADIUS; + _e->sprite.frame = 0; + + sound_play(_p->g->sounds[SOUND_RUMBLE], -1); + } + } + else + { + f64 progress; + + _e->animationTimer--; + + progress = 1 - ((f64)_e->animationTimer / CRUMBLER_ANIMATION_TIMER_MAX); + + _e->sprite.squash = (SPRITE_SQUASH_DEFAULT + cos((ROTATION_MAX_RAD * progress)) * CRUMBLER_SQUASH_MULTIPLIER); + _e->sprite.stretch = (SPRITE_STRETCH_DEFAULT + cos((ROTATION_MAX_RAD * progress)) * CRUMBLER_STRETCH_MULTIPLIER); + + if (_e->animationTimer <= 0) + _e->animationTimer = CRUMBLER_ANIMATION_TIMER_MAX; + } +} diff --git a/src/game/play/enemy/crumbler.h b/src/game/play/enemy/crumbler.h new file mode 100755 index 0000000..b1df469 --- /dev/null +++ b/src/game/play/enemy/crumbler.h @@ -0,0 +1,31 @@ +/* + * DESCRIPTION: + * Header file for crumbler.c. +*/ + +#pragma once + +#include "../../GAME_COMMON.h" +#include "enemy.h" + +#define CRUMBLER_ANIMATION_TIMER_MAX 60 +#define CRUMBLER_ATTACK_TIMER_MAX_BASE 120 +#define CRUMBLER_ATTACK_TIMER_MAX_MIN 60 +#define CRUMBLER_SHADOW_OFFSET_X 0 +#define CRUMBLER_SHADOW_OFFSET_Y 16 +#define CRUMBLER_SHADOW_RADIUS 48 +#define CRUMBLER_HEALTH_BASE 10 +#define CRUMBLER_HEALTH_MAX 99 +#define CRUMBLER_HEIGHT 96 +#define CRUMBLER_ATTACK_OFFSET_Y 1000 +#define CRUMBLER_SQUASH_MULTIPLIER 0.015 +#define CRUMBLER_STRETCH_MULTIPLIER 0.025 +#define CRUMBLER_WIDTH 128 +#define CRUMBLER_HEALTH_GAME_MULTIPLIER 2 +#define CRUMBLER_ATTACK_TIMER_MAX_GAME_MULTIPLIER 5 +#define CRUMBLER_ROWS 1 +#define CRUMBLER_COLUMNS 2 + +void crumbler_init(Enemy* _e, List* _l, Play* _p); +void crumbler_set(Enemy* _e, List* _l, f64 _x, f64 _y, Play* _p); +void crumbler_update(Enemy* _e, List* _l, Play* _p); diff --git a/src/game/play/enemy/cupper.c b/src/game/play/enemy/cupper.c new file mode 100755 index 0000000..5dd1a53 --- /dev/null +++ b/src/game/play/enemy/cupper.c @@ -0,0 +1,151 @@ +/* + * DESCRIPTION: + * AI for the "Cupper" enemy. +*/ + +#include "cupper.h" + +static s32 cupper_health_get(Enemy* _e, List* _l, Play* _p); +static s32 cupper_attack_timer_max_get(Enemy* _e, List* _l, Play* _p); + +/* Returns health of a Cupper. */ +static s32 +cupper_health_get(Enemy* _e, List* _l, Play* _p) +{ + s32 health; + + health = CUPPER_HEALTH_BASE + ((_p->game - 1) * CUPPER_HEALTH_GAME_MULTIPLIER); + + health = CEIL(health, CUPPER_HEALTH_MAX); + + return health; +} + +/* Returns the attack timer max (period in which an attack is performed) of a Cupper. */ +static s32 +cupper_attack_timer_max_get(Enemy* _e, List* _l, Play* _p) +{ + s32 attackTimerMax; + + attackTimerMax = CUPPER_ATTACK_TIMER_MAX_BASE - (_p->game * CUPPER_ATTACK_TIMER_MAX_GAME_MULTIPLIER); + + attackTimerMax = FLOOR(attackTimerMax, CUPPER_ATTACK_TIMER_MAX_MIN); + + return attackTimerMax; +} + +/* Initializes the Cupper. */ +void +cupper_init(Enemy* _e, List* _l, Play* _p) +{ + Atlas atlas; + + atlas_init + ( + &atlas, + _p->g->textures[TEXTURE_ENEMY_CUPPER], + CUPPER_ROWS, + CUPPER_COLUMNS, + CUPPER_WIDTH, + CUPPER_HEIGHT + ); + + sprite_atlas_init + ( + &_e->sprite, + &atlas, + ORIGIN_MIDDLE, + CUPPER_WIDTH, + CUPPER_HEIGHT + ); + + _e->shadow.r = CUPPER_SHADOW_RADIUS; +} + +/* Sets the Cupper. */ +void +cupper_set(Enemy* _e, List* _l, f64 _x, f64 _y, Play* _p) +{ + _e->sprite.x = _x; + _e->sprite.y = _y; + + _e->shadow.x = _e->sprite.x + CUPPER_SHADOW_OFFSET_X; + _e->shadow.y = _e->sprite.y + CUPPER_SHADOW_OFFSET_Y; + + _e->isActive = TRUE; + + _e->health = cupper_health_get(_e, _l, _p); + _e->attackTimer = cupper_attack_timer_max_get(_e, _l, _p); +} + +/* + * Updates Cupper. + * Slowly hops towards the player. +*/ +void +cupper_update(Enemy* _e, List* _l, Play* _p) +{ + f64 angle; + f64 progress; + + _e->attackTimer--; + _e->animationTimer--; + + progress = 1 - ((f64)_e->animationTimer / CUPPER_ANIMATION_TIMER_MAX); + + if (_e->animationTimer <= 0) + _e->animationTimer = CUPPER_ANIMATION_TIMER_MAX; + + if (_e->isActing) + { + if (_e->attackTimer <= 0) + { + _e->dX = 0; + _e->dY = 0; + _e->isActing = FALSE; + _e->attackTimer = cupper_attack_timer_max_get(_e, _l, _p); + } + } + else + { + if (_e->attackTimer <= 0) + { + f64 angle; + + angle = math_atan + ( + _e->shadow.x, + _e->shadow.y, + _p->player.shadow.x, + _p->player.shadow.y + ); + + _e->dX = -cos(angle) * CUPPER_VELOCITY; + _e->dY = -sin(angle) * CUPPER_VELOCITY; + + _e->isActing = TRUE; + + _e->attackTimer = CUPPER_JUMP_TIMER_MAX_BASE; + + if (_p->player.sprite.x < _e->sprite.x) + _e->sprite.flip = FLIP_HORIZONTAL; + else + _e->sprite.flip = FLIP_NONE; + + _e->sprite.frame = 0; + } + else if (_e->attackTimer <= CUPPER_ATTACK_TIMER_THRESHOLD) + _e->sprite.frame = 1; + else + { + _e->sprite.squash = (SPRITE_SQUASH_DEFAULT + cos((ROTATION_MAX_RAD * progress)) * CUPPER_SQUASH_MULTIPLIER); + _e->sprite.stretch = (SPRITE_STRETCH_DEFAULT + cos((ROTATION_MAX_RAD * progress)) * CUPPER_STRETCH_MULTIPLIER); + } + } + + _e->sprite.x += _e->dX; + _e->sprite.y += _e->dY; + + _e->shadow.x = _e->sprite.x + CUPPER_SHADOW_OFFSET_X; + _e->shadow.y = _e->sprite.y + CUPPER_SHADOW_OFFSET_Y; +} diff --git a/src/game/play/enemy/cupper.h b/src/game/play/enemy/cupper.h new file mode 100755 index 0000000..6882f05 --- /dev/null +++ b/src/game/play/enemy/cupper.h @@ -0,0 +1,33 @@ +/* + * DESCRIPTION: + * Header file for cupper.c. +*/ + +#pragma once + +#include "../../GAME_COMMON.h" +#include "enemy.h" + +#define CUPPER_ANIMATION_TIMER_MAX 30 +#define CUPPER_ATTACK_TIMER_MAX_BASE 120 +#define CUPPER_ATTACK_TIMER_MAX_GAME_MULTIPLIER 10 +#define CUPPER_ATTACK_TIMER_MAX_MIN 30 +#define CUPPER_ATTACK_TIMER_THRESHOLD 30 +#define CUPPER_SHADOW_OFFSET_X 0 +#define CUPPER_SHADOW_OFFSET_Y 16 +#define CUPPER_SHADOW_RADIUS 24 +#define CUPPER_COLUMNS 2 +#define CUPPER_HEALTH_BASE 3 +#define CUPPER_HEALTH_GAME_MULTIPLIER 2 +#define CUPPER_HEALTH_MAX 99 +#define CUPPER_HEIGHT 48 +#define CUPPER_JUMP_TIMER_MAX_BASE 30 +#define CUPPER_ROWS 1 +#define CUPPER_SQUASH_MULTIPLIER 0.05 +#define CUPPER_STRETCH_MULTIPLIER 0.05 +#define CUPPER_VELOCITY 3 +#define CUPPER_WIDTH 48 + +void cupper_init(Enemy* _e, List* _l, Play* _p); +void cupper_set(Enemy* _e, List* _l, f64 _x, f64 _y, Play* _p); +void cupper_update(Enemy* _e, List* _l, Play* _p); diff --git a/src/game/play/enemy/enemies.c b/src/game/play/enemy/enemies.c new file mode 100755 index 0000000..fddeae7 --- /dev/null +++ b/src/game/play/enemy/enemies.c @@ -0,0 +1,95 @@ +/* + * DESCRIPTION: + * Game enemies. +*/ + +#include "enemy.h" + +/* Initializes enemy list. */ +void +enemies_init(List* _l, Play* _p) +{ + list_init(_l); +} + +/* Frees enemy list. */ +void +enemies_free(List* _l, Play* _p) +{ + list_free(_l); +} + +/* Brutally murders all enemies. */ +void +enemies_defeat(List* _l, Play* _p) +{ + Enemy** enemies; + s32 count; + + enemies = (Enemy**)list_data_get(_l); + count = _l->count; + + for (s32 i = 0; i < count; i++) + { + Enemy* e; + + e = enemies[i]; + + enemy_defeat(e, _l, _p); + } + + free(enemies); +} + +/* Updates enemies. */ +void +enemies_update(List* _l, Play* _p) +{ + Enemy** enemies; + s32 count; + + enemies = (Enemy**)list_data_get(_l); + count = _l->count; + + for (s32 i = 0; i < count; i++) + { + Enemy* e; + + e = enemies[i]; + + enemy_update(e, _l, _p); + } + + free(enemies); +} + +/* Draws enemies. */ +void +enemies_draw(List* _l, Play* _p) +{ + Enemy** enemies; + s32 count; + + enemies = (Enemy**)list_data_get(_l); + count = _l->count; + + for (s32 i = 0; i < count; i++) + { + Enemy* e; + + e = enemies[i]; + + shadow_draw(&e->shadow, _p); + } + + for (s32 i = 0; i < count; i++) + { + Enemy* e; + + e = enemies[i]; + + sprite_draw(&e->sprite, _p->g->renderer); + } + + free(enemies); +} diff --git a/src/game/play/enemy/enemies.h b/src/game/play/enemy/enemies.h new file mode 100755 index 0000000..b477937 --- /dev/null +++ b/src/game/play/enemy/enemies.h @@ -0,0 +1,15 @@ +/* + * DESCRIPTION: + * Header file for enemy.h +*/ + +#pragma once + +#include "enemy.h" +#include "../shadow/shadow.h" + +void enemies_init(List* _l, Play* _p); +void enemies_free(List* _l, Play* _p); +void enemies_update(List* _l, Play* _p); +void enemies_defeat(List* _l, Play* _p); +void enemies_draw(List* _l, Play* _p); diff --git a/src/game/play/enemy/enemy.c b/src/game/play/enemy/enemy.c new file mode 100755 index 0000000..17388ad --- /dev/null +++ b/src/game/play/enemy/enemy.c @@ -0,0 +1,245 @@ +/* + * DESCRIPTION: + * Game enemies. +*/ + +#include "enemy.h" + +static CollectibleType enemy_collectible_type_get(Enemy* _e, List* _l, Play* _p); +static f64 enemy_collectible_drop_chance_get(Enemy* _e, List* _l, Play* _p); +static void enemy_collectible_drop(Enemy* _e, List* _l, Play* _p); + +/* The enemy has dropped a collectible; what type is it? */ +static CollectibleType +enemy_collectible_type_get(Enemy* _e, List* _l, Play* _p) +{ + f64 random; + CollectibleType type; + + random = random_f64_get(); + + if (random - ENEMY_COLLECTIBLE_POWERUP_DROP_CHANCE < 0) + type = (CollectibleType)random_s32_in_range_get(COLLECTIBLE_MIRACLE_CURE, COLLECTIBLE_BERSERK); + else if (random - ENEMY_COLLECTIBLE_BULLIONS_DROP_CHANCE < 0) + type = COLLECTIBLE_BULLIONS; + else if (random - ENEMY_COLLECTIBLE_SACK_DROP_CHANCE < 0) + type = COLLECTIBLE_SACK; + else + type = COLLECTIBLE_DOLLARS; + + return type; +} + +/* % of enemy dropping a collectible */ +static f64 +enemy_collectible_drop_chance_get(Enemy* _e, List* _l, Play* _p) +{ + f64 chance; + + chance = ENEMY_COLLECTIBLE_DROP_CHANCE_BASE + ((_p->game - 1) * ENEMY_COLLECTIBLE_DROP_CHANCE_GAME_MULTIPLIER); + + switch (_e->type) + { + case ENEMY_CHIPPER: + chance += ENEMY_CHIPPER_DROP_CHANCE_BONUS; + break; + case ENEMY_CRUMBLER: + chance += ENEMY_CRUMBLER_DROP_CHANCE_BONUS; + break; + case ENEMY_NONE: + case ENEMY_CUPPER: + default: + break; + } + + chance = CEIL(chance, ENEMY_COLLECTIBLE_DROP_CHANCE_MAX); + + return chance; +} + +/* Will the enemy drop a collectible? */ +static void +enemy_collectible_drop(Enemy* _e, List* _l, Play* _p) +{ + f64 chanceMax; + f64 chance; + + chanceMax = enemy_collectible_drop_chance_get(_e, _l, _p); + + chance = random_f64_get(); + + if (chance <= chanceMax) + { + CollectibleType type; + + type = enemy_collectible_type_get(_e, _l, _p); + + collectible_add(&_p->collectibles, type, _e->shadow.x, _e->shadow.y, _p); + } +} + +/* Adds an enemy to the game. */ +Enemy* +enemy_add(List* _l, EnemyType _t, Play* _p) +{ + Enemy enemy; + + memset(&enemy, '\0', sizeof(Enemy)); + + enemy.type = _t; + + list_init(&enemy.snakesHit); + list_init(&enemy.returnSnakesHit); + + switch (enemy.type) + { + case ENEMY_CUPPER: + cupper_init(&enemy, _l, _p); + break; + case ENEMY_CHIPPER: + chipper_init(&enemy, _l, _p); + break; + case ENEMY_CHIP: + chip_init(&enemy, _l, _p); + break; + case ENEMY_CRUMBLER: + crumbler_init(&enemy, _l, _p); + break; + case ENEMY_NONE: + default: + break; + } + + _p->isBountyUpdate = TRUE; + + return (Enemy*)list_append_new(_l, (void*)&enemy, sizeof(Enemy)); +} + +/* Removes an enemy from the game. */ +void +enemy_remove(List* _l, Enemy* _e, Play* _p) +{ + list_free(&_e->snakesHit); + list_free(&_e->returnSnakesHit); + + _p->isBountyUpdate = TRUE; + _p->enemyMax--; + + list_node_from_data_remove(_l, _e, sizeof(Enemy)); +} + +/* Positions the enemy and prepares it for battle. */ +void +enemy_set(List* _l, Enemy* _e, f64 _x, f64 _y, Play* _p) +{ + switch (_e->type) + { + case ENEMY_CUPPER: + cupper_set(_e, _l, _x, _y, _p); + break; + case ENEMY_CHIPPER: + chipper_set(_e, _l, _x, _y, _p); + break; + case ENEMY_CHIP: + chip_set(_e, _l, _x, _y, _p); + break; + case ENEMY_CRUMBLER: + crumbler_set(_e, _l, _x, _y, _p); + break; + case ENEMY_NONE: + default: + break; + } +} + +/* The enemy takes the specified amount of damage. */ +void +enemy_damage(Enemy* _e, s32 _d, List* _l, Play* _p) +{ + _e->health -= _d; + _e->hitTimerMax += _d * ENEMY_HIT_TIMER_MAX_MULTIPLIER; + _e->hitTimer += _d * ENEMY_HIT_TIMER_MAX_MULTIPLIER; + + message_damage_add(_e->sprite.x, _e->sprite.y, _d, _p); + sound_play(_p->g->sounds[SOUND_ENEMY_HURT], 0); + + if (_e->health <= 0) + { + _e->health = 0; + enemy_defeat(_e, _l, _p); + } +} + +/* The enemy is defeated.. */ +void +enemy_defeat(Enemy* _e, List* _l, Play* _p) +{ + if (_e->type != ENEMY_CHIP) + enemy_collectible_drop(_e, _l, _p); + + switch (_e->type) + { + case ENEMY_CUPPER: + sound_play(_p->g->sounds[SOUND_CUPPER_KILL], -1); + break; + case ENEMY_CHIPPER: + sound_play(_p->g->sounds[SOUND_CHIPPER_KILL], -1); + break; + case ENEMY_CRUMBLER: + sound_play(_p->g->sounds[SOUND_CRUMBLER_KILL], -1); + break; + case ENEMY_CHIP: + sound_play(_p->g->sounds[SOUND_CHIP_KILL], -1); + break; + default: + break; + } + + _p->player.waveEnemiesKilled++; + _p->player.enemiesKilled++; + + enemy_remove(_l, _e, _p); +} + +/* Updates enemy. */ +void +enemy_update(Enemy* _e, List* _l, Play* _p) +{ + switch (_e->type) + { + case ENEMY_CUPPER: + cupper_update(_e, _l, _p); + break; + case ENEMY_CHIPPER: + chipper_update(_e, _l, _p); + break; + case ENEMY_CHIP: + chip_update(_e, _l, _p); + break; + case ENEMY_CRUMBLER: + crumbler_update(_e, _l, _p); + break; + default: + break; + } + + if (_e->hitTimer > 0) + { + f64 progress; + + progress = 1 - ((f64)_e->hitTimer / _e->hitTimerMax); + + _e->sprite.color.r = SDL_ALPHA_OPAQUE * progress; + _e->sprite.color.g = 0; + _e->sprite.color.b = 0; + + _e->hitTimer--; + + if (_e->hitTimer <= 0) + { + _e->hitTimer = 0; + _e->hitTimerMax = 0; + _e->sprite.color = SPRITE_COLOR_DEFAULT; + } + } +} diff --git a/src/game/play/enemy/enemy.h b/src/game/play/enemy/enemy.h new file mode 100755 index 0000000..2034a47 --- /dev/null +++ b/src/game/play/enemy/enemy.h @@ -0,0 +1,32 @@ +/* + * DESCRIPTION: + * Header file for enemy.h +*/ + +#pragma once + +#include "../collectible/collectible.h" +#include "chip.h" +#include "chipper.h" +#include "crumbler.h" +#include "cupper.h" +#include "../message/message.h" + +#define ENEMY_COLLECTIBLE_DROP_CHANCE_BASE 0.33 +#define ENEMY_CHIPPER_DROP_CHANCE_BONUS 0.25 +#define ENEMY_CRUMBLER_DROP_CHANCE_BONUS 0.50 +#define ENEMY_COLLECTIBLE_DROP_CHANCE_GAME_MULTIPLIER 0.1 +#define ENEMY_COLLECTIBLE_DROP_CHANCE_MAX 1.0 +#define ENEMY_HIT_TIMER_MAX_MULTIPLIER 5 +#define ENEMY_COLLECTIBLE_BULLIONS_DROP_CHANCE 0.10 +#define ENEMY_COLLECTIBLE_SACK_DROP_CHANCE 0.25 +#define ENEMY_COLLECTIBLE_POWERUP_DROP_CHANCE 0.05 + +static const SDL_Color ENEMY_SHADOW_COLOR = {0, 0, 0, 64}; + +Enemy* enemy_add(List* _l, EnemyType _t, Play* _p); +void enemy_set(List* _l, Enemy* _e, f64 _x, f64 _y, Play* _p); +void enemy_update(Enemy* _e, List* _l, Play* _p); +void enemy_damage(Enemy* _e, s32 _d, List* _l, Play* _p); +void enemy_defeat(Enemy* _e, List* _l, Play* _p); +void enemy_remove(List* _l, Enemy* _e, Play* _p); diff --git a/src/game/play/gui/gui.c b/src/game/play/gui/gui.c new file mode 100755 index 0000000..eb023fa --- /dev/null +++ b/src/game/play/gui/gui.c @@ -0,0 +1,62 @@ +/* + * DESCRIPTION: + * Gameplay GUI. +*/ + +#include "gui.h" + +/* Initializes GUI. */ +void +gui_init(GUI* _g, Play* _p) +{ + gui_cash_init(_g, _p); + gui_wave_init(_g, _p); + gui_bounty_init(_g, _p); + gui_upgrade_init(_g, _p); + gui_ready_init(_g, _p); + gui_snake_init(_g, _p); + gui_redirect_init(_g, _p); + cursor_init(&_g->cursor, &_p->g->mouse, _p->g->textures[TEXTURE_GUI_CURSOR]); +} + +/* Frees GUI. */ +void +gui_free(GUI* _g, Play* _p) +{ + gui_cash_free(_g, _p); + gui_snake_free(_g, _p); + gui_bounty_free(_g, _p); + gui_redirect_free(_g, _p); + gui_ready_free(_g, _p); + gui_wave_free(_g, _p); + gui_upgrade_free(_g, _p); + cursor_free(&_g->cursor); +} + +/* Updates GUI. */ +void +gui_update(GUI* _g, Play* _p) +{ + gui_cash_update(_g, _p); + gui_wave_update(_g, _p); + gui_bounty_update(_g, _p); + gui_upgrade_update(_g, _p); + gui_ready_update(_g, _p); + gui_snake_update(_g, _p); + gui_redirect_update(_g, _p); + cursor_update(&_g->cursor, &_p->g->mouse); +} + +/* Draws GUI. */ +void +gui_draw(GUI* _g, Play* _p) +{ + gui_cash_draw(_g, _p); + gui_wave_draw(_g, _p); + gui_bounty_draw(_g, _p); + gui_upgrade_draw(_g, _p); + gui_ready_draw(_g, _p); + gui_snake_draw(_g, _p); + gui_redirect_draw(_g, _p); + cursor_draw(&_g->cursor, _p->g->renderer); +} diff --git a/src/game/play/gui/gui.h b/src/game/play/gui/gui.h new file mode 100755 index 0000000..8f17ebc --- /dev/null +++ b/src/game/play/gui/gui.h @@ -0,0 +1,21 @@ +/* + * DESCRIPTION: + * Header file for gui.c. +*/ + +#pragma once + +#include "../../gui/cursor.h" + +#include "gui_bounty.h" +#include "gui_cash.h" +#include "gui_snake.h" +#include "gui_redirect.h" +#include "gui_ready.h" +#include "gui_wave.h" +#include "gui_upgrade.h" + +void gui_init(GUI* _g, Play* _p); +void gui_free(GUI* _g, Play* _p); +void gui_draw(GUI* _g, Play* _p); +void gui_update(GUI* _g, Play* _p); diff --git a/src/game/play/gui/gui_bounty.c b/src/game/play/gui/gui_bounty.c new file mode 100755 index 0000000..8391759 --- /dev/null +++ b/src/game/play/gui/gui_bounty.c @@ -0,0 +1,116 @@ +/* + * DESCRIPTION: + * Displays a bounty icon and the current bountys available. +*/ + +#include "gui_bounty.h" + +/* Sets the gui bounty text. */ +static void +gui_bounty_text_set(GUI* _g, Play* _p) +{ + char* s; + + s = malloc(GUI_BOUNTY_TEXT_MAX); + + if (_g->bountyText.atlas.texture) + texture_free(_g->bountyText.atlas.texture); + + if (_p->player.isBeingDefeated) + { + snprintf + ( + s, + GUI_BOUNTY_TEXT_MAX, + "%s", + STRING_PLAY_GUI_BOUNTY_DEAD + ); + } + else if (_p->isBetweenWaves) + { + snprintf + ( + s, + GUI_BOUNTY_TEXT_MAX, + "%s", + STRING_PLAY_GUI_BOUNTY_NONE + ); + } + else + { + snprintf + ( + s, + GUI_BOUNTY_TEXT_MAX, + "%i", + _p->enemyMax + ); + } + + text_sprite_init + ( + &_g->bountyText, + _p->g->renderer, + _p->g->fonts[FONT_BIG], + GUI_BOUNTY_TEXT_COLOR, + ORIGIN_MIDDLE, + s, + 0 + ); + + _g->bountyText.x = _g->bountyBackgroundSprite.x; + _g->bountyText.y = _g->bountyBackgroundSprite.y; + + _g->bountyText.rotation = GUI_BOUNTY_TEXT_ROTATION; + _g->bountyText.color.a = GUI_BOUNTY_ALPHA; + + free(s); +} + +/* Initializes bounty GUI. */ +void +gui_bounty_init(GUI* _g, Play* _p) +{ + sprite_init + ( + &_g->bountyBackgroundSprite, + _p->g->textures[TEXTURE_GUI_SIGN_SMALL], + ORIGIN_MIDDLE, + GUI_BOUNTY_BACKGROUND_WIDTH, + GUI_BOUNTY_BACKGROUND_HEIGHT + ); + + _g->bountyBackgroundSprite.x = GUI_BOUNTY_SPRITE_OFFSET_X; + _g->bountyBackgroundSprite.y = GUI_BOUNTY_SPRITE_OFFSET_Y; + + _g->bountyBackgroundSprite.color.a = GUI_BOUNTY_ALPHA; + + gui_bounty_text_set(_g, _p); +} + +/* Frees bounty GUI. */ +void +gui_bounty_free(GUI* _g, Play* _p) +{ + if (_g->bountyText.atlas.texture) + texture_free(_g->bountyText.atlas.texture); +} + +/* Updates bounty GUI. */ +void +gui_bounty_update(GUI* _g, Play* _p) +{ + if (_p->isBountyUpdate) + { + gui_bounty_text_set(_g, _p); + _p->isBountyUpdate = FALSE; + } +} + +/* Draws bounty GUI. */ +void +gui_bounty_draw(GUI* _g, Play* _p) +{ + sprite_draw(&_g->bountyBackgroundSprite, _p->g->renderer); + sprite_draw(&_g->bountyText, _p->g->renderer); +} diff --git a/src/game/play/gui/gui_bounty.h b/src/game/play/gui/gui_bounty.h new file mode 100755 index 0000000..2420804 --- /dev/null +++ b/src/game/play/gui/gui_bounty.h @@ -0,0 +1,25 @@ +/* + * DESCRIPTION: + * Header file for gui_bounty.c. +*/ + +#pragma once + +#include "../../GAME_COMMON.h" +#include "../../GAME_STRINGS.h" + +#define GUI_BOUNTY_TEXT_MAX 15 +#define GUI_BOUNTY_SPRITE_OFFSET_Y 48 +#define GUI_BOUNTY_SPRITE_OFFSET_X 424 +#define GUI_BOUNTY_TEXT_ROTATION -5 +#define GUI_BOUNTY_BACKGROUND_WIDTH 96 +#define GUI_BOUNTY_BACKGROUND_HEIGHT 96 +#define GUI_BOUNTY_ALPHA 196 + +static const SDL_Color GUI_BOUNTY_TEXT_COLOR = {255, 255, 255, 255}; + +void gui_bounty_init(GUI* _g, Play* _p); +void gui_bounty_free(GUI* _g, Play* _p); +void gui_bounty_update(GUI* _g, Play* _p); +void gui_bounty_draw(GUI* _g, Play* _p); + diff --git a/src/game/play/gui/gui_cash.c b/src/game/play/gui/gui_cash.c new file mode 100755 index 0000000..5e685b5 --- /dev/null +++ b/src/game/play/gui/gui_cash.c @@ -0,0 +1,118 @@ +/* + * DESCRIPTION: + * Displays a cash icon and the current cashs available. +*/ + +#include "gui_cash.h" + +/* Sets the gui cash text. */ +static void +gui_cash_text_set(GUI* _g, Play* _p) +{ + char* s; + + s = malloc(GUI_CASH_TEXT_MAX); + + if (_g->cashText.atlas.texture) + texture_free(_g->cashText.atlas.texture); + + snprintf + ( + s, + GUI_CASH_TEXT_MAX, + "%09i", + _p->player.cash + ); + + text_sprite_init + ( + &_g->cashText, + _p->g->renderer, + _p->g->fonts[FONT_MEDIUM], + GUI_CASH_TEXT_COLOR, + ORIGIN_MIDDLE, + s, + 0 + ); + + _g->cashText.x = _g->cashTextBackgroundSprite.x; + _g->cashText.y = _g->cashTextBackgroundSprite.y; + + _g->cashText.rotation = GUI_CASH_TEXT_ROTATION; + _g->cashText.color.a = GUI_CASH_ALPHA; + + free(s); +} + +/* Initializes cash GUI. */ +void +gui_cash_init(GUI* _g, Play* _p) +{ + sprite_init + ( + &_g->cashSprite, + _p->g->textures[TEXTURE_GUI_CASH], + ORIGIN_MIDDLE, + GUI_CASH_WIDTH, + GUI_CASH_HEIGHT + ); + + sprite_init + ( + &_g->cashBackgroundSprite, + _p->g->textures[TEXTURE_GUI_SIGN_SMALL], + ORIGIN_MIDDLE, + GUI_CASH_BACKGROUND_WIDTH, + GUI_CASH_BACKGROUND_HEIGHT + ); + + sprite_init + ( + &_g->cashTextBackgroundSprite, + _p->g->textures[TEXTURE_GUI_SIGN_BIG], + ORIGIN_MIDDLE, + GUI_CASH_TEXT_BACKGROUND_WIDTH, + GUI_CASH_TEXT_BACKGROUND_HEIGHT + ); + + _g->cashBackgroundSprite.x = GUI_CASH_SPRITE_OFFSET_X; + _g->cashBackgroundSprite.y = GUI_CASH_SPRITE_OFFSET_Y; + + _g->cashTextBackgroundSprite.x = GUI_CASH_TEXT_OFFSET_X; + _g->cashTextBackgroundSprite.y = GUI_CASH_TEXT_OFFSET_Y; + + _g->cashSprite.x = _g->cashBackgroundSprite.x; + _g->cashSprite.y = _g->cashBackgroundSprite.y; + + _g->cashBackgroundSprite.color.a = GUI_CASH_ALPHA; + _g->cashTextBackgroundSprite.color.a = GUI_CASH_ALPHA; + _g->cashSprite.color.a = GUI_CASH_ALPHA; + + gui_cash_text_set(_g, _p); +} + +/* Frees cash GUI. */ +void +gui_cash_free(GUI* _g, Play* _p) +{ + if (_g->cashText.atlas.texture) + texture_free(_g->cashText.atlas.texture); +} + +/* Updates cash GUI. */ +void +gui_cash_update(GUI* _g, Play* _p) +{ + if (_p->player.isCashUpdate) + gui_cash_text_set(_g, _p); +} + +/* Draws cash GUI. */ +void +gui_cash_draw(GUI* _g, Play* _p) +{ + sprite_draw(&_g->cashBackgroundSprite, _p->g->renderer); + sprite_draw(&_g->cashTextBackgroundSprite, _p->g->renderer); + sprite_draw(&_g->cashSprite, _p->g->renderer); + sprite_draw(&_g->cashText, _p->g->renderer); +} diff --git a/src/game/play/gui/gui_cash.h b/src/game/play/gui/gui_cash.h new file mode 100755 index 0000000..8264dae --- /dev/null +++ b/src/game/play/gui/gui_cash.h @@ -0,0 +1,31 @@ +/* + * DESCRIPTION: + * Header file for gui_cash.c. +*/ + +#pragma once + +#include "../../GAME_COMMON.h" +#include "../../GAME_STRINGS.h" + +#define GUI_CASH_TEXT_MAX 10 +#define GUI_CASH_WIDTH 64 +#define GUI_CASH_HEIGHT 64 +#define GUI_CASH_BACKGROUND_WIDTH 96 +#define GUI_CASH_BACKGROUND_HEIGHT 96 +#define GUI_CASH_TEXT_BACKGROUND_WIDTH 192 +#define GUI_CASH_TEXT_BACKGROUND_HEIGHT 96 +#define GUI_CASH_SPRITE_OFFSET_X 48 +#define GUI_CASH_SPRITE_OFFSET_Y 64 +#define GUI_CASH_TEXT_OFFSET_X 196 +#define GUI_CASH_TEXT_OFFSET_Y 50 +#define GUI_CASH_TEXT_ROTATION -5 +#define GUI_CASH_ALPHA 196 + +static const SDL_Color GUI_CASH_TEXT_COLOR = {255, 255, 255, 255}; + +void gui_cash_init(GUI* _g, Play* _p); +void gui_cash_free(GUI* _g, Play* _p); +void gui_cash_update(GUI* _g, Play* _p); +void gui_cash_draw(GUI* _g, Play* _p); + diff --git a/src/game/play/gui/gui_ready.c b/src/game/play/gui/gui_ready.c new file mode 100755 index 0000000..16c662f --- /dev/null +++ b/src/game/play/gui/gui_ready.c @@ -0,0 +1,78 @@ +/* + * DESCRIPTION: + * Displays a ready icon and the current readys available. +*/ + +#include "gui_ready.h" + +/* Initializes ready GUI. */ +void +gui_ready_init(GUI* _g, Play* _p) +{ + Sprite sprite; + + sprite_init + ( + &_g->readyBackgroundSprite, + _p->g->textures[TEXTURE_GUI_SIGN_SMALL], + ORIGIN_MIDDLE, + GUI_READY_BACKGROUND_WIDTH, + GUI_READY_BACKGROUND_HEIGHT + ); + + _g->readyBackgroundSprite.x = GUI_READY_OFFSET_X; + _g->readyBackgroundSprite.y = GUI_READY_OFFSET_Y; + + text_sprite_init + ( + &sprite, + _p->g->renderer, + _p->g->fonts[FONT_SMALL], + GUI_READY_TEXT_COLOR, + ORIGIN_MIDDLE, + STRING_PLAY_GUI_READY, + GUI_READY_WRAP + ); + + button_init(&_g->readyButton, &sprite); + + _g->readyButton.sprite.x = _g->readyBackgroundSprite.x + GUI_READY_TEXT_OFFSET_X; + _g->readyButton.sprite.y = _g->readyBackgroundSprite.y + GUI_READY_TEXT_OFFSET_Y; + + _g->readyButton.sprite.rotation = GUI_READY_ROTATION; +} + +/* Frees ready GUI. */ +void +gui_ready_free(GUI* _g, Play* _p) +{ + if (_g->readyButton.sprite.atlas.texture) + texture_free(_g->readyButton.sprite.atlas.texture); +} + +/* Updates ready GUI. */ +void +gui_ready_update(GUI* _g, Play* _p) +{ + if (_p->isUpgradesActive) + { + button_update(&_g->readyButton, &_p->g->mouse); + + if (_g->readyButton.state == BUTTON_STATE_PRESS) + { + _p->isReady = TRUE; + sound_play(_p->g->sounds[SOUND_GO], -1); + } + } +} + +/* Draws ready GUI. */ +void +gui_ready_draw(GUI* _g, Play* _p) +{ + if (_p->isUpgradesActive) + { + sprite_draw(&_g->readyBackgroundSprite, _p->g->renderer); + button_draw(&_g->readyButton, _p->g->renderer); + } +} diff --git a/src/game/play/gui/gui_ready.h b/src/game/play/gui/gui_ready.h new file mode 100755 index 0000000..2f0fcc5 --- /dev/null +++ b/src/game/play/gui/gui_ready.h @@ -0,0 +1,27 @@ +/* + * DESCRIPTION: + * Header file for gui_ready.c. +*/ + +#pragma once + +#include "../../gui/button.h" +#include "../../GAME_STRINGS.h" + +#define GUI_READY_TEXT_MAX 30 +#define GUI_READY_OFFSET_X 752 +#define GUI_READY_OFFSET_Y 550 +#define GUI_READY_BACKGROUND_WIDTH 96 +#define GUI_READY_BACKGROUND_HEIGHT 96 +#define GUI_READY_ROTATION -5 +#define GUI_READY_WRAP 100 +#define GUI_READY_TEXT_OFFSET_X 16 +#define GUI_READY_TEXT_OFFSET_Y 0 + +static const SDL_Color GUI_READY_TEXT_COLOR = {255, 255, 255, 255}; + +void gui_ready_init(GUI* _g, Play* _p); +void gui_ready_free(GUI* _g, Play* _p); +void gui_ready_update(GUI* _g, Play* _p); +void gui_ready_draw(GUI* _g, Play* _p); + diff --git a/src/game/play/gui/gui_redirect.c b/src/game/play/gui/gui_redirect.c new file mode 100755 index 0000000..67debbb --- /dev/null +++ b/src/game/play/gui/gui_redirect.c @@ -0,0 +1,94 @@ +/* + * DESCRIPTION: + * Displays a redirect icon and the current redirects available. +*/ + +#include "gui_redirect.h" + +/* Sets the gui redirect text. */ +static void +gui_redirect_text_set(GUI* _g, Play* _p) +{ + char* s; + + s = malloc(GUI_REDIRECT_TEXT_MAX); + + snprintf + ( + s, + GUI_REDIRECT_TEXT_MAX, + "%i/%i", + _p->player.redirects, + _p->player.redirectMax + ); + + if (_g->redirectText.atlas.texture) + texture_free(_g->redirectText.atlas.texture); + + text_sprite_init + ( + &_g->redirectText, + _p->g->renderer, + _p->g->fonts[FONT_SMALL], + GUI_REDIRECT_TEXT_COLOR, + ORIGIN_TOP_LEFT, + s, + 0 + ); + + free(s); + + _g->redirectText.x = _p->gui.cursor.sprite.x + GUI_REDIRECT_TEXT_OFFSET_X; + _g->redirectText.y = _p->gui.cursor.sprite.y + GUI_REDIRECT_TEXT_OFFSET_Y; +} + +/* Initializes redirect GUI. */ +void +gui_redirect_init(GUI* _g, Play* _p) +{ + sprite_init + ( + &_g->redirectSprite, + _p->g->textures[TEXTURE_GUI_REDIRECT], + ORIGIN_MIDDLE, + GUI_REDIRECT_WIDTH, + GUI_REDIRECT_HEIGHT + ); + + _g->redirectSprite.color.a = GUI_REDIRECT_ALPHA; + + _g->redirectSprite.x = _p->gui.cursor.sprite.x + GUI_REDIRECT_SPRITE_OFFSET_X; + _g->redirectSprite.y = _p->gui.cursor.sprite.y + GUI_REDIRECT_SPRITE_OFFSET_Y; + + gui_redirect_text_set(_g, _p); +} + +/* Frees redirect GUI. */ +void +gui_redirect_free(GUI* _g, Play* _p) +{ + if (_g->redirectText.atlas.texture) + texture_free(_g->redirectText.atlas.texture); +} + +/* Updates redirect GUI. */ +void +gui_redirect_update(GUI* _g, Play* _p) +{ + _g->redirectSprite.x = _p->gui.cursor.sprite.x + GUI_REDIRECT_SPRITE_OFFSET_X; + _g->redirectSprite.y = _p->gui.cursor.sprite.y + GUI_REDIRECT_SPRITE_OFFSET_Y; + + _g->redirectText.x = _p->gui.cursor.sprite.x + GUI_REDIRECT_TEXT_OFFSET_X; + _g->redirectText.y = _p->gui.cursor.sprite.y + GUI_REDIRECT_TEXT_OFFSET_Y; + + if (_p->player.isRedirectUpdate) + gui_redirect_text_set(_g, _p); +} + +/* Draws redirect GUI. */ +void +gui_redirect_draw(GUI* _g, Play* _p) +{ + sprite_draw(&_g->redirectSprite, _p->g->renderer); + sprite_draw(&_g->redirectText, _p->g->renderer); +} diff --git a/src/game/play/gui/gui_redirect.h b/src/game/play/gui/gui_redirect.h new file mode 100755 index 0000000..b2751f2 --- /dev/null +++ b/src/game/play/gui/gui_redirect.h @@ -0,0 +1,25 @@ +/* + * DESCRIPTION: + * Header file for redirect_gui.c. +*/ + +#pragma once + +#include "../../GAME_COMMON.h" + +#define GUI_REDIRECT_TEXT_MAX 6 +#define GUI_REDIRECT_WIDTH 16 +#define GUI_REDIRECT_HEIGHT 16 +#define GUI_REDIRECT_SPRITE_OFFSET_X -16 +#define GUI_REDIRECT_SPRITE_OFFSET_Y -24 +#define GUI_REDIRECT_TEXT_OFFSET_X -8 +#define GUI_REDIRECT_TEXT_OFFSET_Y -28 +#define GUI_REDIRECT_ALPHA 128 + +static const SDL_Color GUI_REDIRECT_TEXT_COLOR = {0, 0, 0, 128}; + +void gui_redirect_init(GUI* _g, Play* _p); +void gui_redirect_free(GUI* _g, Play* _p); +void gui_redirect_update(GUI* _g, Play* _p); +void gui_redirect_draw(GUI* _g, Play* _p); + diff --git a/src/game/play/gui/gui_snake.c b/src/game/play/gui/gui_snake.c new file mode 100755 index 0000000..c5f054c --- /dev/null +++ b/src/game/play/gui/gui_snake.c @@ -0,0 +1,107 @@ +/* + * DESCRIPTION: + * Displays a snake icon and the current snakes available. +*/ + +#include "gui_snake.h" + +/* Sets the gui snake text. */ +static void +gui_snake_text_set(GUI* _g, Play* _p) +{ + char* s; + + s = malloc(GUI_SNAKE_TEXT_MAX); + + if (_g->snakeText.atlas.texture) + texture_free(_g->snakeText.atlas.texture); + + if (_p->player.isPowerUp) + { + snprintf + ( + s, + GUI_SNAKE_TEXT_MAX, + "%s", + STRING_PLAY_GUI_SNAKE_POWER_UP + ); + } + else + { + snprintf + ( + s, + GUI_SNAKE_TEXT_MAX, + "%i/%i", + _p->player.snakeReserve, + _p->player.snakeMax + ); + } + + text_sprite_init + ( + &_g->snakeText, + _p->g->renderer, + _p->g->fonts[FONT_SMALL], + GUI_SNAKE_TEXT_COLOR, + ORIGIN_TOP_LEFT, + s, + 0 + ); + + free(s); + + _g->snakeText.x = _p->gui.cursor.sprite.x + GUI_SNAKE_TEXT_OFFSET_X; + _g->snakeText.y = _p->gui.cursor.sprite.y + GUI_SNAKE_TEXT_OFFSET_Y; +} + +/* Initializes snake GUI. */ +void +gui_snake_init(GUI* _g, Play* _p) +{ + sprite_init + ( + &_g->snakeSprite, + _p->g->textures[TEXTURE_GUI_SNAKE], + ORIGIN_MIDDLE, + GUI_SNAKE_WIDTH, + GUI_SNAKE_HEIGHT + ); + + _g->snakeSprite.color.a = GUI_SNAKE_ALPHA; + + _g->snakeSprite.x = _p->gui.cursor.sprite.x + GUI_SNAKE_SPRITE_OFFSET_X; + _g->snakeSprite.y = _p->gui.cursor.sprite.y + GUI_SNAKE_SPRITE_OFFSET_Y; + + gui_snake_text_set(_g, _p); +} + +/* Frees snake GUI. */ +void +gui_snake_free(GUI* _g, Play* _p) +{ + if (_g->snakeText.atlas.texture) + texture_free(_g->snakeText.atlas.texture); +} + +/* Updates snake GUI. */ +void +gui_snake_update(GUI* _g, Play* _p) +{ + _g->snakeSprite.x = _p->gui.cursor.sprite.x + GUI_SNAKE_SPRITE_OFFSET_X; + _g->snakeSprite.y = _p->gui.cursor.sprite.y + GUI_SNAKE_SPRITE_OFFSET_Y; + + _g->snakeText.x = _p->gui.cursor.sprite.x + GUI_SNAKE_TEXT_OFFSET_X; + _g->snakeText.y = _p->gui.cursor.sprite.y + GUI_SNAKE_TEXT_OFFSET_Y; + + if (_p->player.isSnakeUpdate) + gui_snake_text_set(_g, _p); +} + +/* Draws snake GUI. */ +void +gui_snake_draw(GUI* _g, Play* _p) +{ + sprite_draw(&_g->snakeSprite, _p->g->renderer); + sprite_draw(&_g->snakeText, _p->g->renderer); +} diff --git a/src/game/play/gui/gui_snake.h b/src/game/play/gui/gui_snake.h new file mode 100755 index 0000000..5fa37fa --- /dev/null +++ b/src/game/play/gui/gui_snake.h @@ -0,0 +1,26 @@ +/* + * DESCRIPTION: + * Header file for gui_snake.c. +*/ + +#pragma once + +#include "../../GAME_COMMON.h" +#include "../../GAME_STRINGS.h" + +#define GUI_SNAKE_TEXT_MAX 10 +#define GUI_SNAKE_WIDTH 16 +#define GUI_SNAKE_HEIGHT 16 +#define GUI_SNAKE_SPRITE_OFFSET_X -16 +#define GUI_SNAKE_SPRITE_OFFSET_Y -40 +#define GUI_SNAKE_TEXT_OFFSET_X -8 +#define GUI_SNAKE_TEXT_OFFSET_Y -46 +#define GUI_SNAKE_ALPHA 128 + +static const SDL_Color GUI_SNAKE_TEXT_COLOR = {0, 0, 0, 128}; + +void gui_snake_init(GUI* _g, Play* _p); +void gui_snake_free(GUI* _g, Play* _p); +void gui_snake_update(GUI* _g, Play* _p); +void gui_snake_draw(GUI* _g, Play* _p); + diff --git a/src/game/play/gui/gui_upgrade.c b/src/game/play/gui/gui_upgrade.c new file mode 100755 index 0000000..7828820 --- /dev/null +++ b/src/game/play/gui/gui_upgrade.c @@ -0,0 +1,496 @@ +/* + * DESCRIPTION: + * Upgrade display. +*/ + +#include "gui_upgrade.h" + +static void gui_upgrade_no_cash(GUI* _g, Play* _p); +static void gui_upgrade_maxed(GUI* _g, Play* _p); +static void gui_upgrade_snake(GUI* _g, Play* _p); +static void gui_upgrade_lifetime(GUI* _g, Play* _p); +static void gui_upgrade_redirect(GUI* _g, Play* _p); +static void gui_upgrade_snake_text_set(GUI* _g, Play* _p); + + +/* No cash!! */ +static void +gui_upgrade_no_cash(GUI* _g, Play* _p) +{ + message_no_cash_add(_p->player.sprite.x, _p->player.sprite.y, _p); + + sound_play(_p->g->sounds[SOUND_ERROR], -1); +} + +/* Maxed out!! */ +static void +gui_upgrade_maxed(GUI* _g, Play* _p) +{ + message_maxed_add(_p->player.sprite.x, _p->player.sprite.y, _p); + + sound_play(_p->g->sounds[SOUND_ERROR], -1); +} + +/* Upgrade snake level. */ +static void +gui_upgrade_snake(GUI* _g, Play* _p) +{ + if (_p->player.cash >= _p->player.snakeUpgradePrice) + { + _p->player.cash -= _p->player.snakeUpgradePrice; + + message_purchase_add(_p->player.sprite.x, _p->player.sprite.y, _p->player.snakeUpgradePrice, _p); + + _p->player.snakeUpgradeLevel++; + + if (_p->player.snakeUpgradeLevel > GUI_UPGRADE_MAX) + { + _p->player.snakeUpgradeLevel = CEIL(_p->player.snakeUpgradeLevel, GUI_UPGRADE_MAX); + gui_upgrade_maxed(_g, _p); + } + else + { + _p->player.isSnakeUpgradeUpdate = TRUE; + + _p->player.isSnakeUpdate = TRUE; + + sound_play(_p->g->sounds[SOUND_PURCHASE], -1); + } + } + else + gui_upgrade_no_cash(_g, _p); +} + +/* Upgrade snake level. */ +static void +gui_upgrade_lifetime(GUI* _g, Play* _p) +{ + if (_p->player.cash >= _p->player.lifetimeUpgradePrice) + { + _p->player.cash -= _p->player.lifetimeUpgradePrice; + + message_purchase_add(_p->player.sprite.x, _p->player.sprite.y, _p->player.lifetimeUpgradePrice, _p); + + _p->player.lifetimeUpgradeLevel++; + + if (_p->player.snakeUpgradeLevel > GUI_UPGRADE_MAX) + _p->player.lifetimeUpgradeLevel = CEIL(_p->player.lifetimeUpgradeLevel, GUI_UPGRADE_MAX); + else + { + _p->player.isLifetimeUpgradeUpdate = TRUE; + sound_play(_p->g->sounds[SOUND_PURCHASE], -1); + } + } + else + gui_upgrade_no_cash(_g, _p); +} + +/* Upgrade snake level. */ +static void +gui_upgrade_redirect(GUI* _g, Play* _p) +{ + if (_p->player.cash >= _p->player.redirectUpgradePrice) + { + _p->player.cash -= _p->player.redirectUpgradePrice; + + message_purchase_add(_p->player.sprite.x, _p->player.sprite.y, _p->player.redirectUpgradePrice, _p); + + _p->player.redirectUpgradeLevel++; + + if (_p->player.redirectUpgradeLevel > GUI_UPGRADE_MAX) + _p->player.redirectUpgradeLevel = CEIL(_p->player.redirectUpgradeLevel, GUI_UPGRADE_MAX); + else + { + _p->player.isRedirectUpgradeUpdate = TRUE; + + _p->player.isRedirectUpdate = TRUE; + + sound_play(_p->g->sounds[SOUND_PURCHASE], -1); + } + } + else + gui_upgrade_no_cash(_g, _p); +} + +/* Sets the gui upgrade text. */ +static void +gui_upgrade_text_set(GUI* _g, Play* _p) +{ + char* s; + + s = malloc(GUI_UPGRADE_TEXT_MAX); + + if (_g->upgradeText.atlas.texture) + texture_free(_g->upgradeText.atlas.texture); + + if (_g->snakeUpgradeButton.state == BUTTON_STATE_HOVER) + { + snprintf + ( + s, + GUI_UPGRADE_TEXT_MAX, + "%s", + STRING_PLAY_UPGRADE_SNAKES + ); + } + else if (_g->lifetimeUpgradeButton.state == BUTTON_STATE_HOVER) + { + snprintf + ( + s, + GUI_UPGRADE_TEXT_MAX, + "%s", + STRING_PLAY_UPGRADE_LIFETIME + ); + } + else if (_g->redirectUpgradeButton.state == BUTTON_STATE_HOVER) + { + snprintf + ( + s, + GUI_UPGRADE_TEXT_MAX, + "%s", + STRING_PLAY_UPGRADE_REDIRECT + ); + } + else + { + snprintf + ( + s, + GUI_UPGRADE_TEXT_MAX, + "%s", + STRING_PLAY_UPGRADE + ); + } + + text_sprite_init + ( + &_g->upgradeText, + _p->g->renderer, + _p->g->fonts[FONT_TINY], + GUI_UPGRADE_TEXT_COLOR, + ORIGIN_MIDDLE, + s, + GUI_UPGRADE_WRAP + ); + + free(s); + + _g->upgradeText.x = _g->upgradeBackgroundSprite.x; + _g->upgradeText.y = _g->upgradeBackgroundSprite.y; + + _g->upgradeText.rotation = GUI_UPGRADE_ROTATION; +} + +/* Displays upgrade quantity and price of the snake upgrade. */ +static void +gui_upgrade_snake_text_set(GUI* _g, Play* _p) +{ + char* s; + + s = malloc(GUI_UPGRADE_INFO_TEXT_MAX); + + if (_g->snakeUpgradeText.atlas.texture) + texture_free(_g->snakeUpgradeText.atlas.texture); + + snprintf + ( + s, + GUI_UPGRADE_INFO_TEXT_MAX, + "(x%i) - $%i", + _p->player.snakeUpgradeLevel, + _p->player.snakeUpgradePrice + ); + + text_sprite_init + ( + &_g->snakeUpgradeText, + _p->g->renderer, + _p->g->fonts[FONT_SMALL], + GUI_UPGRADE_INFO_TEXT_COLOR, + ORIGIN_MIDDLE, + s, + 0 + ); + + free(s); + + _g->snakeUpgradeText.x = _g->snakeUpgradeButton.sprite.x + GUI_UPGRADE_TEXT_OFFSET_X; + _g->snakeUpgradeText.y = _g->snakeUpgradeButton.sprite.y + GUI_UPGRADE_TEXT_OFFSET_Y; +} + +/* Displays upgrade quantity and price of the lifetime upgrade. */ +static void +gui_upgrade_lifetime_text_set(GUI* _g, Play* _p) +{ + char* s; + + s = malloc(GUI_UPGRADE_INFO_TEXT_MAX); + + if (_g->lifetimeUpgradeText.atlas.texture) + texture_free(_g->lifetimeUpgradeText.atlas.texture); + + snprintf + ( + s, + GUI_UPGRADE_INFO_TEXT_MAX, + "(x%i) - $%i", + _p->player.lifetimeUpgradeLevel, + _p->player.lifetimeUpgradePrice + ); + + text_sprite_init + ( + &_g->lifetimeUpgradeText, + _p->g->renderer, + _p->g->fonts[FONT_SMALL], + GUI_UPGRADE_INFO_TEXT_COLOR, + ORIGIN_MIDDLE, + s, + 0 + ); + + free(s); + + _g->lifetimeUpgradeText.x = _g->lifetimeUpgradeButton.sprite.x + GUI_UPGRADE_TEXT_OFFSET_X; + _g->lifetimeUpgradeText.y = _g->lifetimeUpgradeButton.sprite.y + GUI_UPGRADE_TEXT_OFFSET_Y; +} + +/* Displays upgrade quantity and price of the redirect upgrade. */ +static void +gui_upgrade_redirect_text_set(GUI* _g, Play* _p) +{ + char* s; + + s = malloc(GUI_UPGRADE_INFO_TEXT_MAX); + + if (_g->redirectUpgradeText.atlas.texture) + texture_free(_g->redirectUpgradeText.atlas.texture); + + snprintf + ( + s, + GUI_UPGRADE_INFO_TEXT_MAX, + "(x%i) - $%i", + _p->player.redirectUpgradeLevel, + _p->player.redirectUpgradePrice + ); + + text_sprite_init + ( + &_g->redirectUpgradeText, + _p->g->renderer, + _p->g->fonts[FONT_SMALL], + GUI_UPGRADE_INFO_TEXT_COLOR, + ORIGIN_MIDDLE, + s, + 0 + ); + + free(s); + + _g->redirectUpgradeText.x = _g->redirectUpgradeButton.sprite.x + GUI_UPGRADE_TEXT_OFFSET_X; + _g->redirectUpgradeText.y = _g->redirectUpgradeButton.sprite.y + GUI_UPGRADE_TEXT_OFFSET_Y; +} + + +/* Initializes upgrade GUI. */ +void +gui_upgrade_init(GUI* _g, Play* _p) +{ + Sprite snakeUpgradeSprite; + Sprite redirectUpgradeSprite; + Sprite lifetimeUpgradeSprite; + + sprite_init + ( + &snakeUpgradeSprite, + _p->g->textures[TEXTURE_GUI_UPGRADE_SNAKE], + ORIGIN_MIDDLE, + GUI_UPGRADE_WIDTH, + GUI_UPGRADE_HEIGHT + ); + + sprite_init + ( + &lifetimeUpgradeSprite, + _p->g->textures[TEXTURE_GUI_UPGRADE_LIFETIME], + ORIGIN_MIDDLE, + GUI_UPGRADE_WIDTH, + GUI_UPGRADE_HEIGHT + ); + + sprite_init + ( + &redirectUpgradeSprite, + _p->g->textures[TEXTURE_GUI_UPGRADE_REDIRECT], + ORIGIN_MIDDLE, + GUI_UPGRADE_WIDTH, + GUI_UPGRADE_HEIGHT + ); + + sprite_init + ( + &_g->upgradeBackgroundSprite, + _p->g->textures[TEXTURE_GUI_SIGN_BIG], + ORIGIN_MIDDLE, + GUI_UPGRADE_BACKGROUND_BIG_WIDTH, + GUI_UPGRADE_BACKGROUND_BIG_HEIGHT + ); + + sprite_init + ( + &_g->snakeUpgradeBackgroundSprite, + _p->g->textures[TEXTURE_GUI_SIGN_SMALL], + ORIGIN_MIDDLE, + GUI_UPGRADE_BACKGROUND_SMALL_WIDTH, + GUI_UPGRADE_BACKGROUND_SMALL_HEIGHT + ); + + sprite_init + ( + &_g->lifetimeUpgradeBackgroundSprite, + _p->g->textures[TEXTURE_GUI_SIGN_SMALL], + ORIGIN_MIDDLE, + GUI_UPGRADE_BACKGROUND_SMALL_WIDTH, + GUI_UPGRADE_BACKGROUND_SMALL_HEIGHT + ); + + sprite_init + ( + &_g->redirectUpgradeBackgroundSprite, + _p->g->textures[TEXTURE_GUI_SIGN_SMALL], + ORIGIN_MIDDLE, + GUI_UPGRADE_BACKGROUND_SMALL_WIDTH, + GUI_UPGRADE_BACKGROUND_SMALL_HEIGHT + ); + + sprite_init + ( + &_g->readyBackgroundSprite, + _p->g->textures[TEXTURE_GUI_SIGN_SMALL], + ORIGIN_MIDDLE, + GUI_UPGRADE_BACKGROUND_SMALL_WIDTH, + GUI_UPGRADE_BACKGROUND_SMALL_HEIGHT + ); + + _g->upgradeBackgroundSprite.x = GUI_UPGRADE_BACKGROUND_SPRITE_OFFSET_X; + _g->upgradeBackgroundSprite.y = GUI_UPGRADE_BACKGROUND_SPRITE_OFFSET_Y; + + _g->snakeUpgradeBackgroundSprite.x = GUI_UPGRADE_SNAKE_SPRITE_OFFSET_X; + _g->lifetimeUpgradeBackgroundSprite.x = GUI_UPGRADE_LIFETIME_SPRITE_OFFSET_X; + _g->redirectUpgradeBackgroundSprite.x = GUI_UPGRADE_REDIRECT_SPRITE_OFFSET_X; + _g->snakeUpgradeBackgroundSprite.y = GUI_UPGRADE_SNAKE_SPRITE_OFFSET_Y; + _g->lifetimeUpgradeBackgroundSprite.y = GUI_UPGRADE_LIFETIME_SPRITE_OFFSET_Y; + _g->redirectUpgradeBackgroundSprite.y = GUI_UPGRADE_REDIRECT_SPRITE_OFFSET_Y; + + button_init(&_g->snakeUpgradeButton, &snakeUpgradeSprite); + button_init(&_g->lifetimeUpgradeButton, &lifetimeUpgradeSprite); + button_init(&_g->redirectUpgradeButton, &redirectUpgradeSprite); + + _g->snakeUpgradeButton.sprite.x = _g->snakeUpgradeBackgroundSprite.x; + _g->snakeUpgradeButton.sprite.y = _g->snakeUpgradeBackgroundSprite.y; + _g->lifetimeUpgradeButton.sprite.x = _g->lifetimeUpgradeBackgroundSprite.x; + _g->lifetimeUpgradeButton.sprite.y = _g->lifetimeUpgradeBackgroundSprite.y; + _g->redirectUpgradeButton.sprite.x = _g->redirectUpgradeBackgroundSprite.x; + _g->redirectUpgradeButton.sprite.y = _g->redirectUpgradeBackgroundSprite.y; + + gui_upgrade_text_set(_g, _p); + gui_upgrade_snake_text_set(_g, _p); + gui_upgrade_lifetime_text_set(_g, _p); + gui_upgrade_redirect_text_set(_g, _p); +} + +/* Frees upgrade GUI. */ +void +gui_upgrade_free(GUI* _g, Play* _p) +{ + if (_g->upgradeText.atlas.texture) + texture_free(_g->upgradeText.atlas.texture); + + if (_g->snakeUpgradeText.atlas.texture) + texture_free(_g->snakeUpgradeText.atlas.texture); + + if (_g->lifetimeUpgradeText.atlas.texture) + texture_free(_g->lifetimeUpgradeText.atlas.texture); + + if (_g->redirectUpgradeText.atlas.texture) + texture_free(_g->redirectUpgradeText.atlas.texture); +} + +/* Updates upgrade GUI. */ +void +gui_upgrade_update(GUI* _g, Play* _p) +{ + if (_p->isUpgradeUpdate) + _p->isUpgradeUpdate = FALSE; + + if (_p->player.isSnakeUpgradeUpdate) + { + gui_upgrade_snake_text_set(_g, _p); + _p->player.isSnakeUpgradeUpdate = FALSE; + } + + if (_p->player.isLifetimeUpgradeUpdate) + { + gui_upgrade_lifetime_text_set(_g, _p); + _p->player.isLifetimeUpgradeUpdate = FALSE; + } + + if (_p->player.isRedirectUpgradeUpdate) + { + gui_upgrade_redirect_text_set(_g, _p); + _p->player.isRedirectUpgradeUpdate = FALSE; + } + + if (_p->isUpgradesActive) + { + button_update(&_g->snakeUpgradeButton, &_p->g->mouse); + button_update(&_g->lifetimeUpgradeButton, &_p->g->mouse); + button_update(&_g->redirectUpgradeButton, &_p->g->mouse); + + if (_g->snakeUpgradeButton.state == BUTTON_STATE_PRESS) + gui_upgrade_snake(_g, _p); + + if (_g->lifetimeUpgradeButton.state == BUTTON_STATE_PRESS) + gui_upgrade_lifetime(_g, _p); + + if (_g->redirectUpgradeButton.state == BUTTON_STATE_PRESS) + gui_upgrade_redirect(_g, _p); + + if + ( + _g->snakeUpgradeButton.state == BUTTON_STATE_HOVER || + _g->lifetimeUpgradeButton.state == BUTTON_STATE_HOVER || + _g->redirectUpgradeButton.state == BUTTON_STATE_HOVER + ) + _p->isUpgradeUpdate = TRUE; + + if (_p->isUpgradeUpdate) + gui_upgrade_text_set(_g, _p); + } +} + +/* Draws upgrade GUI. */ +void +gui_upgrade_draw(GUI* _g, Play* _p) +{ + if (_p->isUpgradesActive) + { + sprite_draw(&_g->upgradeBackgroundSprite, _p->g->renderer); + sprite_draw(&_g->upgradeText, _p->g->renderer); + + sprite_draw(&_g->snakeUpgradeBackgroundSprite, _p->g->renderer); + sprite_draw(&_g->lifetimeUpgradeBackgroundSprite, _p->g->renderer); + sprite_draw(&_g->redirectUpgradeBackgroundSprite, _p->g->renderer); + + button_draw(&_g->snakeUpgradeButton, _p->g->renderer); + button_draw(&_g->lifetimeUpgradeButton, _p->g->renderer); + button_draw(&_g->redirectUpgradeButton, _p->g->renderer); + + sprite_draw(&_g->snakeUpgradeText, _p->g->renderer); + sprite_draw(&_g->lifetimeUpgradeText, _p->g->renderer); + sprite_draw(&_g->redirectUpgradeText, _p->g->renderer); + } +} diff --git a/src/game/play/gui/gui_upgrade.h b/src/game/play/gui/gui_upgrade.h new file mode 100755 index 0000000..5107034 --- /dev/null +++ b/src/game/play/gui/gui_upgrade.h @@ -0,0 +1,43 @@ +/* + * DESCRIPTION: + * Header file for gui_upgrade.c. +*/ + +#pragma once + +#include "../../gui/button.h" + +#include "../../GAME_STRINGS.h" + +#include "../message/message.h" + +#define GUI_UPGRADE_BACKGROUND_BIG_WIDTH 196 +#define GUI_UPGRADE_BACKGROUND_BIG_HEIGHT 98 +#define GUI_UPGRADE_BACKGROUND_SMALL_WIDTH 96 +#define GUI_UPGRADE_BACKGROUND_SMALL_HEIGHT 98 +#define GUI_UPGRADE_BACKGROUND_SPRITE_OFFSET_X 400 +#define GUI_UPGRADE_BACKGROUND_SPRITE_OFFSET_Y 450 +#define GUI_UPGRADE_SNAKE_SPRITE_OFFSET_Y 550 +#define GUI_UPGRADE_LIFETIME_SPRITE_OFFSET_Y 550 +#define GUI_UPGRADE_REDIRECT_SPRITE_OFFSET_Y 550 +#define GUI_UPGRADE_SNAKE_SPRITE_OFFSET_X 200 +#define GUI_UPGRADE_LIFETIME_SPRITE_OFFSET_X 400 +#define GUI_UPGRADE_REDIRECT_SPRITE_OFFSET_X 600 +#define GUI_UPGRADE_WRAP 150 +#define GUI_UPGRADE_ROTATION -5 +#define GUI_UPGRADE_TEXT_MAX 0xFF +#define GUI_UPGRADE_INFO_TEXT_MAX 0xFF +#define GUI_UPGRADE_TEXT_OFFSET_X 0 +#define GUI_UPGRADE_TEXT_OFFSET_Y -48 +#define GUI_UPGRADE_WIDTH 64 +#define GUI_UPGRADE_HEIGHT 64 +#define GUI_UPGRADE_MAX 99 + +static const SDL_Color GUI_UPGRADE_TEXT_COLOR = {255, 255, 255, 255}; +static const SDL_Color GUI_UPGRADE_INFO_TEXT_COLOR = {0, 0, 0, 255}; + +void gui_upgrade_init(GUI* _g, Play* _p); +void gui_upgrade_free(GUI* _g, Play* _p); +void gui_upgrade_update(GUI* _g, Play* _p); +void gui_upgrade_draw(GUI* _g, Play* _p); + diff --git a/src/game/play/gui/gui_wave.c b/src/game/play/gui/gui_wave.c new file mode 100755 index 0000000..65a4702 --- /dev/null +++ b/src/game/play/gui/gui_wave.c @@ -0,0 +1,121 @@ +/* + * DESCRIPTION: + * Displays a wave icon and the current waves available. +*/ + +#include "gui_wave.h" + +/* Sets the gui wave text. */ +static void +gui_wave_text_set(GUI* _g, Play* _p) +{ + char* s; + + s = malloc(GUI_WAVE_TEXT_MAX); + + if (_g->waveText.atlas.texture) + texture_free(_g->waveText.atlas.texture); + + if (_p->isBetweenWaves) + { + snprintf + ( + s, + GUI_WAVE_TEXT_MAX, + "%s-", + STRING_PLAY_GUI_WAVE + ); + } + else + { + if (_p->game > 1) + { + snprintf + ( + s, + GUI_WAVE_TEXT_MAX, + "%s%i (NG+%i)", + STRING_PLAY_GUI_WAVE, + _p->wave, + _p->game - 1 + ); + } + else + { + snprintf + ( + s, + GUI_WAVE_TEXT_MAX, + "%s%i", + STRING_PLAY_GUI_WAVE, + _p->wave + ); + } + } + + text_sprite_init + ( + &_g->waveText, + _p->g->renderer, + _p->g->fonts[FONT_MEDIUM], + GUI_WAVE_TEXT_COLOR, + ORIGIN_MIDDLE, + s, + 0 + ); + + _g->waveText.x = _g->waveBackgroundSprite.x; + _g->waveText.y = _g->waveBackgroundSprite.y; + + _g->waveText.rotation = GUI_WAVE_TEXT_ROTATION; + _g->waveText.color.a = GUI_WAVE_ALPHA; + + free(s); +} + +/* Initializes wave GUI. */ +void +gui_wave_init(GUI* _g, Play* _p) +{ + sprite_init + ( + &_g->waveBackgroundSprite, + _p->g->textures[TEXTURE_GUI_SIGN_BIG], + ORIGIN_MIDDLE, + GUI_WAVE_BACKGROUND_WIDTH, + GUI_WAVE_BACKGROUND_HEIGHT + ); + + _g->waveBackgroundSprite.flip = FLIP_HORIZONTAL; + + _g->waveBackgroundSprite.x = GUI_WAVE_SPRITE_OFFSET_X; + _g->waveBackgroundSprite.y = GUI_WAVE_SPRITE_OFFSET_Y; + + _g->waveBackgroundSprite.color.a = GUI_WAVE_ALPHA; + + gui_wave_text_set(_g, _p); +} + +/* Frees wave GUI. */ +void +gui_wave_free(GUI* _g, Play* _p) +{ + if (_g->waveText.atlas.texture) + texture_free(_g->waveText.atlas.texture); +} + +/* Updates wave GUI. */ +void +gui_wave_update(GUI* _g, Play* _p) +{ + if (_p->isWaveUpdate) + gui_wave_text_set(_g, _p); +} + +/* Draws wave GUI. */ +void +gui_wave_draw(GUI* _g, Play* _p) +{ + sprite_draw(&_g->waveBackgroundSprite, _p->g->renderer); + sprite_draw(&_g->waveText, _p->g->renderer); +} diff --git a/src/game/play/gui/gui_wave.h b/src/game/play/gui/gui_wave.h new file mode 100755 index 0000000..cc363e7 --- /dev/null +++ b/src/game/play/gui/gui_wave.h @@ -0,0 +1,25 @@ +/* + * DESCRIPTION: + * Header file for gui_wave.c. +*/ + +#pragma once + +#include "../../GAME_COMMON.h" +#include "../../GAME_STRINGS.h" + +#define GUI_WAVE_TEXT_MAX 30 +#define GUI_WAVE_SPRITE_OFFSET_Y 50 +#define GUI_WAVE_SPRITE_OFFSET_X 704 +#define GUI_WAVE_TEXT_ROTATION 5 +#define GUI_WAVE_BACKGROUND_WIDTH 192 +#define GUI_WAVE_BACKGROUND_HEIGHT 96 +#define GUI_WAVE_ALPHA 196 + +static const SDL_Color GUI_WAVE_TEXT_COLOR = {255, 255, 255, 255}; + +void gui_wave_init(GUI* _g, Play* _p); +void gui_wave_free(GUI* _g, Play* _p); +void gui_wave_update(GUI* _g, Play* _p); +void gui_wave_draw(GUI* _g, Play* _p); + diff --git a/src/game/play/message/message.c b/src/game/play/message/message.c new file mode 100755 index 0000000..7ad75d7 --- /dev/null +++ b/src/game/play/message/message.c @@ -0,0 +1,331 @@ +/* + * DESCRIPTION: + * Messages, or in-game blurbs that display happenings. +*/ + +#include "message.h" + +static Message* message_add(Message* _m, f64 _x, f64 _y, Play* _p); + +/* Adds a message to the list. */ +static Message* +message_add(Message* _m, f64 _x, f64 _y, Play* _p) +{ + _m->sprite.x = _x; + _m->sprite.y = _y; + _m->dR = 0; + _m->dX = 0; + _m->dY = MESSAGE_VELOCITY; + + _m->lifetime = MESSAGE_LIFETIME; + + return (Message*)list_append_new(&_p->messages, (void*)_m, sizeof(Message)); +} + +/* +$X */ +Message* +message_cash_add(f64 _x, f64 _y, s32 _c, Play* _p) +{ + Message m; + char* s; + + s = malloc(MESSAGE_TEXT_MAX); + + snprintf + ( + s, + MESSAGE_TEXT_MAX, + "+$%i", + _c + ); + + text_sprite_init + ( + &m.sprite, + _p->g->renderer, + _p->g->fonts[FONT_MEDIUM], + MESSAGE_CASH_COLOR, + ORIGIN_MIDDLE, + s, + 0 + ); + + free(s); + + return message_add(&m, _x, _y, _p); +} + +/* -$X */ +Message* +message_purchase_add(f64 _x, f64 _y, s32 _c, Play* _p) +{ + Message m; + char* s; + + s = malloc(MESSAGE_TEXT_MAX); + + snprintf + ( + s, + MESSAGE_TEXT_MAX, + "-$%i", + _c + ); + + text_sprite_init + ( + &m.sprite, + _p->g->renderer, + _p->g->fonts[FONT_MEDIUM], + MESSAGE_PURCHASE_COLOR, + ORIGIN_MIDDLE, + s, + 0 + ); + + free(s); + + return message_add(&m, _x, _y, _p); +} + +/* "You're broke!!" */ +Message* +message_no_cash_add(f64 _x, f64 _y, Play* _p) +{ + Message m; + + text_sprite_init + ( + &m.sprite, + _p->g->renderer, + _p->g->fonts[FONT_MEDIUM], + MESSAGE_PURCHASE_COLOR, + ORIGIN_MIDDLE, + STRING_PLAY_MESSAGE_PURCHASE_NO_CASH, + 0 + ); + + return message_add(&m, _x, _y, _p); +} + +/* "MAXED!!" */ +Message* +message_maxed_add(f64 _x, f64 _y, Play* _p) +{ + Message m; + + text_sprite_init + ( + &m.sprite, + _p->g->renderer, + _p->g->fonts[FONT_MEDIUM], + MESSAGE_PURCHASE_COLOR, + ORIGIN_MIDDLE, + STRING_PLAY_MESSAGE_PURCHASE_MAXED, + 0 + ); + + return message_add(&m, _x, _y, _p); +} + +/* -X */ +Message* +message_damage_add(f64 _x, f64 _y, s32 _d, Play* _p) +{ + Message m; + char* s; + + s = malloc(MESSAGE_TEXT_MAX); + + snprintf + ( + s, + MESSAGE_TEXT_MAX, + "-%i", + _d + ); + + text_sprite_init + ( + &m.sprite, + _p->g->renderer, + _p->g->fonts[FONT_MEDIUM], + MESSAGE_DAMAGE_COLOR, + ORIGIN_MIDDLE, + s, + 0 + ); + + free(s); + + return message_add(&m, _x, _y, _p); +} + +/* "Wave cleared!" */ +Message* +message_wave_clear_add(f64 _x, f64 _y, Play* _p) +{ + Message m; + + text_sprite_init + ( + &m.sprite, + _p->g->renderer, + _p->g->fonts[FONT_MEDIUM], + MESSAGE_WAVE_CLEAR_COLOR, + ORIGIN_MIDDLE, + STRING_PLAY_MESSAGE_WAVE_CLEAR, + 0 + ); + + return message_add(&m, _x, _y, _p); +} + +/* "Wave failed..." */ +Message* +message_wave_fail_add(f64 _x, f64 _y, Play* _p) +{ + Message m; + + text_sprite_init + ( + &m.sprite, + _p->g->renderer, + _p->g->fonts[FONT_MEDIUM], + MESSAGE_WAVE_FAIL_COLOR, + ORIGIN_MIDDLE, + STRING_PLAY_MESSAGE_WAVE_FAIL, + 0 + ); + + return message_add(&m, _x, _y, _p); +} + +/* "Game cleared!!" */ +Message* +message_game_clear_add(f64 _x, f64 _y, Play* _p) +{ + Message m; + + text_sprite_init + ( + &m.sprite, + _p->g->renderer, + _p->g->fonts[FONT_MEDIUM], + MESSAGE_GAME_CLEAR_COLOR, + ORIGIN_MIDDLE, + STRING_PLAY_MESSAGE_GAME_CLEAR, + 0 + ); + + return message_add(&m, _x, _y, _p); +} + + +/* "BERSERK!!" */ +Message* +message_power_up_add(f64 _x, f64 _y, Play* _p) +{ + Message m; + + text_sprite_init + ( + &m.sprite, + _p->g->renderer, + _p->g->fonts[FONT_MEDIUM], + MESSAGE_POWER_UP_COLOR, + ORIGIN_MIDDLE, + STRING_PLAY_MESSAGE_POWER_UP, + 0 + ); + + return message_add(&m, _x, _y, _p); +} + + +/* "Berserk over..." */ +Message* +message_power_down_add(f64 _x, f64 _y, Play* _p) +{ + Message m; + + text_sprite_init + ( + &m.sprite, + _p->g->renderer, + _p->g->fonts[FONT_MEDIUM], + MESSAGE_POWER_DOWN_COLOR, + ORIGIN_MIDDLE, + STRING_PLAY_MESSAGE_POWER_DOWN, + 0 + ); + + return message_add(&m, _x, _y, _p); +} + +/* "-1 Fatness!!" */ +Message* +message_miracle_cure_add(f64 _x, f64 _y, Play* _p) +{ + Message m; + + text_sprite_init + ( + &m.sprite, + _p->g->renderer, + _p->g->fonts[FONT_MEDIUM], + MESSAGE_MIRACLE_CURE_COLOR, + ORIGIN_MIDDLE, + STRING_PLAY_MESSAGE_MIRACLE_CURE, + 0 + ); + + return message_add(&m, _x, _y, _p); +} + +/* "KABOOM!!" */ +Message* +message_dynamite_add(f64 _x, f64 _y, Play* _p) +{ + Message m; + + text_sprite_init + ( + &m.sprite, + _p->g->renderer, + _p->g->fonts[FONT_MEDIUM], + MESSAGE_DYNAMITE_COLOR, + ORIGIN_MIDDLE, + STRING_PLAY_MESSAGE_DYNAMITE, + 0 + ); + + return message_add(&m, _x, _y, _p); +} + +/* Updates a message. */ +void +message_update(Message* _m, Play* _p) +{ + f64 progress; + + progress = ((f64)_m->lifetime / MESSAGE_LIFETIME); + + _m->lifetime--; + + _m->sprite.x += _m->dX; + _m->sprite.y += _m->dY; + _m->sprite.rotation += _m->dR; + + _m->sprite.color.a = SDL_ALPHA_OPAQUE * progress; + + if (_m->lifetime <= 0) + list_node_from_data_remove(&_p->messages, _m, sizeof(Message)); +} + +/* Draws a message. */ +void +message_draw(Message* _m, Play* _p) +{ + sprite_draw(&_m->sprite, _p->g->renderer); +} diff --git a/src/game/play/message/message.h b/src/game/play/message/message.h new file mode 100755 index 0000000..fd0546c --- /dev/null +++ b/src/game/play/message/message.h @@ -0,0 +1,41 @@ +/* + * DESCRIPTION: + * Header file for message.c. +*/ + +#pragma once + +#include "../../GAME_COMMON.h" +#include "../../GAME_STRINGS.h" + +#define MESSAGE_VELOCITY -1 +#define MESSAGE_LIFETIME 60 +#define MESSAGE_TEXT_MAX 20 + +static const SDL_Color MESSAGE_CASH_COLOR = {64, 255, 64, 255}; +static const SDL_Color MESSAGE_PURCHASE_COLOR = {255, 64, 64, 255}; +static const SDL_Color MESSAGE_MAXED_COLOR = {255, 255, 64, 255}; +static const SDL_Color MESSAGE_DAMAGE_COLOR = {255, 64, 64, 255}; +static const SDL_Color MESSAGE_WAVE_CLEAR_COLOR = {0, 0, 0, 255}; +static const SDL_Color MESSAGE_WAVE_FAIL_COLOR = {255, 64, 64, 255}; +static const SDL_Color MESSAGE_GAME_CLEAR_COLOR = {255, 255, 64, 255}; +static const SDL_Color MESSAGE_POWER_UP_COLOR = {255, 64, 255, 255}; +static const SDL_Color MESSAGE_POWER_DOWN_COLOR = {255, 64, 255, 255}; +static const SDL_Color MESSAGE_MIRACLE_CURE_COLOR = {225, 255, 225, 255}; +static const SDL_Color MESSAGE_DYNAMITE_COLOR = {0, 0, 0, 255}; + +Message* message_cash_add(f64 _x, f64 _y, s32 _c, Play* _p); +Message* message_no_cash_add(f64 _x, f64 _y, Play* _p); +Message* message_maxed_add(f64 _x, f64 _y, Play* _p); +Message* message_broke_add(f64 _x, f64 _y, Play* _p); +Message* message_purchase_add(f64 _x, f64 _y, s32 _c, Play* _p); +Message* message_damage_add(f64 _x, f64 _y, s32 _d, Play* _p); +Message* message_wave_clear_add(f64 _x, f64 _y, Play* _p); +Message* message_wave_fail_add(f64 _x, f64 _y, Play* _p); +Message* message_game_clear_add(f64 _x, f64 _y, Play* _p); +Message* message_power_up_add(f64 _x, f64 _y, Play* _p); +Message* message_power_down_add(f64 _x, f64 _y, Play* _p); +Message* message_miracle_cure_add(f64 _x, f64 _y, Play* _p); +Message* message_dynamite_add(f64 _x, f64 _y, Play* _p); +void message_draw(Message* _m, Play* _p); +void message_update(Message* _m, Play* _p); diff --git a/src/game/play/message/messages.c b/src/game/play/message/messages.c new file mode 100755 index 0000000..d06144e --- /dev/null +++ b/src/game/play/message/messages.c @@ -0,0 +1,60 @@ +/* + * DESCRIPTION: + * Handles play messages. +*/ + +#include "messages.h" + +/* Initializes messages. */ +void +messages_init(Play* _p) +{ + list_init(&_p->messages); +} + +/* Frees messages. */ +void +messages_free(Play* _p) +{ + list_free(&_p->messages); +} + +/* Updates messages. */ +void +messages_update(Play* _p) +{ + Message** messages; + s32 messageCount; + + messages = (Message**)list_data_get(&_p->messages); + messageCount = _p->messages.count; + + for (s32 i = 0; i < messageCount; i++) + { + Message* m; + + m = messages[i]; + + message_update(m, _p); + } +} + +/* Draws messages. */ +void +messages_draw(Play* _p) +{ + Message** messages; + s32 messageCount; + + messages = (Message**)list_data_get(&_p->messages); + messageCount = _p->messages.count; + + for (s32 i = 0; i < messageCount; i++) + { + Message* m; + + m = messages[i]; + + message_draw(m, _p); + } +} diff --git a/src/game/play/message/messages.h b/src/game/play/message/messages.h new file mode 100755 index 0000000..ab65f7d --- /dev/null +++ b/src/game/play/message/messages.h @@ -0,0 +1,13 @@ +/* + * DESCRIPTION: + * Header file for messages.c. +*/ + +#pragma once + +#include "message.h" + +void messages_init(Play* _p); +void messages_update(Play* _p); +void messages_draw(Play* _p); +void messages_free(Play* _p); diff --git a/src/game/play/pause/pause.c b/src/game/play/pause/pause.c new file mode 100755 index 0000000..5d0bf19 --- /dev/null +++ b/src/game/play/pause/pause.c @@ -0,0 +1,25 @@ +/* + * DESCRIPTION: + * Gameplay pausing code!!! +*/ + +#include "pause.h" + +/* Initializes pause. */ +void +pause_init(Play* _p) +{ + _p->isPaused = FALSE; +} + +/* Updates pause. */ +void +pause_update(Play* _p) +{ + if (keyboard_press(&_p->g->keyboard, KEYBOARD_P)) + { + _p->isPaused = !_p->isPaused; + + sound_play(_p->g->sounds[SOUND_MENU], -1); + } +} diff --git a/src/game/play/pause/pause.h b/src/game/play/pause/pause.h new file mode 100755 index 0000000..047ce71 --- /dev/null +++ b/src/game/play/pause/pause.h @@ -0,0 +1,11 @@ +/* + * DESCRIPTION: + * Header file for pause.c. +*/ + +#pragma once + +#include "../../GAME_COMMON.h" + +void pause_init(Play* _p); +void pause_update(Play* _p); diff --git a/src/game/play/play.c b/src/game/play/play.c new file mode 100755 index 0000000..8d2d423 --- /dev/null +++ b/src/game/play/play.c @@ -0,0 +1,116 @@ +/* + * DESCRIPTION: + * Main gameplay functions. +*/ + +#include "play.h" + +/* Initializes gameplay resources. */ +void +play_init(Play* _p, Game* _g) +{ + memset(_p, '\0', sizeof(Play)); + + _p->g = _g; + + music_play(_p->g->music[MUSIC_PLAY], TRUE); + + player_init(&_p->player, _p); + enemies_init(&_p->enemies, _p); + collectibles_init(&_p->collectibles, _p); + + wave_init(_p); + spawn_init(_p); + pause_init(_p); + + gui_init(&_p->gui, _p); + messages_init(_p); + + tutorial_init(_p); + + text_sprite_init + ( + &_p->pauseText, + _p->g->renderer, + _p->g->fonts[FONT_MEGA], + PLAY_PAUSE_TEXT_COLOR, + ORIGIN_MIDDLE, + STRING_PLAY_PAUSE, + 0 + ); + + _p->pauseText.x = PLAY_PAUSE_X_OFFSET; + _p->pauseText.y = PLAY_PAUSE_Y_OFFSET; + + sprite_init + ( + &_p->bg, + _p->g->textures[TEXTURE_PLAY_BG], + ORIGIN_TOP_LEFT, + PLAY_BG_WIDTH, + PLAY_BG_HEIGHT + ); + + _p->bg.x = PLAY_BG_OFFSET_X; + _p->bg.y = PLAY_BG_OFFSET_Y; +} + +/* Frees gameplay resources. */ +void +play_free(Play* _p) +{ + enemies_free(&_p->enemies, _p); + collectibles_free(&_p->collectibles, _p); + player_free(&_p->player, _p); + gui_free(&_p->gui, _p); + messages_free(_p); + tutorial_free(_p); +} + +/* Updates gameplay. */ +void +play_update(Play* _p) +{ + gui_update(&_p->gui, _p); + pause_update(_p); + + if (!_p->isPaused) + { + player_update(&_p->player, _p); + enemies_update(&_p->enemies, _p); + collectibles_update(&_p->collectibles, _p); + messages_update(_p); + + wave_update(_p); + spawn_update(_p); + + tutorial_update(_p); + } +} + +/* Draws gameplay. */ +void +play_draw(Play* _p) +{ + sprite_draw(&_p->bg, _p->g->renderer); + enemies_draw(&_p->enemies, _p); + collectibles_draw(&_p->collectibles, _p); + player_draw(&_p->player, _p); + messages_draw(_p); + tutorial_draw(_p); + gui_draw(&_p->gui, _p); + + if (_p->isPaused) + { + SDL_Rect r; + + r.x = 0; + r.y = 0; + r.w = PLAY_PAUSE_RECTANGLE_WIDTH; + r.h = PLAY_PAUSE_RECTANGLE_HEIGHT; + + rectangle_draw(&r, _p->g->renderer, PLAY_PAUSE_BACKGROUND_COLOR); + + sprite_draw(&_p->pauseText, _p->g->renderer); + } +} diff --git a/src/game/play/play.h b/src/game/play/play.h new file mode 100755 index 0000000..2c99bbe --- /dev/null +++ b/src/game/play/play.h @@ -0,0 +1,33 @@ +/* + * DESCRIPTION: + * Header file for play.h. +*/ + +#pragma once + +#include "collectible/collectibles.h" +#include "enemy/enemies.h" +#include "player/player.h" +#include "message/messages.h" +#include "pause/pause.h" +#include "gui/gui.h" +#include "spawn/spawn.h" +#include "tutorial/tutorial.h" +#include "wave/wave.h" + +#define PLAY_BG_OFFSET_X 0 +#define PLAY_BG_OFFSET_Y 0 +#define PLAY_BG_WIDTH 800 +#define PLAY_BG_HEIGHT 600 +#define PLAY_PAUSE_X_OFFSET 400 +#define PLAY_PAUSE_Y_OFFSET 300 +#define PLAY_PAUSE_RECTANGLE_WIDTH 800 +#define PLAY_PAUSE_RECTANGLE_HEIGHT 600 + +static const SDL_Color PLAY_PAUSE_TEXT_COLOR = {255, 255, 255, 255}; +static const SDL_Color PLAY_PAUSE_BACKGROUND_COLOR = {0, 0, 0, 64}; + +void play_draw(Play* _p); +void play_free(Play* _p); +void play_init(Play* _p, Game* _g); +void play_update(Play* _p); diff --git a/src/game/play/player/player.c b/src/game/play/player/player.c new file mode 100755 index 0000000..9f8f81c --- /dev/null +++ b/src/game/play/player/player.c @@ -0,0 +1,92 @@ +/* + * DESCRIPTION: + * Player code. +*/ + +#include "player.h" + +/* Initializes player. */ +void +player_init(Player* _p, Play* _l) +{ + memset(_p, '\0', sizeof(Player)); + + player_fatness_init(_p, _l); + player_upgrades_init(_p, _l); + player_price_init(_p, _l); + player_power_up_init(_p, _l); + player_fire_init(_p, _l); + player_shadow_init(_p, _l); + player_sprite_init(_p, _l); + player_tail_init(_p, _l); + player_snakes_init(_p, _l); + player_direction_init(_p, _l); + player_movement_init(_p, _l); + player_defeat_init(_p, _l); +} + +/* Frees player. */ +void +player_free(Player* _p, Play* _l) +{ + player_sprite_free(_p, _l); + player_snakes_free(_p, _l); +} + +/* Updates player. */ +void +player_update(Player* _p, Play* _l) +{ + player_movement_update(_p, _l); + + player_cash_update(_p, _l); + + player_power_up_update(_p, _l); + + player_upgrades_update(_p, _l); + + player_price_update(_p, _l); + + player_direction_update(_p, _l); + + player_sprite_update(_p, _l); + + player_tail_update(_p, _l); + + player_shadow_update(_p, _l); + + player_fatness_update(_p, _l); + + player_fire_update(_p, _l); + + player_snakes_update(_p, _l); + + player_defeat_update(_p, _l); +} + +/* Draws player. */ +void +player_draw(Player* _p, Play* _l) +{ + player_shadow_draw(_p, _l); + + + switch (_p->direction) + { + case DIRECTION_LEFT: + case DIRECTION_DOWN: + case DIRECTION_RIGHT: + player_sprite_draw(_p, _l); + player_tail_draw(_p, _l); + player_snakes_draw(_p, _l); + break; + case DIRECTION_UP: + player_snakes_draw(_p, _l); + player_sprite_draw(_p, _l); + player_tail_draw(_p, _l); + break; + default: + break; + } + +} diff --git a/src/game/play/player/player.h b/src/game/play/player/player.h new file mode 100755 index 0000000..381388a --- /dev/null +++ b/src/game/play/player/player.h @@ -0,0 +1,24 @@ +/* + * DESCRIPTION: + * Header file for player.c. +*/ + +#pragma once + +#include "player_cash.h" +#include "player_defeat.h" +#include "player_direction.h" +#include "player_fatness.h" +#include "player_fire.h" +#include "player_movement.h" +#include "player_power_up.h" +#include "player_price.h" +#include "player_shadow.h" +#include "player_sprite.h" +#include "player_tail.h" +#include "player_upgrades.h" + +void player_draw(Player* _p, Play* _l); +void player_free(Player* _p, Play* _l); +void player_init(Player* _p, Play* _l); +void player_update(Player* _p, Play* _l); diff --git a/src/game/play/player/player_cash.c b/src/game/play/player/player_cash.c new file mode 100755 index 0000000..760b6bd --- /dev/null +++ b/src/game/play/player/player_cash.c @@ -0,0 +1,41 @@ +/* + * DESCRIPTION: + * Player's cash. +*/ + +#include "player_cash.h" + +/* Adds some cash. */ +void +player_cash_acquire(Player* _p, s32 _c, Play* _l) +{ + f64 cash; + + if (_l->game > 1) + cash = _c * ((_l->game - 1) * PLAYER_CASH_GAME_MULTIPLIER); + else + cash = _c; + + _p->cash += (s32)cash; + _p->cashCollected += (s32)cash; + + message_cash_add(_p->sprite.x, _p->sprite.y, (s32)cash, _l); + + _p->isCashUpdate = TRUE; +} + +/* Initializes player cash. */ +void +player_cash_init(Player* _p, Play* _l) +{ + _p->cash = 0; + + _p->isCashUpdate = FALSE; +} + +/* Updates player cash. */ +void +player_cash_update(Player* _p, Play* _l) +{ + _p->cash = CEIL(_p->cash, PLAYER_CASH_MAX); +} diff --git a/src/game/play/player/player_cash.h b/src/game/play/player/player_cash.h new file mode 100755 index 0000000..746ff2e --- /dev/null +++ b/src/game/play/player/player_cash.h @@ -0,0 +1,13 @@ +/* + * DESCRIPTION: + * Header file for player_cash.c. +*/ + +#include "../message/message.h" + +#define PLAYER_CASH_MAX 999999999 +#define PLAYER_CASH_GAME_MULTIPLIER 1.25 + +void player_cash_acquire(Player* _p, s32 _c, Play* _l); +void player_cash_init(Player* _p, Play* _l); +void player_cash_update(Player* _p, Play* _l); diff --git a/src/game/play/player/player_defeat.c b/src/game/play/player/player_defeat.c new file mode 100755 index 0000000..dc572d2 --- /dev/null +++ b/src/game/play/player/player_defeat.c @@ -0,0 +1,60 @@ +/* + * DESCRIPTION: + * Functions concering player defeat. +*/ + +#include "player_defeat.h" + +/* The player is defeated. */ +void +player_defeat(Player* _p, Play* _l) +{ + list_clear(&_p->snakes); + list_clear(&_l->collectibles); + + music_stop(); + + _p->isBeingDefeated = TRUE; + _p->defeatTimer = 0; + _p->isDefeat = TRUE; +} + +/* Start the defeat process. */ +void +player_defeat_begin(Player* _p, Play* _l) +{ + _p->isBeingDefeated = TRUE; + _p->defeatTimer = PLAYER_DEFEAT_TIMER_MAX; + + list_clear(&_p->snakes); + list_clear(&_l->collectibles); + + music_stop(); + + _l->isBountyUpdate = TRUE; +} + +/* Initializes player defeat. */ +void +player_defeat_init(Player* _p, Play* _l) +{ + _p->isDefeat = FALSE; + _p->isBeingDefeated = FALSE; + _p->defeatTimer = 0; +} + +/* Updates the player defeat. */ +void +player_defeat_update(Player* _p, Play* _l) +{ + if (_p->isBeingDefeated) + { + _p->defeatTimer--; + + _p->isAbleToFire = FALSE; + _p->isAbleToMove = FALSE; + + if (_p->defeatTimer <= 0) + player_defeat(_p, _l); + } +} diff --git a/src/game/play/player/player_defeat.h b/src/game/play/player/player_defeat.h new file mode 100755 index 0000000..59f0593 --- /dev/null +++ b/src/game/play/player/player_defeat.h @@ -0,0 +1,15 @@ +/* + * DESCRIPTION: + * Header file for player_defeat.h. +*/ + +#pragma once + +#include "../../GAME_COMMON.h" + +#define PLAYER_DEFEAT_TIMER_MAX 300 + +void player_defeat_begin(Player* _p, Play* _l); +void player_defeat(Player* _p, Play* _l); +void player_defeat_init(Player* _p, Play* _l); +void player_defeat_update(Player* _p, Play* _l); diff --git a/src/game/play/player/player_direction.c b/src/game/play/player/player_direction.c new file mode 100755 index 0000000..f36a61a --- /dev/null +++ b/src/game/play/player/player_direction.c @@ -0,0 +1,63 @@ +/* + * DESCRIPTION: + * The player's facing direction. +*/ + +#include "player_direction.h" + +/* Initializes player direction. */ +void +player_direction_init(Player* _p, Play* _l) +{ + _p->direction = DIRECTION_RIGHT; +} + +/* Sets player direction. */ +void +player_direction_set(Player* _p, Play* _l) +{ + f64 angle; + + angle = math_atan + ( + _p->shadow.x, + _p->shadow.y, + _l->gui.cursor.sprite.x, + _l->gui.cursor.sprite.y + ); + + angle *= RAD_TO_DEG; + + if + ( + angle > PLAYER_DIRECTION_DOWN_THRESHOLD && + angle <= PLAYER_DIRECTION_LEFT_THRESHOLD + ) + _p->direction = DIRECTION_LEFT; + else if + ( + angle > PLAYER_DIRECTION_LEFT_THRESHOLD && + angle <= PLAYER_DIRECTION_UP_THRESHOLD + ) + _p->direction = DIRECTION_UP; + else if + ( + angle > PLAYER_DIRECTION_RIGHT_THRESHOLD && + angle <= PLAYER_DIRECTION_DOWN_THRESHOLD + ) + _p->direction = DIRECTION_DOWN; + else + _p->direction = DIRECTION_RIGHT; +} + +/* Updates player direction. */ +void +player_direction_update(Player* _p, Play* _l) +{ + if + ( + _p->isAbleToMove && + !_p->isKeyboardMove + ) + player_direction_set(_p, _l); +} diff --git a/src/game/play/player/player_direction.h b/src/game/play/player/player_direction.h new file mode 100755 index 0000000..66a2251 --- /dev/null +++ b/src/game/play/player/player_direction.h @@ -0,0 +1,17 @@ +/* + * DESCRIPTION: + * Header file for player_direction.c. +*/ + +#pragma once + +#include "../../GAME_COMMON.h" + +#define PLAYER_DIRECTION_LEFT_THRESHOLD 45 +#define PLAYER_DIRECTION_UP_THRESHOLD 135 +#define PLAYER_DIRECTION_RIGHT_THRESHOLD -135 +#define PLAYER_DIRECTION_DOWN_THRESHOLD -45 + +void player_direction_init(Player* _p, Play* _l); +void player_direction_update(Player* _p, Play* _l); +void player_direction_set(Player* _p, Play* _l); diff --git a/src/game/play/player/player_fatness.c b/src/game/play/player/player_fatness.c new file mode 100755 index 0000000..fc20e33 --- /dev/null +++ b/src/game/play/player/player_fatness.c @@ -0,0 +1,104 @@ +/* + * DESCRIPTION: + * Functions concering player fatness. +*/ + +#include "player_fatness.h" + +static void player_fatness_swallow(Player* _p, Play* _l); +static void player_fatness_gain(Player* _p, Play* _l); + +/* When you hit an enemy, you 'swallow" them, and this happens. */ +static void +player_fatness_swallow(Player* _p, Play* _l) +{ + enemies_defeat(&_l->enemies, _l); + list_clear(&_l->spawnEnemies); + + _l->isWaveFailed = TRUE; + + _p->isAbleToMove = FALSE; + _p->isAbleToFire = FALSE; + + _p->dX = 0; + _p->dY = 0; + + _p->isBeingFattened = TRUE; + _p->fatnessTimer = PLAYER_FATNESS_TIMER_MAX; + + _p->isFatnessUpdate = TRUE; + + _l->enemyMax = 0; + _l->isBountyUpdate = TRUE; + + _p->isStationary = TRUE; + + sound_play(_l->g->sounds[SOUND_SWALLOW], -1); + + if (_p->fatness + 1 > PLAYER_FATNESS_THRESHOLD) + player_defeat(_p, _l); +} + +/* You gain fatness. */ +static void +player_fatness_gain(Player* _p, Play* _l) +{ + _p->isAbleToMove = TRUE; + _p->isAbleToFire = TRUE; + + _p->fatness++; + _p->isBeingFattened = FALSE; + _p->isFatnessUpdate = TRUE; + + sound_play(_l->g->sounds[SOUND_GROWTH], -1); +} + +/* Initializes player fatness. */ +void +player_fatness_init(Player* _p, Play* _l) +{ + _p->fatness = PLAYER_FATNESS_DEFAULT; +} + +/* Updates the player fatness. */ +void +player_fatness_update(Player* _p, Play* _l) +{ + Enemy** enemies; + s32 enemyCount; + + if (_p->isFatnessUpdate) + _p->isFatnessUpdate = FALSE; + + enemies = (Enemy**)list_data_get(&_l->enemies); + enemyCount = _l->enemies.count; + + for (s32 i = 0; i < enemyCount; i++) + { + Enemy* e; + + e = enemies[i]; + + if + ( + circle_collide(&_p->shadow, &e->shadow) && + e->isActive + ) + { + player_fatness_swallow(_p, _l); + break; + } + } + + if (_p->isBeingFattened) + { + _p->fatnessTimer--; + + if (_p->fatnessTimer <= 0) + player_fatness_gain(_p, _l); + } + + free(enemies); + + _p->fatness = CLAMP(_p->fatness, 0, PLAYER_FATNESS_MAX - 1); +} diff --git a/src/game/play/player/player_fatness.h b/src/game/play/player/player_fatness.h new file mode 100755 index 0000000..3353df8 --- /dev/null +++ b/src/game/play/player/player_fatness.h @@ -0,0 +1,15 @@ +/* + * DESCRIPTION: + * Header file for player_fatness.h. +*/ + +#pragma once + +#include "../enemy/enemies.h" +#include "player_defeat.h" + +#define PLAYER_FATNESS_DEFAULT 0 +#define PLAYER_FATNESS_TIMER_MAX 60 + +void player_fatness_init(Player* _p, Play* _l); +void player_fatness_update(Player* _p, Play* _l); diff --git a/src/game/play/player/player_fire.c b/src/game/play/player/player_fire.c new file mode 100755 index 0000000..9fc1944 --- /dev/null +++ b/src/game/play/player/player_fire.c @@ -0,0 +1,165 @@ +/* + * DESCRIPTION: + * Player firing code. +*/ + +#include "player_fire.h" + +static void player_fire(Player* _p, Play* _l); +static void player_redirect(Player* _p, Play* _l); + +/* Fires a snake. */ +static void +player_fire(Player* _p, Play* _l) +{ + player_snake_add(_p, _l); + + sound_play(_l->g->sounds[SOUND_SNAKE_FIRE], -1); + + _p->isSnakeUpdate = TRUE; +} + +/* Redirects all snakes. The angle of the snakes must be significant enough to do so. */ +static void +player_redirect(Player* _p, Play* _l) +{ + Snake** snakes; + Snake** snakesAvailable; + s32 snakesAvailableCount; + + snakes = (Snake**)list_data_get(&_p->snakes); + + snakesAvailableCount = 0; + snakesAvailable = NULL; + + for (s32 i = 0; i < _p->snakes.count; i++) + { + f64 playerAngle; + f64 snakeAngle; + f64 angleDifference; + Snake* s; + + s = snakes[i]; + + playerAngle = math_atan + ( + _l->player.shadow.x, + _l->player.shadow.y, + _l->g->mouse.x, + _l->g->mouse.y + ); + + snakeAngle = math_atan + ( + _l->player.shadow.x, + _l->player.shadow.y, + s->sprite.x, + s->sprite.y + ); + + playerAngle *= RAD_TO_DEG; + snakeAngle *= RAD_TO_DEG; + + angleDifference = fabs(playerAngle - snakeAngle); + + if + ( + angleDifference > PLAYER_SNAKE_REDIRECT_ANGLE_DIFFERENCE_MIN && + !s->isReturning + ) + { + snakesAvailableCount++; + + snakesAvailable = realloc(snakesAvailable, sizeof(Snake*) * snakesAvailableCount); + + snakesAvailable[snakesAvailableCount - 1] = s; + } + } + + if (snakesAvailableCount > 0) + _p->redirects--; + + for (s32 i = 0; i < snakesAvailableCount; i++) + { + Snake* s; + + s = snakesAvailable[i]; + + s->redirectCount++; + + s->redirectCount = CEIL(s->redirectCount, PLAYER_REDIRECT_MAX); + + s->redirectTimer = PLAYER_REDIRECT_TIMER_MAX; + s->sprite.frame = SNAKE_REDIRECT; + + s->damage = PLAYER_SNAKE_DAMAGE_DEFAULT + pow(s->redirectCount, 2); + + player_snake_reset(s, _p, _l); + } + + free(snakes); + + _p->isRedirectUpdate = TRUE; + + if (snakesAvailableCount > 0) + sound_play(_l->g->sounds[SOUND_SNAKE_REDIRECT], 7); +} + +/* Initializes player firing. */ +void +player_fire_init(Player* _p, Play* _l) +{ + _p->isAbleToFire = TRUE; + _p->snakeReserve = _p->snakeMax; + _p->redirects = _p->redirectMax; + + _p->redirectRechargeTimer = PLAYER_REDIRECT_RECHARGE_TIMER_MAX; +} + +/* Updates the player's firing. */ +void +player_fire_update(Player* _p, Play* _l) +{ + if (_p->isSnakeUpdate) + _p->isSnakeUpdate = FALSE; + + if (_p->isRedirectUpdate) + _p->isRedirectUpdate = FALSE; + + if (_p->redirectTimer > 0) + _p->redirectTimer--; + + + if (_p->snakeReserve > 0) + { + if (_p->isAbleToFire) + { + if (mouse_press(&_l->g->mouse, MOUSE_LEFT)) + { + player_fire(_p, _l); + _p->snakeReserve--; + } + } + } + if + ( + _p->snakes.count > 0 && + _p->redirects > 0 && + _p->redirectTimer <= 0 + ) + if + ( + mouse_press(&_l->g->mouse, MOUSE_RIGHT) || + keyboard_press(&_l->g->keyboard, KEYBOARD_R) + ) + { + player_redirect(_p, _l); + _p->redirectTimer = PLAYER_REDIRECT_TIMER_MAX; + } + + if (_p->snakes.count == 0) + { + _p->redirects = _p->redirectMax; + _p->isRedirectUpdate = TRUE; + } +} diff --git a/src/game/play/player/player_fire.h b/src/game/play/player/player_fire.h new file mode 100755 index 0000000..42f38b6 --- /dev/null +++ b/src/game/play/player/player_fire.h @@ -0,0 +1,16 @@ +/* + * DESCRIPTION: + * Header file for player_fire.c. +*/ + +#pragma once + +#include "player_snakes.h" +#include "player_direction.h" + +#define PLAYER_REDIRECT_MAX 99 +#define PLAYER_REDIRECT_TIMER_MAX 10 +#define PLAYER_REDIRECT_RECHARGE_TIMER_MAX 60 + +void player_fire_init(Player* _p, Play* _l); +void player_fire_update(Player* _p, Play* _l); diff --git a/src/game/play/player/player_movement.c b/src/game/play/player/player_movement.c new file mode 100755 index 0000000..3ecd272 --- /dev/null +++ b/src/game/play/player/player_movement.c @@ -0,0 +1,190 @@ +/* + * DESCRIPTION: + * Player movement code. +*/ + +#include "player_movement.h" + +static void player_velocity_reset(Player* _p); +static bool_u8 player_movement_left_held(Play* _p); +static bool_u8 player_movement_right_held(Play* _p); +static bool_u8 player_movement_up_held(Play* _p); +static bool_u8 player_movement_down_held(Play* _p); + +static bool_u8 +player_movement_left_held(Play* _p) +{ + if + ( + keyboard_held(&_p->g->keyboard, KEYBOARD_LEFT) || + keyboard_held(&_p->g->keyboard, KEYBOARD_A) + ) + return TRUE; + return FALSE; +} + +static bool_u8 +player_movement_right_held(Play* _p) +{ + if + ( + keyboard_held(&_p->g->keyboard, KEYBOARD_RIGHT) || + keyboard_held(&_p->g->keyboard, KEYBOARD_D) + ) + return TRUE; + return FALSE; +} + +static bool_u8 +player_movement_up_held(Play* _p) +{ + if + ( + keyboard_held(&_p->g->keyboard, KEYBOARD_UP) || + keyboard_held(&_p->g->keyboard, KEYBOARD_W) + ) + return TRUE; + return FALSE; +} + +static bool_u8 +player_movement_down_held(Play* _p) +{ + if + ( + keyboard_held(&_p->g->keyboard, KEYBOARD_DOWN) || + keyboard_held(&_p->g->keyboard, KEYBOARD_S) + ) + return TRUE; + return FALSE; +} + +static void +player_velocity_reset(Player* _p) +{ + _p->dX = 0; + _p->dY = 0; + _p->isStationary = TRUE; +} + +void +player_movement_init(Player* _p, Play* _l) +{ + _p->isAbleToMove = TRUE; + _p->isKeyboardMove = TRUE;; +} + +/* Updates player movement. */ +void +player_movement_update(Player* _p, Play* _l) +{ + if (_p->isStationary) + _p->isStationary = FALSE; + + if (_p->isAbleToMove && !_l->isGameCleared) + { + f64 angle; + f64 velocity; + + velocity = PLAYER_VELOCITIES[_p->fatness]; + + if (_p->isKeyboardMove) + { + bool_u8 isMove; + + _p->isStationary = TRUE; + isMove = FALSE; + + player_velocity_reset(_p); + + if (player_movement_left_held(_l)) + { + angle = PLAYER_MOVEMENT_LEFT_ANGLE; + _p->direction = DIRECTION_LEFT; + + if (player_movement_up_held(_l)) + angle = PLAYER_MOVEMENT_LEFT_UP_ANGLE; + else if (player_movement_down_held(_l)) + angle = PLAYER_MOVEMENT_LEFT_DOWN_ANGLE; + + isMove = TRUE; + } + else if (player_movement_right_held(_l)) + { + angle = PLAYER_MOVEMENT_RIGHT_ANGLE; + _p->direction = DIRECTION_RIGHT; + + if (player_movement_up_held(_l)) + angle = PLAYER_MOVEMENT_RIGHT_UP_ANGLE; + else if (player_movement_down_held(_l)) + angle = PLAYER_MOVEMENT_RIGHT_DOWN_ANGLE; + + isMove = TRUE; + } + else if (player_movement_up_held(_l)) + { + angle = PLAYER_MOVEMENT_UP_ANGLE; + //_p->direction = DIRECTION_UP; + isMove = TRUE; + } + else if (player_movement_down_held(_l)) + { + angle = PLAYER_MOVEMENT_DOWN_ANGLE; + //_p->direction = DIRECTION_DOWN; + isMove = TRUE; + } + + _p->dX = -(cos(angle) * velocity); + _p->dY = -(sin(angle) * velocity); + + if (isMove) + _p->isStationary = FALSE; + else + player_velocity_reset(_p); + + } + else + { + if (!mouse_held(&_l->g->mouse, MOUSE_RIGHT)) + player_velocity_reset(_p); + else + { + f64 distance; + + distance = math_distance + ( + _p->sprite.x, + _p->sprite.y, + _l->g->mouse.x, + _l->g->mouse.y + ); + + if (distance > PLAYER_MOVE_MINIMUM) + { + angle = math_atan + ( + _p->sprite.x, + _p->sprite.y, + _l->g->mouse.x, + _l->g->mouse.y + ); + + _p->dX = -(cos(angle) * velocity); + _p->dY = -(sin(angle) * velocity); + + _p->isStationary = FALSE; + } + else + player_velocity_reset(_p); + } + } + } + + _p->sprite.x += _p->dX; + _p->sprite.y += _p->dY; + + _p->sprite.x = _p->sprite.x < PLAYER_MOVEMENT_X_MIN ? PLAYER_MOVEMENT_X_MIN : _p->sprite.x; + _p->sprite.x = _p->sprite.x > PLAYER_MOVEMENT_X_MAX ? PLAYER_MOVEMENT_X_MAX : _p->sprite.x; + _p->sprite.y = _p->sprite.y < PLAYER_MOVEMENT_Y_MIN ? PLAYER_MOVEMENT_Y_MIN : _p->sprite.y; + _p->sprite.y = _p->sprite.y > PLAYER_MOVEMENT_Y_MAX ? PLAYER_MOVEMENT_Y_MAX : _p->sprite.y; +} diff --git a/src/game/play/player/player_movement.h b/src/game/play/player/player_movement.h new file mode 100755 index 0000000..9fd3c4a --- /dev/null +++ b/src/game/play/player/player_movement.h @@ -0,0 +1,30 @@ +#pragma once + +#include "../../GAME_COMMON.h" + +#define PLAYER_MOVE_MINIMUM 32 + +#define PLAYER_MOVEMENT_LEFT_ANGLE 0 +#define PLAYER_MOVEMENT_RIGHT_ANGLE (PI) +#define PLAYER_MOVEMENT_UP_ANGLE (PI / 2) +#define PLAYER_MOVEMENT_DOWN_ANGLE (PI + (PI / 2)) +#define PLAYER_MOVEMENT_LEFT_UP_ANGLE PLAYER_MOVEMENT_LEFT_ANGLE + (PI / 4) +#define PLAYER_MOVEMENT_LEFT_DOWN_ANGLE PLAYER_MOVEMENT_LEFT_ANGLE - (PI / 4) +#define PLAYER_MOVEMENT_RIGHT_UP_ANGLE PLAYER_MOVEMENT_RIGHT_ANGLE - (PI / 4) +#define PLAYER_MOVEMENT_RIGHT_DOWN_ANGLE PLAYER_MOVEMENT_RIGHT_ANGLE + (PI / 4) +#define PLAYER_MOVEMENT_X_MIN -10 +#define PLAYER_MOVEMENT_X_MAX 810 +#define PLAYER_MOVEMENT_Y_MIN -10 +#define PLAYER_MOVEMENT_Y_MAX 610 + +#include "player_direction.h" + +static const s32 PLAYER_VELOCITIES[PLAYER_FATNESS_MAX] = +{ + 5, + 4, + 3 +}; + +void player_movement_init(Player* _p, Play* _l); +void player_movement_update(Player* _p, Play* _l); diff --git a/src/game/play/player/player_power_up.c b/src/game/play/player/player_power_up.c new file mode 100755 index 0000000..0801cf1 --- /dev/null +++ b/src/game/play/player/player_power_up.c @@ -0,0 +1,42 @@ +/* + * DESCRIPTION: + * Player power up behavior. Infinite snakes!! +*/ + +#include "player_power_up.h" + +/* No more power up. */ +void +player_power_up_end(Player* _p, Play* _l) +{ + _p->powerUpTimer = 0; + _p->isPowerUp = FALSE; + + player_snakes_clear(_p, _l); + _p->snakeReserve = _p->snakeMax; + + message_power_down_add(_p->sprite.x, _p->sprite.y, _l); +} + +/* Initializes player power_up. */ +void +player_power_up_init(Player* _p, Play* _l) +{ + _p->powerUpTimer = 0; + _p->isPowerUp = 0; +} + +/* Updates player power_up. */ +void +player_power_up_update(Player* _p, Play* _l) +{ + if (_p->isPowerUp) + { + _p->powerUpTimer--; + + _p->snakeReserve = _p->snakeMax; + + if (_p->powerUpTimer <= 0) + player_power_up_end(_p, _l); + } +} diff --git a/src/game/play/player/player_power_up.h b/src/game/play/player/player_power_up.h new file mode 100755 index 0000000..4422f54 --- /dev/null +++ b/src/game/play/player/player_power_up.h @@ -0,0 +1,13 @@ +/* + * DESCRIPTION: + * Header file for player_power_up.c. +*/ + +#pragma once + +#include "../message/message.h" +#include "player_snakes.h" + +void player_power_up_end(Player* _p, Play* _l); +void player_power_up_init(Player* _p, Play* _l); +void player_power_up_update(Player* _p, Play* _l); diff --git a/src/game/play/player/player_price.c b/src/game/play/player/player_price.c new file mode 100755 index 0000000..235ab21 --- /dev/null +++ b/src/game/play/player/player_price.c @@ -0,0 +1,89 @@ +/* + * DESCRIPTION: + * Determines prices for player upgrades. +*/ + +#include "player_price.h" + +static s32 player_price_snake_get(Player* _p, Play* _l); +static s32 player_price_redirect_get(Player* _p, Play* _l); +static s32 player_price_lifetime_get(Player* _p, Play* _l); + +/* Gets the snake upgrade price. */ +static s32 +player_price_snake_get(Player* _p, Play* _l) +{ + s32 price; + + price = (s32) + ( + pow + ( + PLAYER_PRICE_BASE, + PLAYER_PRICE_EXPONENT_BASE + ((_p->snakeUpgradeLevel - 1) * PLAYER_PRICE_EXPONENT_INCREMENT) + ) + ); + + return price; +} + +/* Gets the lifetime upgrade price. */ +static s32 +player_price_lifetime_get(Player* _p, Play* _l) +{ + s32 price; + + price = (s32) + ( + pow + ( + PLAYER_PRICE_BASE, + PLAYER_PRICE_EXPONENT_BASE + ((_p->lifetimeUpgradeLevel - 1) * PLAYER_PRICE_EXPONENT_INCREMENT) + ) + ); + + return price; +} + +/* Gets the redirect upgrade price. */ +static s32 +player_price_redirect_get(Player* _p, Play* _l) +{ + s32 price; + + price = (s32) + ( + pow + ( + PLAYER_PRICE_BASE, + PLAYER_PRICE_EXPONENT_BASE + ((_p->redirectUpgradeLevel - 1) * PLAYER_PRICE_EXPONENT_INCREMENT) + ) + ); + + return price; +} + +/* Initializes player prices. */ +void +player_price_init(Player* _p, Play* _l) +{ + _p->snakeUpgradePrice = player_price_snake_get(_p, _l); + _p->lifetimeUpgradePrice = player_price_lifetime_get(_p, _l); + _p->redirectUpgradePrice = player_price_redirect_get(_p, _l); +} + +/* Updates player prices. */ +void +player_price_update(Player* _p, Play* _l) +{ + if (_p->isSnakeUpgradeUpdate) + _p->snakeUpgradePrice = player_price_snake_get(_p, _l); + + if (_p->isLifetimeUpgradeUpdate) + _p->lifetimeUpgradePrice = player_price_lifetime_get(_p, _l); + + if (_p->isRedirectUpgradeUpdate) + _p->redirectUpgradePrice = player_price_redirect_get(_p, _l); + + +} diff --git a/src/game/play/player/player_price.h b/src/game/play/player/player_price.h new file mode 100755 index 0000000..1db9eb3 --- /dev/null +++ b/src/game/play/player/player_price.h @@ -0,0 +1,15 @@ +/* + * DESCRIPTION: + * Header file for player_price.c. +*/ + +#pragma once + +#include "../../GAME_COMMON.h" + +#define PLAYER_PRICE_BASE 250 +#define PLAYER_PRICE_EXPONENT_INCREMENT 0.1 +#define PLAYER_PRICE_EXPONENT_BASE 1.0 + +void player_price_init(Player* _p, Play* _l); +void player_price_update(Player* _p, Play* _l); diff --git a/src/game/play/player/player_shadow.c b/src/game/play/player/player_shadow.c new file mode 100755 index 0000000..bf0c368 --- /dev/null +++ b/src/game/play/player/player_shadow.c @@ -0,0 +1,34 @@ +/* + * DESCRIPTION: + * Functions concering player shadow. +*/ + +#include "player_shadow.h" + +/* Initializes player shadow. */ +void +player_shadow_init(Player* _p, Play* _l) +{ + _p->shadow.r = PLAYER_SHADOW_RADIUS[_p->fatness]; + + _p->shadow.x = _p->sprite.x + PLAYER_SHADOW_OFFSET_X; + _p->shadow.y = _p->sprite.y + PLAYER_SHADOW_OFFSET_Y; +} + +/* Updates the player shadow. */ +void +player_shadow_update(Player* _p, Play* _l) +{ + if (_p->isFatnessUpdate) + _p->shadow.r = PLAYER_SHADOW_RADIUS[_p->fatness]; + + _p->shadow.x = _p->sprite.x + PLAYER_SHADOW_OFFSET_X; + _p->shadow.y = _p->sprite.y + PLAYER_SHADOW_OFFSET_Y; +} + +/* Draws the player shadow. */ +void +player_shadow_draw(Player* _p, Play* _l) +{ + shadow_draw(&_p->shadow, _l); +} diff --git a/src/game/play/player/player_shadow.h b/src/game/play/player/player_shadow.h new file mode 100755 index 0000000..146ae5b --- /dev/null +++ b/src/game/play/player/player_shadow.h @@ -0,0 +1,22 @@ +/* + * DESCRIPTION: + * Header file for player_shadow.h. +*/ + +#pragma once + +#include "../shadow/shadow.h" + +#define PLAYER_SHADOW_OFFSET_X 0 +#define PLAYER_SHADOW_OFFSET_Y 32 + +static const s32 PLAYER_SHADOW_RADIUS[PLAYER_FATNESS_MAX] = +{ + 16, + 24, + 32 +}; + +void player_shadow_init(Player* _p, Play* _l); +void player_shadow_update(Player* _p, Play* _l); +void player_shadow_draw(Player* _p, Play* _l); diff --git a/src/game/play/player/player_snakes.c b/src/game/play/player/player_snakes.c new file mode 100755 index 0000000..ce0bc59 --- /dev/null +++ b/src/game/play/player/player_snakes.c @@ -0,0 +1,401 @@ +/* + * DESCRIPTION: + * Player snake code. +*/ + +#include "player_snakes.h" + +static Sprite snakeSprite; +static Sprite arcSprite; + +static void player_snake_remove(Snake* _s, Player* _p, Play* _l); +static void player_snake_update(Snake* _s, Player* _p, Play* _l); +static void player_snake_draw(Snake* _s, Player* _p, Play* _l); + +/* Removes a snake. */ +static void +player_snake_remove(Snake* _s, Player* _p, Play* _l) +{ + Enemy** enemies; + Collectible** collectibles; + s32 enemyCount; + s32 collectibleCount; + + enemies = (Enemy**)list_data_get(&_l->enemies); + enemyCount = _l->enemies.count; + + /* + * If you're looking for it, this is the most inefficent code in this entire thing. + * And that's saying a lot! + */ + for (s32 i = 0; i < enemyCount; i++) + { + Enemy* e; + + e = enemies[i]; + + list_node_from_data_remove(&e->snakesHit, &_s, sizeof(Snake*)); + list_node_from_data_remove(&e->returnSnakesHit, &_s, sizeof(Snake*)); + } + + free(enemies); + + collectibles = (Collectible**)list_data_get(&_l->collectibles); + collectibleCount = _l->collectibles.count; + + for (s32 i = 0; i < collectibleCount; i++) + { + Collectible* c; + + c = collectibles[i]; + + if (c->attachedSnake == _s) + { + c->attachedSnake = NULL; + c->isAttached = FALSE; + collectible_collect(c, &_l->collectibles, _l); + } + } + + free(collectibles); + + list_node_from_data_remove(&_p->snakes, _s, sizeof(Snake)); + + _p->snakeReserve++; + + _p->snakeReserve = CEIL(_p->snakeReserve, _p->snakeMax); + + _p->isSnakeUpdate = TRUE; + + if (_p->redirects < _p->redirectMax) + { + _p->redirects++; + _p->isRedirectUpdate = TRUE; + } +} + +/* Updates a given snake. */ +static void +player_snake_update(Snake* _s, Player* _p, Play* _l) +{ + Collectible** collectibles; + Enemy** enemies; + s32 enemyCount; + s32 collectibleCount; + + _s->sprite.x += _s->dX; + _s->sprite.y += _s->dY; + + _s->shadow.x = _s->sprite.x + PLAYER_SNAKE_SHADOW_OFFSET_X; + _s->shadow.y = _s->sprite.y + PLAYER_SNAKE_SHADOW_OFFSET_Y; + + _s->animationTimer--; + + enemies = (Enemy**)list_data_get(&_l->enemies); + enemyCount = _l->enemies.count; + + if (_s->animationTimer <= 0) + { + if (_s->sprite.flip == FLIP_VERTICAL) + _s->sprite.flip = FLIP_NONE; + else + _s->sprite.flip = FLIP_VERTICAL; + + _s->animationTimer = PLAYER_SNAKE_ANIMATION_TIMER_MAX; + } + + for (s32 i = 0; i < enemyCount; i++) + { + Enemy* e; + + e = enemies[i]; + + if + ( + circle_collide(&_s->shadow, &e->shadow) && + e->isActive + ) + { + Node* returnSnake; + Node* snake; + + snake = list_node_from_data_get(&e->snakesHit, &_s, sizeof(Snake*)); + returnSnake = list_node_from_data_get(&e->returnSnakesHit, &_s, sizeof(Snake*)); + + if + ( + _s->isReturning && + !returnSnake + + ) + { + list_append_new(&e->returnSnakesHit, &_s, sizeof(Snake*)); + enemy_damage(e, _s->damage, &_l->enemies, _l); + } + else if + ( + !_s->isReturning && + !snake + ) + { + list_append_new(&e->snakesHit, &_s, sizeof(Snake*)); + enemy_damage(e, _s->damage, &_l->enemies, _l); + } + } + } + + free(enemies); + + collectibles = (Collectible**)list_data_get(&_l->collectibles); + collectibleCount = _l->collectibles.count; + + for (s32 i = 0; i < collectibleCount; i++) + { + Collectible* c; + + c = collectibles[i]; + + if + ( + circle_collide(&_s->shadow, &c->shadow) && + c->isActive + ) + { + c->attachedSnake = _s; + c->isAttached = TRUE; + } + } + + free(collectibles); + + if (_s->isReturning) + { + f64 angle; + + angle = math_atan + ( + _p->shadow.x, + _p->shadow.y, + _s->shadow.x, + _s->shadow.y + ); + + _s->sprite.rotation = RAD_TO_DEG * (angle + PI); + + _s->returnTimer++; + _s->returnTimer = CEIL(_s->returnTimer, PLAYER_SNAKE_RETURN_TIMER_MAX); + + _s->dX = cos(angle) * (PLAYER_SNAKE_VELOCITY * (_s->returnTimer * PLAYER_SNAKE_RETURN_VELOCITY_MULTIPLIER)); + _s->dY = sin(angle) * (PLAYER_SNAKE_VELOCITY * (_s->returnTimer * PLAYER_SNAKE_RETURN_VELOCITY_MULTIPLIER)); + + if (circle_collide(&_p->shadow, &_s->shadow)) + player_snake_remove(_s, _p, _l); + + } + else + { + _s->lifetime--; + _s->redirectTimer--; + + if (_s->redirectTimer <= 0) + _s->sprite.frame = SNAKE_NONE; + + if (_s->lifetime <= 0) + { + _s->dX = 0; + _s->dY = 0; + _s->isReturning = TRUE; + _s->sprite.frame = SNAKE_RETURN; + + sound_play(_l->g->sounds[SOUND_SNAKE_RETURN], 7); + } + + } +} + +/* Draws a given snake. */ +static void +player_snake_draw(Snake* _s, Player* _p, Play* _l) +{ + if (!_s->isReturning) + { + f64 angle; + + angle = _s->sprite.rotation; + _s->arc.rotation = angle; + + _s->arc.x = _s->sprite.x - (cos(DEG_TO_RAD * angle) * PLAYER_SNAKE_ARC_OFFSET); + _s->arc.y = _s->sprite.y - (sin(DEG_TO_RAD * angle) * PLAYER_SNAKE_ARC_OFFSET); + + sprite_draw(&_s->arc, _l->g->renderer); + } + + shadow_draw(&_s->shadow, _l); + sprite_draw(&_s->sprite, _l->g->renderer); +} + +/* Adds a snake. */ +void +player_snake_add(Player* _p, Play* _l) +{ + Snake snake; + f64 angle; + + memset(&snake, '\0', sizeof(Snake)); + + snake.sprite = snakeSprite; + snake.arc = arcSprite; + + angle = math_atan + ( + _p->sprite.x, + _p->sprite.y, + _l->g->mouse.x, + _l->g->mouse.y + ); + + snake.shadow.r = PLAYER_SNAKE_SHADOW_RADIUS; + snake.sprite.x = _p->sprite.x - (cos(angle) * PLAYER_SNAKE_OFFSET); + snake.sprite.y = _p->sprite.y - (sin(angle) * PLAYER_SNAKE_OFFSET); + + snake.damage = PLAYER_SNAKE_DAMAGE_DEFAULT; + snake.redirectCount = 0; + snake.isReturning = FALSE; + snake.returnTimer = 0; + snake.animationTimer = PLAYER_SNAKE_ANIMATION_TIMER_MAX; + snake.sprite.rotation = RAD_TO_DEG * angle; + snake.dX = -cos(angle) * PLAYER_SNAKE_VELOCITY; + snake.dY = -sin(angle) * PLAYER_SNAKE_VELOCITY; + snake.lifetime = _p->lifetime; + + list_append_new(&_p->snakes, (void*)&snake, sizeof(Snake)); +} + +/* Resets the snake to a new angle/velocity (redirect). */ +void +player_snake_reset(Snake* _s, Player* _p, Play* _l) +{ + f64 angle; + + angle = math_atan + ( + _s->shadow.x, + _s->shadow.y, + _l->g->mouse.x, + _l->g->mouse.y + ); + + _s->animationTimer = PLAYER_SNAKE_ANIMATION_TIMER_MAX; + _s->sprite.rotation = RAD_TO_DEG * angle; + _s->dX = -cos(angle) * (PLAYER_SNAKE_VELOCITY + (_s->redirectCount * PLAYER_SNAKE_REDIRECT_VELOCITY_MULTIPLIER)); + _s->dY = -sin(angle) * (PLAYER_SNAKE_VELOCITY + (_s->redirectCount * PLAYER_SNAKE_REDIRECT_VELOCITY_MULTIPLIER)); + + _s->lifetime = (s32)(_p->lifetime * PLAYER_SNAKE_REDIRECT_LIFETIME_MULTIPLIER); +} + +/* Initializes player snakes. */ +void +player_snakes_init(Player* _p, Play* _l) +{ + Atlas atlas; + + atlas_init + ( + &atlas, + _l->g->textures[TEXTURE_PLAYER_SNAKE], + PLAYER_SNAKE_ROWS, + PLAYER_SNAKE_COLUMNS, + PLAYER_SNAKE_FRAME_WIDTH, + PLAYER_SNAKE_FRAME_HEIGHT + ); + + list_init(&_p->snakes); + + sprite_atlas_init + ( + &snakeSprite, + &atlas, + ORIGIN_MIDDLE, + PLAYER_SNAKE_WIDTH, + PLAYER_SNAKE_HEIGHT + ); + + snakeSprite.frame = SNAKE_NONE; + + sprite_init + ( + &arcSprite, + _l->g->textures[TEXTURE_ARC], + ORIGIN_MIDDLE, + PLAYER_SNAKE_ARC_WIDTH, + PLAYER_SNAKE_ARC_HEIGHT + ); +} + +/* Clears all player snakes. */ +void +player_snakes_clear(Player* _p, Play* _l) +{ + Snake** snakes; + s32 snakeCount; + + snakes = (Snake**)list_data_get(&_p->snakes); + snakeCount = _p->snakes.count; + + for (s32 i = 0; i < snakeCount; i++) + { + Snake* s; + + s = snakes[i]; + + player_snake_remove(s, _p, _l); + } +} + +/* Frees snake list. */ +void +player_snakes_free(Player* _p, Play* _l) +{ + list_free(&_p->snakes); +} + +/* Updates all player snakes. */ +void +player_snakes_update(Player* _p, Play* _l) +{ + Snake** snakes; + + snakes = (Snake**)list_data_get(&_p->snakes); + + for (s32 i = 0; i < _p->snakes.count; i++) + { + Snake* s; + + s = snakes[i]; + + player_snake_update(s, _p, _l); + } + + free(snakes); +} + +/* Draws all player snakes. */ +void +player_snakes_draw(Player* _p, Play* _l) +{ + Snake** snakes; + + snakes = (Snake**)list_data_get(&_p->snakes); + + for (s32 i = 0; i < _p->snakes.count; i++) + { + Snake* s; + + s = snakes[i]; + + player_snake_draw(s, _p, _l); + } + + free(snakes); +} + diff --git a/src/game/play/player/player_snakes.h b/src/game/play/player/player_snakes.h new file mode 100755 index 0000000..e1c1c93 --- /dev/null +++ b/src/game/play/player/player_snakes.h @@ -0,0 +1,41 @@ +/* + * DESCRIPTION: + * Header file for player_snakes.h. +*/ + +#pragma once + +#include "../enemy/enemy.h" + +#define PLAYER_SNAKE_ANIMATION_TIMER_MAX 5 +#define PLAYER_SNAKE_SHADOW_OFFSET_X 0 +#define PLAYER_SNAKE_SHADOW_OFFSET_Y 32 +#define PLAYER_SNAKE_SHADOW_RADIUS 8 +#define PLAYER_SNAKE_COLUMNS 3 +#define PLAYER_SNAKE_DAMAGE_DEFAULT 1 +#define PLAYER_SNAKE_FRAME_HEIGHT 32 +#define PLAYER_SNAKE_FRAME_WIDTH 48 +#define PLAYER_SNAKE_HEIGHT 32 +#define PLAYER_SNAKE_OFFSET 32 +#define PLAYER_SNAKE_REDIRECT_VELOCITY_MULTIPLIER 0.25 +#define PLAYER_SNAKE_REDIRECT_LIFETIME_MULTIPLIER 1.0 +#define PLAYER_SNAKE_RETURN_TIMER_MAX 30 +#define PLAYER_SNAKE_RETURN_VELOCITY_MULTIPLIER 0.05 +#define PLAYER_SNAKE_ROWS 1 +#define PLAYER_SNAKE_VELOCITY 7.5 +#define PLAYER_SNAKE_WIDTH 48 +#define PLAYER_SNAKE_ENEMY_PIERCE_TIMER_MAX 60 +#define PLAYER_SNAKE_REDIRECT_ANGLE_DIFFERENCE_MIN 15 +#define PLAYER_SNAKE_ARC_WIDTH 96 +#define PLAYER_SNAKE_ARC_HEIGHT 96 +#define PLAYER_SNAKE_ARC_OFFSET 64 + +static const SDL_Color PLAYER_SNAKE_SHADOW_COLOR = {0, 0, 0, 64}; + +void player_snake_add(Player* _p, Play* _l); +void player_snake_reset(Snake* _s, Player* _p, Play* _l); +void player_snakes_clear(Player* _p, Play* _l); +void player_snakes_draw(Player* _p, Play* _l); +void player_snakes_free(Player* _p, Play* _l); +void player_snakes_init(Player* _p, Play* _l); +void player_snakes_update(Player* _p, Play* _l); diff --git a/src/game/play/player/player_sprite.c b/src/game/play/player/player_sprite.c new file mode 100755 index 0000000..a71b195 --- /dev/null +++ b/src/game/play/player/player_sprite.c @@ -0,0 +1,112 @@ +/* + * DESCRIPTION: + * Functions concering player sprite. +*/ + +#include "player_sprite.h" + +/* Initializes player sprite. */ +void +player_sprite_init(Player* _p, Play* _l) +{ + Atlas atlas; + + atlas_init + ( + &atlas, + _l->g->textures[TEXTURE_PLAYER_STAGE_ONE], + PLAYER_SPRITE_ROWS, + PLAYER_SPRITE_COLUMNS, + PLAYER_SPRITE_WIDTH, + PLAYER_SPRITE_HEIGHT + ); + + sprite_atlas_init + ( + &_p->sprite, + &atlas, + ORIGIN_MIDDLE, + PLAYER_SPRITE_WIDTH, + PLAYER_SPRITE_HEIGHT + ); + + _p->sprite.x = PLAYER_SPRITE_X_DEFAULT; + _p->sprite.y = PLAYER_SPRITE_Y_DEFAULT; +} + +/* Frees player sprite. */ +void +player_sprite_free(Player* _p, Play* _l) +{ + + +} + +/* Updates the player sprite. */ +void +player_sprite_update(Player* _p, Play* _l) +{ + if (_p->direction == DIRECTION_LEFT) + _p->sprite.frame = 0; + else if (_p->direction == DIRECTION_RIGHT) + _p->sprite.frame = 1; + + if (_p->isFatnessUpdate) + { + /* + if (_p->isBeingFattened) + { + //_p->sprite.atlas.rows = ATLAS_ROWS_DEFAULT; + //_p->sprite.atlas.cols = ATLAS_COLUMNS_DEFAULT; + _p->sprite.frame = 0; + + switch (_p->fatness) + { + case 0: + _p->sprite.atlas.texture = _l->g->textures[TEXTURE_PLAYER_STAGE_ONE]; + //_p->sprite.atlas.texture = _l->g->textures[TEXTURE_PLAYER_SWALLOW_ONE]; + break; + case 1: + _p->sprite.atlas.texture = _l->g->textures[TEXTURE_PLAYER_STAGE_ONE]; + //_p->sprite.atlas.texture = _l->g->textures[TEXTURE_PLAYER_SWALLOW_TWO]; + break; + case 2: + _p->sprite.atlas.texture = _l->g->textures[TEXTURE_PLAYER_STAGE_ONE]; + //_p->sprite.atlas.texture = _l->g->textures[TEXTURE_PLAYER_SWALLOW_THREE]; + break; + default: + break; + } + } + else + { + */ + _p->sprite.atlas.rows = PLAYER_SPRITE_ROWS; + _p->sprite.atlas.cols = PLAYER_SPRITE_COLUMNS; + + switch (_p->fatness) + { + case 0: + _p->sprite.atlas.texture = _l->g->textures[TEXTURE_PLAYER_STAGE_ONE]; + break; + case 1: + _p->sprite.atlas.texture = _l->g->textures[TEXTURE_PLAYER_STAGE_TWO]; + break; + case 2: + _p->sprite.atlas.texture = _l->g->textures[TEXTURE_PLAYER_STAGE_THREE]; + break; + default: + break; + } + /* + } + */ + } +} + +/* Draws the player sprite. */ +void +player_sprite_draw(Player* _p, Play* _l) +{ + sprite_draw(&_p->sprite, _l->g->renderer); +} diff --git a/src/game/play/player/player_sprite.h b/src/game/play/player/player_sprite.h new file mode 100755 index 0000000..f6c9c0c --- /dev/null +++ b/src/game/play/player/player_sprite.h @@ -0,0 +1,24 @@ +/* + * DESCRIPTION: + * Header file for player_sprite.h. +*/ + +#pragma once + +#include "../../GAME_COMMON.h" + +#define PLAYER_SPRITE_HEIGHT 96 +#define PLAYER_SPRITE_WIDTH 96 +#define PLAYER_SPRITE_STAGE_FOUR_WIDTH 128 +#define PLAYER_SPRITE_STAGE_FOUR_HEIGHT 128 +#define PLAYER_SPRITE_ROWS 1 +#define PLAYER_SPRITE_COLUMNS 2 +#define PLAYER_SPRITE_X_DEFAULT 400 +#define PLAYER_SPRITE_Y_DEFAULT 300 + +static const SDL_Color PLAYER_SPRITE_ELLIPSE_COLOR = {0, 0, 0, 128}; + +void player_sprite_init(Player* _p, Play* _l); +void player_sprite_update(Player* _p, Play* _l); +void player_sprite_draw(Player* _p, Play* _l); +void player_sprite_free(Player* _p, Play* _l); diff --git a/src/game/play/player/player_tail.c b/src/game/play/player/player_tail.c new file mode 100755 index 0000000..dc318c5 --- /dev/null +++ b/src/game/play/player/player_tail.c @@ -0,0 +1,129 @@ +/* + * DESCRIPTION: + * Functions concering player tail. +*/ + +#include "player_tail.h" + +static void player_tail_set(Player* _p, Play* _l); + +/* Sets tail's position/dimensions behind player. */ +void +player_tail_set(Player* _p, Play* _l) +{ + switch (_p->direction) + { + case DIRECTION_LEFT: + _p->tailSprite.x = _p->sprite.x + PLAYER_TAIL_LEFT_OFFSET_X; + _p->tailSprite.y = _p->sprite.y + PLAYER_TAIL_LEFT_OFFSET_Y; + break; + case DIRECTION_RIGHT: + _p->tailSprite.x = _p->sprite.x + PLAYER_TAIL_RIGHT_OFFSET_X; + _p->tailSprite.y = _p->sprite.y + PLAYER_TAIL_RIGHT_OFFSET_Y; + break; + /* + case DIRECTION_UP: + _p->tailSprite.x = _p->sprite.x + PLAYER_TAIL_UP_OFFSET_X; + _p->tailSprite.y = _p->sprite.y + PLAYER_TAIL_UP_OFFSET_Y; + break; + case DIRECTION_DOWN: + _p->tailSprite.x = _p->sprite.x + PLAYER_TAIL_DOWN_OFFSET_X; + _p->tailSprite.y = _p->sprite.y + PLAYER_TAIL_DOWN_OFFSET_Y; + break; + */ + default: + break; + } +} + +/* Initializes player tail. */ +void +player_tail_init(Player* _p, Play* _l) +{ + Atlas atlas; + + atlas_init + ( + &atlas, + _l->g->textures[TEXTURE_PLAYER_TAIL_STAGE_ONE], + PLAYER_TAIL_ROWS, + PLAYER_TAIL_COLUMNS, + PLAYER_TAIL_WIDTH, + PLAYER_TAIL_HEIGHT + ); + + sprite_atlas_init + ( + &_p->tailSprite, + &atlas, + ORIGIN_MIDDLE, + PLAYER_TAIL_WIDTH, + PLAYER_TAIL_HEIGHT + ); + + player_tail_set(_p, _l); +} + +/* Frees player tail. */ +void +player_tail_free(Player* _p, Play* _l) +{ + + +} + +/* Updates the player tail. */ +void +player_tail_update(Player* _p, Play* _l) +{ + s32 frame; + + if (_p->isAbleToMove) + { + frame = _p->direction * PLAYER_TAIL_ANIMATE_COUNT; + + if (_p->isTailAnimate) + frame += 1; + + _p->tailSprite.frame = frame; + + if (!_p->isStationary) + { + _p->tailTimer--; + + if (_p->tailTimer <= 0) + { + _p->tailTimer = PLAYER_TAIL_TIMER_MAX * (_p->fatness + 1); + _p->isTailAnimate = !_p->isTailAnimate; + } + } + } + + if (_p->isFatnessUpdate) + { + switch (_p->fatness) + { + case 0: + _p->tailSprite.atlas.texture = _l->g->textures[TEXTURE_PLAYER_TAIL_STAGE_ONE]; + break; + case 1: + _p->tailSprite.atlas.texture = _l->g->textures[TEXTURE_PLAYER_TAIL_STAGE_TWO]; + break; + case 2: + _p->tailSprite.atlas.texture = _l->g->textures[TEXTURE_PLAYER_TAIL_STAGE_THREE]; + break; + default: + break; + } + } + + player_tail_set(_p, _l); +} + +/* Draws the player tail. */ +void +player_tail_draw(Player* _p, Play* _l) +{ + //if (!_p->isBeingFattened && !_p->isBeingDefeated) + sprite_draw(&_p->tailSprite, _l->g->renderer); +} diff --git a/src/game/play/player/player_tail.h b/src/game/play/player/player_tail.h new file mode 100755 index 0000000..30b4e4a --- /dev/null +++ b/src/game/play/player/player_tail.h @@ -0,0 +1,28 @@ +/* + * DESCRIPTION: + * Header file for player_tail.h. +*/ + +#pragma once + +#include "../../GAME_COMMON.h" + +#define PLAYER_TAIL_HEIGHT 96 +#define PLAYER_TAIL_WIDTH 96 +#define PLAYER_TAIL_LEFT_OFFSET_X 96 +#define PLAYER_TAIL_RIGHT_OFFSET_X -96 +#define PLAYER_TAIL_UP_OFFSET_X 0 +#define PLAYER_TAIL_DOWN_OFFSET_X 0 +#define PLAYER_TAIL_LEFT_OFFSET_Y 0 +#define PLAYER_TAIL_RIGHT_OFFSET_Y 0 +#define PLAYER_TAIL_UP_OFFSET_Y 96 +#define PLAYER_TAIL_DOWN_OFFSET_Y -96 +#define PLAYER_TAIL_ROWS 1 +#define PLAYER_TAIL_COLUMNS 4 +#define PLAYER_TAIL_ANIMATE_COUNT 2 +#define PLAYER_TAIL_TIMER_MAX 5 + +void player_tail_init(Player* _p, Play* _l); +void player_tail_update(Player* _p, Play* _l); +void player_tail_draw(Player* _p, Play* _l); +void player_tail_free(Player* _p, Play* _l); diff --git a/src/game/play/player/player_upgrades.c b/src/game/play/player/player_upgrades.c new file mode 100755 index 0000000..2afb927 --- /dev/null +++ b/src/game/play/player/player_upgrades.c @@ -0,0 +1,85 @@ +/* + * DESCRIPTION: + * Dictates player upgrades (redirect, lifetime, snakes) +*/ + +#include "player_upgrades.h" + +static s32 player_upgrades_snake_get(Player* _p, Play* _l); +static s32 player_upgrades_lifetime_get(Player* _p, Play* _l); +static s32 player_upgrades_redirect_get(Player* _p, Play* _l); + +/* Gets the snakes the player can have. */ +static s32 +player_upgrades_snake_get(Player* _p, Play* _l) +{ + s32 snakes; + s32 upgradeLevel; + + upgradeLevel = _p->snakeUpgradeLevel; + + snakes = upgradeLevel; + + return snakes; +} + +/* Gets the lifetime of the snakes the player has. */ +static s32 +player_upgrades_lifetime_get(Player* _p, Play* _l) +{ + s32 lifetime; + s32 upgradeLevel; + + upgradeLevel = _p->lifetimeUpgradeLevel; + + lifetime = ((upgradeLevel - 1) * PLAYER_UPGRADES_LIFETIME_MULTIPLIER) + PLAYER_UPGRADES_LIFETIME_BASE; + + return lifetime; +} + +/* Gets the redirects the player can have. */ +static s32 +player_upgrades_redirect_get(Player* _p, Play* _l) +{ + s32 redirects; + s32 upgradeLevel; + + upgradeLevel = _p->redirectUpgradeLevel; + + redirects = upgradeLevel; + + return redirects; +} + +/* Initializes player upgrades. */ +void +player_upgrades_init(Player* _p, Play* _l) +{ + _p->snakeUpgradeLevel = PLAYER_UPGRADE_LEVEL_BASE; + _p->redirectUpgradeLevel = PLAYER_UPGRADE_LEVEL_BASE; + _p->lifetimeUpgradeLevel = PLAYER_UPGRADE_LEVEL_BASE; + + _p->snakeMax = player_upgrades_snake_get(_p, _l); + _p->redirectMax = player_upgrades_redirect_get(_p, _l); + _p->lifetime = player_upgrades_lifetime_get(_p, _l); +} + +/* Updates player upgrades. */ +void +player_upgrades_update(Player* _p, Play* _l) +{ + if (_p->isSnakeUpgradeUpdate) + { + _p->snakeMax = player_upgrades_snake_get(_p, _l); + _p->snakeReserve = _p->snakeMax; + } + + if (_p->isRedirectUpgradeUpdate) + { + _p->redirectMax = player_upgrades_redirect_get(_p, _l); + _p->redirects = _p->redirectMax; + } + + if (_p->isLifetimeUpgradeUpdate) + _p->lifetime = player_upgrades_lifetime_get(_p, _l); +} diff --git a/src/game/play/player/player_upgrades.h b/src/game/play/player/player_upgrades.h new file mode 100755 index 0000000..c1c4b34 --- /dev/null +++ b/src/game/play/player/player_upgrades.h @@ -0,0 +1,18 @@ +/* + * DESCRIPTION: + * Header file for player_upgrades.c. +*/ + +#pragma once + +#include "../../GAME_COMMON.h" + +#define PLAYER_UPGRADE_LEVEL_BASE 1 +#define PLAYER_UPGRADES_SNAKE_BASE 1 +#define PLAYER_UPGRADES_LIFETIME_BASE 30 +#define PLAYER_UPGRADES_REDIRECT_BASE 1 +#define PLAYER_UPGRADES_POWER_UP_MULTIPLIER 2 +#define PLAYER_UPGRADES_LIFETIME_MULTIPLIER 3 + +void player_upgrades_init(Player* _p, Play* _l); +void player_upgrades_update(Player* _p, Play* _l); diff --git a/src/game/play/shadow/shadow.c b/src/game/play/shadow/shadow.c new file mode 100755 index 0000000..b82c7fe --- /dev/null +++ b/src/game/play/shadow/shadow.c @@ -0,0 +1,27 @@ +/* + * DESCRIPTION: + * Entity shadows. +*/ + +#include "shadow.h" + +/* Draws a shadow. */ +void +shadow_draw(Circle* _c, Play* _p) +{ + Sprite sprite; + + sprite_init + ( + &sprite, + _p->g->textures[TEXTURE_SHADOW], + ORIGIN_MIDDLE, + _c->r * SHADOW_SIZE_MULTIPLIER, + _c->r * SHADOW_SIZE_MULTIPLIER + ); + + sprite.x = _c->x; + sprite.y = _c->y; + + sprite_draw(&sprite, _p->g->renderer); +} diff --git a/src/game/play/shadow/shadow.h b/src/game/play/shadow/shadow.h new file mode 100755 index 0000000..8cc8a68 --- /dev/null +++ b/src/game/play/shadow/shadow.h @@ -0,0 +1,10 @@ +/* + * DESCRIPTION: + * Header file for shadow.c. +*/ + +#include "../../GAME_COMMON.h" + +#define SHADOW_SIZE_MULTIPLIER 1.5 + +void shadow_draw(Circle* _c, Play* _p); diff --git a/src/game/play/spawn/spawn.c b/src/game/play/spawn/spawn.c new file mode 100755 index 0000000..70c85e2 --- /dev/null +++ b/src/game/play/spawn/spawn.c @@ -0,0 +1,166 @@ +/* + * DESCRIPTION: + * Spawns enemies. +*/ + +#include "spawn.h" + +static s32 spawn_timer_max_get(Play* _p); + +/* Gets a new spawn timer max, influenced by the wave. */ +static s32 +spawn_timer_max_get(Play* _p) +{ + s32 spawnTimerBase; + s32 spawnTimerMax; + + spawnTimerBase = SPAWN_TIMER_MAX_DEFAULT - ((_p->wave * _p->game) * SPAWN_TIMER_WAVE_MULTIPLIER); + + spawnTimerBase = FLOOR(spawnTimerBase, SPAWN_TIMER_BASE_MIN); + + spawnTimerMax = random_s32_in_range_get + ( + (s32)(spawnTimerBase * SPAWN_TIMER_MIN_MULTIPLIER), + (s32)(spawnTimerBase * SPAWN_TIMER_MAX_MULTIPLIER) + ); + + return spawnTimerMax; +} + +static void +spawn_enemy_set(Enemy* _e, Play* _p) +{ + f64 x; + f64 y; + Direction direction; + + direction = (Direction)random_s32_in_range_get(DIRECTION_LEFT, DIRECTION_DOWN); + + x = 0; + y = 0; + + switch (_e->type) + { + case ENEMY_CUPPER: + switch (direction) + { + case DIRECTION_LEFT: + x = -CUPPER_WIDTH; + y = random_f64_in_range_get(-CUPPER_HEIGHT, SPAWN_Y_MAX + CUPPER_HEIGHT); + break; + case DIRECTION_RIGHT: + x = SPAWN_X_MAX + CUPPER_WIDTH; + y = random_f64_in_range_get(-CUPPER_HEIGHT, SPAWN_Y_MAX + CUPPER_HEIGHT); + break; + case DIRECTION_UP: + x = random_f64_in_range_get(-CUPPER_WIDTH, SPAWN_X_MAX + CUPPER_WIDTH); + y = -CUPPER_HEIGHT; + break; + case DIRECTION_DOWN: + x = random_f64_in_range_get(-CUPPER_WIDTH, SPAWN_X_MAX + CUPPER_WIDTH); + y = SPAWN_Y_MAX + CUPPER_HEIGHT; + break; + default: + break; + } + break; + case ENEMY_CHIPPER: + switch (direction) + { + case DIRECTION_LEFT: + x = -CHIPPER_WIDTH; + y = random_f64_in_range_get(-CHIPPER_HEIGHT, SPAWN_Y_MAX + CHIPPER_HEIGHT); + break; + case DIRECTION_RIGHT: + x = SPAWN_X_MAX + CHIPPER_WIDTH; + y = random_f64_in_range_get(-CHIPPER_HEIGHT, SPAWN_Y_MAX + CHIPPER_HEIGHT); + break; + case DIRECTION_UP: + x = random_f64_in_range_get(-CHIPPER_WIDTH, SPAWN_X_MAX + CHIPPER_WIDTH); + y = -CHIPPER_HEIGHT; + break; + case DIRECTION_DOWN: + x = random_f64_in_range_get(-CHIPPER_WIDTH, SPAWN_X_MAX + CHIPPER_WIDTH); + y = SPAWN_Y_MAX + CHIPPER_HEIGHT; + break; + default: + break; + } + break; + case ENEMY_CHIP: + switch (direction) + { + case DIRECTION_LEFT: + x = -CHIP_WIDTH; + y = random_f64_in_range_get(-CHIP_HEIGHT, SPAWN_Y_MAX + CHIP_HEIGHT); + break; + case DIRECTION_RIGHT: + x = SPAWN_X_MAX + CHIP_WIDTH; + y = random_f64_in_range_get(-CHIP_HEIGHT, SPAWN_Y_MAX + CHIP_HEIGHT); + break; + case DIRECTION_UP: + x = random_f64_in_range_get(-CHIP_WIDTH, SPAWN_X_MAX + CHIP_WIDTH); + y = -CHIP_HEIGHT; + break; + case DIRECTION_DOWN: + x = random_f64_in_range_get(-CHIP_WIDTH, SPAWN_X_MAX + CHIP_WIDTH); + y = SPAWN_Y_MAX + CHIP_HEIGHT; + break; + default: + break; + } + break; + case ENEMY_CRUMBLER: + x = random_f64_in_range_get(CRUMBLER_WIDTH, SPAWN_X_MAX - CRUMBLER_WIDTH); + y = random_f64_in_range_get(CRUMBLER_HEIGHT, SPAWN_Y_MAX - CRUMBLER_HEIGHT); + break; + case ENEMY_NONE: + default: + break; + } + + enemy_set(&_p->enemies, _e, x, y, _p); +} + +/* Initializes spawning. */ +void +spawn_init(Play* _p) +{ + _p->spawnTimer = SPAWN_TIMER_MAX_DEFAULT; +} + +/* Updates spawning. */ +void +spawn_update(Play* _p) +{ + _p->spawnTimer--; + + if (!_p->isGracePeriod) + { + if (_p->enemies.count == 0) + _p->spawnTimer = 0; + } + + if (_p->spawnTimer <= 0) + { + Node* node; + + node = list_node_from_index_get(&_p->spawnEnemies, 0); + + if (node) + { + Enemy* e; + EnemyType type; + + type = *(EnemyType*)node->data; + + list_remove(&_p->spawnEnemies, node); + + e = enemy_add(&_p->enemies, type, _p); + + spawn_enemy_set(e, _p); + } + + _p->spawnTimer = spawn_timer_max_get(_p); + } +} diff --git a/src/game/play/spawn/spawn.h b/src/game/play/spawn/spawn.h new file mode 100755 index 0000000..c8a1c24 --- /dev/null +++ b/src/game/play/spawn/spawn.h @@ -0,0 +1,19 @@ +/* + * DESCRIPTION: + * Header file for spawn.c. +*/ + +#pragma once + +#include "../enemy/enemy.h" + +#define SPAWN_TIMER_MAX_DEFAULT 150 +#define SPAWN_TIMER_BASE_MIN 30 +#define SPAWN_TIMER_WAVE_MULTIPLIER 5 +#define SPAWN_TIMER_MIN_MULTIPLIER 0.75 +#define SPAWN_TIMER_MAX_MULTIPLIER 1.25 +#define SPAWN_X_MAX 800 +#define SPAWN_Y_MAX 600 + +void spawn_init(Play* _p); +void spawn_update(Play* _p); diff --git a/src/game/play/tutorial/tutorial.c b/src/game/play/tutorial/tutorial.c new file mode 100755 index 0000000..504e25d --- /dev/null +++ b/src/game/play/tutorial/tutorial.c @@ -0,0 +1,79 @@ +/* + * DESCRIPTION: + * Displays some helpful tutorial text at the start of the game. +*/ + +#include "tutorial.h" + +/* Initializes tutorial stuff. */ +void +tutorial_init(Play* _p) +{ + if (_p->player.isKeyboardMove) + { + text_sprite_init + ( + &_p->tutorialText, + _p->g->renderer, + _p->g->fonts[FONT_SMALL], + TUTORIAL_TEXT_COLOR, + ORIGIN_MIDDLE, + STRING_PLAY_TUTORIAL_KEYBOARD, + TUTORIAL_TEXT_WRAP + ); + } + else + { + text_sprite_init + ( + &_p->tutorialText, + _p->g->renderer, + _p->g->fonts[FONT_SMALL], + TUTORIAL_TEXT_COLOR, + ORIGIN_MIDDLE, + STRING_PLAY_TUTORIAL_MOUSE, + TUTORIAL_TEXT_WRAP + ); + } + + _p->tutorialText.x = TUTORIAL_TEXT_OFFSET_X; + _p->tutorialText.y = TUTORIAL_TEXT_OFFSET_Y; + + _p->isTutorial = TRUE; + _p->tutorialTimer = TUTORIAL_TIMER_MAX; +} + +/* Frees tutorial stuff. */ +void +tutorial_free(Play* _p) +{ + if (_p->tutorialText.atlas.texture) + texture_free(_p->tutorialText.atlas.texture); +} + +/* Updates tutorial stuff. */ +void +tutorial_update(Play* _p) +{ + if (_p->isTutorial) + { + f64 progress; + + _p->tutorialTimer--; + + progress = (f64)_p->tutorialTimer / TUTORIAL_TIMER_MAX; + + _p->tutorialText.color.a = SDL_ALPHA_OPAQUE * progress; + + if (_p->tutorialTimer <= 0) + _p->isTutorial = FALSE; + } +} + +/* Draws tutorial stuff. */ +void +tutorial_draw(Play* _p) +{ + if (_p->isTutorial) + sprite_draw(&_p->tutorialText, _p->g->renderer); +} diff --git a/src/game/play/tutorial/tutorial.h b/src/game/play/tutorial/tutorial.h new file mode 100755 index 0000000..a55ece0 --- /dev/null +++ b/src/game/play/tutorial/tutorial.h @@ -0,0 +1,21 @@ +/* + * DESCRIPTION: + * Header file for tutorial.c. +*/ + +#pragma once + +#include "../../GAME_COMMON.h" +#include "../../GAME_STRINGS.h" + +#define TUTORIAL_TEXT_WRAP 600 +#define TUTORIAL_TEXT_OFFSET_X 400 +#define TUTORIAL_TEXT_OFFSET_Y 500 +#define TUTORIAL_TIMER_MAX 600 + +static const SDL_Color TUTORIAL_TEXT_COLOR = {0, 0, 0, 255}; + +void tutorial_draw(Play* _p); +void tutorial_free(Play* _p); +void tutorial_init(Play* _p); +void tutorial_update(Play* _p); diff --git a/src/game/play/wave/wave.c b/src/game/play/wave/wave.c new file mode 100755 index 0000000..56bdb4a --- /dev/null +++ b/src/game/play/wave/wave.c @@ -0,0 +1,359 @@ +/* + * DESCRIPTION: + * Enemy waves. +*/ + +#include "wave.h" + +static void wave_set(Play* _p); +static void wave_next(Play* _p); +static void wave_clear(Play* _p); +static void wave_fail(Play* _p); +static void wave_reward(Play* _p); +static void wave_game_clear_begin(Play* _p); +static void wave_game_clear_begin(Play* _p); + +/* Returns the cash reward you'll get at the end of a wave. */ +static s32 +wave_reward_get(Play* _p) +{ + f64 cash; + + cash = _p->player.waveEnemiesKilled * WAVE_REWARD_MULTIPLIER; + + if (_p->game > 1) + cash *= ((_p->game - 1) * WAVE_REWARD_GAME_MULTIPLIER); + + return (s32)cash; +} + +/* Sets the current wave of enemies. */ +static void +wave_set(Play* _p) +{ + EnemyType type; + s32 index; + s32 enemyCountBase; + s32 enemyCount; + + enemyCountBase = WAVE_ENEMY_COUNT_BASE; + enemyCountBase *= (s32)(_p->wave * WAVE_ENEMY_COUNT_MULTIPLIER); + enemyCountBase *= (s32)(_p->game * WAVE_ENEMY_COUNT_GAME_MULTIPLIER); + + enemyCount = random_s32_in_range_get + ( + (s32)(enemyCountBase * WAVE_ENEMY_COUNT_BASE_MIN_MULTIPLIER), + (s32)(enemyCountBase * WAVE_ENEMY_COUNT_BASE_MAX_MULTIPLIER) + ); + + list_clear(&_p->spawnEnemies); + + _p->player.waveEnemiesKilled = 0; + _p->enemyMax = 0; + + for (s32 i = 0; i < enemyCount; i++) + { + s32 index; + EnemyType type; + + switch (_p->wave) + { + case 1: + index = random_s32_in_range_get(0, WAVE_ONE_ENEMY_TYPE_COUNT - 1); + type = WAVE_ONE[index]; + break; + case 2: + index = random_s32_in_range_get(0, WAVE_TWO_ENEMY_TYPE_COUNT - 1); + type = WAVE_TWO[index]; + break; + case 3: + index = random_s32_in_range_get(0, WAVE_THREE_ENEMY_TYPE_COUNT - 1); + type = WAVE_THREE[index]; + break; + case 4: + index = random_s32_in_range_get(0, WAVE_FOUR_ENEMY_TYPE_COUNT - 1); + type = WAVE_FOUR[index]; + break; + case 5: + index = random_s32_in_range_get(0, WAVE_FIVE_ENEMY_TYPE_COUNT - 1); + type = WAVE_FIVE[index]; + break; + case 6: + index = random_s32_in_range_get(0, WAVE_SIX_ENEMY_TYPE_COUNT - 1); + type = WAVE_SIX[index]; + break; + case 7: + index = random_s32_in_range_get(0, WAVE_SEVEN_ENEMY_TYPE_COUNT - 1); + type = WAVE_SEVEN[index]; + break; + case 8: + index = random_s32_in_range_get(0, WAVE_EIGHT_ENEMY_TYPE_COUNT - 1); + type = WAVE_EIGHT[index]; + break; + case 9: + index = random_s32_in_range_get(0, WAVE_NINE_ENEMY_TYPE_COUNT - 1); + type = WAVE_NINE[index]; + break; + case 10: + index = random_s32_in_range_get(0, WAVE_TEN_ENEMY_TYPE_COUNT - 1); + type = WAVE_TEN[index]; + break; + default: + break; + } + + _p->enemyMax++; + + list_append_new(&_p->spawnEnemies, (void*)&type, sizeof(type)); + } + + _p->isBountyUpdate = TRUE; + + _p->spawnTimer = WAVE_GRACE_PERIOD_TIMER_MAX; + _p->gracePeriodTimer = WAVE_GRACE_PERIOD_TIMER_MAX; + _p->isGracePeriod = TRUE; +} + +/* Entering between waves... */ +static void +wave_between(Play* _p) +{ + wave_reward(_p); + + _p->player.waveEnemiesKilled = 0; + _p->player.isSnakeUpdate = TRUE; + + _p->isBetweenWaves = TRUE; + _p->isReady = FALSE; + _p->player.isAbleToFire = FALSE; + _p->isWaveUpdate = TRUE; + _p->isUpgradesActive = TRUE; + _p->isUpgradeUpdate = TRUE; + _p->isBountyUpdate = TRUE; + + if (_p->player.isPowerUp) + player_power_up_end(&_p->player, _p); +} + +/* Grants a cash reward on wave end. */ +static void +wave_reward(Play* _p) +{ + s32 cash; + + cash = wave_reward_get(_p); + + player_cash_acquire(&_p->player, cash, _p); + + sound_play(_p->g->sounds[SOUND_BULLIONS], -1); +} + +/* Cleared the wave! */ +static void +wave_clear(Play* _p) +{ + _p->isWaveCleared = TRUE; + + if (_p->wave + 1 > WAVE_MAX) + wave_game_clear_begin(_p); + else + { + message_wave_clear_add(_p->player.sprite.x, _p->player.sprite.y, _p); + + music_play(_p->g->music[MUSIC_WAVE_CLEAR], FALSE); + + _p->countdownTimer = WAVE_BETWEEN_TIMER_MAX; + + _p->isWaveUpdate = TRUE; + _p->isBetweenWaves = TRUE; + } +} + +/* Failed the wave. */ +static void +wave_fail(Play* _p) +{ + _p->isWaveFailed = TRUE; + + if (!_p->player.isBeingDefeated) + { + if (_p->wave + 1 > WAVE_MAX) + wave_game_clear_begin(_p); + else + { + message_wave_fail_add(_p->player.sprite.x, _p->player.sprite.y, _p); + + music_play(_p->g->music[MUSIC_WAVE_FAIL], FALSE); + + _p->countdownTimer = WAVE_BETWEEN_TIMER_MAX; + + _p->isWaveUpdate = TRUE; + _p->isBetweenWaves = TRUE; + + } + + } +} + +/* Goes to the next wave. */ +static void +wave_next(Play* _p) +{ + _p->isUpgradesActive = FALSE; + + _p->player.isAbleToFire = TRUE; + + _p->isBetweenWaves = FALSE; + + _p->wave++; + + _p->spawnTimer = WAVE_GRACE_PERIOD_TIMER_MAX; + + _p->isWaveCleared = FALSE; + _p->isWaveFailed = FALSE; + _p->isWaveUpdate = TRUE; + + wave_set(_p); +} + +/* You just beat the game! */ +static void +wave_game_clear_begin(Play* _p) +{ + _p->isBetweenWaves = TRUE; + _p->isWaveFailed = FALSE; + _p->isWaveCleared = FALSE; + _p->isGameClearing = TRUE; + _p->gameClearTimer = WAVE_GAME_CLEAR_TIMER_MAX; + + list_clear(&_p->enemies); + + player_snakes_clear(&_p->player, _p); + + message_game_clear_add(_p->player.sprite.x, _p->player.sprite.y, _p); + + music_play(_p->g->music[MUSIC_WIND], TRUE); +} + +/* You beat the game! */ +static void +wave_game_clear(Play* _p) +{ + _p->isGameCleared = TRUE; +} + +/* Initializes waves. */ +void +wave_init(Play* _p) +{ + list_init(&_p->spawnEnemies); + + _p->wave = WAVE_DEFAULT; + _p->game = GAME_DEFAULT; + _p->isWaveCleared = FALSE; + _p->isGameCleared = FALSE; + + wave_set(_p); +} + +/* New Game+! */ +void +wave_new_game_plus(Play* _p) +{ + list_clear(&_p->collectibles); + + _p->game++; + _p->wave = WAVE_DEFAULT; + _p->isWaveCleared = FALSE; + _p->isGameCleared = FALSE; + _p->isGameClearing = FALSE; + _p->isWaveFailed = FALSE; + _p->isWaveUpdate = TRUE; + _p->isReady = FALSE; + _p->isBetweenWaves = FALSE; + _p->isUpgradesActive = FALSE; + + _p->player.sprite.x = PLAYER_SPRITE_X_DEFAULT; + _p->player.sprite.y = PLAYER_SPRITE_Y_DEFAULT; + + _p->player.isAbleToFire = TRUE; + _p->player.isAbleToMove = TRUE; + + _p->player.snakeReserve = _p->player.snakeMax; + _p->player.redirects = _p->player.redirectMax; + + music_play(_p->g->music[MUSIC_PLAY], TRUE); + + wave_set(_p); +} + + +/* Updates waves. */ +void +wave_update(Play* _p) +{ + if (!_p->isGameClearing) + { + if (_p->isGracePeriod) + { + _p->gracePeriodTimer--; + + if (_p->gracePeriodTimer <= 0) + _p->isGracePeriod = FALSE; + } + + if (_p->isWaveUpdate) + _p->isWaveUpdate = FALSE; + + if (_p->isBetweenWaves) + { + if (!_p->isWaveClearMusicComplete) + { + if (!music_playing()) + { + _p->isWaveClearMusicComplete = TRUE; + music_play(_p->g->music[MUSIC_WIND], TRUE); + wave_between(_p); + } + } + else + { + if (_p->isReady) + { + _p->isWaveClearMusicComplete = FALSE; + + music_play(_p->g->music[MUSIC_PLAY], TRUE); + + _p->isReady = FALSE; + _p->isBetweenWaves = FALSE; + + wave_next(_p); + } + } + } + else + { + if + ( + _p->enemies.count <= 0 && + _p->spawnEnemies.count <= 0 + ) + _p->isWaveCleared = TRUE; + + if (_p->isWaveFailed) + wave_fail(_p); + else if (_p->isWaveCleared) + wave_clear(_p); + } + } + else + { + _p->gameClearTimer--; + + _p->player.isAbleToMove = FALSE; + _p->player.isAbleToFire = FALSE; + + if (_p->gameClearTimer <= 0) + wave_game_clear(_p); + } +} diff --git a/src/game/play/wave/wave.h b/src/game/play/wave/wave.h new file mode 100755 index 0000000..7ad204d --- /dev/null +++ b/src/game/play/wave/wave.h @@ -0,0 +1,100 @@ +/* + * DESCRIPTION: + * Header file for wave.c. +*/ + +#pragma once + +#include "../player/player_cash.h" +#include "../player/player_snakes.h" +#include "../player/player_sprite.h" +#include "../player/player_power_up.h" + +#define GAME_DEFAULT 1 +#define WAVE_GRACE_PERIOD_TIMER_MAX 300 +#define WAVE_DEFAULT 1 +#define WAVE_ENEMY_COUNT_BASE_MAX_MULTIPLIER 1.25 +#define WAVE_ENEMY_COUNT_BASE_MIN_MULTIPLIER 0.75 +#define WAVE_ENEMY_COUNT_GAME_MULTIPLIER 1.25 +#define WAVE_ENEMY_COUNT_MULTIPLIER 1.25 +#define WAVE_MAX 10 +#define WAVE_ENEMY_COUNT_BASE 5 +#define WAVE_REWARD_GAME_MULTIPLIER 2 +#define WAVE_REWARD_MULTIPLIER 10 +#define WAVE_BETWEEN_TIMER_MAX 180 +#define WAVE_GAME_CLEAR_TIMER_MAX 300 + +#define WAVE_ONE_ENEMY_TYPE_COUNT 1 +#define WAVE_TWO_ENEMY_TYPE_COUNT 1 +#define WAVE_THREE_ENEMY_TYPE_COUNT 1 +#define WAVE_FOUR_ENEMY_TYPE_COUNT 2 +#define WAVE_FIVE_ENEMY_TYPE_COUNT 2 +#define WAVE_SIX_ENEMY_TYPE_COUNT 2 +#define WAVE_SEVEN_ENEMY_TYPE_COUNT 3 +#define WAVE_EIGHT_ENEMY_TYPE_COUNT 3 +#define WAVE_NINE_ENEMY_TYPE_COUNT 1 +#define WAVE_TEN_ENEMY_TYPE_COUNT 4 + +static const EnemyType WAVE_ONE[WAVE_ONE_ENEMY_TYPE_COUNT] = +{ + ENEMY_CUPPER +}; + +static const EnemyType WAVE_TWO[WAVE_TWO_ENEMY_TYPE_COUNT] = +{ + ENEMY_CHIPPER +}; + +static const EnemyType WAVE_THREE[WAVE_THREE_ENEMY_TYPE_COUNT] = +{ + ENEMY_CRUMBLER +}; + +static const EnemyType WAVE_FOUR[WAVE_FOUR_ENEMY_TYPE_COUNT] = +{ + ENEMY_CUPPER, + ENEMY_CHIPPER +}; + +static const EnemyType WAVE_FIVE[WAVE_FIVE_ENEMY_TYPE_COUNT] = +{ + ENEMY_CUPPER, + ENEMY_CRUMBLER +}; + +static const EnemyType WAVE_SIX[WAVE_SIX_ENEMY_TYPE_COUNT] = +{ + ENEMY_CHIPPER, + ENEMY_CRUMBLER, +}; + +static const EnemyType WAVE_SEVEN[WAVE_SEVEN_ENEMY_TYPE_COUNT] = +{ + ENEMY_CUPPER, + ENEMY_CHIPPER, + ENEMY_CRUMBLER +}; + +static const EnemyType WAVE_EIGHT[WAVE_EIGHT_ENEMY_TYPE_COUNT] = +{ + ENEMY_CUPPER, + ENEMY_CHIPPER, + ENEMY_CRUMBLER +}; + +static const EnemyType WAVE_NINE[WAVE_NINE_ENEMY_TYPE_COUNT] = +{ + ENEMY_CHIP +}; + +static const EnemyType WAVE_TEN[WAVE_TEN_ENEMY_TYPE_COUNT] = +{ + ENEMY_CUPPER, + ENEMY_CHIPPER, + ENEMY_CRUMBLER, + ENEMY_CHIP +}; + +void wave_init(Play* _p); +void wave_update(Play* _p); +void wave_new_game_plus(Play* _p); diff --git a/src/game/results/results.c b/src/game/results/results.c new file mode 100755 index 0000000..19ac7f3 --- /dev/null +++ b/src/game/results/results.c @@ -0,0 +1,279 @@ +/* + * DESCRIPTION: + * Results code. +*/ + +#include "results.h" + +static void results_highest_wave_set(Results* _r); +static void results_cash_held_set(Results* _r); +static void results_cash_collected_set(Results* _r); +static void results_bounties_hunted_set(Results* _r); + +/* Highest Wave: X (NG+Y)*/ +static void +results_highest_wave_set(Results* _r) +{ + char* s; + + s = malloc(RESULTS_TEXT_MAX); + + if (_r->g->play.game > 1) + { + snprintf + ( + s, + RESULTS_TEXT_MAX, + "%s%i(NG+%i)", + STRING_RESULTS_HIGHEST_WAVE, + _r->g->play.wave, + _r->g->play.game + ); + + } + else + { + snprintf + ( + s, + RESULTS_TEXT_MAX, + "%s%i", + STRING_RESULTS_HIGHEST_WAVE, + _r->g->play.wave + ); + } + + text_sprite_init + ( + &_r->highestWave, + _r->g->renderer, + _r->g->fonts[FONT_BIG], + RESULTS_TEXT_COLOR, + ORIGIN_MIDDLE, + s, + 0 + ); + + _r->highestWave.x = RESULTS_HIGHEST_WAVE_OFFSET_X; + _r->highestWave.y = RESULTS_HIGHEST_WAVE_OFFSET_Y; + + free(s); +} + +/* Bounties Hunted: X */ +static void +results_bounties_hunted_set(Results* _r) +{ + char* s; + + s = malloc(RESULTS_TEXT_MAX); + + snprintf + ( + s, + RESULTS_TEXT_MAX, + "%s%i", + STRING_RESULTS_BOUNTIES_HUNTED, + _r->g->play.player.enemiesKilled + ); + + text_sprite_init + ( + &_r->bountiesHunted, + _r->g->renderer, + _r->g->fonts[FONT_BIG], + RESULTS_TEXT_COLOR, + ORIGIN_MIDDLE, + s, + 0 + ); + + _r->bountiesHunted.x = RESULTS_BOUNTIES_HUNTED_OFFSET_X; + _r->bountiesHunted.y = RESULTS_BOUNTIES_HUNTED_OFFSET_Y; + + free(s); +} + +/* Cash Collected: $X */ +static void +results_cash_collected_set(Results* _r) +{ + char* s; + + s = malloc(RESULTS_TEXT_MAX); + + snprintf + ( + s, + RESULTS_TEXT_MAX, + "%s$%i", + STRING_RESULTS_CASH_COLLECTED, + _r->g->play.player.cashCollected + ); + + text_sprite_init + ( + &_r->cashCollected, + _r->g->renderer, + _r->g->fonts[FONT_BIG], + RESULTS_TEXT_COLOR, + ORIGIN_MIDDLE, + s, + 0 + ); + + _r->cashCollected.x = RESULTS_CASH_COLLECTED_OFFSET_X; + _r->cashCollected.y = RESULTS_CASH_COLLECTED_OFFSET_Y; + + free(s); +} + +/* Cash Held (On Defeat): $X */ +static void +results_cash_held_set(Results* _r) +{ + char* s; + + s = malloc(RESULTS_TEXT_MAX); + + snprintf + ( + s, + RESULTS_TEXT_MAX, + "%s$%i", + STRING_RESULTS_CASH_HELD, + _r->g->play.player.cash + ); + + text_sprite_init + ( + &_r->cashHeld, + _r->g->renderer, + _r->g->fonts[FONT_BIG], + RESULTS_TEXT_COLOR, + ORIGIN_MIDDLE, + s, + 0 + ); + + _r->cashHeld.x = RESULTS_CASH_HELD_OFFSET_X; + _r->cashHeld.y = RESULTS_CASH_HELD_OFFSET_Y; + + free(s); +} + +/* Initializes results stuff. */ +void +results_init(Results* _r, Game* _g) +{ + memset(_r, '\0', sizeof(Results)); + + _r->g = _g; + + results_highest_wave_set(_r); + results_bounties_hunted_set(_r); + results_cash_collected_set(_r); + results_cash_held_set(_r); + + text_sprite_init + ( + &_r->resultsText, + _r->g->renderer, + _r->g->fonts[FONT_MEGA], + RESULTS_TEXT_COLOR, + ORIGIN_MIDDLE, + STRING_RESULTS, + 0 + ); + + _r->resultsText.x = RESULTS_TEXT_OFFSET_X; + _r->resultsText.y = RESULTS_TEXT_OFFSET_Y; + + text_sprite_init + ( + &_r->thanksText, + _r->g->renderer, + _r->g->fonts[FONT_MEGA], + RESULTS_TEXT_COLOR, + ORIGIN_MIDDLE, + STRING_RESULTS_THANKS, + 0 + ); + + _r->thanksText.x = RESULTS_THANKS_TEXT_OFFSET_X; + _r->thanksText.y = RESULTS_THANKS_TEXT_OFFSET_Y; + + sprite_init + ( + &_r->sprite, + _r->g->textures[TEXTURE_RESULTS], + ORIGIN_MIDDLE, + RESULTS_SPRITE_WIDTH, + RESULTS_SPRITE_HEIGHT + ); + + _r->sprite.x = RESULTS_SPRITE_OFFSET_X; + _r->sprite.y = RESULTS_SPRITE_OFFSET_Y; + + music_play(_r->g->music[MUSIC_RESULTS], FALSE); +} + +/* Frees results stuff. */ +void +results_free(Results* _r) +{ + if (_r->highestWave.atlas.texture) + texture_free(_r->highestWave.atlas.texture); + + if (_r->bountiesHunted.atlas.texture) + texture_free(_r->bountiesHunted.atlas.texture); + + if (_r->cashHeld.atlas.texture) + texture_free(_r->cashHeld.atlas.texture); + + if (_r->cashCollected.atlas.texture) + texture_free(_r->cashCollected.atlas.texture); + + if (_r->thanksText.atlas.texture) + texture_free(_r->thanksText.atlas.texture); + + if (_r->resultsText.atlas.texture) + texture_free(_r->thanksText.atlas.texture); +} + +/* Updates results stuff. */ +void +results_update(Results* _r) +{ + if (mouse_press(&_r->g->mouse, MOUSE_LEFT)) + { + _r->isEnd = TRUE; + + sound_play(_r->g->sounds[SOUND_MENU], -1); + } +} + +/* Draws results stuff. */ +void +results_draw(Results* _r) +{ + SDL_Rect r; + + r.x = 0; + r.y = 0; + r.w = RESULTS_RECTANGLE_WIDTH; + r.h = RESULTS_RECTANGLE_HEIGHT; + + rectangle_draw(&r, _r->g->renderer, RESULTS_BACKGROUND_COLOR); + + sprite_draw(&_r->resultsText, _r->g->renderer); + + sprite_draw(&_r->sprite, _r->g->renderer); + + sprite_draw(&_r->highestWave, _r->g->renderer); + sprite_draw(&_r->bountiesHunted, _r->g->renderer); + sprite_draw(&_r->cashCollected, _r->g->renderer); + sprite_draw(&_r->cashHeld, _r->g->renderer); + + sprite_draw(&_r->thanksText, _r->g->renderer); +} diff --git a/src/game/results/results.h b/src/game/results/results.h new file mode 100755 index 0000000..72bb348 --- /dev/null +++ b/src/game/results/results.h @@ -0,0 +1,37 @@ +/* + * DESCRIPTION: + * Header file for results.c. +*/ + +#pragma once + +#include "../GAME_COMMON.h" +#include "../GAME_STRINGS.h" + +#define RESULTS_BOUNTIES_HUNTED_OFFSET_X 400 +#define RESULTS_BOUNTIES_HUNTED_OFFSET_Y 400 +#define RESULTS_CASH_COLLECTED_OFFSET_X 400 +#define RESULTS_CASH_COLLECTED_OFFSET_Y 425 +#define RESULTS_CASH_HELD_OFFSET_X 400 +#define RESULTS_CASH_HELD_OFFSET_Y 450 +#define RESULTS_HIGHEST_WAVE_OFFSET_X 400 +#define RESULTS_HIGHEST_WAVE_OFFSET_Y 375 +#define RESULTS_TEXT_MAX 0xFF +#define RESULTS_TEXT_OFFSET_X 400 +#define RESULTS_TEXT_OFFSET_Y 50 +#define RESULTS_SPRITE_OFFSET_X 400 +#define RESULTS_SPRITE_OFFSET_Y 200 +#define RESULTS_SPRITE_WIDTH 400 +#define RESULTS_SPRITE_HEIGHT 200 +#define RESULTS_THANKS_TEXT_OFFSET_X 400 +#define RESULTS_THANKS_TEXT_OFFSET_Y 500 +#define RESULTS_RECTANGLE_WIDTH 800 +#define RESULTS_RECTANGLE_HEIGHT 600 + +static const SDL_Color RESULTS_TEXT_COLOR = {255, 255, 255, 255}; +static const SDL_Color RESULTS_BACKGROUND_COLOR = {0, 0, 0, 255}; + +void results_init(Results* _r, Game* _g); +void results_free(Results* _r); +void results_update(Results* _r); +void results_draw(Results* _r); diff --git a/src/game/scene/scene.c b/src/game/scene/scene.c new file mode 100755 index 0000000..327700b --- /dev/null +++ b/src/game/scene/scene.c @@ -0,0 +1,177 @@ +/* + * DESCRIPTION: + * Handles cutscenes. +*/ + +#include "scene.h" + +static void scene_text_sprite_set(SceneHandler* _h, Game* _g); +static void scene_text_set(SceneHandler* _h, Game* _g); +static void scene_text_end_set(SceneHandler* _h, Game* _g); +static void scene_sprite_set(SceneHandler* _h, Game* _g); + +static void +scene_sprite_set(SceneHandler* _h, Game* _g) +{ + sprite_init + ( + &_h->sprite, + _g->textures[_h->scenes[_h->sceneIndex].textureType], + ORIGIN_TOP_LEFT, + SCENE_SPRITE_WIDTH, + SCENE_SPRITE_HEIGHT + ); + + _h->sprite.x = SCENE_SPRITE_OFFSET_X; + _h->sprite.y = SCENE_SPRITE_OFFSET_Y; +} + +/* Sets the current text sprite. */ +static void +scene_text_sprite_set(SceneHandler* _h, Game* _g) +{ + char* s; + + s = malloc(_h->textIndex + 1); + memset(s, '\0', _h->textIndex + 1); + + memcpy(s, _h->scenes[_h->sceneIndex].text, _h->textIndex); + + if (_h->text.atlas.texture) + texture_free(_h->text.atlas.texture); + + text_sprite_init + ( + &_h->text, + _g->renderer, + _g->fonts[FONT_SMALL], + SCENE_TEXT_COLOR, + ORIGIN_TOP_LEFT, + s, + SCENE_WRAP + ); + + _h->text.x = SCENE_TEXT_OFFSET_X; + _h->text.y = SCENE_TEXT_OFFSET_Y; + + free(s); +} + +/* Sets new text. */ +static void +scene_text_set(SceneHandler* _h, Game* _g) +{ + _h->textIndex = 0; + _h->textLength = strlen(_h->scenes[_h->sceneIndex].text); + + _h->isTextEnd = FALSE; + + scene_text_sprite_set(_h, _g); +} + +/* Sets the text of the scene to its last index. */ +static void +scene_text_end_set(SceneHandler* _h, Game* _g) +{ + _h->textIndex = _h->textLength; + _h->isTextEnd = TRUE; + _h->updateTimer = 0; + + scene_text_sprite_set(_h, _g); +} + +/* Initializes the scene. */ +void +scene_init(SceneHandler* _h, Game* _g, Scene* _s, s32 _c) +{ + _h->scenes = _s; + _h->sceneCount = _c; + + _h->sceneIndex = 0; + _h->isTextEnd = FALSE; + _h->updateTimer = SCENE_UPDATE_TIMER_MAX; + + scene_sprite_set(_h, _g); + scene_text_set(_h, _g); +} + +/* Frees the scene. */ +void +scene_free(SceneHandler* _h, Game* _g) +{ + if (_h->text.atlas.texture) + texture_free(_h->text.atlas.texture); +} + +/* Updates the scene. */ +void +scene_update(SceneHandler* _h, Game* _g) +{ + if (!_h->isEnd) + { + if (!_h->isTextEnd) + { + _h->updateTimer--; + + if (_h->updateTimer <= 0) + { + _h->textIndex++; + + scene_text_sprite_set(_h, _g); + + _h->updateTimer = SCENE_UPDATE_TIMER_MAX; + + sound_play(_g->sounds[SOUND_BLIP], 0); + } + + if (mouse_press(&_g->mouse, MOUSE_LEFT)) + scene_text_end_set(_h, _g); + + if (_h->textIndex == _h->textLength) + _h->isTextEnd = TRUE; + } + else + { + if (mouse_press(&_g->mouse, MOUSE_LEFT)) + { + _h->sceneIndex++; + + if (_h->sceneIndex >= _h->sceneCount) + _h->isEnd = TRUE; + else + { + scene_sprite_set(_h, _g); + scene_text_set(_h, _g); + } + + sound_play(_g->sounds[SOUND_MENU], 1); + } + } + + if (mouse_press(&_g->mouse, MOUSE_RIGHT)) + { + scene_text_end_set(_h, _g); + _h->isEnd = TRUE; + } + } +} + +/* Draws the scene. */ +void +scene_draw(SceneHandler* _h, Game* _g) +{ + SDL_Rect r; + + r.x = 0; + r.y = 0; + r.w = SCENE_RECTANGLE_WIDTH; + r.h = SCENE_RECTANGLE_HEIGHT; + + rectangle_draw(&r, _g->renderer, SCENE_BACKGROUND_COLOR); + + sprite_draw(&_h->sprite, _g->renderer); + + sprite_draw(&_h->text, _g->renderer); +} + + diff --git a/src/game/scene/scene.h b/src/game/scene/scene.h new file mode 100755 index 0000000..8f658e0 --- /dev/null +++ b/src/game/scene/scene.h @@ -0,0 +1,22 @@ +#pragma once + +#include "../GAME_COMMON.h" + +#define SCENE_UPDATE_TIMER_MAX 4 +#define SCENE_WRAP 600 +#define SCENE_TEXT_OFFSET_X 100 +#define SCENE_TEXT_OFFSET_Y 400 +#define SCENE_SPRITE_WIDTH 800 +#define SCENE_SPRITE_HEIGHT 300 +#define SCENE_SPRITE_OFFSET_X 0 +#define SCENE_SPRITE_OFFSET_Y 50 +#define SCENE_RECTANGLE_WIDTH 800 +#define SCENE_RECTANGLE_HEIGHT 800 + +static const SDL_Color SCENE_BACKGROUND_COLOR = {0, 0, 0, 255}; +static const SDL_Color SCENE_TEXT_COLOR = {255, 255, 255, 255}; + +void scene_init(SceneHandler* _h, Game* _g, Scene* _s, s32 _c); +void scene_update(SceneHandler* _h, Game* _g); +void scene_draw(SceneHandler* _h, Game* _g); +void scene_free(SceneHandler* _h, Game* _g); diff --git a/src/game/title/title.c b/src/game/title/title.c new file mode 100755 index 0000000..f83fc78 --- /dev/null +++ b/src/game/title/title.c @@ -0,0 +1,177 @@ +/* + * DESCRIPTION: + * Title code. +*/ + +#include "title.h" + +/* Initializes title. */ +void +title_init(Title* _t, Game* _g) +{ + Sprite startButtonText; + Sprite infoButtonText; + char* s; + + memset(_t, '\0', sizeof(Title)); + + _t->g = _g; + + cursor_init(&_t->cursor, &_t->g->mouse, _t->g->textures[TEXTURE_GUI_CURSOR]); + + sprite_init + ( + &_t->startBackgroundSprite, + _t->g->textures[TEXTURE_GUI_SIGN_BIG], + ORIGIN_MIDDLE, + TITLE_BUTTON_BACKGROUND_WIDTH, + TITLE_BUTTON_BACKGROUND_HEIGHT + ); + + sprite_init + ( + &_t->infoBackgroundSprite, + _t->g->textures[TEXTURE_GUI_SIGN_BIG], + ORIGIN_MIDDLE, + TITLE_BUTTON_BACKGROUND_WIDTH, + TITLE_BUTTON_BACKGROUND_HEIGHT + ); + + _t->startBackgroundSprite.x = TITLE_START_BUTTON_OFFSET_X; + _t->startBackgroundSprite.y = TITLE_START_BUTTON_OFFSET_Y; + + _t->infoBackgroundSprite.x = TITLE_INFO_BUTTON_OFFSET_X; + _t->infoBackgroundSprite.y = TITLE_INFO_BUTTON_OFFSET_Y; + + s = malloc(TITLE_TEXT_MAX); + + snprintf + ( + s, + TITLE_TEXT_MAX, + "%s", + STRING_TITLE_START + ); + + text_sprite_init + ( + &startButtonText, + _t->g->renderer, + _t->g->fonts[FONT_BIG], + TITLE_TEXT_COLOR, + ORIGIN_MIDDLE, + s, + 0 + ); + + snprintf + ( + s, + TITLE_TEXT_MAX, + "%s", + STRING_TITLE_INFO + ); + + text_sprite_init + ( + &infoButtonText, + _t->g->renderer, + _t->g->fonts[FONT_MEDIUM], + TITLE_TEXT_COLOR, + ORIGIN_MIDDLE, + s, + 0 + ); + + free(s); + + startButtonText.rotation = TITLE_TEXT_ROTATION; + infoButtonText.rotation = TITLE_TEXT_ROTATION; + + button_init(&_t->startButton, &startButtonText); + button_init(&_t->infoButton, &infoButtonText); + + _t->startButton.sprite.x = _t->startBackgroundSprite.x; + _t->startButton.sprite.y = _t->startBackgroundSprite.y; + + _t->infoButton.sprite.x = _t->infoBackgroundSprite.x; + _t->infoButton.sprite.y = _t->infoBackgroundSprite.y; + + sprite_init + ( + &_t->backgroundSprite, + _t->g->textures[TEXTURE_TITLE_BACKGROUND], + ORIGIN_TOP_LEFT, + TITLE_BACKGROUND_WIDTH, + TITLE_BACKGROUND_HEIGHT + ); + + _t->backgroundSprite.x = TITLE_BACKGROUND_OFFSET_X; + _t->backgroundSprite.y = TITLE_BACKGROUND_OFFSET_Y; + + sprite_init + ( + &_t->logoSprite, + _t->g->textures[TEXTURE_LOGO], + ORIGIN_MIDDLE, + TITLE_LOGO_WIDTH, + TITLE_LOGO_HEIGHT + ); + + _t->logoSprite.x = TITLE_LOGO_OFFSET_X; + _t->logoSprite.y = TITLE_LOGO_OFFSET_Y; + + music_play(_t->g->music[MUSIC_TITLE], TRUE); +} + +/* Frees title. */ +void +title_free(Title* _t) +{ + cursor_free(&_t->cursor); +} + +/* Updates title. */ +void +title_update(Title* _t) +{ + if (_t->isStartPressed) + _t->isStartPressed = FALSE; + + if (_t->isInfoPressed) + _t->isInfoPressed = FALSE; + + button_update(&_t->startButton, &_t->g->mouse); + button_update(&_t->infoButton, &_t->g->mouse); + + if (_t->startButton.state == BUTTON_STATE_PRESS) + { + sound_play(_t->g->sounds[SOUND_MENU], -1); + _t->isStartPressed = TRUE; + } + + if (_t->infoButton.state == BUTTON_STATE_PRESS) + { + sound_play(_t->g->sounds[SOUND_MENU], -1); + _t->isInfoPressed = TRUE; + } + + cursor_update(&_t->cursor, &_t->g->mouse); +} + +/* Draws title. */ +void +title_draw(Title* _t) +{ + sprite_draw(&_t->backgroundSprite, _t->g->renderer); + + sprite_draw(&_t->logoSprite, _t->g->renderer); + + sprite_draw(&_t->startBackgroundSprite, _t->g->renderer); + sprite_draw(&_t->infoBackgroundSprite, _t->g->renderer); + + button_draw(&_t->startButton, _t->g->renderer); + button_draw(&_t->infoButton, _t->g->renderer); + + cursor_draw(&_t->cursor, _t->g->renderer); +} diff --git a/src/game/title/title.h b/src/game/title/title.h new file mode 100755 index 0000000..3998ae0 --- /dev/null +++ b/src/game/title/title.h @@ -0,0 +1,34 @@ +/* + * DESCRIPTION: + * Header file for title.c. +*/ + +#pragma once + +#include "../gui/button.h" +#include "../gui/cursor.h" +#include "../GAME_STRINGS.h" + +#define TITLE_BUTTON_BACKGROUND_WIDTH 192 +#define TITLE_BUTTON_BACKGROUND_HEIGHT 96 +#define TITLE_START_BUTTON_OFFSET_X 600 +#define TITLE_START_BUTTON_OFFSET_Y 400 +#define TITLE_INFO_BUTTON_OFFSET_X 600 +#define TITLE_INFO_BUTTON_OFFSET_Y 500 +#define TITLE_TEXT_MAX 15 +#define TITLE_TEXT_ROTATION -5 +#define TITLE_BACKGROUND_OFFSET_X 0 +#define TITLE_BACKGROUND_OFFSET_Y 0 +#define TITLE_LOGO_WIDTH 250 +#define TITLE_LOGO_HEIGHT 200 +#define TITLE_LOGO_OFFSET_X 600 +#define TITLE_LOGO_OFFSET_Y 150 +#define TITLE_BACKGROUND_WIDTH 800 +#define TITLE_BACKGROUND_HEIGHT 600 + +static const SDL_Color TITLE_TEXT_COLOR = {255, 255, 255, 255}; + +void title_draw(Title* _t); +void title_free(Title* _t); +void title_init(Title* _t, Game* _g); +void title_update(Title* _t); diff --git a/src/main.c b/src/main.c new file mode 100755 index 0000000..dd8a9c5 --- /dev/null +++ b/src/main.c @@ -0,0 +1,56 @@ +#include "main.h" + +static void loop(void); +static void init(void); +static void quit(void); + +static Game g; + +static void +init(void) +{ + sdl_init(); + + random_seed_set(); + + game_init(&g); +} + +static void +quit(void) +{ + /* + if (g.isFullScreen) + { + window_fullscreen_exit(g.window); + g.isFullScreen = FALSE; + } + */ + + game_free(&g); + sdl_quit(); + exit(1); +} + +static void +loop(void) +{ + game_loop(&g); + + if (event_press(&g.event, EVENT_QUIT)) + quit(); +} + +s32 +main(s32 argc, char* argv[]) +{ + init(); + +#ifdef EMSCRIPTEN + emscripten_set_main_loop(loop, FPS, TRUE); +#else + while (TRUE) + loop(); +#endif + return 1; +} diff --git a/src/main.h b/src/main.h new file mode 100755 index 0000000..39cfc04 --- /dev/null +++ b/src/main.h @@ -0,0 +1,9 @@ +#pragma once + +#include "game/game.h" +#include "sdl/sdl.h" +#include "util/random.h" + +#ifdef EMSCRIPTEN +#include +#endif diff --git a/src/sdl/SDL_COMMON.h b/src/sdl/SDL_COMMON.h new file mode 100755 index 0000000..4f45dfd --- /dev/null +++ b/src/sdl/SDL_COMMON.h @@ -0,0 +1,17 @@ +#pragma once + +#include +#include +#include +#include + +#include "../COMMON.h" + +typedef enum SDLErrorType +{ + SDL_ERROR_VIDEO, + SDL_ERROR_TIMER, + SDL_ERROR_MIXER, + SDL_ERROR_TTF, + SDL_ERROR_IMAGE +} SDLErrorType; diff --git a/src/sdl/sdl.c b/src/sdl/sdl.c new file mode 100755 index 0000000..7223afe --- /dev/null +++ b/src/sdl/sdl.c @@ -0,0 +1,56 @@ +#include "sdl.h" + +static void sdl_error(enum SDLErrorType _x); + +static void +sdl_error(enum SDLErrorType _x) +{ + switch (_x) + { + /* FALLTHROUGH */ + case SDL_ERROR_VIDEO: + case SDL_ERROR_TIMER: + printf("%s\n", SDL_GetError()); + break; + case SDL_ERROR_MIXER: + printf("%s\n", Mix_GetError()); + break; + case SDL_ERROR_TTF: + printf("%s\n", TTF_GetError()); + break; + case SDL_ERROR_IMAGE: + printf("%s\n", IMG_GetError()); + break; + default: + break; + } + + sdl_quit(); + exit(1); +} + +/* Initializes SDL, SDL_ttf, and SDL_mixer. */ +void +sdl_init(void) +{ + if (SDL_INIT_VIDEO < 0) + sdl_error(SDL_ERROR_VIDEO); + + if (SDL_INIT_TIMER < 0) + sdl_error(SDL_ERROR_TIMER); + + if (TTF_Init() < 0) + sdl_error(SDL_ERROR_TTF); + + if (Mix_OpenAudio(0, MIX_DEFAULT_FORMAT, MIX_CHANNELS, 0) < 0) + sdl_error(SDL_ERROR_MIXER); +} + +/* Quits SDL, SDL_ttf, and SDL_mixer. */ +void +sdl_quit(void) +{ + Mix_CloseAudio(); + TTF_Quit(); + SDL_Quit(); +} diff --git a/src/sdl/sdl.h b/src/sdl/sdl.h new file mode 100755 index 0000000..c8ed313 --- /dev/null +++ b/src/sdl/sdl.h @@ -0,0 +1,6 @@ +#pragma once + +#include "SDL_COMMON.h" + +void sdl_init(void); +void sdl_quit(void); diff --git a/src/util/list.c b/src/util/list.c new file mode 100755 index 0000000..133eef8 --- /dev/null +++ b/src/util/list.c @@ -0,0 +1,191 @@ +#include "list.h" + +/* Initialize a list. */ +void +list_init(List* _l) +{ + memset(_l, '\0', sizeof(List)); + + _l->head = node_get(NULL, 0); + _l->tail = node_get(NULL, 0); + + _l->head->next = _l->tail; + _l->head->prev = NULL; + + _l->tail->next = NULL; + _l->tail->prev = _l->head; + + _l->count = 0; +} + +/* Removes a node from the list. */ +void +list_remove(List* _l, Node* _n) +{ + Node* next; + Node* prev; + + next = _n->next; + prev = _n->prev; + + next->prev = prev; + prev->next = next; + + node_free(_n); + + _l->count--; +} + +/* Removes all the nodes in a given list, but doesn't free the head/tail. */ +void +list_clear(List* _l) +{ + Node* node; + + if (_l->count == 0) + return; + + node = _l->head->next; + + while (node != _l->tail) + { + Node* next; + + next = node->next; + + list_remove(_l, node); + + node = next; + } + + _l->count = 0; +} + +/* Frees a given list. */ +void +list_free(List* _l) +{ + list_clear(_l); + + node_free(_l->head); + node_free(_l->tail); + + _l->count = 0; +} + +/* Adds a node to the left of another in the list. */ +void +list_left_add(List* _l, Node* _a, Node* _b) +{ + _a->next = _b; + _a->prev = _b->prev; + + _b->prev->next = _a; + _b->prev = _a; + + _l->count++; +} + +/* Adds a node to the right of another in the list. */ +void +list_right_add(List* _l, Node* _a, Node* _b) +{ + _a->next = _b->next; + _a->prev = _b; + + _b->next->prev = _a; + _b->next = _a; + + _l->count++; +} + +/* Appends a new node to the head of a list, and returns its data. */ +void* +list_append_new(List* _l, void* _d, size_t _s) +{ + Node* n; + + n = node_get(_d, _s); + + list_right_add(_l, n, _l->head); + + return n->data; +} + +/* Gets a malloc'd array of all the data in a list. */ +void** +list_data_get(List* _l) +{ + void** data; + Node* n; + s32 i; + + if (_l->count == 0) + return NULL; + + i = 0; + data = malloc(sizeof(void*) * _l->count); + + n = _l->head->next; + + while (n != _l->tail) + { + data[i] = (void*)n->data; + n = n->next; + i++; + } + + return data; +} + +/* Returns a node from an index, if it exists. */ +Node* +list_node_from_index_get(List* _l, s32 _i) +{ + Node* n; + s32 i; + + i = 0; + n = _l->head->next; + + while (n != _l->tail) + { + if (i == _i) + return n; + n = n->next; + + i++; + } + + return NULL; +} + +/* Gets a node, given the data and if it exists. */ +Node* +list_node_from_data_get(List* _l, void* _d, size_t _s) +{ + Node* n; + + n = _l->head->next; + + while (n != _l->tail) + { + if (memcmp(n->data, _d, _s) == 0) + return n; + n = n->next; + } + + return NULL; +} + +/* Removes a node from the list, given the data. */ +void +list_node_from_data_remove(List* _l, void* _d, size_t _s) +{ + Node* n; + + n = list_node_from_data_get(_l, _d, _s); + + if (n) + list_remove(_l, n); +} diff --git a/src/util/list.h b/src/util/list.h new file mode 100755 index 0000000..00e4266 --- /dev/null +++ b/src/util/list.h @@ -0,0 +1,22 @@ +#pragma once + +#include "node.h" + +typedef struct List +{ + Node* head; + Node* tail; + s32 count; +} List; + +void list_init(List* _l); +void list_remove(List* _l, Node* _n); +void list_clear(List* _l); +void list_free(List* _l); +void list_left_add(List* _l, Node* _a, Node* _b); +void list_right_add(List* _l, Node* _a, Node* _b); +void* list_append_new(List* _l, void* _data, size_t _size); +void** list_data_get(List* _l); +Node* list_node_from_data_get(List* _l, void* _d, size_t _s); +Node* list_node_from_index_get(List* _l, s32 _i); +void list_node_from_data_remove(List* _l, void* _d, size_t _s); diff --git a/src/util/math.c b/src/util/math.c new file mode 100755 index 0000000..0aedc25 --- /dev/null +++ b/src/util/math.c @@ -0,0 +1,34 @@ +#include "math.h" + +/* Given two points, gets the inverse tangent in radians. */ +f64 +math_atan(f64 _aX, f64 _aY, f64 _bX, f64 _bY) +{ + f64 angle; + f64 x; + f64 y; + + x = _aX - _bX; + y = _aY - _bY; + + angle = atan2(y, x); + + return angle; +} + +/* Distance formula. */ +f64 +math_distance(f64 _aX, f64 _aY, f64 _bX, f64 _bY) +{ + f64 x; + f64 y; + f64 distance; + + x = _aX - _bX; + y = _aY - _bY; + + distance = sqrt(pow(x, 2) + pow(y, 2)); + + return distance; +} + diff --git a/src/util/math.h b/src/util/math.h new file mode 100755 index 0000000..ae6386e --- /dev/null +++ b/src/util/math.h @@ -0,0 +1,13 @@ +/* + * DESCRIPTION: + * Header file for math.c. +*/ + +#pragma once + +#include + +#include "../COMMON.h" + +f64 math_atan(f64 _aX, f64 _aY, f64 _bX, f64 _bY); +f64 math_distance(f64 _aX, f64 _aY, f64 _bX, f64 _bY); diff --git a/src/util/node.c b/src/util/node.c new file mode 100755 index 0000000..16d283b --- /dev/null +++ b/src/util/node.c @@ -0,0 +1,28 @@ +#include "node.h" + +/* Mallocs a node for a linked list, given data and size. */ +Node* +node_get(void* _d, size_t _s) +{ + Node* n; + + n = malloc(sizeof(Node)); + memset(n, '\0', sizeof(Node)); + + if (_d) + { + n->data = malloc(_s); + memcpy(n->data, _d, _s); + } + + return n; +} + +/* Frees a node. */ +void +node_free(Node* _x) +{ + if (_x->data) + free(_x->data); + free(_x); +} diff --git a/src/util/node.h b/src/util/node.h new file mode 100755 index 0000000..43735d2 --- /dev/null +++ b/src/util/node.h @@ -0,0 +1,13 @@ +#pragma once + +#include "../COMMON.h" + +typedef struct Node +{ + struct Node* next; + struct Node* prev; + void* data; +} Node; + +Node* node_get(void* _d, size_t _s); +void node_free(Node* _x); diff --git a/src/util/random.c b/src/util/random.c new file mode 100755 index 0000000..b469aed --- /dev/null +++ b/src/util/random.c @@ -0,0 +1,29 @@ +#include "random.h" + +/* Sets random seed. */ +void +random_seed_set(void) +{ + srand(time(NULL)); +} + +/* Generates a random f64 through [0, 1). */ +f64 +random_f64_get(void) +{ + return ((f64)rand() / (f64)RAND_MAX); +} + +/* Generates a random s32 through [_x, _y]. */ +s32 +random_s32_in_range_get(s32 _x, s32 _y) +{ + return (s32)((random_f64_get() * (_y - _x + 1)) + _x); +} + +/* Generates a random f64 through [_x, _y]. */ +f64 +random_f64_in_range_get(f64 _x, f64 _y) +{ + return (f64)((random_f64_get() * (_y - _x + 1)) + _x); +} diff --git a/src/util/random.h b/src/util/random.h new file mode 100755 index 0000000..adb53bb --- /dev/null +++ b/src/util/random.h @@ -0,0 +1,11 @@ +#pragma once + +#include +#include + +#include "../COMMON.h" + +void random_seed_set(void); +f64 random_f64_get(void); +s32 random_s32_in_range_get(s32 _x, s32 _y); +f64 random_f64_in_range_get(f64 _x, f64 _y);