note
	description: "A bmp image from a custom package file."
	author: "Louis Marchand"
	date: "Thu, 02 Apr 2015 02:40:10 +0000"
	revision: "2.0"

class 
	GAME_IMAGE_BMP_CPF

inherit
	GAME_IMAGE
		redefine
			open
		end

	CPF_RESSOURCE_MANAGER
		undefine
			default_create
		end

create 
	make

feature -- Access

	open
			-- Open Current
		local
			l_rwop: POINTER
		do
			l_rwop := {GAME_SDL_EXTERNAL}.sdl_allocrw;
			cpf.lock_mutex;
			cpf.select_sub_file (cpf_index)
			{GAME_SDL_EXTERNAL}.setsdlrwops (l_rwop, cpf.internal_pointer)
			own_from_pointer ({GAME_SDL_EXTERNAL}.sdl_loadbmp_rw (l_rwop, 0));
			cpf.unlock_mutex
			{GAME_SDL_EXTERNAL}.sdl_freerw (l_rwop)
		end
	
end -- class GAME_IMAGE_BMP_CPF

Generated by ISE EiffelStudio