2015-10-20 13:51:49 +02:00
|
|
|
/*
|
2016-02-21 16:50:27 +01:00
|
|
|
Copyright (C) 2015-2016 Parallel Realities
|
2015-10-20 13:51:49 +02:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
|
|
|
See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef struct Texture Texture;
|
|
|
|
typedef struct Lookup Lookup;
|
|
|
|
typedef struct Weapon Weapon;
|
2016-02-21 08:48:22 +01:00
|
|
|
typedef struct Quadtree Quadtree;
|
2015-10-26 18:27:43 +01:00
|
|
|
typedef struct Entity Entity;
|
2015-10-20 13:51:49 +02:00
|
|
|
typedef struct Bullet Bullet;
|
2015-12-13 15:50:54 +01:00
|
|
|
typedef struct Debris Debris;
|
2015-10-20 13:51:49 +02:00
|
|
|
typedef struct Effect Effect;
|
|
|
|
typedef struct Objective Objective;
|
|
|
|
typedef struct StarSystem StarSystem;
|
|
|
|
typedef struct Challenge Challenge;
|
|
|
|
typedef struct Mission Mission;
|
|
|
|
typedef struct Pulse Pulse;
|
|
|
|
typedef struct Widget Widget;
|
|
|
|
typedef struct HudMessage HudMessage;
|
2015-11-28 11:11:20 +01:00
|
|
|
typedef struct MessageBox MessageBox;
|
2015-11-01 23:19:39 +01:00
|
|
|
typedef struct GridCell GridCell;
|
2015-11-28 11:11:20 +01:00
|
|
|
typedef struct ScriptRunner ScriptRunner;
|
2015-12-22 13:42:04 +01:00
|
|
|
typedef struct Location Location;
|
2016-02-27 13:14:05 +01:00
|
|
|
typedef struct Bucket Bucket;
|
2016-03-03 19:03:07 +01:00
|
|
|
typedef struct Trophy Trophy;
|
2015-10-20 13:51:49 +02:00
|
|
|
|
2015-12-18 11:12:37 +01:00
|
|
|
typedef struct {
|
2015-12-20 13:25:20 +01:00
|
|
|
int debug;
|
2015-12-18 11:12:37 +01:00
|
|
|
int takeScreenshots;
|
2016-03-06 10:47:44 +01:00
|
|
|
char *screenshotFolder;
|
2015-12-18 11:12:37 +01:00
|
|
|
int noAIWeapons;
|
|
|
|
int showFPS;
|
|
|
|
int playerImmortal;
|
|
|
|
int playerUnlimitedMissiles;
|
|
|
|
int noEntityActions;
|
|
|
|
int allImmortal;
|
|
|
|
int fps;
|
|
|
|
} Dev;
|
|
|
|
|
2015-10-20 13:51:49 +02:00
|
|
|
typedef struct {
|
|
|
|
float x;
|
|
|
|
float y;
|
|
|
|
} PointF;
|
|
|
|
|
|
|
|
struct Texture {
|
2015-11-22 17:52:27 +01:00
|
|
|
char name[MAX_DESCRIPTION_LENGTH];
|
2015-10-20 13:51:49 +02:00
|
|
|
long hash;
|
2015-12-20 17:13:35 +01:00
|
|
|
long ttl;
|
2015-11-28 11:11:20 +01:00
|
|
|
SDL_Texture *texture;
|
2015-10-20 13:51:49 +02:00
|
|
|
Texture *next;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
void (*logic)(void);
|
|
|
|
void (*draw)(void);
|
|
|
|
void (*handleClick)(int x, int y, int btn);
|
|
|
|
void (*handleDrag)(int x, int y, int dx, int dy, int cx, int cy);
|
|
|
|
void (*handleMouseUp)(int x, int y, int btn);
|
|
|
|
} Delegate;
|
|
|
|
|
2016-02-23 08:19:31 +01:00
|
|
|
typedef struct {
|
|
|
|
int type;
|
|
|
|
char message[MAX_DESCRIPTION_LENGTH];
|
|
|
|
} ModalDialog;
|
|
|
|
|
2015-10-20 13:51:49 +02:00
|
|
|
struct Lookup {
|
|
|
|
char name[MAX_NAME_LENGTH];
|
|
|
|
long value;
|
|
|
|
Lookup *next;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Weapon {
|
|
|
|
int type;
|
|
|
|
int ammo;
|
|
|
|
int maxAmmo;
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
};
|
|
|
|
|
2015-10-26 18:27:43 +01:00
|
|
|
struct Entity {
|
|
|
|
int type;
|
2015-10-20 13:51:49 +02:00
|
|
|
char name[MAX_NAME_LENGTH];
|
2015-11-01 13:29:32 +01:00
|
|
|
char defName[MAX_NAME_LENGTH];
|
2015-11-14 09:41:07 +01:00
|
|
|
char groupName[MAX_NAME_LENGTH];
|
2015-10-28 20:12:58 +01:00
|
|
|
int active;
|
2015-10-27 08:24:17 +01:00
|
|
|
int id;
|
2015-10-20 13:51:49 +02:00
|
|
|
int side;
|
|
|
|
float x;
|
|
|
|
float y;
|
2015-12-07 20:19:14 +01:00
|
|
|
int offsetX;
|
|
|
|
int offsetY;
|
2015-11-01 23:19:39 +01:00
|
|
|
int w;
|
|
|
|
int h;
|
2015-10-20 13:51:49 +02:00
|
|
|
float dx;
|
|
|
|
float dy;
|
|
|
|
float thrust;
|
2015-10-21 20:21:45 +02:00
|
|
|
float speed;
|
2015-10-26 20:16:12 +01:00
|
|
|
float angle;
|
2015-10-20 13:51:49 +02:00
|
|
|
int alive;
|
|
|
|
int health;
|
|
|
|
int maxHealth;
|
|
|
|
int shield;
|
|
|
|
int maxShield;
|
|
|
|
int reload;
|
|
|
|
int reloadTime;
|
2015-10-23 08:08:18 +02:00
|
|
|
int selectedGunType;
|
2015-10-29 11:14:21 +01:00
|
|
|
int combinedGuns;
|
2015-10-20 13:51:49 +02:00
|
|
|
int shieldRecharge;
|
|
|
|
int shieldRechargeRate;
|
2015-10-21 20:21:45 +02:00
|
|
|
int systemPower;
|
2015-10-20 13:51:49 +02:00
|
|
|
int armourHit;
|
|
|
|
int shieldHit;
|
2015-10-21 20:21:45 +02:00
|
|
|
int systemHit;
|
2015-10-20 13:51:49 +02:00
|
|
|
int thinkTime;
|
|
|
|
int aiActionTime;
|
2015-11-18 12:27:05 +01:00
|
|
|
int aiAggression;
|
2015-12-20 16:13:41 +01:00
|
|
|
int aiDamagePerSec;
|
|
|
|
int aiDamageTimer;
|
|
|
|
int aiEvadeTimer;
|
2015-10-20 13:51:49 +02:00
|
|
|
int separationRadius;
|
2015-12-24 13:12:23 +01:00
|
|
|
int deathType;
|
2015-10-20 13:51:49 +02:00
|
|
|
Weapon guns[MAX_FIGHTER_GUNS];
|
2015-11-22 00:45:22 +01:00
|
|
|
int missiles;
|
2015-10-20 13:51:49 +02:00
|
|
|
long flags;
|
2015-11-18 12:27:05 +01:00
|
|
|
long aiFlags;
|
2015-11-13 09:45:24 +01:00
|
|
|
SDL_Point targetLocation;
|
2015-11-15 00:19:17 +01:00
|
|
|
Entity *towing;
|
2015-10-26 20:16:12 +01:00
|
|
|
Entity *target;
|
2015-12-18 13:02:01 +01:00
|
|
|
Entity *leader;
|
2015-11-15 12:31:30 +01:00
|
|
|
Entity *owner;
|
2015-10-20 13:51:49 +02:00
|
|
|
void (*action)(void);
|
2016-03-08 15:28:11 +01:00
|
|
|
void (*draw)(void);
|
2015-10-20 13:51:49 +02:00
|
|
|
void (*die)(void);
|
2015-11-28 11:11:20 +01:00
|
|
|
SDL_Texture *texture;
|
2015-10-26 20:16:12 +01:00
|
|
|
Entity *next;
|
2015-10-20 13:51:49 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
struct Bullet {
|
|
|
|
int type;
|
|
|
|
float x;
|
|
|
|
float y;
|
2015-11-02 08:57:33 +01:00
|
|
|
int w;
|
|
|
|
int h;
|
2015-10-20 13:51:49 +02:00
|
|
|
float dx;
|
|
|
|
float dy;
|
|
|
|
int sound;
|
|
|
|
int life;
|
|
|
|
int damage;
|
|
|
|
int angle;
|
|
|
|
long flags;
|
|
|
|
SDL_Texture *texture;
|
2015-10-26 20:16:12 +01:00
|
|
|
Entity *owner;
|
|
|
|
Entity *target;
|
2015-10-20 13:51:49 +02:00
|
|
|
Bullet *next;
|
|
|
|
};
|
|
|
|
|
2015-12-13 15:50:54 +01:00
|
|
|
struct Debris {
|
|
|
|
float x;
|
|
|
|
float y;
|
|
|
|
float dx;
|
|
|
|
float dy;
|
|
|
|
int health;
|
|
|
|
int thinkTime;
|
|
|
|
float angle;
|
|
|
|
SDL_Texture *texture;
|
|
|
|
Debris *next;
|
|
|
|
};
|
|
|
|
|
2015-10-20 13:51:49 +02:00
|
|
|
typedef struct {
|
|
|
|
float x;
|
|
|
|
float y;
|
|
|
|
float speed;
|
|
|
|
} Star;
|
|
|
|
|
|
|
|
struct Pulse {
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
float size;
|
|
|
|
int life;
|
|
|
|
int r, g, b;
|
|
|
|
Pulse *next;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Effect {
|
|
|
|
int type;
|
|
|
|
float x;
|
|
|
|
float y;
|
|
|
|
float dx;
|
|
|
|
float dy;
|
|
|
|
float health;
|
2015-11-29 09:34:25 +01:00
|
|
|
float size;
|
|
|
|
float scaleAmount;
|
2015-10-20 13:51:49 +02:00
|
|
|
int r;
|
|
|
|
int g;
|
|
|
|
int b;
|
|
|
|
int a;
|
|
|
|
SDL_Texture *texture;
|
|
|
|
Effect *next;
|
|
|
|
};
|
|
|
|
|
2015-12-22 13:42:04 +01:00
|
|
|
struct Location {
|
2015-12-22 18:58:18 +01:00
|
|
|
int active;
|
2015-12-22 13:42:04 +01:00
|
|
|
char name[MAX_NAME_LENGTH];
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
int size;
|
|
|
|
Location *next;
|
|
|
|
};
|
|
|
|
|
2015-10-20 13:51:49 +02:00
|
|
|
struct Objective {
|
2015-10-29 12:08:47 +01:00
|
|
|
int active;
|
2015-10-20 13:51:49 +02:00
|
|
|
char description[MAX_DESCRIPTION_LENGTH];
|
|
|
|
char targetName[MAX_NAME_LENGTH];
|
2015-10-22 08:08:03 +02:00
|
|
|
int targetType;
|
2015-10-20 13:51:49 +02:00
|
|
|
int currentValue;
|
|
|
|
int targetValue;
|
|
|
|
int status;
|
2015-10-22 08:08:03 +02:00
|
|
|
int isCondition;
|
2015-12-22 18:58:18 +01:00
|
|
|
int isEliminateAll;
|
2015-10-20 13:51:49 +02:00
|
|
|
Objective *next;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Challenge {
|
|
|
|
int type;
|
2016-02-27 17:16:21 +01:00
|
|
|
int value;
|
2015-10-20 13:51:49 +02:00
|
|
|
int passed;
|
|
|
|
Challenge *next;
|
|
|
|
};
|
|
|
|
|
2016-03-02 07:46:13 +01:00
|
|
|
typedef struct {
|
|
|
|
int isChallenge;
|
|
|
|
int timeLimit;
|
|
|
|
int killLimit;
|
|
|
|
int lossLimit;
|
|
|
|
int itemLimit;
|
2016-03-06 10:47:44 +01:00
|
|
|
int escapeLimit;
|
2016-03-04 23:59:16 +01:00
|
|
|
int waypointLimit;
|
2016-03-12 00:45:47 +01:00
|
|
|
int rescueLimit;
|
2016-03-02 23:19:26 +01:00
|
|
|
int noMissiles;
|
|
|
|
int noBoost;
|
|
|
|
int noECM;
|
|
|
|
int noGuns;
|
2016-03-07 13:30:20 +01:00
|
|
|
int scriptedEnd;
|
2016-03-03 00:20:37 +01:00
|
|
|
Challenge *challenges[MAX_CHALLENGES];
|
2016-03-02 07:46:13 +01:00
|
|
|
} ChallengeData;
|
|
|
|
|
2015-10-20 13:51:49 +02:00
|
|
|
struct Mission {
|
|
|
|
char name[MAX_NAME_LENGTH];
|
|
|
|
char description[MAX_DESCRIPTION_LENGTH];
|
|
|
|
char filename[MAX_DESCRIPTION_LENGTH];
|
2015-12-21 15:19:21 +01:00
|
|
|
int requires;
|
2015-10-20 13:51:49 +02:00
|
|
|
char pilot[MAX_NAME_LENGTH];
|
|
|
|
char squadron[MAX_NAME_LENGTH];
|
|
|
|
char craft[MAX_NAME_LENGTH];
|
2016-03-03 19:03:07 +01:00
|
|
|
char trophyId[MAX_NAME_LENGTH];
|
2015-10-20 13:51:49 +02:00
|
|
|
int available;
|
|
|
|
int completed;
|
2016-02-27 17:16:21 +01:00
|
|
|
int completedChallenges;
|
|
|
|
int totalChallenges;
|
2016-02-28 14:02:57 +01:00
|
|
|
int epic;
|
2016-03-02 07:46:13 +01:00
|
|
|
ChallengeData challengeData;
|
2016-02-28 14:02:57 +01:00
|
|
|
SDL_Rect rect;
|
2015-10-20 13:51:49 +02:00
|
|
|
Mission *next;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct StarSystem {
|
|
|
|
char name[MAX_NAME_LENGTH];
|
|
|
|
char description[MAX_DESCRIPTION_LENGTH];
|
|
|
|
int side;
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
int completedMissions;
|
|
|
|
int totalMissions;
|
2016-02-21 17:55:11 +01:00
|
|
|
int availableMissions;
|
2015-11-30 10:33:43 +01:00
|
|
|
int fallsToPandorans;
|
2015-12-21 15:19:21 +01:00
|
|
|
int isSol;
|
2016-02-27 17:16:21 +01:00
|
|
|
Mission missionHead;
|
2015-10-20 13:51:49 +02:00
|
|
|
StarSystem *next;
|
|
|
|
};
|
|
|
|
|
2016-02-21 08:48:22 +01:00
|
|
|
struct Quadtree {
|
|
|
|
int depth;
|
|
|
|
int x, y, w, h;
|
2016-02-21 09:13:17 +01:00
|
|
|
Entity **ents;
|
|
|
|
int capacity;
|
2016-02-21 08:48:22 +01:00
|
|
|
int numEnts;
|
|
|
|
Quadtree *node[4];
|
2015-11-01 23:19:39 +01:00
|
|
|
};
|
|
|
|
|
2015-10-20 13:51:49 +02:00
|
|
|
typedef struct {
|
2015-10-27 08:24:17 +01:00
|
|
|
int entId;
|
2015-11-01 00:09:43 +01:00
|
|
|
SDL_Point camera;
|
2015-10-20 13:51:49 +02:00
|
|
|
int numAllies;
|
|
|
|
int numEnemies;
|
2015-11-22 14:06:19 +01:00
|
|
|
int numInitialEnemies;
|
2015-10-20 13:51:49 +02:00
|
|
|
int status;
|
2016-02-28 14:02:57 +01:00
|
|
|
int isEpic;
|
2015-11-01 10:25:10 +01:00
|
|
|
int epicFighterLimit;
|
2015-11-01 00:09:43 +01:00
|
|
|
int playerSelect;
|
2016-01-25 16:09:14 +01:00
|
|
|
int manualComplete;
|
2016-01-25 15:58:07 +01:00
|
|
|
int unwinnable;
|
2015-10-20 13:51:49 +02:00
|
|
|
int missionFinishedTimer;
|
2015-11-15 17:18:17 +01:00
|
|
|
int boostTimer;
|
|
|
|
int ecmTimer;
|
2015-11-26 11:54:40 +01:00
|
|
|
int radarRange;
|
2015-12-28 14:44:57 +01:00
|
|
|
int numPlayerGuns;
|
2015-10-20 13:51:49 +02:00
|
|
|
int numObjectivesComplete, numObjectivesTotal;
|
2015-10-26 20:16:12 +01:00
|
|
|
Entity *missionTarget;
|
2016-03-07 18:12:21 +01:00
|
|
|
Entity *jumpgate;
|
2015-10-20 13:51:49 +02:00
|
|
|
SDL_Texture *background, *planetTexture;
|
|
|
|
PointF planet;
|
2016-02-21 14:47:10 +01:00
|
|
|
int planetWidth, planetHeight;
|
2015-10-26 18:27:43 +01:00
|
|
|
Entity entityHead, *entityTail;
|
2015-10-20 13:51:49 +02:00
|
|
|
Bullet bulletHead, *bulletTail;
|
2015-12-13 15:50:54 +01:00
|
|
|
Debris debrisHead, *debrisTail;
|
2015-10-20 13:51:49 +02:00
|
|
|
Effect effectHead, *effectTail;
|
|
|
|
Objective objectiveHead, *objectiveTail;
|
2015-12-22 13:42:04 +01:00
|
|
|
Location locationHead, *locationTail;
|
2015-11-28 11:11:20 +01:00
|
|
|
struct cJSON *missionJSON;
|
2015-10-25 01:01:46 +02:00
|
|
|
unsigned int stats[STAT_MAX];
|
2016-02-21 08:48:22 +01:00
|
|
|
Quadtree quadtree;
|
2015-10-20 13:51:49 +02:00
|
|
|
} Battle;
|
|
|
|
|
2015-11-28 11:11:20 +01:00
|
|
|
struct ScriptRunner {
|
|
|
|
struct cJSON *line;
|
|
|
|
long delay;
|
2015-11-28 18:00:54 +01:00
|
|
|
int waitForMessageBox;
|
2015-11-28 11:11:20 +01:00
|
|
|
ScriptRunner *next;
|
|
|
|
};
|
|
|
|
|
2016-03-03 19:03:07 +01:00
|
|
|
struct Trophy {
|
|
|
|
char id[MAX_NAME_LENGTH];
|
|
|
|
char title[MAX_DESCRIPTION_LENGTH];
|
|
|
|
char description[MAX_DESCRIPTION_LENGTH];
|
|
|
|
int value;
|
2016-03-06 18:13:34 +01:00
|
|
|
int hidden;
|
2016-03-03 19:03:07 +01:00
|
|
|
int awarded;
|
|
|
|
unsigned long awardDate;
|
|
|
|
int notify;
|
|
|
|
Trophy *next;
|
|
|
|
};
|
|
|
|
|
2015-10-20 13:51:49 +02:00
|
|
|
typedef struct {
|
2016-02-27 13:14:05 +01:00
|
|
|
StarSystem starSystemHead;
|
|
|
|
Mission challengeMissionHead;
|
2015-10-20 13:51:49 +02:00
|
|
|
Mission *currentMission;
|
2015-10-30 08:22:49 +01:00
|
|
|
char selectedStarSystem[MAX_NAME_LENGTH];
|
2015-12-21 15:19:21 +01:00
|
|
|
int completedMissions;
|
2016-02-21 17:55:11 +01:00
|
|
|
int availableMissions;
|
2015-12-21 15:19:21 +01:00
|
|
|
int totalMissions;
|
2015-10-25 01:01:46 +02:00
|
|
|
unsigned int stats[STAT_MAX];
|
2016-03-03 19:03:07 +01:00
|
|
|
Trophy trophyHead;
|
2015-10-20 13:51:49 +02:00
|
|
|
} Game;
|
|
|
|
|
|
|
|
struct Widget {
|
|
|
|
char name[MAX_NAME_LENGTH];
|
|
|
|
char group[MAX_NAME_LENGTH];
|
|
|
|
int type;
|
|
|
|
int value;
|
|
|
|
char text[MAX_NAME_LENGTH];
|
|
|
|
char **options;
|
|
|
|
int numOptions;
|
|
|
|
int currentOption;
|
|
|
|
int visible;
|
|
|
|
int enabled;
|
2016-02-23 23:20:07 +01:00
|
|
|
int isModal;
|
2015-10-20 13:51:49 +02:00
|
|
|
SDL_Rect rect;
|
2015-11-26 09:16:29 +01:00
|
|
|
SDL_Texture *texture;
|
2015-10-20 13:51:49 +02:00
|
|
|
void (*action)(void);
|
|
|
|
void (*onChange)(char *value);
|
2015-11-26 09:16:29 +01:00
|
|
|
Widget *parent;
|
2015-10-20 13:51:49 +02:00
|
|
|
Widget *next;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct HudMessage {
|
|
|
|
char message[MAX_DESCRIPTION_LENGTH];
|
|
|
|
SDL_Color color;
|
|
|
|
int life;
|
|
|
|
HudMessage *next;
|
|
|
|
};
|
|
|
|
|
2015-11-28 11:11:20 +01:00
|
|
|
struct MessageBox {
|
|
|
|
char title[MAX_NAME_LENGTH];
|
|
|
|
char body[MAX_DESCRIPTION_LENGTH];
|
|
|
|
int time;
|
2015-12-06 16:03:44 +01:00
|
|
|
int height;
|
2015-11-28 11:11:20 +01:00
|
|
|
MessageBox *next;
|
|
|
|
};
|
|
|
|
|
2015-11-23 15:52:11 +01:00
|
|
|
typedef struct {
|
|
|
|
int x;
|
|
|
|
int y;
|
2015-11-24 08:16:48 +01:00
|
|
|
int w;
|
|
|
|
int h;
|
2016-02-14 12:07:15 +01:00
|
|
|
int dx;
|
|
|
|
int dy;
|
2015-11-23 15:52:11 +01:00
|
|
|
int button[MAX_MOUSE_BUTTONS];
|
|
|
|
} Mouse;
|
|
|
|
|
2015-10-20 13:51:49 +02:00
|
|
|
typedef struct {
|
|
|
|
char saveDir[MAX_FILENAME_LENGTH];
|
|
|
|
int winWidth;
|
|
|
|
int winHeight;
|
|
|
|
float scaleX;
|
|
|
|
float scaleY;
|
|
|
|
int fullscreen;
|
|
|
|
int musicVolume;
|
|
|
|
int soundVolume;
|
2015-11-23 15:52:11 +01:00
|
|
|
Mouse mouse;
|
2015-10-20 13:51:49 +02:00
|
|
|
int keyboard[MAX_KEYBOARD_KEYS];
|
|
|
|
SDL_Texture *backBuffer;
|
|
|
|
SDL_Renderer *renderer;
|
|
|
|
SDL_Window *window;
|
|
|
|
Delegate delegate;
|
2016-02-23 08:19:31 +01:00
|
|
|
ModalDialog modalDialog;
|
2016-03-05 14:49:07 +01:00
|
|
|
int awaitingWidgetInput;
|
2016-03-05 13:35:19 +01:00
|
|
|
int lastKeyPressed;
|
|
|
|
int lastButtonPressed;
|
2016-03-03 19:03:07 +01:00
|
|
|
int keyControls[CONTROL_MAX];
|
|
|
|
int mouseControls[CONTROL_MAX];
|
2015-10-20 13:51:49 +02:00
|
|
|
} App;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
SDL_Color red;
|
|
|
|
SDL_Color orange;
|
|
|
|
SDL_Color yellow;
|
|
|
|
SDL_Color green;
|
|
|
|
SDL_Color blue;
|
|
|
|
SDL_Color cyan;
|
|
|
|
SDL_Color purple;
|
|
|
|
SDL_Color white;
|
|
|
|
SDL_Color black;
|
|
|
|
SDL_Color lightGrey;
|
|
|
|
SDL_Color darkGrey;
|
|
|
|
} Colors;
|
2016-02-27 13:14:05 +01:00
|
|
|
|
|
|
|
struct Bucket
|
|
|
|
{
|
|
|
|
char *key, *value;
|
|
|
|
Bucket *next;
|
|
|
|
};
|
|
|
|
|
2016-03-05 13:35:19 +01:00
|
|
|
typedef struct
|
2016-02-27 13:14:05 +01:00
|
|
|
{
|
|
|
|
Bucket **bucket;
|
|
|
|
int *bucketCount;
|
|
|
|
} HashTable;
|
|
|
|
|
2016-03-05 13:35:19 +01:00
|
|
|
typedef struct
|
2016-02-27 13:14:05 +01:00
|
|
|
{
|
|
|
|
int32_t magicNumber, version, stringCount;
|
|
|
|
int32_t originalOffset, translationOffset;
|
|
|
|
} MOHeader;
|
|
|
|
|
2016-03-05 13:35:19 +01:00
|
|
|
typedef struct
|
2016-02-27 13:14:05 +01:00
|
|
|
{
|
|
|
|
int32_t length, offset;
|
|
|
|
} MOEntry;
|