--TODO: degager les underlays
-- should be doable with loops on tables but i'm lazy
function loadCardImages(setName)
	local cardImages={}
	cardImages["vertical"]={}
	cardImages["horizontal"]={}
	
	--this one is for the guy in the top of the screen
	cardImages.vertical["back"]=Image.load("images/cards/"..setName.."/vertical_back.png")
	--and that one for the player
	cardImages.vertical["big_back"]=Image.load("images/cards/"..setName.."/vertical_big_back.png")
	
	--vertical visible images
	cardImages.vertical[1]=Image.load("images/cards/"..setName.."/vertical_01.png")
	cardImages.vertical[2]=Image.load("images/cards/"..setName.."/vertical_02.png")
	cardImages.vertical[3]=Image.load("images/cards/"..setName.."/vertical_03.png")
	cardImages.vertical[4]=Image.load("images/cards/"..setName.."/vertical_04.png")
	cardImages.vertical[5]=Image.load("images/cards/"..setName.."/vertical_05.png")
	cardImages.vertical[6]=Image.load("images/cards/"..setName.."/vertical_06.png")
	cardImages.vertical[7]=Image.load("images/cards/"..setName.."/vertical_07.png")
	cardImages.vertical[8]=Image.load("images/cards/"..setName.."/vertical_08.png")
	cardImages.vertical[9]=Image.load("images/cards/"..setName.."/vertical_09.png")
	cardImages.vertical[10]=Image.load("images/cards/"..setName.."/vertical_10.png")
	cardImages.vertical[11]=Image.load("images/cards/"..setName.."/vertical_11V.png")
	cardImages.vertical[12]=Image.load("images/cards/"..setName.."/vertical_12C.png")
	cardImages.vertical[13]=Image.load("images/cards/"..setName.."/vertical_13D.png")
	cardImages.vertical[14]=Image.load("images/cards/"..setName.."/vertical_14R.png")
	cardImages.vertical[15]=Image.load("images/cards/"..setName.."/vertical_15A.png")
	
	cardImages.vertical["overlay"]={}
	cardImages.vertical.overlay["clubs"]=Image.load("images/cards/"..setName.."/vertical_clubs_overlay.png")
	cardImages.vertical.overlay["hearts"]=Image.load("images/cards/"..setName.."/vertical_hearts_overlay.png")
	cardImages.vertical.overlay["spades"]=Image.load("images/cards/"..setName.."/vertical_spades_overlay.png")
	cardImages.vertical.overlay["diamonds"]=Image.load("images/cards/"..setName.."/vertical_diamonds_overlay.png")
	
	cardImages.vertical["underlay"]={}
	cardImages.vertical.underlay["clubs"]=Image.load("images/cards/"..setName.."/vertical_clubs_underlay.png")
	cardImages.vertical.underlay["hearts"]=Image.load("images/cards/"..setName.."/vertical_hearts_underlay.png")
	cardImages.vertical.underlay["spades"]=Image.load("images/cards/"..setName.."/vertical_spades_underlay.png")
	cardImages.vertical.underlay["diamonds"]=Image.load("images/cards/"..setName.."/vertical_diamonds_underlay.png")
	
	--vertical greyed images
	cardImages.vertical["greyed"]={}
	cardImages.vertical.greyed[1]=Image.load("images/cards/"..setName.."/vertical_01_greyed.png")
	cardImages.vertical.greyed[2]=Image.load("images/cards/"..setName.."/vertical_02_greyed.png")
	cardImages.vertical.greyed[3]=Image.load("images/cards/"..setName.."/vertical_03_greyed.png")
	cardImages.vertical.greyed[4]=Image.load("images/cards/"..setName.."/vertical_04_greyed.png")
	cardImages.vertical.greyed[5]=Image.load("images/cards/"..setName.."/vertical_05_greyed.png")
	cardImages.vertical.greyed[6]=Image.load("images/cards/"..setName.."/vertical_06_greyed.png")
	cardImages.vertical.greyed[7]=Image.load("images/cards/"..setName.."/vertical_07_greyed.png")
	cardImages.vertical.greyed[8]=Image.load("images/cards/"..setName.."/vertical_08_greyed.png")
	cardImages.vertical.greyed[9]=Image.load("images/cards/"..setName.."/vertical_09_greyed.png")
	cardImages.vertical.greyed[10]=Image.load("images/cards/"..setName.."/vertical_10_greyed.png")
	cardImages.vertical.greyed[11]=Image.load("images/cards/"..setName.."/vertical_11V_greyed.png")
	cardImages.vertical.greyed[12]=Image.load("images/cards/"..setName.."/vertical_12C_greyed.png")
	cardImages.vertical.greyed[13]=Image.load("images/cards/"..setName.."/vertical_13D_greyed.png")
	cardImages.vertical.greyed[14]=Image.load("images/cards/"..setName.."/vertical_14R_greyed.png")
	cardImages.vertical.greyed[15]=Image.load("images/cards/"..setName.."/vertical_15A_greyed.png")
	
	cardImages.vertical.greyed["overlay"]={}
	cardImages.vertical.greyed.overlay["clubs"]=Image.load("images/cards/"..setName.."/vertical_clubs_overlay_greyed.png")
	cardImages.vertical.greyed.overlay["hearts"]=Image.load("images/cards/"..setName.."/vertical_hearts_overlay_greyed.png")
	cardImages.vertical.greyed.overlay["spades"]=Image.load("images/cards/"..setName.."/vertical_spades_overlay_greyed.png")
	cardImages.vertical.greyed.overlay["diamonds"]=Image.load("images/cards/"..setName.."/vertical_diamonds_overlay_greyed.png")
	
	cardImages.vertical.greyed["underlay"]={}
	cardImages.vertical.greyed.underlay["clubs"]=Image.load("images/cards/"..setName.."/vertical_clubs_underlay_greyed.png")
	cardImages.vertical.greyed.underlay["hearts"]=Image.load("images/cards/"..setName.."/vertical_hearts_underlay_greyed.png")
	cardImages.vertical.greyed.underlay["spades"]=Image.load("images/cards/"..setName.."/vertical_spades_underlay_greyed.png")
	cardImages.vertical.greyed.underlay["diamonds"]=Image.load("images/cards/"..setName.."/vertical_diamonds_underlay_greyed.png")
	
	--horizontal images
	cardImages.horizontal["back"]=Image.load("images/cards/"..setName.."/horizontal_back.png")
	
	--horizontal visible images
	cardImages.horizontal[1]=Image.load("images/cards/"..setName.."/horizontal_01.png")
	cardImages.horizontal[2]=Image.load("images/cards/"..setName.."/horizontal_02.png")
	cardImages.horizontal[3]=Image.load("images/cards/"..setName.."/horizontal_03.png")
	cardImages.horizontal[4]=Image.load("images/cards/"..setName.."/horizontal_04.png")
	cardImages.horizontal[5]=Image.load("images/cards/"..setName.."/horizontal_05.png")
	cardImages.horizontal[6]=Image.load("images/cards/"..setName.."/horizontal_06.png")
	cardImages.horizontal[7]=Image.load("images/cards/"..setName.."/horizontal_07.png")
	cardImages.horizontal[8]=Image.load("images/cards/"..setName.."/horizontal_08.png")
	cardImages.horizontal[9]=Image.load("images/cards/"..setName.."/horizontal_09.png")
	cardImages.horizontal[10]=Image.load("images/cards/"..setName.."/horizontal_10.png")
	cardImages.horizontal[11]=Image.load("images/cards/"..setName.."/horizontal_11V.png")
	cardImages.horizontal[12]=Image.load("images/cards/"..setName.."/horizontal_12C.png")
	cardImages.horizontal[13]=Image.load("images/cards/"..setName.."/horizontal_13D.png")
	cardImages.horizontal[14]=Image.load("images/cards/"..setName.."/horizontal_14R.png")
	cardImages.horizontal[15]=Image.load("images/cards/"..setName.."/horizontal_15A.png")
	
	cardImages.horizontal["overlay"]={}
	cardImages.horizontal.overlay["clubs"]=Image.load("images/cards/"..setName.."/horizontal_clubs_overlay.png")
	cardImages.horizontal.overlay["hearts"]=Image.load("images/cards/"..setName.."/horizontal_hearts_overlay.png")
	cardImages.horizontal.overlay["spades"]=Image.load("images/cards/"..setName.."/horizontal_spades_overlay.png")
	cardImages.horizontal.overlay["diamonds"]=Image.load("images/cards/"..setName.."/horizontal_diamonds_overlay.png")
	
	cardImages.horizontal["underlay"]={}
	cardImages.horizontal.underlay["clubs"]=Image.load("images/cards/"..setName.."/horizontal_clubs_underlay.png")
	cardImages.horizontal.underlay["hearts"]=Image.load("images/cards/"..setName.."/horizontal_hearts_underlay.png")
	cardImages.horizontal.underlay["spades"]=Image.load("images/cards/"..setName.."/horizontal_spades_underlay.png")
	cardImages.horizontal.underlay["diamonds"]=Image.load("images/cards/"..setName.."/horizontal_diamonds_underlay.png")
	
	--vertical greyed images
	cardImages.horizontal["greyed"]={}
	cardImages.horizontal.greyed[1]=Image.load("images/cards/"..setName.."/horizontal_01_greyed.png")
	cardImages.horizontal.greyed[2]=Image.load("images/cards/"..setName.."/horizontal_02_greyed.png")
	cardImages.horizontal.greyed[3]=Image.load("images/cards/"..setName.."/horizontal_03_greyed.png")
	cardImages.horizontal.greyed[4]=Image.load("images/cards/"..setName.."/horizontal_04_greyed.png")
	cardImages.horizontal.greyed[5]=Image.load("images/cards/"..setName.."/horizontal_05_greyed.png")
	cardImages.horizontal.greyed[6]=Image.load("images/cards/"..setName.."/horizontal_06_greyed.png")
	cardImages.horizontal.greyed[7]=Image.load("images/cards/"..setName.."/horizontal_07_greyed.png")
	cardImages.horizontal.greyed[8]=Image.load("images/cards/"..setName.."/horizontal_08_greyed.png")
	cardImages.horizontal.greyed[9]=Image.load("images/cards/"..setName.."/horizontal_09_greyed.png")
	cardImages.horizontal.greyed[10]=Image.load("images/cards/"..setName.."/horizontal_10_greyed.png")
	cardImages.horizontal.greyed[11]=Image.load("images/cards/"..setName.."/horizontal_11V_greyed.png")
	cardImages.horizontal.greyed[12]=Image.load("images/cards/"..setName.."/horizontal_12C_greyed.png")
	cardImages.horizontal.greyed[13]=Image.load("images/cards/"..setName.."/horizontal_13D_greyed.png")
	cardImages.horizontal.greyed[14]=Image.load("images/cards/"..setName.."/horizontal_14R_greyed.png")
	cardImages.horizontal.greyed[15]=Image.load("images/cards/"..setName.."/horizontal_15A_greyed.png")
	
	cardImages.horizontal.greyed["overlay"]={}
	cardImages.horizontal.greyed.overlay["clubs"]=Image.load("images/cards/"..setName.."/horizontal_clubs_overlay_greyed.png")
	cardImages.horizontal.greyed.overlay["hearts"]=Image.load("images/cards/"..setName.."/horizontal_hearts_overlay_greyed.png")
	cardImages.horizontal.greyed.overlay["spades"]=Image.load("images/cards/"..setName.."/horizontal_spades_overlay_greyed.png")
	cardImages.horizontal.greyed.overlay["diamonds"]=Image.load("images/cards/"..setName.."/horizontal_diamonds_overlay_greyed.png")
	
	cardImages.horizontal.greyed["underlay"]={}
	cardImages.horizontal.greyed.underlay["clubs"]=Image.load("images/cards/"..setName.."/horizontal_clubs_underlay_greyed.png")
	cardImages.horizontal.greyed.underlay["hearts"]=Image.load("images/cards/"..setName.."/horizontal_hearts_underlay_greyed.png")
	cardImages.horizontal.greyed.underlay["spades"]=Image.load("images/cards/"..setName.."/horizontal_spades_underlay_greyed.png")
	cardImages.horizontal.greyed.underlay["diamonds"]=Image.load("images/cards/"..setName.."/horizontal_diamonds_underlay_greyed.png")
	
	return cardImages
end