diff --git a/assets/fonts/prince_0.png b/assets/fonts/prince_0.png index a33e193..4910b45 100644 Binary files a/assets/fonts/prince_0.png and b/assets/fonts/prince_0.png differ diff --git a/manifest b/manifest index dbef0d7..9c8faa3 100644 --- a/manifest +++ b/manifest @@ -2,7 +2,7 @@ title=Prince of Persia subtitle=Roku remake of the Classic 8 bit Game major_version=0 minor_version=12 -build_version=3440 +build_version=3444 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 diff --git a/source/gameMain.brs b/source/gameMain.brs index f5386a8..4880d50 100644 --- a/source/gameMain.brs +++ b/source/gameMain.brs @@ -36,6 +36,10 @@ Sub Main() m.prandom = CreatePseudoRandom() m.manifest = GetManifestArray() m.status = [] + 'Check Roku model for performance alert + if not IsOpenGL() + MessageDialog("Prince of Persia", "Warning: Your Roku device doesn't support accelerated graphics, this game will not perform well.") + end if 'Initialize Screen if isHD() m.mainScreen = CreateObject("roScreen", true, 854, 480) @@ -44,6 +48,7 @@ Sub Main() end if m.mainScreen.SetMessagePort(m.port) 'Load Mods + Sleep(500) TextBox(m.mainScreen, 620, 50, "Loading...") m.mods = LoadMods() 'Initialize Settings @@ -75,10 +80,6 @@ Sub Main() m.savedGame = LoadSavedGame() m.highScores = LoadHighScores() if m.highScores = invalid then m.highScores = [] - 'Check Roku model for performance alert - if not IsOpenGL() - MessageDialog("Prince of Persia", "Warning: Your Roku device doesn't support accelerated graphics, this game will not perform well.") - end if 'Play Game Introduction and Disclaimer if m.intro print "Starting intro..." diff --git a/source/gameStatus.brs b/source/gameStatus.brs index 14a8252..c7c55f5 100644 --- a/source/gameStatus.brs +++ b/source/gameStatus.brs @@ -146,50 +146,34 @@ Function LoadBitmapFont(scale = 1.0 as float) As Dynamic return this End Function -Function write_text(screen as object, text as string, x as integer, y as integer) as object +Function write_text(screen as object, text as string, x as integer, y as integer, redraw = false as boolean) as object xOff = 2 * m.scale yOff = 8 * m.scale for c = 0 to len(text) - 1 ci = asc(text.mid(c,1)) 'Convert accented characters not supported by the font - if ci > 191 and ci < 199 + if (ci > 191 and ci < 199) or (ci > 223 and ci < 231) 'A ci = 65 - else if ci = 199 + else if ci = 199 or ci = 231 'C ci = 67 - else if ci > 199 and ci < 204 + else if (ci > 199 and ci < 204) or (ci > 231 and ci < 236) 'E ci = 69 - else if ci > 203 and ci < 208 + else if (ci > 203 and ci < 208) or (ci > 235 and ci < 240) 'I ci = 73 - else if ci = 208 + else if ci = 208 'D ci = 68 - else if ci = 209 + else if ci = 209 or ci = 241 'N ci = 78 - else if ci > 209 and ci < 215 + else if (ci > 209 and ci < 215) or (ci > 241 and ci < 247)'O ci = 79 - else if ci = 215 - ci = 120 - else if ci = 216 + else if ci = 215 'X + ci = 88 + else if ci = 216 '0 ci = 48 - else if ci > 216 and ci < 221 + else if (ci > 216 and ci < 221) or (ci > 248 and ci < 253) 'U ci = 85 - else if ci = 221 + else if ci = 221 'Y ci = 89 - else if ci > 223 and ci < 231 - ci = 97 - else if ci = 231 - ci = 99 - else if ci > 231 and ci < 236 - ci = 101 - else if ci > 235 and ci < 240 - ci = 105 - else if ci = 240 - ci = 100 - else if ci = 241 - ci = 110 - else if ci > 241 and ci < 247 - ci = 111 - else if ci > 248 and ci < 253 - ci = 117 else if ci > 160 ci = 32 end if @@ -197,7 +181,14 @@ Function write_text(screen as object, text as string, x as integer, y as integer letter = m.chars.Lookup("chr" + itostr(ci)) if letter <> invalid yl = y + (yOff - letter.image.GetHeight()) - screen.drawobject(x, yl + letter.yOffset, letter.image) + if not redraw + screen.drawobject(x, yl + letter.yOffset, letter.image) + else + bmp = CreateObject("roBitmap", {width:letter.GetWidth(), height:letter.GetHeight(), alphaenable:true}) + bmp.Clear(m.colors.black) + bmp.DrawObject(0, 0, letter) + screen.DrawObject(x, yl + letter.yOffset, bmp) + end if x += (letter.image.GetWidth() + xOff) end if next