Sorry for the late response and thanks that looks complicated i needed to know how to do it because i wanted my game to have lighting effects ex: There is a lamp and i have transparent sprite over it so it will be like its glowing.
STOP RE-UPLOADING SPOOKY MAZE THE ORIGINAL 100% WORKING KEY IS: (QK4N3PZF).
I got that key from Calc84's post, he is the creator of spooky maze and the RAYCAST.LIB.