2 Copyright (C) 2004-2011 Parallel Realities
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.
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.
13 See the GNU General Public License for more details.
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.
26 signed char frameLoop;
35 char lastKeyPressed[25];
36 char lastKeyEvents[25];
38 // Joystick config stuff
39 int lastButtonPressed;
48 char mouseLeft, mouseRight;
51 int joystickState[32]; // hopefully no one has a joystick with this many buttons(!)
60 char userHomeDirectory[PATH_MAX];
72 unsigned char *binaryBuffer; // used for unzipping
73 unsigned char *dataBuffer; // used for unzipping
80 char saveSlot[10][80];
83 int playerPosX, playerPosY;
87 Widget *highlightedWidget;
94 int cheatHealth, cheatExtras, cheatFuel, cheatLevels, cheatBlood, cheatInvulnerable;
95 int cheatReload, cheatSpeed, cheatSkipLevel;
100 int getMouseX() const;
101 int getMouseY() const;
103 void setMouse(int x, int y);
106 void clearCheatVars();
107 bool compareLastKeyInputs();
111 void setUserHome(const char *path);
113 bool unpack(const char *filename, int fileType);
114 bool loadData(const char *filename);
115 void reportFontFailure();
116 void setPlayerPosition(int x, int y, int limitLeft, int limitRight, int limitUp, int limitDown);
117 int getFrameLoop() const;
119 void doTimeDifference();
120 float getTimeDifference() const;
121 void resetTimeDifference();
122 void setInfoMessage(const char *message, int priority, int type);
123 void deleteWidgets();
124 void addWidget(Widget *widget);
125 bool loadWidgets(const char *filename);
126 Widget *getWidgetByName(const char *name);
127 void showWidgetGroup(const char *groupName, bool show);
128 void enableWidgetGroup(const char *groupName, bool show);
129 void showWidget(const char *name, bool show);
130 void enableWidget(const char *name, bool enable);
131 void setWidgetVariable(const char *name, int *variable);
132 bool widgetChanged(const char *name);
133 void highlightWidget(int dir);
134 void highlightWidget(const char *name);
135 int processWidgets();
137 int getValueOfDefine(const char *word);
138 char *getDefineOfValue(const char *prefix, int value);
139 int getValueOfFlagTokens(const char *line);
140 void delay(unsigned int frameLimit);