Skip to content

Commit

Permalink
Fixed #91 - Some mp3 sound effects are not playing on newer Roku firm…
Browse files Browse the repository at this point in the history
…wares

Added a warning for Roku Stick (3600X) users to only use 4 rooms mode,
due to the memory limitations of the device.
  • Loading branch information
lvcabral committed Aug 5, 2018
1 parent 8df6962 commit 08f3e2e
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 21 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -1,6 +1,8 @@

.buildpath

.directory

.project

.settings
Expand Down
Binary file removed assets/sounds/creaking-door.mp3
Binary file not shown.
Binary file added assets/sounds/creaking-door.wav
Binary file not shown.
Binary file modified assets/sounds/drink.mp3
Binary file not shown.
Binary file modified assets/sounds/exit-door-close.mp3
Binary file not shown.
Binary file removed assets/sounds/gate-fast-close.mp3
Binary file not shown.
Binary file added assets/sounds/gate-fast-close.wav
Binary file not shown.
Binary file modified assets/sounds/mirror.mp3
Binary file not shown.
34 changes: 17 additions & 17 deletions assets/sounds/sounds.json
Expand Up @@ -5,12 +5,6 @@
"duration":3526,
"priority":30
},
"creaking-door":
{
"type":"mp3",
"duration":679,
"priority":10
},
"death":
{
"type":"mp3",
Expand All @@ -20,7 +14,7 @@
"drink":
{
"type":"mp3",
"duration":679,
"duration":1044,
"priority":20
},
"exit-door-open":
Expand All @@ -32,7 +26,7 @@
"exit-door-close":
{
"type":"mp3",
"duration":914,
"duration":940,
"priority":10
},
"fight-death":
Expand All @@ -41,12 +35,6 @@
"duration":7706,
"priority":30
},
"gate-fast-close":
{
"type":"mp3",
"duration":626,
"priority":10
},
"glory":
{
"type":"mp3",
Expand All @@ -68,7 +56,7 @@
"mirror":
{
"type":"mp3",
"duration":522,
"duration":914,
"priority":20
},
"small-life-potion":
Expand All @@ -80,7 +68,7 @@
"spikes":
{
"type":"mp3",
"duration":522,
"duration":914,
"priority":10
},
"success":
Expand All @@ -92,7 +80,7 @@
"success-suspense":
{
"type":"mp3",
"duration":7340,
"duration":7418,
"priority":100
},
"suspense":
Expand All @@ -119,12 +107,24 @@
"duration":106,
"priority":10
},
"creaking-door":
{
"type":"wav",
"duration":731,
"priority":10
},
"gate-close":
{
"type":"wav",
"duration":97,
"priority":15
},
"gate-fast-close":
{
"type":"wav",
"duration":679,
"priority":10
},
"gate-end":
{
"type":"wav",
Expand Down
Binary file modified assets/sounds/spikes.mp3
Binary file not shown.
Binary file modified assets/sounds/success-suspense.mp3
Binary file not shown.
4 changes: 2 additions & 2 deletions manifest
@@ -1,8 +1,8 @@
title=Prince of Persia
subtitle=Roku remake of the Classic 8 bit Game
major_version=0
minor_version=12
build_version=3444
minor_version=13
build_version=3453
mm_icon_focus_hd=pkg:/images/icon_focus_hd.png
mm_icon_side_hd=pkg:/images/icon_focus_hd.png
mm_icon_focus_sd=pkg:/images/icon_side_hd.png
Expand Down
6 changes: 6 additions & 0 deletions source/gameMain.brs
Expand Up @@ -38,7 +38,13 @@ Sub Main()
m.status = []
'Check Roku model for performance alert
if not IsOpenGL()
m.mainScreen = CreateObject("roScreen")
m.mainScreen.SetMessagePort(m.port)
MessageDialog("Prince of Persia", "Warning: Your Roku device doesn't support accelerated graphics, this game will not perform well.")
else if IsRokuStick()
m.mainScreen = CreateObject("roScreen")
m.mainScreen.SetMessagePort(m.port)
MessageDialog("Prince of Persia", "Warning: Your Roku Stick device has limited memory, this game only works properly on the 4 rooms mode.")
end if
'Initialize Screen
if isHD()
Expand Down
10 changes: 8 additions & 2 deletions source/gameUtil.brs
Expand Up @@ -406,8 +406,14 @@ End Function

Function IsOpenGL() as Boolean
di = CreateObject("roDeviceInfo")
model = Val(Left(di.GetModel(),1))
return (model = 3 or model = 4 or model = 6)
gp = di.GetGraphicsPlatform()
return (lcase(gp)="opengl")
End Function

Function IsRokuStick() as Boolean
di = CreateObject("roDeviceInfo")
model = di.GetModel()
return (model = "3600X")
End Function

'Nullable Boolean
Expand Down

0 comments on commit 08f3e2e

Please sign in to comment.