LP 0.7 --> 0.8 problem

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
LuMo
Posts: 410
Joined: Sun Aug 21, 2005 2:45 am
Location: Austria
Contact:

LP 0.7 --> 0.8 problem

Post by LuMo »

well just tried to update VgSlag's Pyramid Panic to 0.8 compatibility (as a start, to use the 'engine')
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
well i can tell where the problem is, but not how to solve it...
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
LuMo
Posts: 410
Joined: Sun Aug 21, 2005 2:45 am
Location: Austria
Contact:

Post by LuMo »

hab den fehler gefungen;
eigentlich ein dummer fehler :-S

Code: Select all

g_backGround: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) 
wärs gewesen...
Post Reply