Skip to content
Snippets Groups Projects
Commit b543f3bd authored by dg's avatar dg
Browse files

fix all 3 display modes

git-svn-id: http://svn.net-core.org/repos/t-engine4@193 51575b47-30f0-44d4-a5cc-537603b46e54
parent 8648a321
No related branches found
No related tags found
No related merge requests found
......@@ -379,8 +379,8 @@ function _M:checkMapViewBounded()
if self.my > self.h - self.viewport.mheight then self.my = self.h - self.viewport.mheight self.changed = true end
-- Center if smaller than map viewport
if self.w < self.viewport.mwidth then self.mx = (self.w - self.viewport.mwidth) / 2 end
if self.h < self.viewport.mheight then self.my = (self.h - self.viewport.mheight) / 2 end
if self.w < self.viewport.mwidth then self.mx = math.floor((self.w - self.viewport.mwidth) / 2) end
if self.h < self.viewport.mheight then self.my = math.floor((self.h - self.viewport.mheight) / 2) end
self._map:setScroll(self.mx, self.my)
end
......
......@@ -25,13 +25,13 @@ function _M:get(char, fr, fg, fb, br, bg, bb, image, alpha)
bgidx = "none"
end
if self.use_images and image then char = image end
if (self.use_images or not dochar) and image then char = image end
if self.repo[char] and self.repo[char][fgidx] and self.repo[char][fgidx][bgidx] then
return self.repo[char][fgidx][bgidx]
else
local s
if self.use_images and image then
if (self.use_images or not dochar) and image then
print("Loading tile", image)
s = core.display.loadImage(self.prefix..image)
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment