| 1 | /* |
| 2 | * OpenTyrian: A modern cross-platform port of Tyrian |
| 3 | * Copyright (C) 2007-2009 The OpenTyrian Development Team |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU General Public License |
| 7 | * as published by the Free Software Foundation; either version 2 |
| 8 | * of the License, or (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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 18 | */ |
| 19 | #ifndef MAININT_H |
| 20 | #define MAININT_H |
| 21 | |
| 22 | #include "config.h" |
| 23 | #include "opentyr.h" |
| 24 | #include "palette.h" |
| 25 | #include "player.h" |
| 26 | #include "sprite.h" |
| 27 | |
| 28 | extern bool button[4]; // fire, left fire, right fire, mode swap |
| 29 | |
| 30 | extern JE_shortint constantLastX; |
| 31 | extern JE_word textErase; |
| 32 | extern JE_word upgradeCost; |
| 33 | extern JE_word downgradeCost; |
| 34 | extern JE_boolean performSave; |
| 35 | extern JE_boolean jumpSection; |
| 36 | extern JE_boolean useLastBank; |
| 37 | |
| 38 | extern bool pause_pressed, ingamemenu_pressed; |
| 39 | |
| 40 | /*void JE_textMenuWait(JE_word waittime, JE_boolean dogamma);*/ |
| 41 | |
| 42 | void JE_drawTextWindow(const char *text); |
| 43 | void JE_initPlayerData(void); |
| 44 | void JE_highScoreScreen(void); |
| 45 | void JE_gammaCorrect_func(JE_byte *col, JE_real r); |
| 46 | void JE_gammaCorrect(Palette *colorBuffer, JE_byte gamma); |
| 47 | JE_boolean JE_gammaCheck(void); |
| 48 | /* void JE_textMenuWait(JE_word *waitTime, JE_boolean doGamma); /!\ In setup.h */ |
| 49 | void JE_nextEpisode(void); |
| 50 | void JE_helpSystem(JE_byte startTopic); |
| 51 | void JE_doInGameSetup(void); |
| 52 | JE_boolean JE_inGameSetup(void); |
| 53 | void JE_inGameHelp(void); |
| 54 | void JE_sortHighScores(void); |
| 55 | void JE_highScoreCheck(void); |
| 56 | void adjust_difficulty(void); |
| 57 | |
| 58 | bool load_next_demo(void); |
| 59 | bool replay_demo_keys(void); |
| 60 | |
| 61 | void JE_SFCodes(JE_byte playerNum_, JE_integer PX_, JE_integer PY_, JE_integer mouseX_, JE_integer mouseY_); |
| 62 | void JE_sort(void); |
| 63 | |
| 64 | long weapon_upgrade_cost(long base_cost, unsigned int power); |
| 65 | ulong JE_getCost(JE_byte itemType, JE_word itemNum); |
| 66 | JE_longint JE_getValue(JE_byte itemType, JE_word itemNum); |
| 67 | ulong JE_totalScore(const Player *); |
| 68 | |
| 69 | void JE_drawPortConfigButtons(void); |
| 70 | void JE_outCharGlow(JE_word x, JE_word y, const char *s); |
| 71 | |
| 72 | void JE_playCredits(void); |
| 73 | void JE_endLevelAni(void); |
| 74 | void JE_drawCube(SDL_Surface * screen, JE_word x, JE_word y, JE_byte filter, JE_byte brightness); |
| 75 | void JE_handleChat(void); |
| 76 | bool str_pop_int(char *str, int *val); |
| 77 | bool JE_loadScreen(void); |
| 78 | void JE_operation(JE_byte slot); |
| 79 | void JE_inGameDisplays(void); |
| 80 | void JE_mainKeyboardInput(void); |
| 81 | void JE_pauseGame(void); |
| 82 | |
| 83 | void JE_playerMovement(Player *this_player, JE_byte inputDevice, JE_byte playerNum, JE_word shipGr, Sprite2_array *shipGrPtr_, JE_word *mouseX, JE_word *mouseY); |
| 84 | void JE_mainGamePlayerFunctions(void); |
| 85 | const char *JE_getName(JE_byte pnum); |
| 86 | |
| 87 | void JE_playerCollide(Player *this_player, JE_byte playerNum); |
| 88 | |
| 89 | #endif /* MAININT_H */ |