Skip to content

Conversation

@dcvz
Copy link
Contributor

@dcvz dcvz commented Sep 23, 2022

No description provided.

dcvz and others added 30 commits August 11, 2022 17:12
…owd-control

# Conflicts:
#	libultraship/libultraship/Lib/SDL/lib/x86/SDL2.lib
#	libultraship/libultraship/Lib/SDL/lib/x86/SDL2main.lib
#	soh/soh/Enhancements/debugconsole.cpp
# Conflicts:
#	libultraship/libultraship/Window.cpp
#	soh/CMakeLists.txt
#	soh/soh/Enhancements/debugconsole.cpp
#	soh/src/code/z_play.c
#	soh/src/overlays/actors/ovl_player_actor/z_player.c
@dcvz dcvz force-pushed the feature/crowd-control branch from b6d19d9 to 17f99b6 Compare September 26, 2022 21:56
@dcvz dcvz marked this pull request as ready for review September 27, 2022 17:37
@garrettjoecox
Copy link
Contributor

I think at the very least we can prefix these variables in a way that makes it more obvious what they are when you come across them. Also because they are console commands not necessarily tied to CC I wouldn’t involve CC in the naming: eg noUI = sohTempVarNoUI

Bump on this

@briaguya0
Copy link
Contributor

briaguya0 commented Sep 27, 2022

across them. Also because they are console commands not necessarily tied to CC I wouldn’t involve CC in the naming: eg noUI = sohTempVarNoUI

Bump on this

what about "Chaos Effect" as a naming convention. I'm thinking we could add a "chaos mode" for offline play that triggers random chaos effects every so often so they aren't just limited to crowd control/console command use

Comment on lines 8 to 20
extern uint32_t noUI;
extern uint32_t giantLink;
extern uint32_t minishLink;
extern uint32_t paperLink;
extern uint32_t gravityLevel;
extern uint32_t resetLinkScale;
extern uint32_t invisibleLink;
extern uint32_t oneHitKO;
extern uint32_t pacifistMode;
extern int32_t defenseModifier;
extern uint32_t noZ;
extern uint32_t reverseControls;
extern int32_t speedModifier;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use uint32_t for boolean values?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original implementation had them so I kept them, can replace them with bools

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually learned that they are indeed needed. We're using these variables in c code from the decomp and bools are not playing nice

Comment on lines 10935 to 10941
if (gravityLevel == 2) {
this->actor.gravity = -4.0f;
}

if (gravityLevel == 0) {
this->actor.gravity = -0.3f;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these values feel like magic numbers, we're only checking 0 and 2 here, what is gravity level 2? seems like using #defines or and enum for these could be good

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated!

this->actor.scale.z = paperLink == 2 ? 0.001f : 0.01f;
}

if (resetLinkScale == 1) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we just used bool instead of uint32_t for these (even if we don't) this could just be if (resetLinkScale)

@dcvz dcvz force-pushed the feature/crowd-control branch from 705da1b to cd48426 Compare September 27, 2022 22:12
@briaguya0 briaguya0 merged commit 083ceb4 into HarbourMasters:develop Sep 28, 2022
@dcvz dcvz deleted the feature/crowd-control branch September 28, 2022 07:44
Kenix3 pushed a commit to Kenix3/Shipwright that referenced this pull request Oct 19, 2022
* 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 (HarbourMasters#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 2aafcc1.

* Revert "few fix and paper Link"

This reverts commit 65e76dc.

* Paper Link & few fixes (HarbourMasters#28)

* Implement pacifist mode (HarbourMasters#30)

* Implement cucco storm (HarbourMasters#31)

* Add no UI functionality (HarbourMasters#32)

* Enable CrowdControl on windows (HarbourMasters#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 (HarbourMasters#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 (HarbourMasters#36)

* Enums for returning effect states

* Add more enemies

* Update CrowdControl.cpp

* Remove enums from enemies

* Fix up flow for events (HarbourMasters#37)

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

* Fix spawn position of likelike

* CC temp enemy fixes (HarbourMasters#38)

* Check for pause in pacifist and allow button presses (HarbourMasters#39)

* Fix Pacifist mode (HarbourMasters#41)

* First attempt pacifier fix

* Real fix for pacifist mode

* Comment

* Remove cutscene and long delay from cucco_storm (HarbourMasters#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 (HarbourMasters#42)

* Small stalfos fix (HarbourMasters#43)

* Syntax Improvements (HarbourMasters#44)

* Revert bools to uint32_t

* Add comment about bools

* Fix cucco storm, fix empty heart (HarbourMasters#45)

* Protect commands vector with mutex

* prefix effects with chaosEffect (HarbourMasters#46)

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

Co-authored-by: Baoulettes <[email protected]>
Co-authored-by: aMannus <[email protected]>
Co-authored-by: briaguya <[email protected]>
Co-authored-by: briaguya <briaguya@alice>
dcvz added a commit to briaguya0/Shipwright that referenced this pull request Nov 12, 2022
* 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 (#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 2aafcc1.

* Revert "few fix and paper Link"

This reverts commit 65e76dc.

* Paper Link & few fixes (#28)

* Implement pacifist mode (#30)

* Implement cucco storm (#31)

* Add no UI functionality (#32)

* Enable CrowdControl on windows (#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 (#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 (#36)

* Enums for returning effect states

* Add more enemies

* Update CrowdControl.cpp

* Remove enums from enemies

* Fix up flow for events (#37)

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

* Fix spawn position of likelike

* CC temp enemy fixes (#38)

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

* Fix Pacifist mode (#41)

* First attempt pacifier fix

* Real fix for pacifist mode

* Comment

* Remove cutscene and long delay from cucco_storm (#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 (#42)

* Small stalfos fix (#43)

* Syntax Improvements (#44)

* Revert bools to uint32_t

* Add comment about bools

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

* Protect commands vector with mutex

* prefix effects with chaosEffect (#46)

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

Co-authored-by: Baoulettes <[email protected]>
Co-authored-by: aMannus <[email protected]>
Co-authored-by: briaguya <[email protected]>
Co-authored-by: briaguya <briaguya@alice>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants