Skip to content

Commit

Permalink
Feature: Crowd Control Integration (void-linux#1568)
Browse files Browse the repository at this point in the history
* Start effects

* Disable input to game when typing in console

* Add gravity support

* noUI placeholder

* Add rest of effects to console

* Remove z_play code

* Add rupee modification

* Add OneHit KO (void-linux#27)

* few fix and paper Link

* Better method and now use the reset flag

* Revert "Better method and now use the reset flag"

This reverts commit 2aafcc1df29686940945ebab87372360a06a3cf7.

* Revert "few fix and paper Link"

This reverts commit 65e76dcfeec3924ca9977c931703b4c3232a9733.

* Paper Link & few fixes (void-linux#28)

* Implement pacifist mode (void-linux#30)

* Implement cucco storm (void-linux#31)

* Add no UI functionality (void-linux#32)

* Enable CrowdControl on windows (void-linux#33)

* Use std::format and implement wallmaster

* Implement defense modifier

* Implement no_z and clean up

* Implement reverse controls

* Some fixes while testing CC connection

* Implement speed modifier and fix defese modifier

* Fail magic effects if magic is not acquired

* Fix queue system

* Implement rainstorm

* Some cleanup

* Use IS_ZERO to handle very low near zero values

* Split some effects

* Fix emptying magic

* Don’t run cucco on pre-rendered backgrounds

* Use correct method for updating ruppees

* Fix decreasing speed

* Remove old SDL stuff

* Remove old fixes

* Enable Crowd Control for both debug and release

* Add missing returns

* Cleanup event firing

* Further clean up on event firing

* Fix some bugs

* CC fixes and enemy spawning (void-linux#35)

* Fix icetraps

* Fix title screen

* Fix pause screen

* Fix death screen timer & Code cleanup

* Fix timer during textboxes

* Code cleanup

* Add: Multiple enemy spawning

* More enemies + more code cleanup (void-linux#36)

* Enums for returning effect states

* Add more enemies

* Update CrowdControl.cpp

* Remove enums from enemies

* Fix up flow for events (void-linux#37)

# Conflicts:
#	soh/soh/Enhancements/crowd-control/CrowdControl.cpp

* Fix spawn position of likelike

* CC temp enemy fixes (void-linux#38)

* Check for pause in pacifist and allow button presses (void-linux#39)

* Fix Pacifist mode (void-linux#41)

* First attempt pacifier fix

* Real fix for pacifist mode

* Comment

* Remove cutscene and long delay from cucco_storm (void-linux#40)

* Some PR Fixes

* Use standard types

* Handle JSON parsing error and free memory

* Add CC configuration file

* Add: Giving deku shield option. Fix: Giant Lonk (void-linux#42)

* Small stalfos fix (void-linux#43)

* Syntax Improvements (void-linux#44)

* Revert bools to uint32_t

* Add comment about bools

* Fix cucco storm, fix empty heart (void-linux#45)

* Protect commands vector with mutex

* prefix effects with chaosEffect (void-linux#46)

Co-authored-by: briaguya <briaguya@alice>

Co-authored-by: Baoulettes <perlouzerie@hotmail.fr>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
Co-authored-by: briaguya <briaguya@alice>
  • Loading branch information
5 people committed Sep 28, 2022
1 parent 87125ae commit 083ceb4
Show file tree
Hide file tree
Showing 18 changed files with 1,533 additions and 49 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ set(VCPKG_TRIPLET x64-windows-static)
set(VCPKG_TARGET_TRIPLET x64-windows-static)

vcpkg_bootstrap()
vcpkg_install_packages(zlib bzip2 libpng SDL2 GLEW glfw3)
vcpkg_install_packages(zlib bzip2 libpng SDL2 SDL2-net GLEW glfw3)
endif()

################################################################################
Expand Down
4 changes: 2 additions & 2 deletions libultraship/libultraship/Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ extern "C" {
pad->err_no = 0;
pad->gyro_x = 0;
pad->gyro_y = 0;

if (SohImGui::GetInputEditor()->IsOpened()) return;
if (SohImGui::GetInputEditor()->IsOpened()) return;

Ship::Window::GetInstance()->GetControlDeck()->WriteToPad(pad);
Ship::ExecuteHooks<Ship::ControllerRead>(pad);
Expand Down
26 changes: 25 additions & 1 deletion soh/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,13 @@ set(Header_Files__soh__Enhancements__item_tables

source_group("Header Files\\soh\\Enhancements\\item-tables" FILES ${Header_Files__soh__Enhancements__item_tables})

if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
set(Header_Files__soh__Enhancements__crowd_control
"soh/Enhancements/crowd-control/CrowdControl.h"
)
source_group("Header Files\\soh\\Enhancements\\crowd-control" FILES ${Header_Files__soh__Enhancements__crowd_control})
endif()

set(Source_Files__soh
"soh/GbiWrap.cpp"
"soh/OTRAudio.h"
Expand Down Expand Up @@ -378,6 +385,13 @@ set(Source_Files__soh__Enhancements__item_tables

source_group("Source Files\\soh\\Enhancements\\item-tables" FILES ${Source_Files__soh__Enhancements__item_tables})

if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
set(Source_Files__soh__Enhancements__crowd_control
"soh/Enhancements/crowd-control/CrowdControl.cpp"
)
source_group("Source Files\\soh\\Enhancements\\crowd-control" FILES ${Source_Files__soh__Enhancements__crowd_control})
endif()

set(Source_Files__src__boot
"src/boot/assert.c"
"src/boot/boot_main.c"
Expand Down Expand Up @@ -1588,6 +1602,7 @@ set(ALL_FILES
${Header_Files__soh__Enhancements__randomizer__3drando}
${Header_Files__soh__Enhancements__item_tables}
${Header_Files__soh__Enhancements__custom_message}
${Header_Files__soh__Enhancements__crowd_control}
${Source_Files__soh}
${Source_Files__soh__Enhancements}
${Source_Files__soh__Enhancements__controls}
Expand All @@ -1599,6 +1614,7 @@ set(ALL_FILES
${Source_Files__soh__Enhancements__randomizer__3drando__location_access}
${Source_Files__soh__Enhancements__item_tables}
${Source_Files__soh__Enhancements__custom_message}
${Source_Files__soh__Enhancements__crowd_control}
${Source_Files__src__boot}
${Source_Files__src__buffers}
${Source_Files__src__code}
Expand Down Expand Up @@ -1680,6 +1696,11 @@ endif()
find_package(SDL2)
set(SDL2-INCLUDE ${SDL2_INCLUDE_DIRS})

if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
find_package(SDL2-net)
set(SDL2-NET-INCLUDE ${SDL_NET_INCLUDE_DIRS})
endif()

target_include_directories(${PROJECT_NAME} PRIVATE assets
${CMAKE_CURRENT_SOURCE_DIR}/include/
${CMAKE_CURRENT_SOURCE_DIR}/src/
Expand All @@ -1690,6 +1711,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE assets
${CMAKE_CURRENT_SOURCE_DIR}/../libultraship/libultraship/Lib/Fast3D/U64/PR
${CMAKE_CURRENT_SOURCE_DIR}/../ZAPDTR/ZAPDUtils
${SDL2-INCLUDE}
${SDL2-NET-INCLUDE}
${CMAKE_CURRENT_SOURCE_DIR}/assets/
.
)
Expand All @@ -1700,12 +1722,13 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
"$<$<CONFIG:Debug>:"
"_DEBUG;"
"_CRT_SECURE_NO_WARNINGS;"
"ENABLE_DX11"
"ENABLE_DX11;"
">"
"$<$<CONFIG:Release>:"
"NDEBUG"
">"
"INCLUDE_GAME_PRINTF;"
"ENABLE_CROWD_CONTROL;"
"UNICODE;"
"_UNICODE"
STORMLIB_NO_AUTO_LINK
Expand Down Expand Up @@ -1941,6 +1964,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
"glu32;"
"SDL2::SDL2;"
"SDL2::SDL2main;"
"SDL2::SDL2_net;"
"glfw;"
"winmm;"
"imm32;"
Expand Down
4 changes: 4 additions & 0 deletions soh/include/functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -1076,6 +1076,8 @@ void Interface_SetDoAction(GlobalContext* globalCtx, u16 action);
void Interface_SetNaviCall(GlobalContext* globalCtx, u16 naviCallState);
void Interface_LoadActionLabelB(GlobalContext* globalCtx, u16 action);
s32 Health_ChangeBy(GlobalContext* globalCtx, s16 healthChange);
void Health_GiveHearts(s16 hearts);
void Health_RemoveHearts(s16 hearts);
void Rupees_ChangeBy(s16 rupeeChange);
void Inventory_ChangeAmmo(s16 item, s16 ammoChange);
void Magic_Fill(GlobalContext* globalCtx);
Expand All @@ -1091,6 +1093,7 @@ f32 Path_OrientAndGetDistSq(Actor* actor, Path* path, s16 waypoint, s16* yaw);
void Path_CopyLastPoint(Path* path, Vec3f* dest);
void FrameAdvance_Init(FrameAdvanceContext* frameAdvCtx);
s32 FrameAdvance_Update(FrameAdvanceContext* frameAdvCtx, Input* input);
u8 PlayerGrounded(Player* player);
void Player_SetBootData(GlobalContext* globalCtx, Player* player);
s32 Player_InBlockingCsMode(GlobalContext* globalCtx, Player* player);
s32 Player_InCsMode(GlobalContext* globalCtx);
Expand All @@ -1103,6 +1106,7 @@ void Player_SetModelGroup(Player* player, s32 modelGroup);
void func_8008EC70(Player* player);
void Player_SetEquipmentData(GlobalContext* globalCtx, Player* player);
void Player_UpdateBottleHeld(GlobalContext* globalCtx, Player* player, s32 item, s32 actionParam);
void func_80837C0C(GlobalContext* globalCtx, Player* this, s32 arg2, f32 arg3, f32 arg4, s16 arg5, s32 arg6);
void func_8008EDF0(Player* player);
void func_8008EE08(Player* player);
void func_8008EEAC(GlobalContext* globalCtx, Actor* actor);
Expand Down
Loading

0 comments on commit 083ceb4

Please sign in to comment.