File: enemy_boss03.c

package info (click to toggle)
ketm 0.0.6-17sarge1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 9,356 kB
  • ctags: 875
  • sloc: ansic: 7,303; sh: 410; makefile: 185
file content (44 lines) | stat: -rw-r--r-- 766 bytes parent folder | download | duplicates (3)
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
44
#include "enemy.h"

extern SPRITE *player;
extern double fps_factor;
extern SDL_Surface *screen;

typedef struct _boss03_data {
	ENEMY_BASE b;
	int state;
	int wait1;
	int wait2;
	int level;
} BOSS03_DATA;

void enemy_boss03_add(int lv)
{
	BOSS03_DATA *b;
	SPRITE *s;

	s=sprite_add_file("galaxy.bmp",36,PR_ENEMY);
	s->flags|=(SP_FLAG_VISIBLE|SP_FLAG_COLCHECK);
	s->anim_speed=-2;
	s->aktframe=0;
	s->type=SP_EN_BOSS03;
	b=mmalloc(sizeof(BOSS03_DATA));
	s->data=b;
	b->b.health=20;
	b->b.score=500;
	b->state=0;
	b->wait1=50*fps_factor;
	b->wait2=0;
	b->level=lv;
	s->mover=enemy_boss03_move;
	s->x=(screen->w/2)-(s->w/2);
	s->y=100;

	((PLAYER_DATA *)player->data)->bossmode=1;
}

void enemy_boss03_move(SPRITE *s)
{
	// BOSS03_DATA *b=(BOSS03_DATA *)s->data;
		
}