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

Updated boot menu with new tiles

git-svn-id: http://svn.net-core.org/repos/t-engine4@4004 51575b47-30f0-44d4-a5cc-537603b46e54
parent cae3913c
No related branches found
No related tags found
No related merge requests found
Showing
with 28 additions and 16 deletions
......@@ -167,12 +167,12 @@ function _M:onResolutionChange()
end
function _M:setupDisplayMode()
Map:setViewPort(0, 0, self.w, self.h, 32, 32, nil, 22, true, true)
Map:setViewPort(0, 0, self.w, self.h, 48, 48, nil, 22, true, true)
Map:resetTiles()
Map.tiles.use_images = true
-- Create the framebuffer
-- self.fbo = core.display.newFBO(game.w, game.h)
self.fbo = core.display.newFBO(game.w, game.h)
if self.fbo then
self.fbo_shader = Shader.new("main_fbo")
if not self.fbo_shader.shad then
......
......@@ -56,17 +56,21 @@ function _M:on_move(x, y, who, forced)
end
--- Generate sub entities to make nice trees
function _M:makeTrees(base, max)
function _M:makeTrees(base, max, bigheight_limit, tint)
local function makeTree(nb, z)
local inb = 4 - nb
local treeid = rng.range(1, max or 5)
return engine.Entity.new{
z = z,
display_scale = rng.float(0.5 + inb / 6, 1.3),
display_scale = 1,
display_scale = rng.float(0.5 + inb / 6, 1),
display_x = rng.float(-1 / 3 * nb / 3, 1 / 3 * nb / 3),
display_y = rng.float(-1 / 3 * nb / 3, 1 / 3 * nb / 3),
display_y = rng.float(-1 / 3 * nb / 3, 1 / 3 * nb / 3) - (treeid < (bigheight_limit or 9) and 0 or 1),
display_on_seen = true,
display_on_remember = true,
image = (base or "terrain/tree_alpha")..rng.range(1,max or 5)..".png",
display_h = treeid < (bigheight_limit or 9) and 1 or 2,
image = (base or "terrain/tree_alpha")..treeid..".png",
tint = tint,
}
end
......
......@@ -65,7 +65,7 @@ end
function _M:handle(level, i, j)
local g = level.map(i, j, Map.TERRAIN)
if g and Map.tiles.nicer_tiles then
if g then
if g.nice_tiler then self["niceTile"..g.nice_tiler.method:capitalize()](self, level, i, j, g, g.nice_tiler) end
if g.nice_editer then self["editTile"..g.nice_editer.method:capitalize()](self, level, i, j, g, g.nice_editer) end
if g.nice_editer2 then self["editTile"..g.nice_editer2.method:capitalize()](self, level, i, j, g, g.nice_editer2) end
......@@ -139,8 +139,6 @@ function _M:replaceAll(level)
end
function _M:postProcessLevelTiles(level)
if not Map.tiles.nicer_tiles then return end
self.edit_entity_store = {}
for i = 0, level.map.w - 1 do for j = 0, level.map.h - 1 do
......@@ -153,8 +151,6 @@ function _M:postProcessLevelTiles(level)
end
function _M:updateAround(level, x, y)
if not Map.tiles.nicer_tiles then return end
self.edit_entity_store = nil
for i = x-1, x+1 do for j = y-1, y+1 do
......
......@@ -30,10 +30,10 @@ module(..., package.seeall, class.inherit(
))
function _M:init(t, no_default)
t.display=t.display or '@'
t.color_r=t.color_r or 230
t.color_g=t.color_g or 230
t.color_b=t.color_b or 230
t.display=''
t.color_r=230
t.color_g=230
t.color_b=230
t.player = true
t.type = t.type or "humanoid"
......@@ -53,6 +53,18 @@ function _M:init(t, no_default)
self:learnTalent(self.T_LIGHTNING, true, 2)
self:learnTalent(self.T_SUNSHIELD, true, 2)
self:learnTalent(self.T_FLAMESHOCK, true, 2)
local tile = rng.range(1, 4)
if tile == 1 then
self.image = "player/humanoid_dwarf_dwarven_summoner.png"
elseif tile == 2 then
self.image = "player/humanoid_human_riala_shalarak.png"
elseif tile == 3 then
self.image = "player/humanoid_elf_high_chronomancer_zemekkys.png"
elseif tile == 4 then
self.image = "player/humanoid_halfling_protector_myssil.png"
end
self:removeAllMOs()
end
function _M:move(x, y, force)
......
......@@ -25,7 +25,7 @@ newEntity{
name = "grass", image = "terrain/grass.png",
display = '.', color=colors.LIGHT_GREEN, back_color={r=44,g=95,b=43},
grow = "TREE",
nice_tiler = { method="replace", base={"GRASS_PATCH", 70, 1, 15}},
nice_tiler = { method="replace", base={"GRASS_PATCH", 70, 1, 12}},
nice_editer = grass_editer,
}
for i = 1, 12 do newEntity{ base = "GRASS", define_as = "GRASS_PATCH"..i, image = "terrain/grass"..(i<7 and "" or "2")..".png" } end
......
game/engines/default/modules/boot/data/gfx/invis.png

195 B

game/engines/default/modules/boot/data/gfx/player/humanoid_dwarf_dwarven_summoner.png

11.9 KiB

game/engines/default/modules/boot/data/gfx/player/humanoid_halfling_protector_myssil.png

6.99 KiB

game/engines/default/modules/boot/data/gfx/player/humanoid_human_riala_shalarak.png

8.04 KiB

game/engines/default/modules/boot/data/gfx/terrain/crystal_alpha1.png

5.25 KiB

game/engines/default/modules/boot/data/gfx/terrain/crystal_alpha2.png

3.33 KiB

game/engines/default/modules/boot/data/gfx/terrain/crystal_alpha3.png

3.5 KiB

game/engines/default/modules/boot/data/gfx/terrain/crystal_alpha4.png

6.57 KiB

game/engines/default/modules/boot/data/gfx/terrain/crystal_alpha5.png

4.24 KiB

game/engines/default/modules/boot/data/gfx/terrain/crystal_alpha6.png

6.87 KiB

game/engines/default/modules/boot/data/gfx/terrain/crystal_floor1.png

6.29 KiB

game/engines/default/modules/boot/data/gfx/terrain/crystal_floor2.png

5.92 KiB

game/engines/default/modules/boot/data/gfx/terrain/crystal_floor3.png

5.95 KiB

game/engines/default/modules/boot/data/gfx/terrain/crystal_floor4.png

5.84 KiB

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