Skip to content

Commit

Permalink
- First pass of SFXs integration
Browse files Browse the repository at this point in the history
  • Loading branch information
iarwain committed Jan 31, 2021
1 parent c6e45be commit c7d8199
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 6 deletions.
27 changes: 23 additions & 4 deletions data/config/card.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,25 @@ KeyDuration = 1
StartAnim = Hidden
Hidden = 0
Show = 0
ShowLoud = 0
Visible = 0
Hide = 0
HideLoud = 0
ShuffleLeft = 0
ShuffleRight = 0
Reveal = 0
RevealLoud = 0
Revealed = 0
Hidden-> = Hidden # .Show
Show-> = !Visible # !Reveal
Visible-> = Visible # .Hide # -.!ShuffleLeft # -.!ShuffleRight # .!Reveal
Hidden-> = Hidden # .Show # -.ShowLoud
Show-> = !Visible # !Reveal # -!RevealLoud
ShowLoud-> = !Visible # !Reveal # -!RevealLoud
Visible-> = Visible # .Hide # -.HideLoud # -.!ShuffleLeft # -.!ShuffleRight # .!Reveal # -.!RevealLoud
Hide-> = !Hidden
HideLoud-> = !Hidden
ShuffleLeft-> = Hidden
ShuffleRight-> = Hidden
Reveal-> = Revealed
RevealLoud-> = Revealed
Prefix = @

[Hidden1]
Expand All @@ -34,12 +40,21 @@ TextureOrigin = (0, 0)
KeyEvent = Object.AddFX ^ Show, > Object.GetParent ^, Object.AddFX < Pick
KeyDuration = % > Get Flip EndTime, * < 0.5

[ShowLoud1]
TextureOrigin = (0, 0)
KeyEvent = Object.AddFX ^ Show, > Object.GetParent ^, Object.AddFX < Pick, Object.Create PickSound
KeyDuration = % > Get Flip EndTime, * < 0.5

[Hide1]
KeyEvent = Object.AddFX ^ Hide, > Object.GetParent ^, Object.AddFX < Drop
KeyDuration = % > Get Flip EndTime, * < 0.5

[HideLoud1]
KeyEvent = Object.AddFX ^ Hide, > Object.GetParent ^, Object.AddFX < Drop, Object.Create DropSound
KeyDuration = % > Get Flip EndTime, * < 0.5

[ShuffleLeft1]
KeyEvent = Object.AddFX ^ ShuffleLeft, > Object.GetParent ^, Object.AddFX < Drop
KeyEvent = Object.AddFX ^ ShuffleLeft, > Object.GetParent ^, Object.AddFX < Drop, Object.Create DropSound
KeyDuration = % > Get Flip EndTime, * < 0.5

[ShuffleRight1]
Expand All @@ -50,6 +65,10 @@ KeyDuration = % > Get Flip EndTime, * < 0.5
KeyEvent = Object.AddFX ^ Reveal, > Object.GetParent ^, Object.AddFX < Drop
KeyDuration = % > Get Drop EndTime, * < 0.5

[RevealLoud1]
KeyEvent = Object.AddFX ^ Reveal, > Object.GetParent ^, Object.AddFX < Drop, Object.Create DropSound
KeyDuration = % > Get Drop EndTime, * < 0.5

[Revealed1]

[Show]
Expand Down
1 change: 1 addition & 0 deletions data/config/ggj2021.ini
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@ ChildList = Player1 # Table
@table.ini@
@card.ini@
@font.ini@
@sound.ini@

@dev.ini@
6 changes: 6 additions & 0 deletions data/config/player.ini
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ WrapAround = @Game
[Player1@Player]
Input = Player1Input

[Move]
0 = Object.Create MoveSound

[Error]
0 = Object.Create ErrorSound

[Hand@Object]
Scale = 4
Graphic = @
Expand Down
16 changes: 16 additions & 0 deletions data/config/sound.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[Sound]
SoundList = @
LifeTime = sound
Bus = sfx

[PickSound@Sound]
Sound = PickUp.ogg

[DropSound@Sound]
Sound = PutDown.ogg

[MoveSound@Sound]
Sound = Move.ogg

[ErrorSound@Sound]
Sound = InvalidAction.ogg
5 changes: 3 additions & 2 deletions src/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ void Player::Update(const orxCLOCK_INFO &_rstInfo)
}
else
{
poLeftCard->SetAnim("Hide");
poLeftCard->SetAnim("HideLoud");
poRightCard->SetAnim("Hide");
}
bBusy = orxFALSE;
Expand Down Expand Up @@ -170,6 +170,7 @@ void Player::Update(const orxCLOCK_INFO &_rstInfo)
if(u32NewSlotIndex != astHands[i].u32SlotIndex)
{
Select(i, u32NewSlotIndex);
AddTrack("Move");
}
}
}
Expand All @@ -183,7 +184,7 @@ void Player::Update(const orxCLOCK_INFO &_rstInfo)
&& (poTable->astSlots[astHands[0].u32SlotIndex].poCard->IsHidden())
&& (poTable->astSlots[astHands[1].u32SlotIndex].poCard->IsHidden()))
{
poTable->astSlots[astHands[0].u32SlotIndex].poCard->SetAnim("Show");
poTable->astSlots[astHands[0].u32SlotIndex].poCard->SetAnim("ShowLoud");
poTable->astSlots[astHands[1].u32SlotIndex].poCard->SetAnim("Show");
bBusy = orxTRUE;
}
Expand Down

0 comments on commit c7d8199

Please sign in to comment.