Index: src/map.c =================================================================== --- src/map.c (revision 3826) +++ src/map.c (working copy) @@ -499,7 +499,7 @@ texcoords[4] = m->tex_x[0] + m->tex_factorx[0]; texcoords[5] = m->tex_y[0] + m->tex_factory[0]; texcoords[6] = m->tex_x[0]; texcoords[7] = m->tex_y[0] + m->tex_factory[0]; - vertices[0] = dx; vertices[1] = dy; vertices[3] = dz; + vertices[0] = dx; vertices[1] = dy; vertices[2] = dz; vertices[3] = w + dx; vertices[4] = dy; vertices[5] = dz; vertices[6] = w + dx; vertices[7] = h + dy; vertices[8] = dz; vertices[9] = dx; vertices[10] = h + dy; vertices[11] = dz; Index: src/core_lua.c =================================================================== --- src/core_lua.c (revision 3826) +++ src/core_lua.c (working copy) @@ -1411,8 +1411,8 @@ if (!fbo_active) return 0; GLuint *t = (GLuint*)auxiliar_checkclass(L, "gl{texture}", 1); - int x = luaL_checknumber(L, 2); - int y = luaL_checknumber(L, 3); + float x = luaL_checknumber(L, 2); + float y = luaL_checknumber(L, 3); int w = luaL_checknumber(L, 4); int h = luaL_checknumber(L, 5); float r = luaL_checknumber(L, 6); Index: game/engines/default/engine/Tiles.lua =================================================================== --- game/engines/default/engine/Tiles.lua (revision 3826) +++ game/engines/default/engine/Tiles.lua (working copy) @@ -103,13 +103,18 @@ if not s then s = core.display.loadImage(self.base_prefix..image) end if s then is_image = true end end + + local pot_width = math.pow(2, math.ceil(math.log(self.w-0.1) / math.log(2.0))) + local pot_height = math.pow(2, math.ceil(math.log(self.h-0.1) / math.log(2.0))) + if not s then local w, h = self.font:size(dochar) if not self.allow_backcolor or br < 0 then br = nil end 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 - 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) + + s = core.display.newTile(pot_width, pot_height, self.font, dochar, (pot_width - w) / 2, (pot_height - h) / 2, fr, fg, fb, br or 0, bg or 0, bb or 0, alpha, self.use_images) end if self.texture then @@ -118,9 +123,9 @@ sw, sh = w / sw, h / sh if not is_image and do_outline then if type(do_outline) == "boolean" then - s = s:makeOutline(2, 2, self.w, self.h, 0, 0, 0, 1) or s + s = s:makeOutline(2*pot_width/self.w, 2*pot_height/self.h, pot_width, pot_height, 0, 0, 0, 1) or s else - s = s:makeOutline(do_outline.x, do_outline.y, self.w, self.h, do_outline.r, do_outline.g, do_outline.b, do_outline.a) or s + s = s:makeOutline(do_outline.x*pot_width/self.w, do_outline.y*pot_height/self.h, pot_width, pot_height, do_outline.r, do_outline.g, do_outline.b, do_outline.a) or s end end else Index: game/modules/tome/load.lua =================================================================== --- game/modules/tome/load.lua (revision 3826) +++ game/modules/tome/load.lua (working copy) @@ -52,7 +52,7 @@ 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="48x48", tiles="shockbolt"} + else config.settings.tome.gfx = {size="51x51", tiles="shockbolt"} end end if config.settings.tome.gfx.tiles == "mushroom" then config.settings.tome.gfx.tiles="shockbolt" end Index: game/modules/tome/dialogs/GraphicMode.lua =================================================================== --- game/modules/tome/dialogs/GraphicMode.lua (revision 3826) +++ game/modules/tome/dialogs/GraphicMode.lua (working copy) @@ -40,7 +40,7 @@ Dialog.init(self, "Change graphic mode", 300, 20) - self.c_list = List.new{width=self.iw, nb_items=5, list=self.list, fct=function(item) self:use(item) end} + self.c_list = List.new{width=self.iw, nb_items=7, list=self.list, fct=function(item) self:use(item) end} self:loadUI{ {left=0, top=0, ui=self.c_list}, @@ -91,8 +91,11 @@ elseif self.cur_sel == "size" then list = { {name="64x64", sub="size", val="64x64"}, - {name="48x48", sub="size", val="48x48"}, + {name="51x51", sub="size", val="51x51"}, + {name="40x40", sub="size", val="40x40"}, {name="32x32", sub="size", val="32x32"}, + {name="25x25", sub="size", val="25x25"}, + {name="20x20", sub="size", val="20x20"}, {name="16x16", sub="size", val="16x16"}, } end Index: game/modules/tome/class/Game.lua =================================================================== --- game/modules/tome/class/Game.lua (revision 3826) +++ game/modules/tome/class/Game.lua (working copy) @@ -385,10 +385,16 @@ 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 - Map:setViewPort(216, 0, self.w - 216, (self.map_h_stop or 80) - 16, 48, 48, nil, 36, do_bg) + elseif gfx.size == "51x51" then + Map:setViewPort(216, 0, self.w - 216, (self.map_h_stop or 80) - 16, 51, 51, nil, 44, do_bg) + elseif gfx.size == "40x40" then + Map:setViewPort(216, 0, self.w - 216, (self.map_h_stop or 80) - 16, 40, 40, nil, 44, do_bg) elseif gfx.size == "32x32" then Map:setViewPort(216, 0, self.w - 216, (self.map_h_stop or 80) - 16, 32, 32, nil, 22, do_bg) + elseif gfx.size == "25x25" then + Map:setViewPort(216, 0, self.w - 216, (self.map_h_stop or 80) - 16, 25, 25, nil, 22, do_bg) + elseif gfx.size == "20x20" then + Map:setViewPort(216, 0, self.w - 216, (self.map_h_stop or 80) - 16, 20, 20, "/data/font/FSEX300.ttf", 32, do_bg) elseif gfx.size == "16x16" then Map:setViewPort(216, 0, self.w - 216, (self.map_h_stop or 80) - 16, 16, 16, "/data/font/FSEX300.ttf", 16, do_bg) end