#!sdl_chomik

<create new image "background_tile.png">;
let my background tile image index = <the created image index>;

<create new image "game_background_tile.png">;
let my game background tile image index = <the created image index>;

<create new image "chomik.png">;
let my chomik image index = <the created image index>;

<create new image "world.png">;
let my world image index = <the created image index>;

<create new image "town.png">;
let my town image index = <the created image index>;

<create new image "key_black_small.png">;
let my key black small image index = <the created image index>;

<create new image "key_blue_small.png">;
let my key blue small image index = <the created image index>;

<create new image "key_red_small.png">;
let my key red small image index = <the created image index>;

<create new image "key_white_small.png">;
let my key white small image index = <the created image index>;

<create new image "key_yellow_small.png">;
let my key yellow small image index = <the created image index>;

<create new image "person1_1000.png">;
let my person 1 small image index = <the created image index>;

<create new image "person2_1000.png">;
let my person 2 small image index = <the created image index>;

<create new image "person3_1000.png">;
let my person 3 small image index = <the created image index>;

<create new image "person4_1000.png">;
let my person 4 small image index = <the created image index>;

<create new output stringstream>;
let my stringstream index = <the created stream index>;


let please load animations for the current person and image (NUMBER:integer)=value code
{
	let my current image number = value integer [(NUMBER:integer)];
	#<print "image number" <my current image number>>;

	let the set to stream stream index = <my stringstream index>;
	<set to stream "">;
	
	let the print target stream index=<my stringstream index>;
	let the print end of line = value string "";
	let the print separator = value string "";
	<print "person" <my current person number> "_" <my current image number> ".png">;
	let the print target stream index=value integer 0; # back to the standard output
	let the print end of line = value string "\n";
	let the print separator = value string " ";
	
	let the get from stream stream index=<my stringstream index>;
	<get from stream>; 
	#<print <the get from stream result> "###">;
	
	<create new image <the get from stream result>>;
	let my person number <my current person number> small image number <my current image number> index = <the created image index>;
};

let please load animations for person (PERSON:integer)=value code
{
	let my current person number = value integer [(PERSON:integer)];
	<please load animations for the current person and image (NUMBER:range 1000..1019)>;
};


<please load animations for person (PERSON:range 1..4)>;
