Tests About Natural Selection In Virtual Environment
c
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.

visu.h 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. Copyright (C) 2011 Weber Yann, Schuck Clement
  3. This file is part of Tansive.
  4. Tansive is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. Tansive is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with Tansive. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. #ifndef VISU_H
  16. #define VISU_H
  17. #include<SDL/SDL.h>
  18. #include"map.h"
  19. #include"creature.h"
  20. #include"config.h"
  21. /*
  22. visu.h :
  23. Drawing functions
  24. */
  25. //Function to draw a circle
  26. void rasterCircleRGBA(SDL_Surface* surface,int x0, int y0, int radius, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
  27. void rasterCircleRGB(SDL_Surface* surface,int x0, int y0, int radius, Uint8 r, Uint8 g, Uint8 b);
  28. //Function to plot a pixel
  29. void setPixel(SDL_Surface* surface, int x, int y, Uint32 pixel);
  30. void setPixelRGB(SDL_Surface* surface, int x, int y, Uint8 r, Uint8 g, Uint8 b);
  31. void setPixelRGBA(SDL_Surface* surface, int x, int y, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
  32. void setPixelRGBP(SDL_Surface* surface, int x, int y, Uint8 r, Uint8 g, Uint8 b, float p);
  33. //Function to draw the map
  34. void draw_map(SDL_Surface* screen, SDL_Surface* surface, t_map* mp);
  35. //Function to draw a zoomed part of the map
  36. void draw_map_zoom(SDL_Surface* screen, SDL_Surface* surface, t_map* mp, int xc, int yc, int zoom);
  37. //Function to draw a square representing the zoom area
  38. void draw_zoom_area(SDL_Surface* screen, SDL_Surface* surface, int xc, int yc, t_map* mp);
  39. #endif