diff --git a/game/engines/default/engine/Target.lua b/game/engines/default/engine/Target.lua index 965a6d45b7545848e2b9a5962c45ee25727f9847..02de7e69d6f8b79671490f2f7cc97d96ddf334b3 100644 --- a/game/engines/default/engine/Target.lua +++ b/game/engines/default/engine/Target.lua @@ -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() diff --git a/game/engines/default/engine/Tiles.lua b/game/engines/default/engine/Tiles.lua index 5db955b06a51c4780eb4ba5e22a1657168eb2c55..65c6d5837aa120016301ec1eb2310229977344cd 100644 --- a/game/engines/default/engine/Tiles.lua +++ b/game/engines/default/engine/Tiles.lua @@ -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 diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index 88fdd9b081e2346e0d7351bece94300049326efe..1f8b21a2ca84186fb39e8c444bbe34233940437d 100644 --- a/game/modules/tome/class/Game.lua +++ b/game/modules/tome/class/Game.lua @@ -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 diff --git a/game/modules/tome/dialogs/GraphicMode.lua b/game/modules/tome/dialogs/GraphicMode.lua index f47fcd7244ff5a346a08e4b398b2a3a6a4e80360..66ecff2c71d3590e3eea4953f34629d627912c43 100644 --- a/game/modules/tome/dialogs/GraphicMode.lua +++ b/game/modules/tome/dialogs/GraphicMode.lua @@ -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"}, } diff --git a/game/modules/tome/load.lua b/game/modules/tome/load.lua index 2e0dc04b8867d57cc90b531f3597f9889ee3c77b..24b3f79aa284b41a2517d54bd2bf130a7c7363e5 100644 --- a/game/modules/tome/load.lua +++ b/game/modules/tome/load.lua @@ -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