Skip to content

Commit

Permalink
Merge branch 'release/0.11.1.1132'
Browse files Browse the repository at this point in the history
  • Loading branch information
rm-code committed Nov 8, 2017
2 parents 37cbb5c + 8fd4111 commit d859311
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 10 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
2 changes: 0 additions & 2 deletions lib/Camera.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/items/weapons/ProjectileManager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions src/ui/screens/CombatScreen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 )

Expand Down
2 changes: 1 addition & 1 deletion src/ui/screens/HealthScreen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion src/ui/screens/MainMenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()

Expand Down
9 changes: 8 additions & 1 deletion src/ui/screens/OptionsScreen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
Expand Down Expand Up @@ -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()
Expand Down
8 changes: 7 additions & 1 deletion src/ui/screens/SavegameScreen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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' )
Expand Down Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions version.lua
Original file line number Diff line number Diff line change
@@ -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 );

0 comments on commit d859311

Please sign in to comment.