Comments, small changes
This commit is contained in:
@@ -19,6 +19,7 @@ int Sprite::get(Team team, Type type, Visibility vis, SDL_Surface* dest_surface)
|
||||
return -1;
|
||||
}
|
||||
|
||||
//Offsetting magic to get the right image of the piece
|
||||
SDL_Rect dest_rect{0,0,SPRITE_SIZE,SPRITE_SIZE};
|
||||
SDL_Rect src_rect{type*SPRITE_SIZE,team*SPRITE_SIZE+vis*2*SPRITE_SIZE,SPRITE_SIZE,SPRITE_SIZE};
|
||||
SDL_BlitSurface(sheet, &src_rect, dest_surface, &dest_rect);
|
||||
|
||||
Reference in New Issue
Block a user