Comments, small changes

This commit is contained in:
2022-04-19 15:14:24 -04:00
parent 6ed4f41803
commit 5145cbb856
4 changed files with 166 additions and 89 deletions
+1
View File
@@ -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);