Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. /*
  2.  * OpenTyrian: A modern cross-platform port of Tyrian
  3.  * Copyright (C) 2007-2009  The OpenTyrian Development Team
  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  18.  */
  19. #ifndef BACKGRND_H
  20. #define BACKGRND_H
  21.  
  22. #include "opentyr.h"
  23.  
  24. #include "SDL.h"
  25.  
  26. #include <stdint.h>
  27.  
  28. extern JE_word backPos, backPos2, backPos3;
  29. extern JE_word backMove, backMove2, backMove3;
  30. extern JE_word mapX, mapY, mapX2, mapX3, mapY2, mapY3;
  31. extern JE_byte **mapYPos, **mapY2Pos, **mapY3Pos;
  32. extern JE_word mapXPos, oldMapXOfs, mapXOfs, mapX2Ofs, mapX2Pos, mapX3Pos, oldMapX3Ofs, mapX3Ofs, tempMapXOfs;
  33. extern intptr_t mapXbpPos, mapX2bpPos, mapX3bpPos;
  34. extern JE_byte map1YDelay, map1YDelayMax, map2YDelay, map2YDelayMax;
  35. extern JE_boolean anySmoothies;  // if yes, I want one :D
  36. extern JE_byte smoothie_data[9];
  37.  
  38. extern int starfield_speed;
  39.  
  40. void JE_darkenBackground( JE_word neat );
  41.  
  42. void blit_background_row( SDL_Surface *surface, int x, int y, Uint8 **map );
  43. void blit_background_row_blend( SDL_Surface *surface, int x, int y, Uint8 **map );
  44.  
  45. void draw_background_1( SDL_Surface *surface );
  46. void draw_background_2( SDL_Surface *surface );
  47. void draw_background_2_blend( SDL_Surface *surface );
  48. void draw_background_3( SDL_Surface *surface );
  49.  
  50. void JE_filterScreen( JE_shortint col, JE_shortint generic_int );
  51.  
  52. void JE_checkSmoothies( void );
  53. void lava_filter( SDL_Surface *dst, SDL_Surface *src );
  54. void water_filter( SDL_Surface *dst, SDL_Surface *src );
  55. void iced_blur_filter( SDL_Surface *dst, SDL_Surface *src );
  56. void blur_filter( SDL_Surface *dst, SDL_Surface *src );
  57. /*smoothies #5 is used for 3*/
  58. /*smoothies #9 is a vertical flip*/
  59.  
  60. void initialize_starfield( void );
  61. void update_and_draw_starfield( SDL_Surface* surface, int move_speed );
  62.  
  63. #endif /* BACKGRND_H */
  64.  
  65.