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

plop


git-svn-id: http://svn.net-core.org/repos/t-engine4@3435 51575b47-30f0-44d4-a5cc-537603b46e54
parent d489fdd3
No related branches found
No related tags found
No related merge requests found
Showing
with 120 additions and 16 deletions
......@@ -107,12 +107,9 @@ function _M:addPond(x, y, spots)
local g7 = pmap[i-1] and pmap[i-1][j-1]
local g8 = pmap[i] and pmap[i][j-1]
local g9 = pmap[i+1] and pmap[i+1][j-1]
local nb = (g1 and 1 or 0) + (g2 and 1 or 0) + (g3 and 1 or 0) + (g4 and 1 or 0) + (g6 and 1 or 0) + (g7 and 1 or 0) + (g8 and 1 or 0) + (g9 and 1 or 0)
if not g8 and not g4 and not g6 and g2 then pmap[i][j] = nil
elseif not g2 and not g4 and not g6 and g8 then pmap[i][j] = nil
elseif not g6 and not g2 and not g8 and g4 then pmap[i][j] = nil
elseif not g4 and not g2 and not g8 and g6 then pmap[i][j] = nil
end
if nb < 4 then pmap[i][j] = nil end
end end
-- Draw the pond
......
......@@ -118,14 +118,14 @@ function _M:makePod(x, y, radius, room_id, data)
end
for i = -radius + x, radius + x do for j = -radius + y, radius + y do
local g1 = self.map.room_map[i-1] and self.map.room_map[i-1][j+1].room == room_id
local g2 = self.map.room_map[i] and self.map.room_map[i][j+1].room == room_id
local g3 = self.map.room_map[i+1] and self.map.room_map[i+1][j+1].room == room_id
local g4 = self.map.room_map[i-1] and self.map.room_map[i-1][j].room == room_id
local g6 = self.map.room_map[i+1] and self.map.room_map[i+1][j].room == room_id
local g7 = self.map.room_map[i-1] and self.map.room_map[i-1][j-1].room == room_id
local g8 = self.map.room_map[i] and self.map.room_map[i][j-1].room == room_id
local g9 = self.map.room_map[i+1] and self.map.room_map[i+1][j-1].room == room_id
local g1 = self.map.room_map[i-1] and self.map.room_map[i-1][j+1] and self.map.room_map[i-1][j+1].room == room_id
local g2 = self.map.room_map[i] and self.map.room_map[i][j+1] and self.map.room_map[i][j+1].room == room_id
local g3 = self.map.room_map[i+1] and self.map.room_map[i+1][j+1] and self.map.room_map[i+1][j+1].room == room_id
local g4 = self.map.room_map[i-1] and self.map.room_map[i-1][j] and self.map.room_map[i-1][j].room == room_id
local g6 = self.map.room_map[i+1] and self.map.room_map[i+1][j] and self.map.room_map[i+1][j].room == room_id
local g7 = self.map.room_map[i-1] and self.map.room_map[i-1][j-1] and self.map.room_map[i-1][j-1].room == room_id
local g8 = self.map.room_map[i] and self.map.room_map[i][j-1] and self.map.room_map[i][j-1].room == room_id
local g9 = self.map.room_map[i+1] and self.map.room_map[i+1][j-1] and self.map.room_map[i+1][j-1].room == room_id
if not g8 and not g4 and not g6 and g2 then self.map(i, j, Map.TERRAIN, self:resolve('#')) self.map.room_map[i][j].room = nil
elseif not g2 and not g4 and not g6 and g8 then self.map(i, j, Map.TERRAIN, self:resolve('#')) self.map.room_map[i][j].room = nil
......
game/modules/tome/data/gfx/line_particle.png

225 B

