renamed some map functions for consistency

This commit is contained in:
Andre Leiradella 2015-05-10 11:26:20 -03:00
parent a48f771717
commit e3b578bab1
3 changed files with 6 additions and 17 deletions

View File

@ -137,7 +137,7 @@ void rl_map_destroy( const rl_map_t* map )
destroy( map );
}
static void render_layer0( const rl_map_t* map, int x, int y )
void rl_map_blit0_nobg( const rl_map_t* map, int x, int y )
{
int bg_width, bg_height;
rl_backgrnd_fb( &bg_width, &bg_height );
@ -172,7 +172,7 @@ static void render_layer0( const rl_map_t* map, int x, int y )
}
}
static void render_layern( const rl_map_t* map, int index, int x, int y )
void rl_map_blitn_nobg( const rl_map_t* map, int index, int x, int y )
{
int bg_width, bg_height;
rl_backgrnd_fb( &bg_width, &bg_height );
@ -211,15 +211,3 @@ static void render_layern( const rl_map_t* map, int index, int x, int y )
ndx = next;
}
}
void rl_map_render_layer( const rl_map_t* map, int index, int x, int y )
{
if ( index )
{
render_layern( map, index, x, y );
}
else
{
render_layer0( map, x, y );
}
}

View File

@ -36,6 +36,7 @@ rl_map_t;
rl_map_t* rl_map_create( const void* data, size_t size );
void rl_map_destroy( const rl_map_t* map );
void rl_map_render_layer( const rl_map_t* map, int index, int x, int y );
void rl_map_blit0_nobg( const rl_map_t* map, int x, int y );
void rl_map_blitn_nobg( const rl_map_t* map, int index, int x, int y );
#endif /* RL_MAP_H */

View File

@ -283,9 +283,9 @@ static void testscr_update( testscr_t* s )
int x = s->xx * max_x / width;
int y = s->yy * max_y / height;
rl_map_render_layer( s->map, 0, x, y );
rl_map_blit0_nobg( s->map, x, y );
rl_sprites_blit_nobg();
rl_map_render_layer( s->map, 1, x, y );
rl_map_blitn_nobg( s->map, 1, x, y );
}
}