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

Added 48x48 display mode

git-svn-id: http://svn.net-core.org/repos/t-engine4@3826 51575b47-30f0-44d4-a5cc-537603b46e54
parent d5471b64
No related branches found
No related tags found
No related merge requests found
......@@ -32,13 +32,16 @@ function _M:init(map, source_actor)
self.cursor = engine.Tiles:loadImage("target_cursor.png"):glTexture()
self.sr = core.display.newSurface(map.tile_w, map.tile_h)
--Use power of two (pot) width and height, rounded up
local pot_width = math.pow(2, math.ceil(math.log(map.tile_w-0.1) / math.log(2.0)))
local pot_height = math.pow(2, math.ceil(math.log(map.tile_h-0.1) / math.log(2.0)))
self.sr = core.display.newSurface(pot_width, pot_height)
self.sr:erase(255, 0, 0, 90)
self.sr = self.sr:glTexture()
self.sb = core.display.newSurface(map.tile_w, map.tile_h)
self.sb = core.display.newSurface(pot_width, pot_height)
self.sb:erase(0, 0, 255, 90)
self.sb = self.sb:glTexture()
self.sg = core.display.newSurface(map.tile_w, map.tile_h)
self.sg = core.display.newSurface(pot_width, pot_height)
self.sg:erase(0, 255, 0, 90)
self.sg = self.sg:glTexture()
......
......@@ -109,7 +109,6 @@ function _M:get(char, fr, fg, fb, br, bg, bb, image, alpha, do_outline, allow_ti
if not self.allow_backcolor or bg < 0 then bg = nil end
if not self.allow_backcolor or bb < 0 then bb = nil end
if not self.allow_backcolor then alpha = 0 end
print('====', char, fr, fg, fb, br, bg, bb, image)
s = core.display.newTile(self.w, self.h, self.font, dochar, (self.w - w) / 2, (self.h - h) / 2, fr, fg, fb, br or 0, bg or 0, bb or 0, alpha, self.use_images)
end
......
......@@ -382,7 +382,7 @@ function _M:setupDisplayMode(reboot, mode)
print("[DISPLAY MODE] Tileset: "..gfx.tiles)
print("[DISPLAY MODE] Size: "..gfx.size)
local do_bg = true
local do_bg = gfx.tiles == "ascii_full"
if gfx.size == "64x64" then
Map:setViewPort(216, 0, self.w - 216, (self.map_h_stop or 80) - 16, 64, 64, nil, 44, do_bg)
elseif gfx.size == "48x48" then
......
......@@ -91,7 +91,7 @@ function _M:generateList()
elseif self.cur_sel == "size" then
list = {
{name="64x64", sub="size", val="64x64"},
-- {name="48x48", sub="size", val="48x48"},
{name="48x48", sub="size", val="48x48"},
{name="32x32", sub="size", val="32x32"},
{name="16x16", sub="size", val="16x16"},
}
......
......@@ -52,7 +52,7 @@ if not config.settings.tome.smooth_move then config.settings.tome.smooth_move =
if not config.settings.tome.gfx then
local w, h = core.display.size()
if w >= 1000 then config.settings.tome.gfx = {size="64x64", tiles="shockbolt"}
else config.settings.tome.gfx = {size="32x32", tiles="shockbolt"}
else config.settings.tome.gfx = {size="48x48", tiles="shockbolt"}
end
end
if config.settings.tome.gfx.tiles == "mushroom" then config.settings.tome.gfx.tiles="shockbolt" 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