-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
base_size = 64
local r = 1
local g = 1
local b = 1
local a = 1
return { generator = function()
return {
life = 10,
size = size, sizev = 0, sizea = 0,
x = x, xv = 0, xa = 0,
y = y, yv = 0, ya = 0,
dir = 0, dirv = dirv, dira = 0,
vel = 0, velv = 0, vela = 0,
r = r, rv = 0, ra = 0,
g = g, gv = 0, ga = 0,
b = b, bv = 0, ba = 0,
a = a, av = 0, aa = 0,
}
end, },
function(self)
self.ps:emit(1)
end,
1,
image
......@@ -67,4 +67,4 @@ function(self)
end
first = false
end,
1000
1000
\ No newline at end of file
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
local side = rng.table{4,6,2,8}
local first = true
local life
local first = true
local stars = {}
for i = 1, nb do stars[#stars+1] = {x = rng.range(0, width), y = rng.range(0, height)} end
local idx = 1
return { generator = function()
local x = stars[idx].x
local y = stars[idx].y
idx = idx + 1
if idx > #stars then idx = 1 end
return {
life = 1000000,
size = rng.float(size_min, size_max), sizev = 0, sizea = 0,
x = x, xv = 0, xa = 0,
y = y, yv = 0, ya = 0,
dir = 0, dirv = 0, dira = 0,
vel = 0, velv = 0, vela = 0,
r = 1, rv = 0, ra = 0,
g = 1, gv = 0, ga = 0,
b = 1, bv = 0, ba = 0,
a = rng.float(a_min, a_max), av = 0, aa = 0,
}
end, },
function(self)
if first then self.ps:emit(nb) first = false end
end,
nb
\ No newline at end of file
game/modules/tome/data/gfx/shockbolt/npc/humanoid_orc_orc_blood_mage.png

7.74 KiB

game/modules/tome/data/gfx/shockbolt/npc/humanoid_orc_orc_corruptor.png

6.89 KiB

game/modules/tome/data/gfx/shockbolt/npc/humanoid_orc_orc_cryomancer.png

8.67 KiB

game/modules/tome/data/gfx/shockbolt/npc/humanoid_orc_orc_elite_berserker.png

11 KiB

game/modules/tome/data/gfx/shockbolt/npc/humanoid_orc_orc_elite_fighter.png

9.05 KiB

game/modules/tome/data/gfx/shockbolt/npc/humanoid_orc_orc_high_cryomancer.png

8.77 KiB

game/modules/tome/data/gfx/shockbolt/npc/humanoid_orc_orc_high_pyromancer.png

8.27 KiB

game/modules/tome/data/gfx/shockbolt/npc/humanoid_orc_orc_mage_hunter.png

8.88 KiB

game/modules/tome/data/gfx/shockbolt/npc/humanoid_orc_orc_necromancer.png

7.49 KiB

game/modules/tome/data/gfx/shockbolt/npc/humanoid_orc_orc_pyromancer.png

8.53 KiB

game/modules/tome/data/gfx/shockbolt/terrain/star.png

8.22 KiB

......@@ -218,11 +218,16 @@ return {
post_process = function(level)
local Map = require "engine.Map"
level.background_particle = require("engine.Particles").new("starfield", 1, {width=Map.viewport.width, height=Map.viewport.height, vel_min=0, vel_max=0.5})
level.background_particle1 = require("engine.Particles").new("starfield_static", 1, {width=Map.viewport.width, height=Map.viewport.height, nb=300, a_min=0.5, a_max = 0.8, size_min = 1, size_max = 3})
level.background_particle2 = require("engine.Particles").new("starfield_static", 1, {width=Map.viewport.width, height=Map.viewport.height, nb=300, a_min=0.5, a_max = 0.9, size_min = 4, size_max = 8})
level.world_particle = require("engine.Particles").new("image", 1, {size=512, image="shockbolt/terrain/eyal-world", x=400, y=400})
end,
background = function(level, x, y, nb_keyframes)
local Map = require "engine.Map"
level.background_particle.ps:toScreen(x, y, true, 1)
level.background_particle1.ps:toScreen(x, y, true, 1)
local parx, pary = level.map.mx / (level.map.w - Map.viewport.mwidth), level.map.my / (level.map.h - Map.viewport.mheight)
level.background_particle2.ps:toScreen(x - parx * 40, y - pary * 40, true, 1)
level.world_particle.ps:toScreen(x - parx * 60, y - pary * 60, true, 1)
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