local conv={
	grass="g",
	dirt="d",
	gravel="R",
	sand="S",
	log_1="u",
	log_2="v",
	log_3="w",
	leaf_1="l",
	leaf_2="L",
	bush="b",
	flower_1="1",
	flower_2="2",
	flower_3="3",
	mushroom_1="4",
	mushroom_2="5",
	
	stone="s",
	coal="c",
	iron="i",
	aluminium="a",
	amazonite="e",
	sapphire="A",
	ruby="r",
	gold="G",
	diamond="D",
	
	ladder="f",
	glass="C",
	wood="U",
	cobblestone="t",
	brick="k",
	iron_block="J",
	aluminium_block="z",
	amazonite_block="E",
	sapphire_block="H",
	ruby_block="p",
	gold_block="B",
	diamond_block="P",
	
	water="W",
	lava="V"
}
-- reserved charecters: a A b B c C d D e E g G H i J k l L p P r R s S t u U v V w W z 1 2 3 4 5

local temp3 = pge.dir.read(pge.dir.open("pix/"..theme))
for t=1,#temp3 do
	local temp4=string.sub(string.lower(temp3[t].name),1,-5)
	if conv[temp4] then
		temp4=conv[temp4]
	end
	pix[temp4] = pge.texture.load("pix/"..theme.."/"..temp3[t].name)
end
temp3 = pge.dir.read(pge.dir.open("pix/"..theme.."/vram"))
if temp3 then
	for t=1,#temp3 do
		local temp4=string.sub(string.lower(temp3[t].name),1,-5)
		if conv[temp4] then
			temp4=conv[temp4]
		end
		pix[temp4] = pge.texture.load("pix/"..theme.."/vram/"..temp3[t].name, PGE_VRAM)
	end
end

pix[""]=pix["bedrock"]
pix["bedrock"]=nil

dofile("controls.lua")