Skip to content

Commit

Permalink
SpriteHandler.h:
Browse files Browse the repository at this point in the history
* Added public function clear() that clears all sprites. Any sprite pointers kept outside will be dangling because their corresponding unique-ptrs have been destructed, so beware.
  • Loading branch information
razterizer committed Nov 20, 2024
1 parent 88dbc88 commit 4b8f993
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions SpriteHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,11 @@ class SpriteHandler
return sprite_arr;
}

void clear()
{
m_sprites.clear();
}

template<int NR, int NC>
void draw(ScreenHandler<NR, NC>& sh, int sim_frame) const
{
Expand Down

0 comments on commit 4b8f993

Please sign in to comment.