-
Notifications
You must be signed in to change notification settings - Fork 0
Fix/rb 66 sound effect still playing #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
2ad6834
CLIENT-GAME: Add isReady method
kw4ntiq 8e6e565
CLIENT-GAME: Fix raylib comp unload
kw4ntiq f6ee02e
CLIENT-GAME: Fix clang tidy warnings
kw4ntiq 1c05d43
CLIENT-GAME: Fix = by copy
kw4ntiq 3bc3418
CLIENT-GAME: Add debug
kw4ntiq b615895
CLIENT-GAME: Clean code
kw4ntiq 0192ae0
CLIENT-GAME: Set win size to 1920 1080
kw4ntiq 3168c2b
Merge branch 'dev' into fix/RB-66
kw4ntiq 1ba7ba7
FORMAT-AUTO: automatic format on pull request #47
github-actions[bot] 3ab5cd3
CLIENT-GAME: Fix system merge
kw4ntiq 7e2caa2
Merge branch after formating
kw4ntiq 1810c14
CLIENT-GAME: Remove useless line
kw4ntiq e370312
FORMAT-AUTO: automatic format on pull request #47
github-actions[bot] 865e23b
Merge branch 'fix/RB-66-Sound-effect-still-playing' of github.com:X-R…
kw4ntiq cc31b6d
CLIENT-GAME: Fix cmake
kw4ntiq 6e52327
CLIENT-GAME: Fix eof
kw4ntiq 6406d59
CLIENT-GAME: Add compile definition
kw4ntiq 39665ff
FORMAT-AUTO: automatic format on pull request #47
github-actions[bot] fd43d4b
Merge branch 'dev' into fix/RB-66-Sound-effect-still-playing
kw4ntiq c4eebc1
FORMAT-AUTO: automatic format on pull request #47
github-actions[bot] 9c20e8a
CLIENT-GAME: Fix system.cpp
kw4ntiq 15bcf3f
Merge branch 'dev' into fix/RB-66-Sound-effect-still-playing
kw4ntiq 8b43476
CLIENT-GAME: Fix const parameter in sparse array
kw4ntiq 8381dbf
CLIENT-GAME: Move initAudio to client systems
kw4ntiq b919a98
Merge branch 'dev' into fix/RB-66
kw4ntiq dce7875
FORMAT-AUTO: automatic format on pull request #47
github-actions[bot] 046903a
CLIENT-GAME: Fix merge conflicts
kw4ntiq 14d72cb
FORMAT-AUTO: automatic format on pull request #47
github-actions[bot] 023a21c
CLIENT-GAME: Fix build
kw4ntiq File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| /* | ||
| ** EPITECH PROJECT, 2023 | ||
| ** R-Bus | ||
| ** File description: | ||
| ** unloadRaylib | ||
| */ | ||
|
|
||
| #include "Registry.hpp" | ||
| #include "Raylib.hpp" | ||
|
|
||
| static void unloadSounds(std::size_t id) | ||
| { | ||
| Registry::components<Raylib::Sound> arrSound = | ||
| Registry::getInstance().getComponents<Raylib::Sound>(); | ||
|
|
||
| if (arrSound.exist(id)) { | ||
| arrSound[id].unload(); | ||
| } | ||
| } | ||
|
|
||
| static void unloadMusic(std::size_t id) | ||
| { | ||
| Registry::components<Raylib::Music> arrMusic = | ||
| Registry::getInstance().getComponents<Raylib::Music>(); | ||
|
|
||
| if (arrMusic.exist(id)) { | ||
| arrMusic[id].unload(); | ||
| } | ||
| } | ||
|
|
||
| static void unloadSprite(std::size_t id) | ||
| { | ||
| Registry::components<Raylib::Sprite> arrSprite = | ||
| Registry::getInstance().getComponents<Raylib::Sprite>(); | ||
|
|
||
| if (arrSprite.exist(id)) { | ||
| arrSprite[id].unloadSprite(); | ||
| } | ||
| } | ||
|
|
||
| static void unloadImage(std::size_t id) | ||
| { | ||
| Registry::components<Raylib::Image> arrImage = | ||
| Registry::getInstance().getComponents<Raylib::Image>(); | ||
|
|
||
| if (arrImage.exist(id)) { | ||
| arrImage[id].unloadImage(); | ||
| } | ||
| } | ||
|
|
||
| // NOLINTNEXTLINE(readability-convert-member-functions-to-static,-warnings-as-errors) | ||
| void Registry::unloadRaylibComponents(std::size_t id) | ||
| { | ||
| unloadSounds(id); | ||
| unloadMusic(id); | ||
| unloadSprite(id); | ||
| unloadImage(id); | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.