Skip to content
Snippets Groups Projects
Verified Commit b3c137df authored by TORTEROTOT THOMAS's avatar TORTEROTOT THOMAS
Browse files

Added method to change wall color

parent 5695fda1
Branches master
No related merge requests found
......@@ -95,6 +95,11 @@ int Terrain::eat(const int32_t x, const int32_t y)
return 0;
}
void Terrain::set_wall_color(const Uint8 r, const Uint8 g, const Uint8 b) const
{
SDL_SetSurfaceColorMod(wall_cache_surface_handle, r, g, b);
}
void Terrain::update_position_and_walls()
{
for (uint32_t y = 0; y < height; ++y)
......
......@@ -29,6 +29,8 @@ public:
[[nodiscard]] int eat(const int32_t x, const int32_t y);
void set_wall_color(const Uint8 r, const Uint8 g, const Uint8 b) const;
private:
void update_position_and_walls();
void update_sprite_handles();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment