|  |  | @ -12,6 +12,8 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | #include "df/init.h" |  |  |  | #include "df/init.h" | 
			
		
	
		
		
			
				
					
					|  |  |  | #include "df/renderer.h" |  |  |  | #include "df/renderer.h" | 
			
		
	
		
		
			
				
					
					|  |  |  | #include "df/graphic.h" |  |  |  | #include "df/graphic.h" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | #include "df/enabler.h" | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | #include "df/map_renderer.h" | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | using std::string; |  |  |  | using std::string; | 
			
		
	
		
		
			
				
					
					|  |  |  | using std::vector; |  |  |  | using std::vector; | 
			
		
	
	
		
		
			
				
					|  |  | @ -23,6 +25,7 @@ REQUIRE_GLOBAL(window_x) | 
			
		
	
		
		
			
				
					
					|  |  |  | REQUIRE_GLOBAL(window_y) |  |  |  | REQUIRE_GLOBAL(window_y) | 
			
		
	
		
		
			
				
					
					|  |  |  | REQUIRE_GLOBAL(window_z) |  |  |  | REQUIRE_GLOBAL(window_z) | 
			
		
	
		
		
			
				
					
					|  |  |  | REQUIRE_GLOBAL_NO_USE(gps) |  |  |  | REQUIRE_GLOBAL_NO_USE(gps) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | REQUIRE_GLOBAL_NO_USE(enabler) | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | #ifdef WIN32 |  |  |  | #ifdef WIN32 | 
			
		
	
		
		
			
				
					
					|  |  |  |     // On Windows there's no convert_magenta parameter. Arguments are pushed onto stack,
 |  |  |  |     // On Windows there's no convert_magenta parameter. Arguments are pushed onto stack,
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -34,15 +37,31 @@ REQUIRE_GLOBAL_NO_USE(gps) | 
			
		
	
		
		
			
				
					
					|  |  |  |     typedef void(_stdcall *RENDER_UPDOWN)(); |  |  |  |     typedef void(_stdcall *RENDER_UPDOWN)(); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     RENDER_MAP _render_map; |  |  |  |     RENDER_MAP _render_map; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	RENDER_UPDOWN _render_updown; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	LOAD_MULTI_PDIM _load_multi_pdim; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     void render_map(){ _render_map(0); } |  |  |  |     void render_map(){ _render_map(0); } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	void render_updown() { _render_updown(); } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	void load_tileset(const string &filename, long * tex_pos, long dimx, long dimy, long* disp_x,long* disp_y) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		_load_multi_pdim(tex_pos, filename, &df::global::enabler->textures, dimx, dimy, disp_x, disp_y); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	} | 
			
		
	
		
		
			
				
					
					|  |  |  | #else |  |  |  | #else | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | REQUIRE_GLOBAL_NO_USE(map_renderer) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     typedef void(*LOAD_MULTI_PDIM)(void *tex, const string &filename, long *tex_pos, long dimx, long dimy, bool convert_magenta, long *disp_x, long *disp_y); |  |  |  |     typedef void(*LOAD_MULTI_PDIM)(void *tex, const string &filename, long *tex_pos, long dimx, long dimy, bool convert_magenta, long *disp_x, long *disp_y); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     typedef void(*RENDER_MAP)(void*, int); |  |  |  |     typedef void(*RENDER_MAP)(void*, int); | 
			
		
	
		
		
			
				
					
					|  |  |  |     typedef void(*RENDER_UPDOWN)(void*); |  |  |  |     typedef void(*RENDER_UPDOWN)(void*); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     RENDER_MAP _render_map; |  |  |  | 	RENDER_MAP _render_map; | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     void render_map(){ _render_map(); } |  |  |  | 	RENDER_UPDOWN _render_updown; | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	LOAD_MULTI_PDIM _load_multi_pdim; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     void render_map(){ _render_map(df::global::map_renderer,0); } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	void render_updown() { _render_updown(df::global::map_renderer); } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	void load_tileset(const string &filename, long * tex_pos, long dimx, long dimy, long* disp_x, long* disp_y) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 		_load_multi_pdim(&df::global::enabler->textures, filename,tex_pos, &df::global::enabler->textures, dimx, dimy,true, disp_x, disp_y); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 	} | 
			
		
	
		
		
			
				
					
					|  |  |  | #endif |  |  |  | #endif | 
			
		
	
		
		
			
				
					
					|  |  |  | static int render_map_rect(lua_State* L) |  |  |  | static int render_map_rect(lua_State* L) | 
			
		
	
		
		
			
				
					
					|  |  |  | { |  |  |  | { | 
			
		
	
	
		
		
			
				
					|  |  | 
 |