well works fine till one problem comes:
Code: Select all
-- Function to render the map
function f_drawMap()
-- Render the map
for i_counter_0 = 0, 16 do
for i_counter_1 = 0, 29 do
-- Is it data?
if a_map_0_gfx[(i_counter_0 + 1)][(i_counter_1 + 1)] ~= 0 then
-- Yes, use it
Image:blit(16 * i_counter_1, 16 * i_counter_0, o_tiles[a_map_0_gfx[(i_counter_0 + 1)][(i_counter_1 + 1)]], g_backGround)
-- Is it an animated tile?
if a_map_0_gfx[(i_counter_0 + 1)][(i_counter_1 + 1)] == 50 then
-- Push it into the table
table.insert(o_torchesPosition, {i_counter_0, i_counter_1})
end
end
end
end
end
further this line is the problem:
Image:blit(16 * i_counter_1, 16 * i_counter_0, o_tiles[a_map_0_gfx[(i_counter_0 + 1)][(i_counter_1 + 1)]], g_backGround)
what does this line mean?
it means it draws the on position(x)=16 * i_counter_1, postition(y)16 * i_counter_0, draw image loaded previously and stored in array o_tiles[x][y], draw to background
thats what i think it means (guess i am right);
the strange thing is, that those animated things get drawn!
greets
LuMo