1 /* Tower Toppler - Nebulus 2 * Copyright (C) 2000-2012 Andreas R�ver 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 2 7 * of the License, or (at your option) any later version. 8 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 */ 18 19 #ifndef toppler_h 20 #define toppler_h 21 22 /* this modules handles the the green animal, updates its position 23 on the tower and its shape corresponding to the shape of the tower */ 24 25 26 /* initializes the variables, call this function each time you start at the tower. */ 27 void top_init(void); 28 29 /* actualizes the position and shape of the toppler considering the given keyposition */ 30 void top_updatetoppler(int left_right, int up_down, bool space); 31 32 /* tests, if the toppler collides with something while it is on the elevator */ 33 void top_testcollision(void); 34 35 /* the following functions return several of the necessary variables for the toppler */ 36 37 /* its vertial position on the tower */ 38 int top_verticalpos(void); 39 40 /* the angle position on the tower */ 41 int top_anglepos(void); 42 43 /* is it visible */ 44 bool top_visible(void); 45 46 /* does it look left (or right) */ 47 bool top_look_left(void); 48 49 /* the shape, independent of the direction */ 50 int top_shape(void); 51 52 /* is it on an elevator */ 53 bool top_onelevator(void); 54 55 /* technique bonus points, how often got it thrown down */ 56 int top_technic(void); 57 58 /* the actual state of the toppler */ 59 60 /* drowned */ 61 bool top_died(void); 62 63 /* reached target */ 64 bool top_targetreached(void); 65 66 /* the game ended, either drowned or reached target */ 67 bool top_ended(void); 68 69 /* the animal is currently drowning */ 70 bool top_dying(void); 71 72 /* it is moving */ 73 bool top_walking(void); 74 75 /* needed for destruction of tower, to drop the toppler 76 one layer of the tower */ 77 void top_drop1layer(void); 78 79 /* hide the toppler */ 80 void top_hide(void); 81 82 /* show it and set its shape, vertical and angular position */ 83 void top_show(int shape, int vpos, int apos); 84 85 /* move the toppler to the side until it is at a valid position 86 this function is necessary for the downfalling elevators to 87 push the animal aside */ 88 void top_sidemove(void); 89 90 91 #endif 92