Removed some stupid .part file and added such files to .gitignore
[mirrors/Programs.git] / c / ninvaders-0.1.1 / aliens.h
... / ...
CommitLineData
1/**
2 * nInvaders - a space invaders clone for ncurses
3 * Copyright (C) 2002-2003 Dettus
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 * homepage: http://ninvaders.sourceforge.net
20 * mailto: ninvaders-devel@lists.sourceforge.net
21 *
22 */
23
24
25#include "view.h"
26
27#ifndef ALIENS
28#define ALIENS
29
30typedef struct Aliens Aliens;
31
32struct Aliens {
33 int posX; // horizontal position of aliens
34 int posY; // vertical position of aliens
35 int right;
36 int left;
37 int bottom;
38 int speed; // 0: no movement; 1: one per turn; etc.
39};
40
41Aliens aliens;
42
43int shipnum;
44
45#define ALIENS_MAX_NUMBER_X 10
46#define ALIENS_MAX_NUMBER_Y 5
47#define ALIENS_MAX_MISSILES 10
48
49// todo: move to structure
50int lowest_ship[ALIENS_MAX_NUMBER_X];
51int alienshotx[ALIENS_MAX_MISSILES];
52int alienshoty[ALIENS_MAX_MISSILES];
53int alienshotnum;
54int alienBlock[ALIENS_MAX_NUMBER_Y][ALIENS_MAX_NUMBER_X];
55
56int bunker[BUNKERHEIGHT][BUNKERWIDTH + 1];
57
58
59void aliensReset();
60void bunkersReset();
61int aliensMove();
62int aliensMissileMove();
63void render();
64int aliensHitCheck(int shotx, int shoty);
65int bunkersHitCheck(int shotx, int shoty);
66
67
68// methods that handle graphic display, from view.c
69extern void aliensDisplay(int x, int y, int wid, int hgt);
70extern void aliensClear(int x, int y, int wid, int hgt);
71extern void aliensRefresh(int level, int *pAliens);
72extern void aliensMissileDisplay(int x, int y);
73extern void aliensMissileClear(int x, int y);
74extern void bunkersClearElement(int x, int y);
75extern void bunkersClear();
76extern void bunkersRefresh();
77
78#endif
This page took 0.294782 seconds and 4 git commands to generate.