display.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /* This file is part of remurder
  2. *
  3. * Copyright (C) 2014 Hein-Pieter van Braam <hp@tmm.cx>
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License
  7. * as published by the Free Software Foundation; either version 2
  8. * of the License, or (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc.,
  18. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. */
  20. #ifndef DISPLAY_H_
  21. #define DISPLAY_H_
  22. #include <SDL/SDL.h>
  23. void init_sdl();
  24. void wait_for_keypress();
  25. void display_buffer(int width, int height, char *cur_buffer, char *prev_buffer, int delay, char* changed_blocks);
  26. void create_window(int width, int height);
  27. #define NCOLORS 256
  28. SDL_Color colors[NCOLORS];
  29. SDL_Surface *screen;
  30. #endif /* DISPLAY_H_ */