A 2D tile-based sandbox game.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

drawutil.h 416B

12345678910111213141516171819202122
  1. #pragma once
  2. #include <SDL.h>
  3. #include <optional>
  4. #include <initializer_list>
  5. #include <utility>
  6. #include "Win.h"
  7. namespace Swan {
  8. namespace Draw {
  9. SDL_Color linearGradient(
  10. float val, std::initializer_list<std::pair<float, SDL_Color>> colors);
  11. void parallaxBackground(
  12. Win &win, SDL_Texture *tex,
  13. std::optional<SDL_Rect> srcrect, std::optional<SDL_Rect> destrect,
  14. float x, float y, float factor);
  15. }
  16. }