| 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 HELPTEXT_H |
| 20 | #define HELPTEXT_H |
| 21 | |
| 22 | #include "opentyr.h" |
| 23 | |
| 24 | #include "SDL.h" |
| 25 | |
| 26 | #include <stdio.h> |
| 27 | |
| 28 | #define MENU_MAX 14 |
| 29 | |
| 30 | #define DESTRUCT_MODES 5 |
| 31 | |
| 32 | extern const JE_byte menuHelp[MENU_MAX][11]; /* [1..14, 1..11] */ |
| 33 | |
| 34 | extern JE_byte verticalHeight; |
| 35 | extern JE_byte helpBoxColor, helpBoxBrightness, helpBoxShadeType; |
| 36 | |
| 37 | #define HELPTEXT_MISCTEXT_COUNT 68 |
| 38 | #define HELPTEXT_MISCTEXTB_COUNT 5 |
| 39 | #define HELPTEXT_MISCTEXTB_SIZE 11 |
| 40 | #define HELPTEXT_MENUTEXT_SIZE 21 |
| 41 | #define HELPTEXT_MAINMENUHELP_COUNT 34 |
| 42 | #define HELPTEXT_NETWORKTEXT_COUNT 4 |
| 43 | #define HELPTEXT_NETWORKTEXT_SIZE 22 |
| 44 | #define HELPTEXT_SUPERSHIPS_COUNT 11 |
| 45 | #define HELPTEXT_SPECIALNAME_COUNT 9 |
| 46 | #define HELPTEXT_SHIPINFO_COUNT 13 |
| 47 | |
| 48 | extern char helpTxt[39][231]; |
| 49 | extern char pName[21][16]; |
| 50 | extern char miscText[HELPTEXT_MISCTEXT_COUNT][42]; |
| 51 | extern char miscTextB[HELPTEXT_MISCTEXTB_COUNT][HELPTEXT_MISCTEXTB_SIZE]; |
| 52 | extern char keyName[8][18]; |
| 53 | extern char menuText[7][HELPTEXT_MENUTEXT_SIZE]; |
| 54 | extern char outputs[9][31]; |
| 55 | extern char topicName[6][21]; |
| 56 | extern char mainMenuHelp[HELPTEXT_MAINMENUHELP_COUNT][66]; |
| 57 | extern char inGameText[6][21]; |
| 58 | extern char detailLevel[6][13]; |
| 59 | extern char gameSpeedText[5][13]; |
| 60 | extern char inputDevices[3][13]; |
| 61 | extern char networkText[HELPTEXT_NETWORKTEXT_COUNT][HELPTEXT_NETWORKTEXT_SIZE]; |
| 62 | extern char difficultyNameB[11][21]; |
| 63 | extern char joyButtonNames[5][21]; |
| 64 | extern char superShips[HELPTEXT_SUPERSHIPS_COUNT][26]; |
| 65 | extern char specialName[HELPTEXT_SPECIALNAME_COUNT][10]; |
| 66 | extern char destructHelp[25][22]; |
| 67 | extern char weaponNames[17][17]; |
| 68 | extern char destructModeName[DESTRUCT_MODES][13]; |
| 69 | extern char shipInfo[HELPTEXT_SHIPINFO_COUNT][2][256]; |
| 70 | extern char menuInt[MENU_MAX+1][11][18]; |
| 71 | |
| 72 | void read_encrypted_pascal_string(char *s, size_t size, FILE *f); |
| 73 | void skip_pascal_string(FILE *f); |
| 74 | |
| 75 | void JE_helpBox(SDL_Surface *screen, int x, int y, const char *message, unsigned int boxwidth); |
| 76 | void JE_HBox(SDL_Surface *screen, int x, int y, unsigned int messagenum, unsigned int boxwidth); |
| 77 | void JE_loadHelpText(void); |
| 78 | |
| 79 | #endif /* HELPTEXT_H */ |