Zireael07 / The-Veins-of-the-Earth-original

An Underdark-themed roguelike for T-Engine

Home Page:http://www.moddb.com/mods/the-veins-of-the-earth

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stop map going under UI on left-hand side

Zireael07 opened this issue · comments

Everything I've tried so far results in the screen becoming blurry and the mouse being offset.

@Sebsebeleb , @joshkel : Any ideas what to do? This is a major annoyance, especially on the world map, where the starting stairs are positioned in the top-left corner by design...

From what I can tell, since framebuffers are in use, the coordinates to the game.fbo:toScreen call here determine where the map is shown.

I changed my copy to

self.fbo:toScreen(map.display_x, map.display_y, self.w - map.display_x, self.h - map.display_y, self.fbo_shader.shad)

and updated getMapSize to use a smaller size:

function _M:getMapSize()
    local w, h = core.display.size()
    return 200, 0, w - 200, h
end

However, I've never used framebuffers in T-Engine, so I don't know if there's a better way of doing this.

Thanks Josh, that was it! I was poking at getMapSize the whole time, never thinking the fbo part could be to blame!

Fixed in c0979cc