1 /* 2 * XGalaga-SDL - a SDL port of XGalaga, clone of the game Galaga 3 * Copyright (c) 1995-1998 Joe Rumsey (mrogre@mediaone.net) 4 * Copyright (c) 2010 Frank Zago 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License as 8 * published by the Free Software Foundation; either version 2 of the 9 * License, or (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, but 12 * WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19 * 02110-1301, USA. 20 */ 21 22 #include "xgalaga.h" 23 24 int buttonDown = 0; 25 26 int score; 27 28 int ships; 29 30 int level, metaLevel; 31 int startLevel=1; /* default starting level defined here */ 32 33 int nextBonus; 34 35 int counter; 36 37 int wantStars = 1; 38 39 int winwidth = WINWIDTH; 40 int winheight = WINHEIGHT; 41 42 int alien_shape[ALIENSHAPES] = { 43 I_ALIEN1, 44 I_ALIEN2, 45 I_ALIEN3, 46 I_ALIEN4, 47 I_ALIEN5, 48 I_ALIEN6, 49 I_ALIEN7, 50 I_ALIEN8, 51 I_ALIEN9, 52 I_ALIEN10, 53 I_ALIEN11, 54 I_ALIEN12, 55 I_ALIEN13, 56 I_ALIEN14, 57 I_ALIEN15, 58 I_ALIEN16, 59 I_ALIEN17, 60 }; 61 62 int weapon = 0; 63 int maxtorps = 4, numtorps = 0; 64 65 int plx; 66 int pldead = 0; 67 68 int movespeed = MINSPEED; 69 70 int playSounds=1; 71 72 int plshield = 0; 73 int shieldsleft = 0; 74 int shieldon = 0; 75 76 unsigned int title_page=0, pagetimer=300; 77 78 int gotlemon = 0; 79 80 struct alien aliens[MAXALIENS]; 81 82 SFont_Font *fnt_reg_green; 83 SFont_Font *fnt_reg_cyan; 84 SFont_Font *fnt_reg_yellow; 85 SFont_Font *fnt_reg_red; 86 SFont_Font *fnt_reg_grey; 87 88 SFont_Font *fnt_big_red; 89 90 enum gstate gstate; 91 92 int fullscreen = 1; /* windowed = 0, fullscreen != 0 */ 93