Skip to content
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

Add sound effects #69

Merged
merged 2 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,28 @@ type AssetManager struct {

fontComicSansMs rl.Font
fontComicSansMsBig rl.Font

sfxClick rl.Sound
sfxClickAlt rl.Sound
sfxChaosRoll rl.Sound
sfxTileAddRemove rl.Sound
sfxPieceMove rl.Sound
sfxPieceCapture rl.Sound
sfxPiecePromote rl.Sound
sfxPieceAdd rl.Sound
sfxPieceRemove rl.Sound
sfxPieceColorChange rl.Sound
sfxPieceSizeChange rl.Sound
sfxStatusEffectAdd rl.Sound
sfxStatusEffectRemove rl.Sound
sfxObstacleAdd rl.Sound
sfxObstacleRemove rl.Sound
sfxShopMoneyEarn rl.Sound
sfxShopQuickbuy rl.Sound
sfxShopQuickbuyUndo rl.Sound
sfxShopUnlock rl.Sound
sfxShopShuffle rl.Sound
sfxShopPriceChange rl.Sound
}

func (am *AssetManager) LoadAll() {
Expand Down Expand Up @@ -112,6 +134,28 @@ func (am *AssetManager) LoadAll() {

am.fontComicSansMs = rl.LoadFontEx("assets/comic.ttf", 20, []rune(FontChars))
am.fontComicSansMsBig = rl.LoadFontEx("assets/comic.ttf", 28, []rune(FontChars))

am.sfxClick = rl.LoadSound("assets/sfx/click3.wav")
am.sfxClickAlt = rl.LoadSound("assets/sfx/click.wav")
am.sfxChaosRoll = rl.LoadSound("assets/sfx/chaos_roll.ogg")
am.sfxTileAddRemove = rl.LoadSound("assets/sfx/tile_add_remove.ogg")
am.sfxPieceMove = rl.LoadSound("assets/sfx/piece_move.mp3")
am.sfxPieceCapture = rl.LoadSound("assets/sfx/piece_capture.mp3")
am.sfxPiecePromote = rl.LoadSound("assets/sfx/piece_promote.mp3")
am.sfxPieceAdd = rl.LoadSound("assets/sfx/piece_add.ogg")
am.sfxPieceRemove = rl.LoadSound("assets/sfx/piece_remove.ogg")
am.sfxPieceColorChange = rl.LoadSound("assets/sfx/piece_color_change.ogg")
am.sfxPieceSizeChange = rl.LoadSound("assets/sfx/piece_size_change.wav")
am.sfxStatusEffectAdd = rl.LoadSound("assets/sfx/status_effect_add.ogg")
am.sfxStatusEffectRemove = rl.LoadSound("assets/sfx/status_effect_remove.ogg")
am.sfxObstacleAdd = rl.LoadSound("assets/sfx/obstacle_add.wav")
am.sfxObstacleRemove = rl.LoadSound("assets/sfx/obstacle_remove.wav")
am.sfxShopMoneyEarn = rl.LoadSound("assets/sfx/shop_money_earn.ogg")
am.sfxShopQuickbuy = rl.LoadSound("assets/sfx/shop_quickbuy.ogg")
am.sfxShopQuickbuyUndo = rl.LoadSound("assets/sfx/shop_quickbuy_undo.ogg")
am.sfxShopUnlock = rl.LoadSound("assets/sfx/shop_unlock.ogg")
am.sfxShopShuffle = rl.LoadSound("assets/sfx/shop_shuffle.ogg")
am.sfxShopPriceChange = rl.LoadSound("assets/sfx/shop_price_change.ogg")
}

func (am *AssetManager) UnloadAll() {
Expand Down Expand Up @@ -166,4 +210,26 @@ func (am *AssetManager) UnloadAll() {

rl.UnloadFont(am.fontComicSansMs)
rl.UnloadFont(am.fontComicSansMsBig)

rl.UnloadSound(am.sfxClick)
rl.UnloadSound(am.sfxClickAlt)
rl.UnloadSound(am.sfxChaosRoll)
rl.UnloadSound(am.sfxTileAddRemove)
rl.UnloadSound(am.sfxPieceMove)
rl.UnloadSound(am.sfxPieceCapture)
rl.UnloadSound(am.sfxPiecePromote)
rl.UnloadSound(am.sfxPieceAdd)
rl.UnloadSound(am.sfxPieceRemove)
rl.UnloadSound(am.sfxPieceColorChange)
rl.UnloadSound(am.sfxPieceSizeChange)
rl.UnloadSound(am.sfxStatusEffectAdd)
rl.UnloadSound(am.sfxStatusEffectRemove)
rl.UnloadSound(am.sfxObstacleAdd)
rl.UnloadSound(am.sfxObstacleRemove)
rl.UnloadSound(am.sfxShopMoneyEarn)
rl.UnloadSound(am.sfxShopQuickbuy)
rl.UnloadSound(am.sfxShopQuickbuyUndo)
rl.UnloadSound(am.sfxShopUnlock)
rl.UnloadSound(am.sfxShopShuffle)
rl.UnloadSound(am.sfxShopPriceChange)
}
Binary file added assets/sfx/chaos_roll.ogg
Binary file not shown.
Binary file added assets/sfx/click.wav
Binary file not shown.
Binary file added assets/sfx/click2.wav
Binary file not shown.
Binary file added assets/sfx/click3.wav
Binary file not shown.
Binary file added assets/sfx/obstacle_add.wav
Binary file not shown.
Binary file added assets/sfx/obstacle_remove.wav
Binary file not shown.
Binary file added assets/sfx/piece_add.ogg
Binary file not shown.
Binary file added assets/sfx/piece_capture.mp3
Binary file not shown.
Binary file added assets/sfx/piece_color_change.ogg
Binary file not shown.
Binary file added assets/sfx/piece_move.mp3
Binary file not shown.
Binary file added assets/sfx/piece_promote.mp3
Binary file not shown.
Binary file added assets/sfx/piece_remove.ogg
Binary file not shown.
Binary file added assets/sfx/piece_size_change.wav
Binary file not shown.
Binary file added assets/sfx/shop_money_earn.ogg
Binary file not shown.
Binary file added assets/sfx/shop_price_change.ogg
Binary file not shown.
Binary file added assets/sfx/shop_quickbuy.ogg
Binary file not shown.
Binary file added assets/sfx/shop_quickbuy_undo.ogg
Binary file not shown.
Binary file added assets/sfx/shop_shuffle.ogg
Binary file not shown.
Binary file added assets/sfx/shop_unlock.ogg
Binary file not shown.
Binary file added assets/sfx/status_effect_add.ogg
Binary file not shown.
Binary file added assets/sfx/status_effect_remove.ogg
Binary file not shown.
Binary file added assets/sfx/tile_add_remove.ogg
Binary file not shown.
Binary file added assets/sfx/tools_05.ogg
Binary file not shown.
Binary file added assets/sfx/tools_07.ogg
Binary file not shown.
Binary file added assets/sfx/wood_cracking_02.ogg
Binary file not shown.
Binary file added assets/sfx/wood_cracking_03.ogg
Binary file not shown.
Binary file added assets/sfx/wood_misc_01.ogg
Binary file not shown.
2 changes: 1 addition & 1 deletion chaos.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func NewRngStuff() RngStuff {
res.AddChaosOption("Summon two Imps on Earth on random empty tiles")
res.AddChaosOption("Pick a file in a plane. Curse all non-royal pieces in the chosen file")
res.AddChaosOption("Replace all Bishops with Rooks and vice versa")
res.AddChaosOption("Reset both player’s coin count to 0")
res.AddChaosOption("Reset both players' coin count to 0")
res.AddChaosOption("Spread all ice to adjacent tiles")
res.AddChaosOption("Summon the Devil (Giant Imp with double move) in the middle of Hell")
res.AddChaosOption("Summon an Angel on an empty tile in Heaven")
Expand Down
Loading