diff --git a/CHANGELOG.md b/CHANGELOG.md index 678629a8..41e4ef23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +# Version 0.11.1.1132 - 2017-11-08 + +## Fixes +- Fixed offset between screen mouse coordinates and game world coordinates +- Fixed blurry menu titles being caused by drawing at non-integer coordinates if screen dimensions were odd +- Fixed eplosive weapons not triggering when hitting empty tiles + +## Other Changes +- Health screen can be closed by pressing 'h' again +- Make sure mouse cursor is visible in combat state + + + + # Version 0.11.0.1125 - 2017-11-08 ## Additions diff --git a/README.md b/README.md index be5425a9..12ba500f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # On The Roadside -[![Version](https://img.shields.io/badge/Version-0.11.0.1125-blue.svg)](https://github.com/rm-code/on-the-roadside/releases/latest) +[![Version](https://img.shields.io/badge/Version-0.11.1.1132-blue.svg)](https://github.com/rm-code/on-the-roadside/releases/latest) [![LOVE](https://img.shields.io/badge/L%C3%96VE-0.10.2-EA316E.svg)](http://love2d.org/) [![Build Status](https://travis-ci.com/rm-code/On-The-Roadside.svg?token=q3rLXeyGTBN9VB2zsWMr&branch=develop)](https://travis-ci.com/rm-code/On-The-Roadside) diff --git a/lib/Camera.lua b/lib/Camera.lua index 32a76d55..786584d8 100644 --- a/lib/Camera.lua +++ b/lib/Camera.lua @@ -72,8 +72,6 @@ end function camera:attach() local cx,cy = love.graphics.getWidth()/(2*self.scale), love.graphics.getHeight()/(2*self.scale) - cx, cy = math.floor( cx / 16 ) * 16, math.floor( cy / 16 ) * 16 - love.graphics.push() love.graphics.scale(self.scale) love.graphics.translate(cx, cy) diff --git a/src/items/weapons/ProjectileManager.lua b/src/items/weapons/ProjectileManager.lua index 83712f33..0e0b0a15 100644 --- a/src/items/weapons/ProjectileManager.lua +++ b/src/items/weapons/ProjectileManager.lua @@ -137,7 +137,7 @@ local function checkForHits( index, projectile, tile, character ) if projectile:hasReachedTarget() then Log.debug( 'Projectile reached target tile', 'ProjectileManager' ) - queue:removeProjectile( index ) + hitTile( index, true, tile, projectile ) end end diff --git a/src/ui/screens/CombatScreen.lua b/src/ui/screens/CombatScreen.lua index ea2928e2..8a0e0cdf 100644 --- a/src/ui/screens/CombatScreen.lua +++ b/src/ui/screens/CombatScreen.lua @@ -34,6 +34,8 @@ function CombatScreen.new() local tw, th = TexturePacks.getTileDimensions() function self:init( playerFaction, savegame ) + love.mouse.setVisible( true ) + combatState = CombatState.new() combatState:init( playerFaction, savegame ) diff --git a/src/ui/screens/HealthScreen.lua b/src/ui/screens/HealthScreen.lua index 3aff993b..b6d100f9 100644 --- a/src/ui/screens/HealthScreen.lua +++ b/src/ui/screens/HealthScreen.lua @@ -136,7 +136,7 @@ function HealthScreen.new() end function self:keypressed( key ) - if key == 'escape' or key == 'q' then + if key == 'escape' or key == 'h' then ScreenManager.pop(); end end diff --git a/src/ui/screens/MainMenu.lua b/src/ui/screens/MainMenu.lua index 5e4fb7ed..fbd49c81 100644 --- a/src/ui/screens/MainMenu.lua +++ b/src/ui/screens/MainMenu.lua @@ -86,6 +86,12 @@ function SplashScreen.new() end end + local function drawTitle() + local cx, _ = GridHelper.centerElement( GridHelper.pixelsToGrid( title:getWidth(), title:getHeight() * #TITLE_STRING )) + local tw, _ = TexturePacks.getTileDimensions() + love.graphics.draw( title, cx * tw, TITLE_POSITION * TexturePacks.getFont():getGlyphHeight() ) + end + local function drawDebugInfo() local font = TexturePacks.getFont() if debug then @@ -146,7 +152,8 @@ function SplashScreen.new() function self:draw() local font = TexturePacks.getFont() font:use() - love.graphics.draw( title, love.graphics.getWidth() * 0.5 - title:getWidth() * 0.5, TITLE_POSITION * font:getGlyphHeight() ) + + drawTitle() buttonList:draw() diff --git a/src/ui/screens/OptionsScreen.lua b/src/ui/screens/OptionsScreen.lua index 98ad4437..f7e29d6d 100644 --- a/src/ui/screens/OptionsScreen.lua +++ b/src/ui/screens/OptionsScreen.lua @@ -75,6 +75,13 @@ function OptionsScreen.new() end end + local function drawTitle() + local cx, _ = GridHelper.centerElement( GridHelper.pixelsToGrid( title:getWidth(), title:getHeight() * #TITLE_STRING )) + local tw, _ = TexturePacks.getTileDimensions() + love.graphics.draw( title, cx * tw, TITLE_POSITION * TexturePacks.getFont():getGlyphHeight() ) + end + + local function createLanguageOption( lx, ly, index ) local listOfValues = { { displayTextID = Translator.getText( 'ui_lang_eng' ), value = 'en_EN' }, @@ -184,7 +191,7 @@ function OptionsScreen.new() function self:draw() font:use() - love.graphics.draw( title, love.graphics.getWidth() * 0.5 - title:getWidth() * 0.5, TITLE_POSITION * font:getGlyphHeight() ) + drawTitle() buttonList:draw() footer:draw() diff --git a/src/ui/screens/SavegameScreen.lua b/src/ui/screens/SavegameScreen.lua index 7366b8bd..f7e72468 100644 --- a/src/ui/screens/SavegameScreen.lua +++ b/src/ui/screens/SavegameScreen.lua @@ -79,6 +79,12 @@ function SavegameScreen.new() end end + local function drawTitle() + local cx, _ = GridHelper.centerElement( GridHelper.pixelsToGrid( title:getWidth(), title:getHeight() * #TITLE_STRING )) + local tw, _ = TexturePacks.getTileDimensions() + love.graphics.draw( title, cx * tw, TITLE_POSITION * TexturePacks.getFont():getGlyphHeight() ) + end + local function createBackButton( lx, ly, index ) local function callback() ScreenManager.switch( 'mainmenu' ) @@ -148,7 +154,7 @@ function SavegameScreen.new() function self:draw() font:use() - love.graphics.draw( title, love.graphics.getWidth() * 0.5 - title:getWidth() * 0.5, TITLE_POSITION * font:getGlyphHeight() ) + drawTitle() buttonList:draw() footer:draw() diff --git a/version.lua b/version.lua index 85ef9760..fa5f2219 100644 --- a/version.lua +++ b/version.lua @@ -1,8 +1,8 @@ local version = { major = 0, minor = 11, - patch = 0, - build = 1125, + patch = 1, + build = 1132, } return string.format( "%d.%d.%d.%d", version.major, version.minor, version.patch, version.build );