File: blubats.h

package info (click to toggle)
rockdodger 0.9.2-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,220 kB
  • ctags: 756
  • sloc: ansic: 5,374; makefile: 159; sh: 21
file content (43 lines) | stat: -rw-r--r-- 1,168 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef __BLUBATS_H__
#define __BLUBATS_H__
#include <SDL/SDL.h>
#include "u-iff.h"
#include "rockdodger_globals.h"

/*! \brief Initialise blubats
 *
 * Load all images, etc. After initialisation a pointer to something
 * is returned. On any error a NULL pointer is returned -- do not use
 * this pointer.
 *
 * \param iff IFF context
 * \return NULL pointer on failure
 */
void *init_blubats(uiff_ctx_t iff);

/*! \brief activate a single blubat
 * This function avtivate if possible a single blubat.
 *
 * \return 1 on success, else 0
 */
int activate_one_blubat();

/*! \brief Check if a blubat was hit
 * Check if one of the active blubats was hit.
 *
 * \param ylaser Y position of the laser on the screen
 * \param maxx maximum X position of the laser
 * \return number of the killed blubat or -1
 */
int check_blubat_hit(int ylaser, int maxx);

void deactivate_all_blubats(void);	//!< Remove all blubats from screen

void display_blubats(SDL_Surface * surf_screen);	//!< Display blubats

void kill_blubat(unsigned int hit);	//!< remove a single blubat

void move_all_blubats();	//!< Move all blubats

void shutdown_blubats(void);	//!< Shutdown function.
#endif