Moved #includes, #defines, enums into c files, from h files.
This commit is contained in:
parent
fc09a7d598
commit
5e82c957cd
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,27 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "ai.h"
|
#include "ai.h"
|
||||||
|
#include "../battle/mine.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../battle/fighters.h"
|
||||||
|
#include "../battle/quadtree.h"
|
||||||
|
#include "../battle/bullets.h"
|
||||||
|
#include "../battle/hud.h"
|
||||||
|
#include "../battle/script.h"
|
||||||
|
|
||||||
|
#define AI_EVADE 0
|
||||||
|
#define AI_FALLBACK 1
|
||||||
|
#define AI_HUNT 2
|
||||||
|
#define TURN_SPEED 4
|
||||||
|
#define TURN_THRESHOLD 2
|
||||||
|
|
||||||
|
extern Battle battle;
|
||||||
|
extern Colors colors;
|
||||||
|
extern Dev dev;
|
||||||
|
extern Entity *player;
|
||||||
|
extern Entity *self;
|
||||||
|
|
||||||
static void faceTarget(Entity *e);
|
static void faceTarget(Entity *e);
|
||||||
static int isInFOV(Entity *e, int fov);
|
static int isInFOV(Entity *e, int fov);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,29 +18,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void checkZackariaSuspicionLevel(void);
|
||||||
|
void checkSuspicionLevel(void);
|
||||||
#define AI_EVADE 0
|
void doAI(void);
|
||||||
#define AI_FALLBACK 1
|
|
||||||
#define AI_HUNT 2
|
|
||||||
#define TURN_SPEED 4
|
|
||||||
#define TURN_THRESHOLD 2
|
|
||||||
|
|
||||||
extern void addHudMessage(SDL_Color c, char *format, ...);
|
|
||||||
extern void applyFighterBrakes(void);
|
|
||||||
extern void applyFighterThrust(void);
|
|
||||||
extern void fireGuns(Entity *owner);
|
|
||||||
extern void fireMissile(Entity *owner);
|
|
||||||
extern void fireRocket(Entity *owner);
|
|
||||||
extern Entity **getAllEntsInRadius(int x, int y, int radius, Entity *ignore);
|
|
||||||
extern float getAngle(int x1, int y1, int x2, int y2);
|
|
||||||
extern int getDistance(int x1, int y1, int x2, int y2);
|
|
||||||
extern float mod(float n, float x);
|
|
||||||
extern void runScriptFunction(char *format, ...);
|
|
||||||
extern Entity *spawnMine(int type);
|
|
||||||
|
|
||||||
extern Battle battle;
|
|
||||||
extern Colors colors;
|
|
||||||
extern Dev dev;
|
|
||||||
extern Entity *player;
|
|
||||||
extern Entity *self;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,13 +18,55 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "battle.h"
|
#include "battle.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "../game/credits.h"
|
||||||
|
#include "../battle/locations.h"
|
||||||
|
#include "../system/widgets.h"
|
||||||
|
#include "../galaxy/mission.h"
|
||||||
|
#include "../battle/bullets.h"
|
||||||
|
#include "../galaxy/galacticMap.h"
|
||||||
|
#include "../battle/effects.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
#include "../battle/starfield.h"
|
||||||
|
#include "../battle/player.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../battle/messageBox.h"
|
||||||
|
#include "../battle/spawners.h"
|
||||||
|
#include "../battle/waypoints.h"
|
||||||
|
#include "../battle/radar.h"
|
||||||
|
#include "../battle/objectives.h"
|
||||||
|
#include "../battle/script.h"
|
||||||
|
#include "../battle/quadtree.h"
|
||||||
|
#include "../challenges/challenges.h"
|
||||||
|
#include "../challenges/challengeHome.h"
|
||||||
|
#include "../system/modalDialog.h"
|
||||||
|
#include "../game/options.h"
|
||||||
|
#include "../battle/hud.h"
|
||||||
|
#include "../battle/missionInfo.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../system/input.h"
|
||||||
|
#include "../game/stats.h"
|
||||||
|
#include "../battle/debris.h"
|
||||||
|
#include "../game/trophies.h"
|
||||||
|
#include "../battle/entities.h"
|
||||||
|
|
||||||
|
#define SHOW_BATTLE 0
|
||||||
|
#define SHOW_MENU 1
|
||||||
|
#define SHOW_OBJECTIVES 2
|
||||||
|
#define SHOW_OPTIONS 3
|
||||||
|
|
||||||
|
extern App app;
|
||||||
|
extern Battle battle;
|
||||||
|
extern Dev dev;
|
||||||
|
extern Entity *player;
|
||||||
|
extern Game game;
|
||||||
|
|
||||||
static void logic(void);
|
static void logic(void);
|
||||||
static void draw(void);
|
static void draw(void);
|
||||||
static void handleKeyboard(void);
|
static void handleKeyboard(void);
|
||||||
static void postBattle(void);
|
static void postBattle(void);
|
||||||
void destroyBattle(void);
|
|
||||||
static void doBattle(void);
|
static void doBattle(void);
|
||||||
static void optQuitBattle(void);
|
static void optQuitBattle(void);
|
||||||
static void quitBattle(void);
|
static void quitBattle(void);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,80 +18,5 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void destroyBattle(void);
|
||||||
|
void initBattle(void);
|
||||||
#include "../json/cJSON.h"
|
|
||||||
|
|
||||||
#define SHOW_BATTLE 0
|
|
||||||
#define SHOW_MENU 1
|
|
||||||
#define SHOW_OBJECTIVES 2
|
|
||||||
#define SHOW_OPTIONS 3
|
|
||||||
|
|
||||||
extern void awardTrophy(char *id);
|
|
||||||
extern void blitScaled(AtlasImage *atlasImage, int x, int y, int w, int h, int center);
|
|
||||||
extern void cancelScript(void);
|
|
||||||
extern void clearInput(void);
|
|
||||||
extern void destroyBullets(void);
|
|
||||||
extern void destroyDebris(void);
|
|
||||||
extern void destroyEffects(void);
|
|
||||||
extern void destroyEntities(void);
|
|
||||||
extern void destroyQuadtree(void);
|
|
||||||
extern void destroyScript(void);
|
|
||||||
extern void doBullets(void);
|
|
||||||
extern void doChallenges(void);
|
|
||||||
extern void doDebris(void);
|
|
||||||
extern void doEffects(void);
|
|
||||||
extern void doEntities(void);
|
|
||||||
extern void doHud(void);
|
|
||||||
extern void doLocations(void);
|
|
||||||
extern void doMessageBox(void);
|
|
||||||
extern void doObjectives(void);
|
|
||||||
extern void doPlayer(void);
|
|
||||||
extern void doPlayerSelect(void);
|
|
||||||
extern void doScript(void);
|
|
||||||
extern void doSpawners(void);
|
|
||||||
extern void doStars(float dx, float dy);
|
|
||||||
extern void doWidgets(void);
|
|
||||||
extern void drawBackground(SDL_Texture *texture);
|
|
||||||
extern void drawBullets(void);
|
|
||||||
extern void drawDebris(void);
|
|
||||||
extern void drawEffects(void);
|
|
||||||
extern void drawEntities(void);
|
|
||||||
extern void drawHud(void);
|
|
||||||
extern void drawLocations(void);
|
|
||||||
extern void drawMessageBox(void);
|
|
||||||
extern void drawMissionInfo(void);
|
|
||||||
extern void drawOptions(void);
|
|
||||||
extern void drawStars(void);
|
|
||||||
extern void drawWidgets(char *groupName);
|
|
||||||
extern Widget *getWidget(const char *name, const char *group);
|
|
||||||
extern void initBullets(void);
|
|
||||||
extern void initChallengeHome(void);
|
|
||||||
extern void initCredits(void);
|
|
||||||
extern void initDebris(void);
|
|
||||||
extern void initEffects(void);
|
|
||||||
extern void initEntities(void);
|
|
||||||
extern void initGalacticMap(void);
|
|
||||||
extern void initHud(void);
|
|
||||||
extern void initMessageBox(void);
|
|
||||||
extern void initOptions(void (*returnFromOptions)(void));
|
|
||||||
extern void initQuadtree(Quadtree *root);
|
|
||||||
extern void initRadar(void);
|
|
||||||
extern void initStars(void);
|
|
||||||
extern void loadMission(char *filename);
|
|
||||||
extern void playSound(int id);
|
|
||||||
extern void resetHud(void);
|
|
||||||
extern void resetMessageBox(void);
|
|
||||||
extern void resetWaypoints(void);
|
|
||||||
extern void runScriptFunction(const char *format, ...);
|
|
||||||
extern void scrollBackground(float x, float y);
|
|
||||||
extern void selectWidget(const char *name, const char *group);
|
|
||||||
extern void setAtlasColor(int r, int g, int b, int a);
|
|
||||||
extern void showOKCancelDialog(void (*okCallback)(void), void (*cancelCallback)(void), const char *format, ...);
|
|
||||||
extern void updateAccuracyStats(unsigned int *stats);
|
|
||||||
|
|
||||||
extern App app;
|
|
||||||
extern Battle battle;
|
|
||||||
extern Dev dev;
|
|
||||||
extern Entity *player;
|
|
||||||
extern Game game;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,28 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "bullets.h"
|
#include "bullets.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../battle/fighters.h"
|
||||||
|
#include "../battle/quadtree.h"
|
||||||
|
#include "../game/trophies.h"
|
||||||
|
#include "../battle/effects.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
#include "../system/io.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
|
||||||
|
#define INITIAL_BULLET_DRAW_CAPACITY 32
|
||||||
|
#define MISSILE_LIFE (FPS * 30)
|
||||||
|
#define TURN_SPEED 2
|
||||||
|
#define TURN_THRESHOLD 3
|
||||||
|
|
||||||
|
extern App app;
|
||||||
|
extern Battle battle;
|
||||||
|
extern Entity *player;
|
||||||
|
|
||||||
static void huntTarget(Bullet *b);
|
static void huntTarget(Bullet *b);
|
||||||
static void checkCollisions(Bullet *b);
|
static void checkCollisions(Bullet *b);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,37 +18,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void destroyBullets(void);
|
||||||
|
void destroyBulletDefs(void);
|
||||||
#include "../json/cJSON.h"
|
void fireMissile(Entity *owner);
|
||||||
|
void fireRocket(Entity *owner);
|
||||||
#define INITIAL_BULLET_DRAW_CAPACITY 32
|
void fireGuns(Entity *owner);
|
||||||
#define MISSILE_LIFE (FPS * 30)
|
void drawBullets(void);
|
||||||
#define TURN_SPEED 2
|
void doBullets(void);
|
||||||
#define TURN_THRESHOLD 3
|
void initBulletDefs(void);
|
||||||
|
void initBullets(void);
|
||||||
extern void addBulletHitEffect(int x, int y, int r, int g, int b);
|
|
||||||
extern void addMissileEngineEffect(Bullet *b);
|
|
||||||
extern void addMissileExplosion(Bullet *b);
|
|
||||||
extern void awardTrophy(char *id);
|
|
||||||
extern void blitRotated(AtlasImage *atlasImage, int x, int y, float angle);
|
|
||||||
extern int collision(int x1, int y1, int w1, int h1, int x2, int y2, int w2, int h2);
|
|
||||||
extern void damageFighter(Entity *e, int damage, long flags);
|
|
||||||
extern long flagsToLong(char *flags, int *add);
|
|
||||||
extern Entity **getAllEntsInRadius(int x, int y, int radius, Entity *ignore);
|
|
||||||
extern Entity **getAllEntsWithin(int x, int y, int w, int h, Entity *ignore);
|
|
||||||
extern float getAngle(int x1, int y1, int x2, int y2);
|
|
||||||
extern AtlasImage *getAtlasImage(char *filename);
|
|
||||||
extern int getDistance(int x1, int y1, int x2, int y2);
|
|
||||||
extern int isOnBattleScreen(int x, int y, int w, int h);
|
|
||||||
extern long lookup(char *name);
|
|
||||||
extern float mod(float n, float x);
|
|
||||||
extern void playBattleSound(int id, int x, int y);
|
|
||||||
extern void playSound(int id);
|
|
||||||
extern char *readFile(char *filename);
|
|
||||||
extern void *resize(void *array, int oldSize, int newSize);
|
|
||||||
extern void setAtlasColor(int r, int g, int b, int a);
|
|
||||||
|
|
||||||
extern App app;
|
|
||||||
extern Battle battle;
|
|
||||||
extern Entity *player;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,30 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "capitalShips.h"
|
#include "capitalShips.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../battle/ai.h"
|
||||||
|
#include "../battle/fighters.h"
|
||||||
|
#include "../battle/quadtree.h"
|
||||||
|
#include "../battle/debris.h"
|
||||||
|
#include "../battle/messageBox.h"
|
||||||
|
#include "../battle/script.h"
|
||||||
|
#include "../battle/effects.h"
|
||||||
|
#include "../battle/objectives.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../system/io.h"
|
||||||
|
#include "../battle/entities.h"
|
||||||
|
|
||||||
|
#define TURN_SPEED 0.1
|
||||||
|
#define TURN_THRESHOLD 2
|
||||||
|
|
||||||
|
extern Battle battle;
|
||||||
|
extern Entity *player;
|
||||||
|
extern Entity *self;
|
||||||
|
|
||||||
static int steer(void);
|
static int steer(void);
|
||||||
static void think(void);
|
static void think(void);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,39 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
void destroyCapitalShipDefs(void);
|
||||||
#include "../common.h"
|
void loadCapitalShips(struct cJSON *node);
|
||||||
|
void updateCapitalShipComponentProperties(Entity *parent, long flags);
|
||||||
#include "../json/cJSON.h"
|
void loadCapitalShipDefs(void);
|
||||||
|
void doCapitalShip(void);
|
||||||
#define TURN_SPEED 0.1
|
Entity *spawnCapitalShip(char *name, int x, int y, int side);
|
||||||
#define TURN_THRESHOLD 2
|
|
||||||
|
|
||||||
extern void addDebris(int x, int y, int amount);
|
|
||||||
extern void addLargeEngineEffect(void);
|
|
||||||
extern void addLargeExplosion(void);
|
|
||||||
extern void addMessageBox(char *title, char *body, int type);
|
|
||||||
extern void addSmallExplosion(void);
|
|
||||||
extern void applyFighterThrust(void);
|
|
||||||
extern void doAI(void);
|
|
||||||
extern long flagsToLong(char *flags, int *add);
|
|
||||||
extern Entity **getAllEntsInRadius(int x, int y, int radius, Entity *ignore);
|
|
||||||
extern float getAngle(int x1, int y1, int x2, int y2);
|
|
||||||
extern AtlasImage *getAtlasImage(char *filename);
|
|
||||||
extern int getDistance(int x1, int y1, int x2, int y2);
|
|
||||||
extern char **getFileList(char *dir, int *count);
|
|
||||||
extern int getJSONValue(cJSON *node, char *name, int defValue);
|
|
||||||
extern char *getJSONValueStr(cJSON *node, char *name, char *defValue);
|
|
||||||
extern long lookup(char *name);
|
|
||||||
extern float mod(float n, float x);
|
|
||||||
extern void playBattleSound(int id, int x, int y);
|
|
||||||
extern char *readFile(char *filename);
|
|
||||||
extern void runScriptFunction(char *format, ...);
|
|
||||||
extern Entity *spawnEntity(void);
|
|
||||||
extern char **toTypeArray(char *types, int *numTypes);
|
|
||||||
extern void updateCondition(char *name, int type);
|
|
||||||
extern void updateObjective(char *name, int type);
|
|
||||||
|
|
||||||
extern Battle battle;
|
|
||||||
extern Entity *player;
|
|
||||||
extern Entity *self;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "debris.h"
|
#include "debris.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../battle/effects.h"
|
||||||
|
|
||||||
|
#define INITIAL_DEBRIS_DRAW_CAPACITY 32
|
||||||
|
#define MAX_DEBRIS_TEXTURES 6
|
||||||
|
|
||||||
|
extern Battle battle;
|
||||||
|
|
||||||
static void changeCourse(Debris *d);
|
static void changeCourse(Debris *d);
|
||||||
static void resizeDrawList(void);
|
static void resizeDrawList(void);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,18 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void destroyDebris(void);
|
||||||
|
void drawDebris(void);
|
||||||
#include "../json/cJSON.h"
|
void doDebris(void);
|
||||||
|
void addDebris(int x, int y, int amount);
|
||||||
#define INITIAL_DEBRIS_DRAW_CAPACITY 32
|
void initDebris(void);
|
||||||
#define MAX_DEBRIS_TEXTURES 6
|
|
||||||
|
|
||||||
extern void addDebrisFire(int x, int y);
|
|
||||||
extern void blitRotated(AtlasImage *atlasImage, int x, int y, float angle);
|
|
||||||
extern AtlasImage *getAtlasImage(char *filename);
|
|
||||||
extern int isOnBattleScreen(int x, int y, int w, int h);
|
|
||||||
extern float mod(float n, float x);
|
|
||||||
extern void *resize(void *array, int oldSize, int newSize);
|
|
||||||
|
|
||||||
extern Battle battle;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "effects.h"
|
#include "effects.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
|
||||||
|
#define INITIAL_EFFECT_DRAW_CAPACITY 128
|
||||||
|
|
||||||
|
extern App app;
|
||||||
|
extern Battle battle;
|
||||||
|
extern Entity *self;
|
||||||
|
|
||||||
static void setRandomFlameHue(Effect *e);
|
static void setRandomFlameHue(Effect *e);
|
||||||
static void setRandomShieldHue(Effect *e);
|
static void setRandomShieldHue(Effect *e);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,17 +18,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void destroyEffects(void);
|
||||||
|
void addECMEffect(Entity *ent);
|
||||||
#define INITIAL_EFFECT_DRAW_CAPACITY 128
|
void addShieldSplinterEffect(Entity *ent);
|
||||||
|
void addMissileEngineEffect(Bullet *b);
|
||||||
extern void blitScaled(AtlasImage *atlasImage, int x, int y, int w, int h, int center);
|
void addLargeEngineEffect(void);
|
||||||
extern int collision(int x1, int y1, int w1, int h1, int x2, int y2, int w2, int h2);
|
void addEngineEffect(void);
|
||||||
extern AtlasImage *getAtlasImage(char *name);
|
void addMissileExplosion(Bullet *b);
|
||||||
extern int isOnBattleScreen(int x, int y, int w, int h);
|
void addLargeExplosion(void);
|
||||||
extern void *resize(void *array, int oldSize, int newSize);
|
void addMineExplosion(void);
|
||||||
extern void setAtlasColor(int r, int g, int b, int a);
|
void addSmallExplosion(void);
|
||||||
|
void addDebrisFire(int x, int y);
|
||||||
extern App app;
|
void addSmallFighterExplosion(void);
|
||||||
extern Battle battle;
|
void addBulletHitEffect(int x, int y, int r, int g, int b);
|
||||||
extern Entity *self;
|
void drawShieldHitEffect(Entity *e);
|
||||||
|
void drawEffects(void);
|
||||||
|
void doEffects(void);
|
||||||
|
void initEffects(void);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,27 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "entities.h"
|
#include "entities.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
|
#include "../battle/capitalShips.h"
|
||||||
|
#include "../battle/fighters.h"
|
||||||
|
#include "../battle/quadtree.h"
|
||||||
|
#include "../battle/rope.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../game/trophies.h"
|
||||||
|
#include "../battle/effects.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
|
||||||
|
#define DISABLED_GLOW_MAX 255
|
||||||
|
#define DISABLED_GLOW_MIN 128
|
||||||
|
#define DISABLED_GLOW_SPEED 3
|
||||||
|
|
||||||
|
extern App app;
|
||||||
|
extern Battle battle;
|
||||||
|
extern Dev dev;
|
||||||
|
extern Entity *player;
|
||||||
|
extern Entity *self;
|
||||||
|
|
||||||
static void drawEntity(Entity *e);
|
static void drawEntity(Entity *e);
|
||||||
static void doEntity(void);
|
static void doEntity(void);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,31 +18,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void destroyEntities(void);
|
||||||
|
void awardPandoranCraftTrophy(void);
|
||||||
#define DISABLED_GLOW_MAX 255
|
void updateEntitySide(char *sideStr, char *name);
|
||||||
#define DISABLED_GLOW_MIN 128
|
void killEntity(char *name);
|
||||||
#define DISABLED_GLOW_SPEED 3
|
void addAllToQuadtree(void);
|
||||||
|
void countNumEnemies(void);
|
||||||
extern void addToQuadtree(Entity *e, Quadtree *root);
|
void activateEntityGroups(char *groupNames);
|
||||||
extern void awardTrophy(char *id);
|
void activateEntities(char *names);
|
||||||
extern void blitRotated(AtlasImage *atlasImage, int x, int y, float angle);
|
void drawEntities(void);
|
||||||
extern void cutRope(Entity *e);
|
void doEntities(void);
|
||||||
extern void doCapitalShip(void);
|
Entity *spawnEntity(void);
|
||||||
extern void doFighter(void);
|
void initEntities(void);
|
||||||
extern void doRope(Entity *e);
|
|
||||||
extern void drawRope(Entity *e);
|
|
||||||
extern void drawShieldHitEffect(Entity *e);
|
|
||||||
extern Entity **getAllEntsWithin(int x, int y, int w, int h, Entity *ignore);
|
|
||||||
extern int isOnBattleScreen(int x, int y, int w, int h);
|
|
||||||
extern long lookup(char *name);
|
|
||||||
extern void removeFromQuadtree(Entity *e, Quadtree *root);
|
|
||||||
extern void resetFighter(Entity *e);
|
|
||||||
extern void setAtlasColor(int r, int g, int b, int a);
|
|
||||||
extern void updateCapitalShipComponentProperties(Entity *parent, long flags);
|
|
||||||
|
|
||||||
extern App app;
|
|
||||||
extern Battle battle;
|
|
||||||
extern Dev dev;
|
|
||||||
extern Entity *player;
|
|
||||||
extern Entity *self;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,31 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "fighters.h"
|
#include "fighters.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../battle/ai.h"
|
||||||
|
#include "../battle/quadtree.h"
|
||||||
|
#include "../battle/debris.h"
|
||||||
|
#include "../battle/rope.h"
|
||||||
|
#include "../galaxy/mission.h"
|
||||||
|
#include "../battle/hud.h"
|
||||||
|
#include "../battle/objectives.h"
|
||||||
|
#include "../battle/script.h"
|
||||||
|
#include "../battle/effects.h"
|
||||||
|
#include "../battle/items.h"
|
||||||
|
#include "../system/io.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../battle/entities.h"
|
||||||
|
|
||||||
|
extern Battle battle;
|
||||||
|
extern Colors colors;
|
||||||
|
extern Entity *player;
|
||||||
|
extern Entity *self;
|
||||||
|
extern Game game;
|
||||||
|
|
||||||
static void separate(void);
|
static void separate(void);
|
||||||
static void die(void);
|
static void die(void);
|
||||||
|
@ -172,7 +196,6 @@ static void randomizeDartGuns(Entity *dart)
|
||||||
dart->guns[2].y = -10;
|
dart->guns[2].y = -10;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
/* Plasma / Laser cannons */
|
/* Plasma / Laser cannons */
|
||||||
case 3:
|
case 3:
|
||||||
dart->guns[0].type = BT_PLASMA;
|
dart->guns[0].type = BT_PLASMA;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,42 +18,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void destroyFighterStats(void);
|
||||||
|
void destroyFighterDefs(void);
|
||||||
#include "../json/cJSON.h"
|
void loadFighters(struct cJSON *node);
|
||||||
|
void loadFighterDefs(void);
|
||||||
extern void addDebris(int x, int y, int amount);
|
Entity **getDBFighters(int *num);
|
||||||
extern void addEngineEffect(void);
|
void retreatAllies(void);
|
||||||
extern void addHudMessage(SDL_Color c, char *format, ...);
|
void retreatEnemies(void);
|
||||||
extern void addRandomItem(int x, int y);
|
void damageFighter(Entity *e, int amount, long flags);
|
||||||
extern void addShieldSplinterEffect(Entity *ent);
|
void applyFighterBrakes(void);
|
||||||
extern void addSmallExplosion(void);
|
void applyFighterThrust(void);
|
||||||
extern void addSmallFighterExplosion(void);
|
void doFighter(void);
|
||||||
extern void adjustObjectiveTargetValue(char *name, int type, int amount);
|
void resetFighter(Entity *fighter);
|
||||||
extern void attachRope(void);
|
Entity *spawnFighter(char *name, int x, int y, int side);
|
||||||
extern void checkSuspicionLevel(void);
|
|
||||||
extern void checkZackariaSuspicionLevel(void);
|
|
||||||
extern void completeMission(void);
|
|
||||||
extern void doAI(void);
|
|
||||||
extern long flagsToLong(char *flags, int *add);
|
|
||||||
extern Entity **getAllEntsInRadius(int x, int y, int radius, Entity *ignore);
|
|
||||||
extern float getAngle(int x1, int y1, int x2, int y2);
|
|
||||||
extern AtlasImage *getAtlasImage(char *filename);
|
|
||||||
extern int getDistance(int x1, int y1, int x2, int y2);
|
|
||||||
extern char **getFileList(char *dir, int *count);
|
|
||||||
extern int getJSONValue(cJSON *node, char *name, int defValue);
|
|
||||||
extern char *getJSONValueStr(cJSON *node, char *name, char *defValue);
|
|
||||||
extern long lookup(char *name);
|
|
||||||
extern void playBattleSound(int id, int x, int y);
|
|
||||||
extern char *readFile(char *filename);
|
|
||||||
extern void runScriptFunction(char *format, ...);
|
|
||||||
extern Entity *spawnEntity(void);
|
|
||||||
extern char **toTypeArray(char *types, int *numTypes);
|
|
||||||
extern void updateCondition(char *name, int type);
|
|
||||||
extern void updateObjective(char *name, int type);
|
|
||||||
|
|
||||||
extern Battle battle;
|
|
||||||
extern Colors colors;
|
|
||||||
extern Entity *player;
|
|
||||||
extern Entity *self;
|
|
||||||
extern Game game;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,23 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "hud.h"
|
#include "hud.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../battle/player.h"
|
||||||
|
#include "../system/text.h"
|
||||||
|
#include "../battle/radar.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
#include "../battle/jumpgate.h"
|
||||||
|
|
||||||
|
#define MAX_HUD_MESSAGES 6
|
||||||
|
|
||||||
|
extern App app;
|
||||||
|
extern Battle battle;
|
||||||
|
extern Colors colors;
|
||||||
|
extern Entity *player;
|
||||||
|
extern Game game;
|
||||||
|
|
||||||
static void drawPlayerTargeter(void);
|
static void drawPlayerTargeter(void);
|
||||||
static void drawNumFighters(void);
|
static void drawNumFighters(void);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,26 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void resetHud(void);
|
||||||
|
void drawHud(void);
|
||||||
#define MAX_HUD_MESSAGES 6
|
void addHudMessage(SDL_Color c, char *format, ...);
|
||||||
|
void doHud(void);
|
||||||
extern void blit(AtlasImage *atlasImage, int x, int y, int center);
|
void initHud(void);
|
||||||
extern void blitRotated(AtlasImage *atlasImage, int x, int y, float angle);
|
|
||||||
extern void drawRadar(void);
|
|
||||||
extern void drawRadarRangeWarning(void);
|
|
||||||
extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...);
|
|
||||||
extern float getAngle(int x1, int y1, int x2, int y2);
|
|
||||||
extern AtlasImage *getAtlasImage(char *filename);
|
|
||||||
extern int getDistance(int x1, int y1, int x2, int y2);
|
|
||||||
extern int getPercent(float current, float total);
|
|
||||||
extern int jumpgateEnabled(void);
|
|
||||||
extern int playerHasGun(int type);
|
|
||||||
extern void setAtlasColor(int r, int g, int b, int a);
|
|
||||||
extern char *timeToString(long millis, int showHours);
|
|
||||||
|
|
||||||
extern App app;
|
|
||||||
extern Battle battle;
|
|
||||||
extern Colors colors;
|
|
||||||
extern Entity *player;
|
|
||||||
extern Game game;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,23 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "items.h"
|
#include "items.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../battle/quadtree.h"
|
||||||
|
#include "../battle/hud.h"
|
||||||
|
#include "../battle/objectives.h"
|
||||||
|
#include "../system/io.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../battle/entities.h"
|
||||||
|
|
||||||
|
extern Battle battle;
|
||||||
|
extern Colors colors;
|
||||||
|
extern Entity *player;
|
||||||
|
extern Entity *self;
|
||||||
|
|
||||||
static void action(void);
|
static void action(void);
|
||||||
static Entity *getItemDef(char *name);
|
static Entity *getItemDef(char *name);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,23 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void destroyItemDefs(void);
|
||||||
|
void loadItems(struct cJSON *node);
|
||||||
#include "../json/cJSON.h"
|
void addRandomItem(int x, int y);
|
||||||
|
Entity *spawnItem(char *name);
|
||||||
extern void addHudMessage(SDL_Color c, char *format, ...);
|
void loadItemDefs(void);
|
||||||
extern int collision(int x1, int y1, int w1, int h1, int x2, int y2, int w2, int h2);
|
|
||||||
extern long flagsToLong(char *flags, int *add);
|
|
||||||
extern Entity **getAllEntsInRadius(int x, int y, int radius, Entity *ignore);
|
|
||||||
extern AtlasImage *getAtlasImage(char *filename);
|
|
||||||
extern int getJSONValue(cJSON *node, char *name, int defValue);
|
|
||||||
extern char *getJSONValueStr(cJSON *node, char *name, char *defValue);
|
|
||||||
extern void playBattleSound(int id, int x, int y);
|
|
||||||
extern char *readFile(char *filename);
|
|
||||||
extern Entity *spawnEntity(void);
|
|
||||||
extern void updateObjective(char *name, int type);
|
|
||||||
|
|
||||||
extern Battle battle;
|
|
||||||
extern Colors colors;
|
|
||||||
extern Entity *player;
|
|
||||||
extern Entity *self;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,23 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "jumpgate.h"
|
#include "jumpgate.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../battle/quadtree.h"
|
||||||
|
#include "../battle/debris.h"
|
||||||
|
#include "../battle/objectives.h"
|
||||||
|
#include "../battle/script.h"
|
||||||
|
#include "../battle/effects.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../battle/entities.h"
|
||||||
|
|
||||||
|
#define ESCAPE_DISTANCE 256
|
||||||
|
|
||||||
|
extern Battle battle;
|
||||||
|
extern Entity *self;
|
||||||
|
|
||||||
static void think(void);
|
static void think(void);
|
||||||
static void draw(void);
|
static void draw(void);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,21 +18,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void activateJumpgate(int activate);
|
||||||
|
int jumpgateEnabled(void);
|
||||||
#define ESCAPE_DISTANCE 256
|
Entity *spawnJumpgate(int side, long flags);
|
||||||
|
|
||||||
extern void addDebris(int x, int y, int amount);
|
|
||||||
extern void addSmallExplosion(void);
|
|
||||||
extern void blitRotated(AtlasImage *atlasImage, int x, int y, float angle);
|
|
||||||
extern Entity **getAllEntsInRadius(int x, int y, int radius, Entity *ignore);
|
|
||||||
extern AtlasImage *getAtlasImage(char *filename);
|
|
||||||
extern int getDistance(int x1, int y1, int x2, int y2);
|
|
||||||
extern void playBattleSound(int id, int x, int y);
|
|
||||||
extern void runScriptFunction(char *format, ...);
|
|
||||||
extern Entity *spawnEntity(void);
|
|
||||||
extern void updateCondition(char *name, int type);
|
|
||||||
extern void updateObjective(char *name, int type);
|
|
||||||
|
|
||||||
extern Battle battle;
|
|
||||||
extern Entity *self;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "locations.h"
|
#include "locations.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../battle/script.h"
|
||||||
|
|
||||||
|
extern Battle battle;
|
||||||
|
extern Entity *player;
|
||||||
|
|
||||||
void doLocations(void)
|
void doLocations(void)
|
||||||
{
|
{
|
||||||
|
@ -131,7 +139,6 @@ void loadLocations(cJSON *node)
|
||||||
l->x += (SCREEN_WIDTH / 2);
|
l->x += (SCREEN_WIDTH / 2);
|
||||||
l->y += (SCREEN_HEIGHT / 2);
|
l->y += (SCREEN_HEIGHT / 2);
|
||||||
|
|
||||||
|
|
||||||
node = node->next;
|
node = node->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,14 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void loadLocations(struct cJSON *node);
|
||||||
|
void createChristabelLocation(void);
|
||||||
#include "../json/cJSON.h"
|
void activateLocations(char *locations);
|
||||||
|
void drawLocations(void);
|
||||||
extern void drawCircle(int cx, int cy, int radius, int r, int g, int b, int a);
|
void doLocations(void);
|
||||||
extern int getDistance(int x1, int y1, int x2, int y2);
|
|
||||||
extern int getJSONValue(cJSON *node, char *name, int defValue);
|
|
||||||
extern void runScriptFunction(char *format, ...);
|
|
||||||
|
|
||||||
extern Battle battle;
|
|
||||||
extern Entity *player;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "messageBox.h"
|
#include "messageBox.h"
|
||||||
|
#include "../system/text.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
|
||||||
|
#define MSG_BOX_TEXT_WIDTH 600
|
||||||
|
|
||||||
|
extern App app;
|
||||||
|
extern Battle battle;
|
||||||
|
extern Colors colors;
|
||||||
|
extern Entity *player;
|
||||||
|
|
||||||
static void calculateMessageBoxHeight(MessageBox *msg);
|
static void calculateMessageBoxHeight(MessageBox *msg);
|
||||||
static void nextMessage(void);
|
static void nextMessage(void);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,16 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void resetMessageBox(void);
|
||||||
|
void drawMessageBox(void);
|
||||||
#define MSG_BOX_TEXT_WIDTH 600
|
int showingMessageBoxes(void);
|
||||||
|
void doMessageBox(void);
|
||||||
extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...);
|
void addMessageBox(char *title, char *body, int type);
|
||||||
extern int getWrappedTextHeight(char *text, int size);
|
void initMessageBox(void);
|
||||||
extern void playSound(int sound);
|
|
||||||
extern void useFont(char *name);
|
|
||||||
|
|
||||||
extern App app;
|
|
||||||
extern Battle battle;
|
|
||||||
extern Colors colors;
|
|
||||||
extern Entity *player;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,26 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "mine.h"
|
#include "mine.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../battle/fighters.h"
|
||||||
|
#include "../battle/quadtree.h"
|
||||||
|
#include "../game/trophies.h"
|
||||||
|
#include "../battle/objectives.h"
|
||||||
|
#include "../battle/script.h"
|
||||||
|
#include "../battle/effects.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../battle/entities.h"
|
||||||
|
|
||||||
|
#define DAMAGE_RANGE 250
|
||||||
|
#define SYSTEM_POWER 50
|
||||||
|
#define TRIGGER_RANGE 150
|
||||||
|
|
||||||
|
extern Battle battle;
|
||||||
|
extern Entity *player;
|
||||||
|
extern Entity *self;
|
||||||
|
|
||||||
static void think(void);
|
static void think(void);
|
||||||
static void die(void);
|
static void die(void);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,23 +18,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
Entity *spawnMine(int type);
|
||||||
|
|
||||||
#define DAMAGE_RANGE 250
|
|
||||||
#define SYSTEM_POWER 50
|
|
||||||
#define TRIGGER_RANGE 150
|
|
||||||
|
|
||||||
extern void addMineExplosion(void);
|
|
||||||
extern void awardTrophy(char *id);
|
|
||||||
extern void damageFighter(Entity *e, int amount, long flags);
|
|
||||||
extern Entity **getAllEntsInRadius(int x, int y, int radius, Entity *ignore);
|
|
||||||
extern AtlasImage *getAtlasImage(char *filename);
|
|
||||||
extern int getDistance(int x1, int y1, int x2, int y2);
|
|
||||||
extern void playBattleSound(int id, int x, int y);
|
|
||||||
extern void runScriptFunction(const char *format, ...);
|
|
||||||
extern Entity *spawnEntity(void);
|
|
||||||
extern void updateObjective(char *name, int type);
|
|
||||||
|
|
||||||
extern Battle battle;
|
|
||||||
extern Entity *player;
|
|
||||||
extern Entity *self;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "missionInfo.h"
|
#include "missionInfo.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../challenges/challenges.h"
|
||||||
|
#include "../system/widgets.h"
|
||||||
|
#include "../system/text.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
|
||||||
|
extern App app;
|
||||||
|
extern Battle battle;
|
||||||
|
extern Colors colors;
|
||||||
|
extern Game game;
|
||||||
|
|
||||||
static void drawMissionSummary(AtlasImage *title);
|
static void drawMissionSummary(AtlasImage *title);
|
||||||
static void drawObjectives(void);
|
static void drawObjectives(void);
|
||||||
|
@ -224,4 +236,3 @@ static void drawChallenges(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,17 +18,5 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void drawMissionInfo(void);
|
||||||
|
void initMissionInfo(void);
|
||||||
extern void blit(AtlasImage *atlasImage, int x, int y, int center);
|
|
||||||
extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...);
|
|
||||||
extern void drawWidgets(char *groupName);
|
|
||||||
extern AtlasImage *getAtlasImage(char *filename);
|
|
||||||
extern char *getChallengeDescription(Challenge *c);
|
|
||||||
extern void setAtlasColor(int r, int g, int b, int a);
|
|
||||||
extern char *timeToString(long millis, int showHours);
|
|
||||||
|
|
||||||
extern App app;
|
|
||||||
extern Battle battle;
|
|
||||||
extern Colors colors;
|
|
||||||
extern Game game;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "objectives.h"
|
#include "objectives.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../galaxy/mission.h"
|
||||||
|
#include "../battle/hud.h"
|
||||||
|
#include "../battle/script.h"
|
||||||
|
|
||||||
|
extern Battle battle;
|
||||||
|
extern Colors colors;
|
||||||
|
|
||||||
static int fireObjectivesComplete;
|
static int fireObjectivesComplete;
|
||||||
|
|
||||||
|
@ -238,7 +249,6 @@ void completeConditions(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void failIncompleteObjectives(void)
|
void failIncompleteObjectives(void)
|
||||||
{
|
{
|
||||||
Objective *o;
|
Objective *o;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,16 +18,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void addEpicKillsObjective(void);
|
||||||
#include "../json/cJSON.h"
|
void addEpicLivesObjective(void);
|
||||||
|
void loadObjectives(struct cJSON *node);
|
||||||
extern void addHudMessage(SDL_Color c, char *format, ...);
|
void activateObjectives(char *objectives);
|
||||||
extern void completeMission(void);
|
void failIncompleteObjectives(void);
|
||||||
extern void failMission(void);
|
void completeConditions(void);
|
||||||
extern int getJSONValue(cJSON *node, char *name, int defValue);
|
void completeAllObjectives(void);
|
||||||
extern long lookup(char *name);
|
void updateCondition(char *name, int type);
|
||||||
extern void playSound(int id);
|
void adjustObjectiveTargetValue(char *name, int type, int amount);
|
||||||
extern void runScriptFunction(char *format, ...);
|
void updateObjective(char *name, int type);
|
||||||
|
void doObjectives(void);
|
||||||
extern Battle battle;
|
|
||||||
extern Colors colors;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,31 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../system/controls.h"
|
||||||
|
#include "../battle/fighters.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../galaxy/mission.h"
|
||||||
|
#include "../game/trophies.h"
|
||||||
|
#include "../battle/hud.h"
|
||||||
|
#include "../battle/objectives.h"
|
||||||
|
#include "../battle/bullets.h"
|
||||||
|
#include "../battle/effects.h"
|
||||||
|
|
||||||
|
#define MAX_SELECTABLE_PLAYERS 8
|
||||||
|
#define MAX_SELECTABLE_TARGETS 8
|
||||||
|
|
||||||
|
extern App app;
|
||||||
|
extern Battle battle;
|
||||||
|
extern Colors colors;
|
||||||
|
extern Dev dev;
|
||||||
|
extern Entity *player;
|
||||||
|
extern Entity *self;
|
||||||
|
extern Game game;
|
||||||
|
|
||||||
static void selectTarget(void);
|
static void selectTarget(void);
|
||||||
static void switchGuns(void);
|
static void switchGuns(void);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,39 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void loadPlayer(struct cJSON *node);
|
||||||
#include "../json/cJSON.h"
|
int playerHasGun(int type);
|
||||||
|
void setInitialPlayerAngle(void);
|
||||||
#define MAX_SELECTABLE_PLAYERS 8
|
void doPlayerSelect(void);
|
||||||
#define MAX_SELECTABLE_TARGETS 8
|
void doPlayer(void);
|
||||||
|
void initPlayer(void);
|
||||||
extern void addECMEffect(Entity *ent);
|
|
||||||
extern void addHudMessage(SDL_Color c, char *format, ...);
|
|
||||||
extern void applyFighterBrakes(void);
|
|
||||||
extern void applyFighterThrust(void);
|
|
||||||
extern void awardTrophy(char *id);
|
|
||||||
extern void clearControl(int type);
|
|
||||||
extern int collision(int x1, int y1, int w1, int h1, int x2, int y2, int w2, int h2);
|
|
||||||
extern void failMission(void);
|
|
||||||
extern void fireGuns(Entity *owner);
|
|
||||||
extern void fireMissile(Entity *owner);
|
|
||||||
extern void fireRocket(Entity *owner);
|
|
||||||
extern long flagsToLong(char *flags, int *add);
|
|
||||||
extern float getAngle(int x1, int y1, int x2, int y2);
|
|
||||||
extern int getDistance(int x1, int y1, int x2, int y2);
|
|
||||||
extern int isAcceptControl(void);
|
|
||||||
extern int isControl(int type);
|
|
||||||
extern long lookup(char *name);
|
|
||||||
extern float mod(float n, float x);
|
|
||||||
extern void playSound(int id);
|
|
||||||
extern void resetAcceptControls(void);
|
|
||||||
extern Entity *spawnFighter(char *name, int x, int y, int side);
|
|
||||||
extern void updateCondition(char *name, int type);
|
|
||||||
|
|
||||||
extern App app;
|
|
||||||
extern Battle battle;
|
|
||||||
extern Colors colors;
|
|
||||||
extern Dev dev;
|
|
||||||
extern Entity *player;
|
|
||||||
extern Entity *self;
|
|
||||||
extern Game game;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "quadtree.h"
|
#include "quadtree.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
|
||||||
|
#define QT_INITIAL_CAPACITY 8
|
||||||
|
#define QT_MAX_DEPTH 5
|
||||||
|
|
||||||
|
extern Battle battle;
|
||||||
|
|
||||||
static Entity **candidates;
|
static Entity **candidates;
|
||||||
static int cIndex;
|
static int cIndex;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,11 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void destroyQuadtree(void);
|
||||||
|
Entity **getAllEntsInRadius(int x, int y, int radius, Entity *ignore);
|
||||||
#define QT_INITIAL_CAPACITY 8
|
Entity **getAllEntsWithin(int x, int y, int w, int h, Entity *ignore);
|
||||||
#define QT_MAX_DEPTH 5
|
void removeFromQuadtree(Entity *e, Quadtree *root);
|
||||||
|
void addToQuadtree(Entity *e, Quadtree *root);
|
||||||
extern void *resize(void *array, int oldSize, int newSize);
|
void initQuadtree(Quadtree *root);
|
||||||
|
|
||||||
extern Battle battle;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "radar.h"
|
#include "radar.h"
|
||||||
|
#include "../system/text.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
|
||||||
|
extern App app;
|
||||||
|
extern Battle battle;
|
||||||
|
extern Colors colors;
|
||||||
|
extern Entity *player;
|
||||||
|
|
||||||
static AtlasImage *radarTexture;
|
static AtlasImage *radarTexture;
|
||||||
static AtlasImage *radarWarningTexture;
|
static AtlasImage *radarWarningTexture;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,15 +18,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void drawRadarRangeWarning(void);
|
||||||
|
void drawRadar(void);
|
||||||
extern void blit(AtlasImage *atlasImage, int x, int y, int center);
|
void initRadar(void);
|
||||||
extern void blitRotated(AtlasImage *atlasImage, int x, int y, float angle);
|
|
||||||
extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...);
|
|
||||||
extern AtlasImage *getAtlasImage(char *filename);
|
|
||||||
extern int getDistance(int x1, int y1, int x2, int y2);
|
|
||||||
|
|
||||||
extern App app;
|
|
||||||
extern Battle battle;
|
|
||||||
extern Colors colors;
|
|
||||||
extern Entity *player;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "rope.h"
|
#include "rope.h"
|
||||||
|
#include "../battle/hud.h"
|
||||||
|
#include "../battle/quadtree.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../battle/script.h"
|
||||||
|
|
||||||
|
#define ROPE_DISTANCE 128
|
||||||
|
|
||||||
|
extern App app;
|
||||||
|
extern Battle battle;
|
||||||
|
extern Colors colors;
|
||||||
|
extern Entity *player;
|
||||||
|
extern Entity *self;
|
||||||
|
|
||||||
void attachRope(void)
|
void attachRope(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,19 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void cutRope(Entity *e);
|
||||||
|
void drawRope(Entity *e);
|
||||||
#define ROPE_DISTANCE 128
|
void doRope(Entity *owner);
|
||||||
|
void attachRope(void);
|
||||||
extern void addHudMessage(SDL_Color c, char *format, ...);
|
|
||||||
extern Entity **getAllEntsInRadius(int x, int y, int radius, Entity *ignore);
|
|
||||||
extern float getAngle(int x1, int y1, int x2, int y2);
|
|
||||||
extern int getDistance(int x1, int y1, int x2, int y2);
|
|
||||||
extern void playBattleSound(int id, int x, int y);
|
|
||||||
extern void runScriptFunction(char *format, ...);
|
|
||||||
|
|
||||||
extern App app;
|
|
||||||
extern Battle battle;
|
|
||||||
extern Colors colors;
|
|
||||||
extern Entity *player;
|
|
||||||
extern Entity *self;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,10 +18,24 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "script.h"
|
#include "script.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "../battle/locations.h"
|
||||||
|
#include "../battle/fighters.h"
|
||||||
|
#include "../galaxy/mission.h"
|
||||||
|
#include "../battle/hud.h"
|
||||||
|
#include "../battle/objectives.h"
|
||||||
|
#include "../battle/spawners.h"
|
||||||
|
#include "../battle/waypoints.h"
|
||||||
|
#include "../battle/messageBox.h"
|
||||||
|
#include "../battle/entities.h"
|
||||||
|
#include "../battle/jumpgate.h"
|
||||||
|
|
||||||
|
extern Battle battle;
|
||||||
|
extern Colors colors;
|
||||||
|
|
||||||
static void executeNextLine(ScriptRunner *runner);
|
static void executeNextLine(ScriptRunner *runner);
|
||||||
void destroyScript(void);
|
|
||||||
|
|
||||||
static cJSON *scriptJSON, *rootJSON;
|
static cJSON *scriptJSON, *rootJSON;
|
||||||
static ScriptRunner head;
|
static ScriptRunner head;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,29 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void destroyScript(void);
|
||||||
|
void cancelScript(void);
|
||||||
#include "../json/cJSON.h"
|
void runScriptFunction(const char *format, ...);
|
||||||
|
void doScript(void);
|
||||||
extern void activateEntities(char *name);
|
void initScript(struct cJSON *root);
|
||||||
extern void activateEntityGroups(char *groupName);
|
|
||||||
extern void activateJumpgate(int activate);
|
|
||||||
extern void activateLocations(char *locations);
|
|
||||||
extern void activateNextWaypoint(void);
|
|
||||||
extern void activateObjectives(char *objectives);
|
|
||||||
extern void activateSpawner(char *name, int active);
|
|
||||||
extern void activateTrespasserSpawner(void);
|
|
||||||
extern void addHudMessage(SDL_Color c, char *format, ...);
|
|
||||||
extern void addMessageBox(char *title, char *body, int type);
|
|
||||||
extern void completeAllObjectives(void);
|
|
||||||
extern void completeMission(void);
|
|
||||||
extern void createChristabelLocation(void);
|
|
||||||
extern void failMission(void);
|
|
||||||
extern void killEntity(char *name);
|
|
||||||
extern void retreatAllies(void);
|
|
||||||
extern void retreatEnemies(void);
|
|
||||||
extern int showingMessageBoxes(void);
|
|
||||||
extern void updateEntitySide(char *side, char *entity);
|
|
||||||
|
|
||||||
extern Battle battle;
|
|
||||||
extern Colors colors;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "spawners.h"
|
#include "spawners.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "../battle/fighters.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
|
||||||
|
extern Battle battle;
|
||||||
|
extern Entity *player;
|
||||||
|
|
||||||
void doSpawners(void)
|
void doSpawners(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,16 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void loadSpawners(struct cJSON *node);
|
||||||
|
void activateTrespasserSpawner(void);
|
||||||
#include "../json/cJSON.h"
|
void activateSpawner(char *name, int active);
|
||||||
|
void doSpawners(void);
|
||||||
extern long flagsToLong(char *flags, int *add);
|
|
||||||
extern int getJSONValue(cJSON *node, char *name, int defValue);
|
|
||||||
extern char *getJSONValueStr(cJSON *node, char *name, char *defValue);
|
|
||||||
extern long lookup(char *name);
|
|
||||||
extern Entity *spawnFighter(char *name, int x, int y, int side);
|
|
||||||
extern char **toTypeArray(char *types, int *numTypes);
|
|
||||||
|
|
||||||
extern Battle battle;
|
|
||||||
extern Entity *player;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "starfield.h"
|
#include "starfield.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
|
||||||
|
extern App app;
|
||||||
|
|
||||||
static Star stars[MAX_STARS];
|
static Star stars[MAX_STARS];
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,8 +18,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void drawStars(void);
|
||||||
|
void doStars(float dx, float dy);
|
||||||
extern float mod(float n, float x);
|
void initStars(void);
|
||||||
|
|
||||||
extern App app;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,12 +18,25 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "waypoints.h"
|
#include "waypoints.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../battle/hud.h"
|
||||||
|
#include "../battle/objectives.h"
|
||||||
|
#include "../battle/script.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../battle/entities.h"
|
||||||
|
|
||||||
|
extern Battle battle;
|
||||||
|
extern Colors colors;
|
||||||
|
extern Entity *player;
|
||||||
|
extern Entity *self;
|
||||||
|
extern Game game;
|
||||||
|
|
||||||
static void think(void);
|
static void think(void);
|
||||||
static int teamMatesClose(void);
|
static int teamMatesClose(void);
|
||||||
static int isCurrentObjective(void);
|
static int isCurrentObjective(void);
|
||||||
void activateNextWaypoint(void);
|
|
||||||
|
|
||||||
static int waypointId;
|
static int waypointId;
|
||||||
static int currentWaypointId;
|
static int currentWaypointId;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,18 +18,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void activateNextWaypoint(void);
|
||||||
|
Entity *spawnWaypoint(void);
|
||||||
extern void addHudMessage(SDL_Color c, char *format, ...);
|
void resetWaypoints(void);
|
||||||
extern AtlasImage *getAtlasImage(char *filename);
|
|
||||||
extern int getDistance(int x1, int y1, int x2, int y2);
|
|
||||||
extern void playSound(int id);
|
|
||||||
extern void runScriptFunction(char *format, ...);
|
|
||||||
extern Entity *spawnEntity(void);
|
|
||||||
extern void updateObjective(char *name, int type);
|
|
||||||
|
|
||||||
extern Battle battle;
|
|
||||||
extern Colors colors;
|
|
||||||
extern Entity *player;
|
|
||||||
extern Entity *self;
|
|
||||||
extern Game game;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,13 +18,47 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "challengeHome.h"
|
#include "challengeHome.h"
|
||||||
|
#include "../battle/starfield.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../system/input.h"
|
||||||
|
#include "../game/title.h"
|
||||||
|
#include "../game/stats.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../system/widgets.h"
|
||||||
|
#include "../galaxy/mission.h"
|
||||||
|
#include "../game/trophies.h"
|
||||||
|
#include "../game/options.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../game/fighterDatabase.h"
|
||||||
|
#include "../system/transition.h"
|
||||||
|
#include "../challenges/challenges.h"
|
||||||
|
#include "../system/text.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
#include "../battle/battle.h"
|
||||||
|
#include "../system/resources.h"
|
||||||
|
#include "../system/textures.h"
|
||||||
|
|
||||||
|
#define CHALLENGES_PER_PAGE 14
|
||||||
|
#define SHOW_CHALLENGES 0
|
||||||
|
#define SHOW_FIGHTER_DB 5
|
||||||
|
#define SHOW_MENU 1
|
||||||
|
#define SHOW_OPTIONS 2
|
||||||
|
#define SHOW_STATS 3
|
||||||
|
#define SHOW_TROPHIES 4
|
||||||
|
|
||||||
|
extern App app;
|
||||||
|
extern Battle battle;
|
||||||
|
extern Colors colors;
|
||||||
|
extern Dev dev;
|
||||||
|
extern Game game;
|
||||||
|
|
||||||
static void logic(void);
|
static void logic(void);
|
||||||
static void draw(void);
|
static void draw(void);
|
||||||
static void handleKeyboard(void);
|
static void handleKeyboard(void);
|
||||||
static void drawChallenges(void);
|
static void drawChallenges(void);
|
||||||
static void doChallenges(void);
|
static void doChallengeList(void);
|
||||||
static void startChallengeMission(void);
|
static void startChallengeMission(void);
|
||||||
static void drawMenu(void);
|
static void drawMenu(void);
|
||||||
static void resume(void);
|
static void resume(void);
|
||||||
|
@ -209,7 +243,7 @@ static void logic(void)
|
||||||
switch (show)
|
switch (show)
|
||||||
{
|
{
|
||||||
case SHOW_CHALLENGES:
|
case SHOW_CHALLENGES:
|
||||||
doChallenges();
|
doChallengeList();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SHOW_MENU:
|
case SHOW_MENU:
|
||||||
|
@ -232,7 +266,7 @@ static void logic(void)
|
||||||
app.doTrophyAlerts = 1;
|
app.doTrophyAlerts = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void doChallenges(void)
|
static void doChallengeList(void)
|
||||||
{
|
{
|
||||||
Mission *c;
|
Mission *c;
|
||||||
int i, startIndex, end;
|
int i, startIndex, end;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,58 +18,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void initChallengeHome(void);
|
||||||
|
|
||||||
#define CHALLENGES_PER_PAGE 14
|
|
||||||
#define SHOW_CHALLENGES 0
|
|
||||||
#define SHOW_FIGHTER_DB 5
|
|
||||||
#define SHOW_MENU 1
|
|
||||||
#define SHOW_OPTIONS 2
|
|
||||||
#define SHOW_STATS 3
|
|
||||||
#define SHOW_TROPHIES 4
|
|
||||||
|
|
||||||
extern void autoSizeWidgetButtons(char *group, int recenter);
|
|
||||||
extern void awardChallengeTrophies(void);
|
|
||||||
extern void awardStatsTrophies(void);
|
|
||||||
extern void blit(AtlasImage *atlasImage, int x, int y, int centered);
|
|
||||||
extern void clearInput(void);
|
|
||||||
extern int collision(int x1, int y1, int w1, int h1, int x2, int y2, int w2, int h2);
|
|
||||||
extern void doFighterDatabase(void);
|
|
||||||
extern void doStars(float dx, float dy);
|
|
||||||
extern void doWidgets(void);
|
|
||||||
extern void drawBackground(SDL_Texture *texture);
|
|
||||||
extern void drawFighterDatabase(void);
|
|
||||||
extern void drawOptions(void);
|
|
||||||
extern void drawStars(void);
|
|
||||||
extern void drawStats(void);
|
|
||||||
extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...);
|
|
||||||
extern void drawTrophies(void);
|
|
||||||
extern void drawWidgets(char *groupName);
|
|
||||||
extern void endSectionTransition(void);
|
|
||||||
extern AtlasImage *getAtlasImage(const char *filename);
|
|
||||||
extern char *getBackgroundTextureName(int n);
|
|
||||||
extern char *getChallengeDescription(Challenge *c);
|
|
||||||
extern char *getPlanetTextureName(int n);
|
|
||||||
extern SDL_Texture *getTexture(char *filename);
|
|
||||||
extern Widget *getWidget(const char *name, const char *group);
|
|
||||||
extern void initBattle(void);
|
|
||||||
extern void initFighterDatabaseDisplay(void);
|
|
||||||
extern void initOptions(void (*returnFromOptions)(void));
|
|
||||||
extern void initStatsDisplay(void);
|
|
||||||
extern void initTitle(void);
|
|
||||||
extern void initTrophiesDisplay(void);
|
|
||||||
extern void loadMission(char *filename);
|
|
||||||
extern void playMusic(char *filename, int loop);
|
|
||||||
extern void playSound(int sound);
|
|
||||||
extern void scrollBackground(float x, float y);
|
|
||||||
extern void selectWidget(const char *name, const char *group);
|
|
||||||
extern void startSectionTransition(void);
|
|
||||||
extern void stopMusic(void);
|
|
||||||
extern char *timeToString(long millis, int showHours);
|
|
||||||
extern void updateAllMissions(void);
|
|
||||||
|
|
||||||
extern App app;
|
|
||||||
extern Battle battle;
|
|
||||||
extern Colors colors;
|
|
||||||
extern Dev dev;
|
|
||||||
extern Game game;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,22 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "challenges.h"
|
#include "challenges.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../battle/fighters.h"
|
||||||
|
#include "../system/widgets.h"
|
||||||
|
#include "../galaxy/mission.h"
|
||||||
|
#include "../game/trophies.h"
|
||||||
|
#include "../game/stats.h"
|
||||||
|
#include "../system/io.h"
|
||||||
|
|
||||||
|
extern Battle battle;
|
||||||
|
extern Dev dev;
|
||||||
|
extern Entity *player;
|
||||||
|
extern Game game;
|
||||||
|
|
||||||
static void updateTimeChallenge(Challenge *c);
|
static void updateTimeChallenge(Challenge *c);
|
||||||
static void updateSurvivalChallenge(Challenge *c);
|
static void updateSurvivalChallenge(Challenge *c);
|
||||||
|
@ -35,7 +50,6 @@ static void completeChallenge(void);
|
||||||
static void failChallenge(void);
|
static void failChallenge(void);
|
||||||
static int updateChallenges(void);
|
static int updateChallenges(void);
|
||||||
static char *getFormattedChallengeDescription(const char *format, ...);
|
static char *getFormattedChallengeDescription(const char *format, ...);
|
||||||
char *getChallengeDescription(Challenge *c);
|
|
||||||
static int challengeFinished(void);
|
static int challengeFinished(void);
|
||||||
static int alreadyPassed(void);
|
static int alreadyPassed(void);
|
||||||
static void printStats(void);
|
static void printStats(void);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,23 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void updateChallengeMissions(void);
|
||||||
#include "../json/cJSON.h"
|
Challenge *getChallenge(Mission *mission, int type, int value);
|
||||||
|
char *getChallengeDescription(Challenge *c);
|
||||||
extern void awardCraftTrophy(void);
|
void doChallenges(void);
|
||||||
extern void awardStatsTrophies(void);
|
void loadChallenge(Mission *mission, struct cJSON *node);
|
||||||
extern char **getFileList(char *dir, int *count);
|
void initChallenges(void);
|
||||||
extern int getJSONValue(cJSON *node, char *name, int defValue);
|
|
||||||
extern char *getLookupName(char *prefix, long num);
|
|
||||||
extern Mission *loadMissionMeta(char *filename);
|
|
||||||
extern long lookup(char *name);
|
|
||||||
extern void retreatAllies(void);
|
|
||||||
extern void retreatEnemies(void);
|
|
||||||
extern void selectWidget(const char *name, const char *group);
|
|
||||||
extern char *timeToString(long millis, int showHours);
|
|
||||||
extern void updateAccuracyStats(unsigned int *stats);
|
|
||||||
|
|
||||||
extern Battle battle;
|
|
||||||
extern Dev dev;
|
|
||||||
extern Entity *player;
|
|
||||||
extern Game game;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,40 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "galacticMap.h"
|
#include "galacticMap.h"
|
||||||
|
#include "../battle/starfield.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../system/input.h"
|
||||||
|
#include "../game/title.h"
|
||||||
|
#include "../game/stats.h"
|
||||||
|
#include "../system/widgets.h"
|
||||||
|
#include "../galaxy/mission.h"
|
||||||
|
#include "../game/trophies.h"
|
||||||
|
#include "../system/modalDialog.h"
|
||||||
|
#include "../game/options.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../game/fighterDatabase.h"
|
||||||
|
#include "../system/transition.h"
|
||||||
|
#include "../system/text.h"
|
||||||
|
#include "../galaxy/starSystems.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
#include "../battle/battle.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../system/textures.h"
|
||||||
|
|
||||||
|
#define MAX_LISTED_MISSIONS 9
|
||||||
|
#define SHOW_FIGHTER_DB 6
|
||||||
|
#define SHOW_GALAXY 0
|
||||||
|
#define SHOW_MENU 2
|
||||||
|
#define SHOW_OPTIONS 3
|
||||||
|
#define SHOW_STAR_SYSTEM 1
|
||||||
|
#define SHOW_STATS 4
|
||||||
|
#define SHOW_TROPHIES 5
|
||||||
|
|
||||||
|
extern App app;
|
||||||
|
extern Colors colors;
|
||||||
|
extern Game game;
|
||||||
|
|
||||||
static void logic(void);
|
static void logic(void);
|
||||||
static void draw(void);
|
static void draw(void);
|
||||||
|
@ -30,7 +63,6 @@ static void selectStarSystem(void);
|
||||||
static void drawGalaxy(void);
|
static void drawGalaxy(void);
|
||||||
static void centerOnSelectedStarSystem(void);
|
static void centerOnSelectedStarSystem(void);
|
||||||
static void doStarSystems(void);
|
static void doStarSystems(void);
|
||||||
void destroyGalacticMap(void);
|
|
||||||
static void drawPulses(void);
|
static void drawPulses(void);
|
||||||
static void drawInfoBars(void);
|
static void drawInfoBars(void);
|
||||||
static void doPulses(void);
|
static void doPulses(void);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,59 +18,5 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void destroyGalacticMap(void);
|
||||||
|
void initGalacticMap(void);
|
||||||
#define MAX_LISTED_MISSIONS 9
|
|
||||||
#define SHOW_FIGHTER_DB 6
|
|
||||||
#define SHOW_GALAXY 0
|
|
||||||
#define SHOW_MENU 2
|
|
||||||
#define SHOW_OPTIONS 3
|
|
||||||
#define SHOW_STAR_SYSTEM 1
|
|
||||||
#define SHOW_STATS 4
|
|
||||||
#define SHOW_TROPHIES 5
|
|
||||||
|
|
||||||
extern void autoSizeWidgetButtons(char *group, int recenter);
|
|
||||||
extern void awardCampaignTrophies(void);
|
|
||||||
extern void awardStatsTrophies(void);
|
|
||||||
extern void blit(AtlasImage *atlasImage, int x, int y, int centered);
|
|
||||||
extern void blitRotated(AtlasImage *atlasImage, int x, int y, float angle);
|
|
||||||
extern void clearInput(void);
|
|
||||||
extern int collision(int x1, int y1, int w1, int h1, int x2, int y2, int w2, int h2);
|
|
||||||
extern void doFighterDatabase(void);
|
|
||||||
extern void doStars(float dx, float dy);
|
|
||||||
extern void doWidgets(void);
|
|
||||||
extern void drawBackground(SDL_Texture *texture);
|
|
||||||
extern void drawCircle(int cx, int cy, int radius, int r, int g, int b, int a);
|
|
||||||
extern void drawFighterDatabase(void);
|
|
||||||
extern void drawOptions(void);
|
|
||||||
extern void drawStars(void);
|
|
||||||
extern void drawStats(void);
|
|
||||||
extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...);
|
|
||||||
extern void drawTrophies(void);
|
|
||||||
extern void drawWidgets(char *groupName);
|
|
||||||
extern void endSectionTransition(void);
|
|
||||||
extern AtlasImage *getAtlasImage(char *filename);
|
|
||||||
extern StarSystem *getStarSystem(char *name);
|
|
||||||
extern SDL_Texture *getTexture(char *filename);
|
|
||||||
extern Widget *getWidget(const char *name, const char *group);
|
|
||||||
extern void initBattle(void);
|
|
||||||
extern void initFighterDatabaseDisplay(void);
|
|
||||||
extern void initOptions(void (*returnFromOptions)(void));
|
|
||||||
extern void initStatsDisplay(void);
|
|
||||||
extern void initTitle(void);
|
|
||||||
extern void initTrophiesDisplay(void);
|
|
||||||
extern void loadMission(char *filename);
|
|
||||||
extern void playMusic(char *filename, int loop);
|
|
||||||
extern void playSound(int id);
|
|
||||||
extern void scrollBackground(float x, float y);
|
|
||||||
extern void selectWidget(const char *name, const char *group);
|
|
||||||
extern void setAtlasColor(int r, int g, int b, int a);
|
|
||||||
extern void setMouseCursor(int isDrag);
|
|
||||||
extern void showOKDialog(void (*callback)(void), const char *format, ...);
|
|
||||||
extern void startSectionTransition(void);
|
|
||||||
extern void stopMusic(void);
|
|
||||||
extern void updateAllMissions(void);
|
|
||||||
|
|
||||||
extern App app;
|
|
||||||
extern Colors colors;
|
|
||||||
extern Game game;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,10 +18,43 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "mission.h"
|
#include "mission.h"
|
||||||
|
#include <time.h>
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "../battle/locations.h"
|
||||||
|
#include "../system/widgets.h"
|
||||||
|
#include "../system/io.h"
|
||||||
|
#include "../galaxy/starSystems.h"
|
||||||
|
#include "../battle/jumpgate.h"
|
||||||
|
#include "../battle/missionInfo.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../battle/player.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../system/transition.h"
|
||||||
|
#include "../battle/objectives.h"
|
||||||
|
#include "../battle/script.h"
|
||||||
|
#include "../battle/waypoints.h"
|
||||||
|
#include "../battle/spawners.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
|
#include "../battle/mine.h"
|
||||||
|
#include "../challenges/challenges.h"
|
||||||
|
#include "../battle/fighters.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../system/resources.h"
|
||||||
|
#include "../battle/capitalShips.h"
|
||||||
|
#include "../game/trophies.h"
|
||||||
|
#include "../system/textures.h"
|
||||||
|
#include "../battle/items.h"
|
||||||
|
#include "../battle/entities.h"
|
||||||
|
|
||||||
|
extern App app;
|
||||||
|
extern Battle battle;
|
||||||
|
extern Dev dev;
|
||||||
|
extern Entity *player;
|
||||||
|
extern Game game;
|
||||||
|
|
||||||
static void loadEntities(cJSON *node);
|
static void loadEntities(cJSON *node);
|
||||||
static unsigned long hashcode(const char *str);
|
|
||||||
static void loadEpicData(cJSON *node);
|
static void loadEpicData(cJSON *node);
|
||||||
static char *getAutoBackground(char *filename);
|
static char *getAutoBackground(char *filename);
|
||||||
static char *getAutoPlanet(char *filename);
|
static char *getAutoPlanet(char *filename);
|
||||||
|
@ -496,20 +529,3 @@ int isMissionAvailable(Mission *mission, Mission *prev)
|
||||||
) || dev.debug;
|
) || dev.debug;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned long hashcode(const char *str)
|
|
||||||
{
|
|
||||||
unsigned long hash = 5381;
|
|
||||||
int c;
|
|
||||||
|
|
||||||
c = *str;
|
|
||||||
|
|
||||||
while (c)
|
|
||||||
{
|
|
||||||
hash = ((hash << 5) + hash) + c;
|
|
||||||
|
|
||||||
c = *str++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return hash;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,57 +18,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
int isMissionAvailable(Mission *mission, Mission *prev);
|
||||||
#include "../json/cJSON.h"
|
void updateAllMissions(void);
|
||||||
|
Mission *getMission(char *filename);
|
||||||
#include "time.h"
|
void failMission(void);
|
||||||
|
void completeMission(void);
|
||||||
extern void activateNextWaypoint(void);
|
void loadMission(char *filename);
|
||||||
extern void addAllToQuadtree(void);
|
Mission *loadMissionMeta(char *filename);
|
||||||
extern void addEpicKillsObjective(void);
|
|
||||||
extern void addEpicLivesObjective(void);
|
|
||||||
extern void awardCraftTrophy(void);
|
|
||||||
extern void awardPostMissionTrophies(void);
|
|
||||||
extern void awardStatsTrophies(void);
|
|
||||||
extern void completeConditions(void);
|
|
||||||
extern void countNumEnemies(void);
|
|
||||||
extern void endSectionTransition(void);
|
|
||||||
extern void failIncompleteObjectives(void);
|
|
||||||
extern long flagsToLong(char *flags, int *add);
|
|
||||||
extern AtlasImage *getAtlasImage(char *filename);
|
|
||||||
extern char *getBackgroundTextureName(unsigned long n);
|
|
||||||
extern int getJSONValue(cJSON *node, char *name, int defValue);
|
|
||||||
extern char *getJSONValueStr(cJSON *node, char *name, char *defValue);
|
|
||||||
extern char *getMusicFilename(unsigned long n);
|
|
||||||
extern char *getPlanetTextureName(unsigned long n);
|
|
||||||
extern SDL_Texture *getTexture(char *filename);
|
|
||||||
extern void initMissionInfo(void);
|
|
||||||
extern void initPlayer(void);
|
|
||||||
extern void initScript(cJSON *missionJSON);
|
|
||||||
extern void loadCapitalShips(cJSON *node);
|
|
||||||
extern void loadChallenge(Mission *mission, cJSON *node);
|
|
||||||
extern void loadFighters(cJSON *node);
|
|
||||||
extern void loadItems(cJSON *node);
|
|
||||||
extern void loadLocations(cJSON *node);
|
|
||||||
extern void loadObjectives(cJSON *node);
|
|
||||||
extern void loadPlayer(cJSON *node);
|
|
||||||
extern void loadSpawners(cJSON *node);
|
|
||||||
extern long lookup(char *name);
|
|
||||||
extern void playMusic(char *filename, int loop);
|
|
||||||
extern char *readFile(char *filename);
|
|
||||||
extern void retreatEnemies(void);
|
|
||||||
extern void selectWidget(const char *name, const char *group);
|
|
||||||
extern void setInitialPlayerAngle(void);
|
|
||||||
extern Entity *spawnJumpgate(int side, long flags);
|
|
||||||
extern Entity *spawnMine(int type);
|
|
||||||
extern Entity *spawnWaypoint(void);
|
|
||||||
extern void startSectionTransition(void);
|
|
||||||
extern void stopMusic(void);
|
|
||||||
extern void updateChallengeMissions(void);
|
|
||||||
extern void updateStarSystemMissions(void);
|
|
||||||
|
|
||||||
extern App app;
|
|
||||||
extern Battle battle;
|
|
||||||
extern Dev dev;
|
|
||||||
extern Entity *player;
|
|
||||||
extern Game game;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "starSystems.h"
|
#include "starSystems.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "../galaxy/mission.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../system/io.h"
|
||||||
|
|
||||||
|
extern Game game;
|
||||||
|
|
||||||
static void loadMissions(StarSystem *starSystem);
|
static void loadMissions(StarSystem *starSystem);
|
||||||
static StarSystem *loadStarSystem(cJSON *starSystemJSON);
|
static StarSystem *loadStarSystem(cJSON *starSystemJSON);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,15 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void destroyStarSystems(void);
|
||||||
|
void updateStarSystemMissions(void);
|
||||||
#include "../json/cJSON.h"
|
StarSystem *getStarSystem(char *name);
|
||||||
|
void initStarSystems(void);
|
||||||
extern char **getFileList(char *dir, int *count);
|
|
||||||
extern int getJSONValue(cJSON *node, char *name, int defValue);
|
|
||||||
extern int isMissionAvailable(Mission *mission, Mission *prev);
|
|
||||||
extern Mission *loadMissionMeta(char *filename);
|
|
||||||
extern long lookup(char *name);
|
|
||||||
extern char *readFile(char *filename);
|
|
||||||
|
|
||||||
extern Game game;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,13 +18,27 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "credits.h"
|
#include "credits.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
#include "../game/title.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../system/transition.h"
|
||||||
|
#include "../system/textures.h"
|
||||||
|
#include "../system/io.h"
|
||||||
|
#include "../system/text.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
|
||||||
|
#define CREDIT_LINE_LIMIT (UI_WIDTH - 300)
|
||||||
|
|
||||||
|
extern App app;
|
||||||
|
extern Colors colors;
|
||||||
|
|
||||||
static void loadCredits(void);
|
static void loadCredits(void);
|
||||||
static void logic(void);
|
static void logic(void);
|
||||||
static void draw(void);
|
static void draw(void);
|
||||||
static void handleKeyboard(void);
|
static void handleKeyboard(void);
|
||||||
void destroyCredits(void);
|
|
||||||
|
|
||||||
static SDL_Texture *background;
|
static SDL_Texture *background;
|
||||||
static AtlasImage *earthTexture;
|
static AtlasImage *earthTexture;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,23 +18,5 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void destroyCredits(void);
|
||||||
#include "../json/cJSON.h"
|
void initCredits(void);
|
||||||
|
|
||||||
#define CREDIT_LINE_LIMIT (UI_WIDTH - 300)
|
|
||||||
|
|
||||||
extern void blit(AtlasImage *atlasImage, int x, int y, int centered);
|
|
||||||
extern void drawBackground(SDL_Texture *texture);
|
|
||||||
extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...);
|
|
||||||
extern void endSectionTransition(void);
|
|
||||||
extern AtlasImage *getAtlasImage(const char *filename);
|
|
||||||
extern SDL_Texture *getTexture(const char *filename);
|
|
||||||
extern int getWrappedTextHeight(char *text, int size);
|
|
||||||
extern void initTitle(void);
|
|
||||||
extern void playMusic(char *filename, int loop);
|
|
||||||
extern char *readFile(char *filename);
|
|
||||||
extern void startSectionTransition(void);
|
|
||||||
extern void stopMusic(void);
|
|
||||||
|
|
||||||
extern App app;
|
|
||||||
extern Colors colors;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "fighterDatabase.h"
|
#include "fighterDatabase.h"
|
||||||
|
#include "../system/text.h"
|
||||||
|
#include "../battle/fighters.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
#include "../system/widgets.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
|
||||||
|
extern App app;
|
||||||
|
extern Colors colors;
|
||||||
|
extern Game game;
|
||||||
|
|
||||||
static void prevFighter(void);
|
static void prevFighter(void);
|
||||||
static void nextFighter(void);
|
static void nextFighter(void);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,15 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void drawFighterDatabase(void);
|
||||||
|
void doFighterDatabase(void);
|
||||||
extern void blitRotated(AtlasImage *atlasImage, int x, int y, float angle);
|
void initFighterDatabaseDisplay(void);
|
||||||
extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...);
|
void destroyFighterDatabase(void);
|
||||||
extern void drawWidgets(char *groupName);
|
void initFighterDatabase(void);
|
||||||
extern Entity **getDBFighters(int *num);
|
|
||||||
extern Widget *getWidget(const char *name, const char *group);
|
|
||||||
extern float mod(float n, float x);
|
|
||||||
|
|
||||||
extern App app;
|
|
||||||
extern Colors colors;
|
|
||||||
extern Game game;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,8 +18,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "game.h"
|
#include "game.h"
|
||||||
|
|
||||||
|
extern Game game;
|
||||||
|
|
||||||
void initGame(void)
|
void initGame(void)
|
||||||
{
|
{
|
||||||
memset(&game, 0, sizeof(Game));
|
memset(&game, 0, sizeof(Game));
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,6 +18,5 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void destroyGame(void);
|
||||||
|
void initGame(void);
|
||||||
extern Game game;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "load.h"
|
#include "load.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
|
#include "../challenges/challenges.h"
|
||||||
|
#include "../battle/fighters.h"
|
||||||
|
#include "../galaxy/mission.h"
|
||||||
|
#include "../game/trophies.h"
|
||||||
|
#include "../system/io.h"
|
||||||
|
#include "../galaxy/starSystems.h"
|
||||||
|
|
||||||
|
extern Game game;
|
||||||
|
|
||||||
static void loadStats(cJSON *statsJSON);
|
static void loadStats(cJSON *statsJSON);
|
||||||
static void loadStarSystems(cJSON *starSystemsJSON);
|
static void loadStarSystems(cJSON *starSystemsJSON);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,18 +18,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void loadGame(void);
|
||||||
|
|
||||||
#include "../json/cJSON.h"
|
|
||||||
|
|
||||||
extern void destroyFighterStats(void);
|
|
||||||
extern Challenge *getChallenge(Mission *mission, int type, int value);
|
|
||||||
extern char *getLookupName(char *prefix, long num);
|
|
||||||
extern Mission *getMission(char *filename);
|
|
||||||
extern char *getSaveFilePath(char *filename);
|
|
||||||
extern StarSystem *getStarSystem(char *name);
|
|
||||||
extern Trophy *getTrophy(char *id);
|
|
||||||
extern int lookup(char *lookup);
|
|
||||||
extern char *readFile(char *filename);
|
|
||||||
|
|
||||||
extern Game game;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
|
#include <SDL2/SDL_mixer.h>
|
||||||
|
#include "../battle/starfield.h"
|
||||||
|
#include "../system/controls.h"
|
||||||
|
#include "../system/widgets.h"
|
||||||
|
#include "../system/init.h"
|
||||||
|
#include "../system/text.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
|
||||||
|
#define SHOW_CONTROLS 1
|
||||||
|
#define SHOW_MAIN 0
|
||||||
|
|
||||||
|
extern App app;
|
||||||
|
extern Colors colors;
|
||||||
|
|
||||||
static void changeWindowSize(char *value);
|
static void changeWindowSize(char *value);
|
||||||
static void changeSoundVolume(char *value);
|
static void changeSoundVolume(char *value);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,23 +18,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void updateCustomResolutionOption(void);
|
||||||
|
void drawOptions(void);
|
||||||
#include "SDL2/SDL_mixer.h"
|
void initOptions(void (*rtn)(void));
|
||||||
|
|
||||||
#define SHOW_CONTROLS 1
|
|
||||||
#define SHOW_MAIN 0
|
|
||||||
|
|
||||||
extern void drawControls(void);
|
|
||||||
extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...);
|
|
||||||
extern void drawWidgets(char *groupName);
|
|
||||||
extern Widget *getWidget(const char *name, const char *group);
|
|
||||||
extern void initControlsDisplay(void);
|
|
||||||
extern void initGraphics(void);
|
|
||||||
extern void initStars(void);
|
|
||||||
extern void saveConfig(void);
|
|
||||||
extern void selectWidget(const char *name, const char *group);
|
|
||||||
extern void setWidgetOption(const char *name, const char *group, const char *value);
|
|
||||||
|
|
||||||
extern App app;
|
|
||||||
extern Colors colors;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "save.h"
|
#include "save.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
|
#include "../system/io.h"
|
||||||
|
|
||||||
|
extern Game game;
|
||||||
|
|
||||||
static void saveStarSystems(cJSON *gameJSON);
|
static void saveStarSystems(cJSON *gameJSON);
|
||||||
static void saveChallenges(cJSON *gameJSON);
|
static void saveChallenges(cJSON *gameJSON);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,12 +18,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void saveGame(void);
|
||||||
|
|
||||||
#include "../json/cJSON.h"
|
|
||||||
|
|
||||||
extern char *getLookupName(char *prefix, long num);
|
|
||||||
extern char *getSaveFilePath(char *filename);
|
|
||||||
extern int writeFile(char *filename, char *data);
|
|
||||||
|
|
||||||
extern Game game;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,12 +18,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "stats.h"
|
#include "stats.h"
|
||||||
|
#include "../system/text.h"
|
||||||
|
#include "../system/widgets.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
|
||||||
|
#define STATS_PER_PAGE 9
|
||||||
|
|
||||||
|
extern App app;
|
||||||
|
extern Colors colors;
|
||||||
|
extern Game game;
|
||||||
|
|
||||||
static void prevPage(void);
|
static void prevPage(void);
|
||||||
static void nextPage(void);
|
static void nextPage(void);
|
||||||
static void calculatePercentComplete(void);
|
static void calculatePercentComplete(void);
|
||||||
void updateAccuracyStats(unsigned int *stats);
|
|
||||||
|
|
||||||
static char *statDescription[STAT_MAX];
|
static char *statDescription[STAT_MAX];
|
||||||
static int page;
|
static int page;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,16 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void updateAccuracyStats(unsigned int *stats);
|
||||||
|
void drawStats(void);
|
||||||
#define STATS_PER_PAGE 9
|
void initStatsDisplay(void);
|
||||||
|
void initStats(void);
|
||||||
extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...);
|
|
||||||
extern void drawWidgets(char *groupName);
|
|
||||||
extern int getPercent(float current, float total);
|
|
||||||
extern Widget *getWidget(const char *name, const char *group);
|
|
||||||
extern char *timeToString(long millis, int showHours);
|
|
||||||
|
|
||||||
extern App app;
|
|
||||||
extern Colors colors;
|
|
||||||
extern Game game;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,40 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "title.h"
|
#include "title.h"
|
||||||
|
#include "../galaxy/mission.h"
|
||||||
|
#include "../system/transition.h"
|
||||||
|
#include "../battle/starfield.h"
|
||||||
|
#include "../game/credits.h"
|
||||||
|
#include "../system/input.h"
|
||||||
|
#include "../game/stats.h"
|
||||||
|
#include "../system/widgets.h"
|
||||||
|
#include "../challenges/challengeHome.h"
|
||||||
|
#include "../battle/battle.h"
|
||||||
|
#include "../galaxy/galacticMap.h"
|
||||||
|
#include "../game/options.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../game/fighterDatabase.h"
|
||||||
|
#include "../game/trophies.h"
|
||||||
|
#include "../battle/effects.h"
|
||||||
|
#include "../system/text.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../system/textures.h"
|
||||||
|
|
||||||
|
#define NUM_FIGHTERS 12
|
||||||
|
#define SHOW_FIGHTER_DB 4
|
||||||
|
#define SHOW_OPTIONS 2
|
||||||
|
#define SHOW_STATS 1
|
||||||
|
#define SHOW_TITLE 0
|
||||||
|
#define SHOW_TROPHIES 3
|
||||||
|
|
||||||
|
extern App app;
|
||||||
|
extern Battle battle;
|
||||||
|
extern Colors colors;
|
||||||
|
extern Entity *self;
|
||||||
|
extern Game game;
|
||||||
|
|
||||||
static void logic(void);
|
static void logic(void);
|
||||||
static void draw(void);
|
static void draw(void);
|
||||||
|
@ -195,7 +228,7 @@ static void draw(void)
|
||||||
|
|
||||||
blit(pandoranWar, app.winWidth / 2, 110, 1);
|
blit(pandoranWar, app.winWidth / 2, 110, 1);
|
||||||
|
|
||||||
drawText(10, app.winHeight - 25, 14, TA_LEFT, colors.white, "Copyright Parallel Realities, 2015-2019");
|
drawText(10, app.winHeight - 25, 14, TA_LEFT, colors.white, "Copyright,2022 Parallel Realities, 2015-2019,2022");
|
||||||
drawText(app.winWidth - 10, app.winHeight - 25, 14, TA_RIGHT, colors.white, "Version %.2f.%d", VERSION, REVISION);
|
drawText(app.winWidth - 10, app.winHeight - 25, 14, TA_RIGHT, colors.white, "Version %.2f.%d", VERSION, REVISION);
|
||||||
|
|
||||||
switch (show)
|
switch (show)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,56 +18,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void initTitle(void);
|
||||||
|
|
||||||
#define NUM_FIGHTERS 12
|
|
||||||
#define SHOW_FIGHTER_DB 4
|
|
||||||
#define SHOW_OPTIONS 2
|
|
||||||
#define SHOW_STATS 1
|
|
||||||
#define SHOW_TITLE 0
|
|
||||||
#define SHOW_TROPHIES 3
|
|
||||||
|
|
||||||
extern void addEngineEffect(void);
|
|
||||||
extern void autoSizeWidgetButtons(char *group, int recenter);
|
|
||||||
extern void blit(AtlasImage *atlasImage, int x, int y, int centered);
|
|
||||||
extern void clearInput(void);
|
|
||||||
extern void destroyBattle(void);
|
|
||||||
extern void doEffects(void);
|
|
||||||
extern void doFighterDatabase(void);
|
|
||||||
extern void doStars(float dx, float dy);
|
|
||||||
extern void doWidgets(void);
|
|
||||||
extern void drawBackground(SDL_Texture *texture);
|
|
||||||
extern void drawEffects(void);
|
|
||||||
extern void drawFighterDatabase(void);
|
|
||||||
extern void drawOptions(void);
|
|
||||||
extern void drawStars(void);
|
|
||||||
extern void drawStats(void);
|
|
||||||
extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...);
|
|
||||||
extern void drawTrophies(void);
|
|
||||||
extern void drawWidgets(char *groupName);
|
|
||||||
extern void endSectionTransition(void);
|
|
||||||
extern AtlasImage *getAtlasImage(const char *filename);
|
|
||||||
extern SDL_Texture *getTexture(const char *filename);
|
|
||||||
extern Widget *getWidget(const char *name, const char *group);
|
|
||||||
extern void initChallengeHome(void);
|
|
||||||
extern void initCredits(void);
|
|
||||||
extern void initEffects(void);
|
|
||||||
extern void initFighterDatabaseDisplay(void);
|
|
||||||
extern void initGalacticMap(void);
|
|
||||||
extern void initOptions(void (*returnFromOptions)(void));
|
|
||||||
extern void initStatsDisplay(void);
|
|
||||||
extern void initTrophiesDisplay(void);
|
|
||||||
extern void playMusic(char *filename, int loop);
|
|
||||||
extern void playSound(int id);
|
|
||||||
extern void scrollBackground(float x, float y);
|
|
||||||
extern void selectWidget(const char *name, const char *group);
|
|
||||||
extern void setAtlasColor(int r, int g, int b, int a);
|
|
||||||
extern void startSectionTransition(void);
|
|
||||||
extern void stopMusic(void);
|
|
||||||
extern void updateAllMissions(void);
|
|
||||||
|
|
||||||
extern App app;
|
|
||||||
extern Battle battle;
|
|
||||||
extern Colors colors;
|
|
||||||
extern Entity *self;
|
|
||||||
extern Game game;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,27 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "trophies.h"
|
#include "trophies.h"
|
||||||
|
#include <time.h>
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../system/widgets.h"
|
||||||
|
#include "../system/io.h"
|
||||||
|
#include "../system/text.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../battle/entities.h"
|
||||||
|
|
||||||
|
#define TROPHIES_PER_PAGE 4
|
||||||
|
|
||||||
|
extern App app;
|
||||||
|
extern Battle battle;
|
||||||
|
extern Colors colors;
|
||||||
|
extern Entity *player;
|
||||||
|
extern Game game;
|
||||||
|
|
||||||
static void prevPage(void);
|
static void prevPage(void);
|
||||||
static void nextPage(void);
|
static void nextPage(void);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,34 +18,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
void awardCraftTrophy(void);
|
||||||
#include "../common.h"
|
void awardPostMissionTrophies(void);
|
||||||
#include "../json/cJSON.h"
|
void awardChallengeTrophies(void);
|
||||||
|
void awardCampaignTrophies(void);
|
||||||
#include "time.h"
|
void awardStatsTrophies(void);
|
||||||
|
Trophy *getTrophy(char *id);
|
||||||
#define TROPHIES_PER_PAGE 4
|
void drawTrophyAlert(void);
|
||||||
|
void doTrophyAlerts(void);
|
||||||
extern void awardPandoranCraftTrophy(void);
|
void awardTrophy(char *id);
|
||||||
extern void blit(AtlasImage *atlasImage, int x, int y, int centered);
|
void drawTrophies(void);
|
||||||
extern void blitRotated(AtlasImage *atlasImage, int x, int y, float angle);
|
void initTrophiesDisplay(void);
|
||||||
extern void blitScaled(AtlasImage *atlasImage, int x, int y, int w, int h, int center);
|
void initTrophies(void);
|
||||||
extern void calcTextDimensions(char *text, int size, int *w, int *h);
|
|
||||||
extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...);
|
|
||||||
extern void drawWidgets(char *groupName);
|
|
||||||
extern AtlasImage *getAtlasImage(char *filename);
|
|
||||||
extern int getJSONValue(cJSON *node, char *name, int defValue);
|
|
||||||
extern int getPercent(float current, float total);
|
|
||||||
extern Widget *getWidget(const char *name, const char *group);
|
|
||||||
extern long lookup(char *name);
|
|
||||||
extern float mod(float n, float x);
|
|
||||||
extern void playSound(int id);
|
|
||||||
extern char *readFile(char *filename);
|
|
||||||
extern void setAtlasColor(int r, int g, int b, int a);
|
|
||||||
extern char *timeToDate(long millis);
|
|
||||||
|
|
||||||
extern App app;
|
|
||||||
extern Battle battle;
|
|
||||||
extern Colors colors;
|
|
||||||
extern Entity *player;
|
|
||||||
extern Game game;
|
|
||||||
|
|
|
@ -62,7 +62,6 @@ typedef struct cJSON_Hooks {
|
||||||
/* Supply malloc, realloc and free functions to cJSON */
|
/* Supply malloc, realloc and free functions to cJSON */
|
||||||
extern void cJSON_InitHooks(cJSON_Hooks* hooks);
|
extern void cJSON_InitHooks(cJSON_Hooks* hooks);
|
||||||
|
|
||||||
|
|
||||||
/* Supply a block of JSON, and this returns a cJSON object you can interrogate. Call cJSON_Delete when finished. */
|
/* Supply a block of JSON, and this returns a cJSON object you can interrogate. Call cJSON_Delete when finished. */
|
||||||
extern cJSON *cJSON_Parse(const char *value);
|
extern cJSON *cJSON_Parse(const char *value);
|
||||||
/* Render a cJSON entity to text for transfer/storage. Free the char* when finished. */
|
/* Render a cJSON entity to text for transfer/storage. Free the char* when finished. */
|
||||||
|
|
27
src/main.c
27
src/main.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,32 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
#include <time.h>
|
||||||
|
#include "game/load.h"
|
||||||
|
#include "system/lookup.h"
|
||||||
|
#include "system/draw.h"
|
||||||
|
#include "game/credits.h"
|
||||||
|
#include "system/input.h"
|
||||||
|
#include "system/controls.h"
|
||||||
|
#include "game/title.h"
|
||||||
|
#include "game/trophies.h"
|
||||||
|
#include "system/modalDialog.h"
|
||||||
|
#include "test/testMission.h"
|
||||||
|
#include "game/save.h"
|
||||||
|
#include "system/io.h"
|
||||||
|
#include "system/dev.h"
|
||||||
|
#include "system/init.h"
|
||||||
|
#include "plat/win32/win32Init.h"
|
||||||
|
|
||||||
|
App app;
|
||||||
|
Battle battle;
|
||||||
|
Colors colors;
|
||||||
|
Dev dev;
|
||||||
|
Entity *player;
|
||||||
|
Entity *self;
|
||||||
|
Game game;
|
||||||
|
|
||||||
static void handleMissionArgs(int argc, char *argv[]);
|
static void handleMissionArgs(int argc, char *argv[]);
|
||||||
static void handleLoggingArgs(int argc, char *argv[]);
|
static void handleLoggingArgs(int argc, char *argv[]);
|
||||||
|
|
41
src/main.h
41
src/main.h
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,41 +18,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "SDL2/SDL.h"
|
int main(int argc, char *argv[]);
|
||||||
#include "time.h"
|
|
||||||
|
|
||||||
#include "defs.h"
|
|
||||||
#include "structs.h"
|
|
||||||
|
|
||||||
extern void cleanup(void);
|
|
||||||
extern void clearControl(int type);
|
|
||||||
extern void createScreenshotFolder(void);
|
|
||||||
extern void doDevKeys(void);
|
|
||||||
extern void doInput(void);
|
|
||||||
extern void doModalDialog(void);
|
|
||||||
extern void doTrophyAlerts(void);
|
|
||||||
extern void drawModalDialog(void);
|
|
||||||
extern void drawTrophyAlert(void);
|
|
||||||
extern int fileExists(char *filename);
|
|
||||||
extern char *getSaveFilePath(char *filename);
|
|
||||||
extern void init18N(int argc, char *argv[]);
|
|
||||||
extern void initCredits(void);
|
|
||||||
extern void initGameSystem(void);
|
|
||||||
extern void initLookups(void);
|
|
||||||
extern void initSDL(int argc, char *argv[]);
|
|
||||||
extern void initTitle(void);
|
|
||||||
extern int isControl(int type);
|
|
||||||
extern void loadGame(void);
|
|
||||||
extern void loadTestMission(char *filename);
|
|
||||||
extern void prepareScene(void);
|
|
||||||
extern void presentScene(void);
|
|
||||||
extern void saveGame(void);
|
|
||||||
extern void saveScreenshot(void);
|
|
||||||
|
|
||||||
App app;
|
|
||||||
Battle battle;
|
|
||||||
Colors colors;
|
|
||||||
Dev dev;
|
|
||||||
Entity *player;
|
|
||||||
Entity *self;
|
|
||||||
Game game;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../../common.h"
|
||||||
#include "unixInit.h"
|
#include "unixInit.h"
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <pwd.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
extern App app;
|
||||||
|
extern Dev dev;
|
||||||
|
|
||||||
void createSaveFolder(void)
|
void createSaveFolder(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,12 +18,5 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/stat.h>
|
void createScreenshotFolder(void);
|
||||||
#include <pwd.h>
|
void createSaveFolder(void);
|
||||||
#include <unistd.h>
|
|
||||||
#include <errno.h>
|
|
||||||
|
|
||||||
#include "../../common.h"
|
|
||||||
|
|
||||||
extern App app;
|
|
||||||
extern Dev dev;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../../common.h"
|
||||||
#include "win32Init.h"
|
#include "win32Init.h"
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
extern App app;
|
||||||
|
extern Dev dev;
|
||||||
|
|
||||||
void createSaveFolder(void)
|
void createSaveFolder(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,11 +18,5 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/stat.h>
|
void createScreenshotFolder(void);
|
||||||
#include <unistd.h>
|
void createSaveFolder(void);
|
||||||
#include <errno.h>
|
|
||||||
|
|
||||||
#include "../../common.h"
|
|
||||||
|
|
||||||
extern App app;
|
|
||||||
extern Dev dev;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2018-2019 Parallel Realities
|
Copyright (C) 2018-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "atlas.h"
|
#include "atlas.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "../system/io.h"
|
||||||
|
#include "../system/textures.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
|
||||||
static void loadAtlasData(void);
|
static void loadAtlasData(void);
|
||||||
|
|
||||||
|
@ -40,7 +45,7 @@ void setAtlasColor(int r, int g, int b, int a)
|
||||||
SDL_SetTextureAlphaMod(atlasTexture, a);
|
SDL_SetTextureAlphaMod(atlasTexture, a);
|
||||||
}
|
}
|
||||||
|
|
||||||
AtlasImage *getAtlasImage(char *filename)
|
AtlasImage *getAtlasImage(const char *filename)
|
||||||
{
|
{
|
||||||
AtlasImage *a;
|
AtlasImage *a;
|
||||||
unsigned long i;
|
unsigned long i;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2018-2019 Parallel Realities
|
Copyright (C) 2018-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,10 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
char **getAtlasFileList(char *dir, int *count);
|
||||||
#include "../json/cJSON.h"
|
AtlasImage *getAtlasImage(const char *filename);
|
||||||
|
void setAtlasColor(int r, int g, int b, int a);
|
||||||
extern SDL_Texture *getTexture(const char *filename);
|
void initAtlas(void);
|
||||||
extern unsigned long hashcode(const char *str);
|
|
||||||
extern char *readFile(const char *filename);
|
|
||||||
extern int stringComparator(const void *a, const void *b);
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "controls.h"
|
#include "controls.h"
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include "../system/text.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
|
#include "../system/widgets.h"
|
||||||
|
#include "../system/io.h"
|
||||||
|
|
||||||
|
extern App app;
|
||||||
|
extern Colors colors;
|
||||||
|
|
||||||
static void restoreDefaults(void);
|
static void restoreDefaults(void);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,15 +18,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void drawControls(void);
|
||||||
#include "../json/cJSON.h"
|
void clearControlConfig(char *name);
|
||||||
|
void updateControlButton(char *name);
|
||||||
extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...);
|
void updateControlKey(char *name);
|
||||||
extern void drawWidgets(char *groupName);
|
void resetAcceptControls(void);
|
||||||
extern char *getLookupName(char *prefix, long num);
|
void clearControl(int type);
|
||||||
extern Widget *getWidget(const char *name, const char *group);
|
int isAcceptControl(void);
|
||||||
extern long lookup(char *name);
|
int isControl(int type);
|
||||||
extern char *readFile(char *filename);
|
void initControlsDisplay(void);
|
||||||
|
void initControls(void);
|
||||||
extern App app;
|
|
||||||
extern Colors colors;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "dev.h"
|
#include "dev.h"
|
||||||
|
#include "../galaxy/mission.h"
|
||||||
|
|
||||||
|
extern App app;
|
||||||
|
extern Battle battle;
|
||||||
|
extern Dev dev;
|
||||||
|
|
||||||
void doDevKeys(void)
|
void doDevKeys(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,10 +18,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void doDevKeys(void);
|
||||||
|
|
||||||
extern void completeMission(void);
|
|
||||||
|
|
||||||
extern App app;
|
|
||||||
extern Battle battle;
|
|
||||||
extern Dev dev;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "draw.h"
|
#include "draw.h"
|
||||||
|
#include "../system/text.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../system/input.h"
|
||||||
|
|
||||||
|
extern App app;
|
||||||
|
extern Battle battle;
|
||||||
|
extern Colors colors;
|
||||||
|
extern Dev dev;
|
||||||
|
|
||||||
static void initColor(SDL_Color *c, int r, int g, int b);
|
static void initColor(SDL_Color *c, int r, int g, int b);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,13 +18,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void saveScreenshot(void);
|
||||||
|
int isOnBattleScreen(int x, int y, int w, int h);
|
||||||
extern int collision(int x1, int y1, int w1, int h1, int x2, int y2, int w2, int h2);
|
void drawBackground(SDL_Texture *texture);
|
||||||
extern void drawMouse(void);
|
void scrollBackground(float x, float y);
|
||||||
extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...);
|
void drawCircle(int cx, int cy, int radius, int r, int g, int b, int a);
|
||||||
|
void blitRotated(AtlasImage *atlasImage, int x, int y, float angle);
|
||||||
extern App app;
|
void blitScaled(AtlasImage *atlasImage, int x, int y, int w, int h, int center);
|
||||||
extern Battle battle;
|
void blit(AtlasImage *atlasImage, int x, int y, int center);
|
||||||
extern Colors colors;
|
void presentScene(void);
|
||||||
extern Dev dev;
|
void prepareScene(void);
|
||||||
|
void initGraphics(void);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2009-2016 Parallel Realities
|
Copyright (C) 2009-2016,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,11 +17,15 @@ along with this program; if not, write to the Free Software
|
||||||
Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
|
Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "i18n.h"
|
#include "i18n.h"
|
||||||
|
#include "../system/io.h"
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define TABLE_SIZE 255
|
||||||
|
|
||||||
char *getTranslatedString(char *);
|
|
||||||
void setLanguage(char *, char *);
|
|
||||||
void cleanupLanguage(void);
|
|
||||||
static int hashCode(char *);
|
static int hashCode(char *);
|
||||||
static void put(char *, char *);
|
static void put(char *, char *);
|
||||||
static void initTable(void);
|
static void initTable(void);
|
||||||
|
@ -363,7 +367,7 @@ char *getTranslatedString(char *key)
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cleanupLanguage()
|
void cleanupLanguage(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
Bucket *bucket, *p, *q;
|
Bucket *bucket, *p, *q;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2009-2016 Parallel Realities
|
Copyright (C) 2009-2016,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,15 +17,6 @@ along with this program; if not, write to the Free Software
|
||||||
Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
|
Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#include <windows.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define TABLE_SIZE 255
|
|
||||||
|
|
||||||
char *getTranslatedString(char *);
|
|
||||||
void setLanguage(char *, char *);
|
|
||||||
void cleanupLanguage(void);
|
void cleanupLanguage(void);
|
||||||
extern int fileExists(char *filename);
|
char *getTranslatedString(char *key);
|
||||||
|
void setLanguage(char *applicationName, char *languageCode);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,11 +18,48 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "init.h"
|
#include "init.h"
|
||||||
|
#include <SDL2/SDL_image.h>
|
||||||
|
#include "../json/cJSON.h"
|
||||||
|
#include <SDL2/SDL_mixer.h>
|
||||||
|
#include <SDL2/SDL_ttf.h>
|
||||||
|
#include "../game/credits.h"
|
||||||
|
#include "../system/widgets.h"
|
||||||
|
#include "../battle/bullets.h"
|
||||||
|
#include "../system/modalDialog.h"
|
||||||
|
#include "../system/io.h"
|
||||||
|
#include "../galaxy/starSystems.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
#include "../battle/starfield.h"
|
||||||
|
#include "../system/util.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
#include "../system/lookup.h"
|
||||||
|
#include "../challenges/challenges.h"
|
||||||
|
#include "../system/controls.h"
|
||||||
|
#include "../battle/fighters.h"
|
||||||
|
#include "../game/game.h"
|
||||||
|
#include "../battle/battle.h"
|
||||||
|
#include "../game/options.h"
|
||||||
|
#include "../system/text.h"
|
||||||
|
#include "../system/i18n.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../system/resources.h"
|
||||||
|
#include "../battle/capitalShips.h"
|
||||||
|
#include "../system/input.h"
|
||||||
|
#include "../game/stats.h"
|
||||||
|
#include "../galaxy/galacticMap.h"
|
||||||
|
#include "../game/trophies.h"
|
||||||
|
#include "../game/fighterDatabase.h"
|
||||||
|
#include "../system/textures.h"
|
||||||
|
#include "../battle/items.h"
|
||||||
|
#include "../plat/win32/win32Init.h"
|
||||||
|
#include "locale.h"
|
||||||
|
|
||||||
|
extern App app;
|
||||||
|
|
||||||
static void loadConfig(int argc, char *argv[]);
|
static void loadConfig(int argc, char *argv[]);
|
||||||
static void loadConfigFile(char *filename);
|
static void loadConfigFile(char *filename);
|
||||||
void saveConfig(void);
|
|
||||||
static void showLoadingStep(float step, float maxSteps);
|
static void showLoadingStep(float step, float maxSteps);
|
||||||
static void handleCommandLineConfig(int argc, char *argv[]);
|
static void handleCommandLineConfig(int argc, char *argv[]);
|
||||||
|
|
||||||
|
@ -88,7 +125,7 @@ void initSDL(int argc, char *argv[])
|
||||||
|
|
||||||
if (Mix_OpenAudio(AUDIO_FREQUENCY, MIX_DEFAULT_FORMAT, AUDIO_CHANNELS, AUDIO_CHUNKSIZE) == -1)
|
if (Mix_OpenAudio(AUDIO_FREQUENCY, MIX_DEFAULT_FORMAT, AUDIO_CHANNELS, AUDIO_CHUNKSIZE) == -1)
|
||||||
{
|
{
|
||||||
printf("Couldn't initialize SDL Mixer\n");
|
printf("Couldn't initialize SDL Mixer\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,63 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void cleanup(void);
|
||||||
|
void saveConfig(void);
|
||||||
#include "../json/cJSON.h"
|
void initGameSystem(void);
|
||||||
|
void initSDL(int argc, char *argv[]);
|
||||||
#include "locale.h"
|
void init18N(int argc, char *argv[]);
|
||||||
|
|
||||||
#include "SDL2/SDL_image.h"
|
|
||||||
#include "SDL2/SDL_mixer.h"
|
|
||||||
#include "SDL2/SDL_ttf.h"
|
|
||||||
|
|
||||||
extern void createSaveFolder(void);
|
|
||||||
extern void destroyBattle(void);
|
|
||||||
extern void destroyBulletDefs(void);
|
|
||||||
extern void destroyCapitalShipDefs(void);
|
|
||||||
extern void destroyCredits(void);
|
|
||||||
extern void destroyFighterDatabase(void);
|
|
||||||
extern void destroyFighterDefs(void);
|
|
||||||
extern void destroyFighterStats(void);
|
|
||||||
extern void destroyGalacticMap(void);
|
|
||||||
extern void destroyGame(void);
|
|
||||||
extern void destroyItemDefs(void);
|
|
||||||
extern void destroyLookups(void);
|
|
||||||
extern void destroyResources(void);
|
|
||||||
extern void destroySounds(void);
|
|
||||||
extern void destroyStarSystems(void);
|
|
||||||
extern void destroyTextures(void);
|
|
||||||
extern void destroyWidgets(void);
|
|
||||||
extern int fileExists(char *filename);
|
|
||||||
extern int getJSONValue(cJSON *node, char *name, int defValue);
|
|
||||||
extern char *getLookupName(char *prefix, long num);
|
|
||||||
extern char *getSaveFilePath(char *filename);
|
|
||||||
extern void initAtlas(void);
|
|
||||||
extern void initBulletDefs(void);
|
|
||||||
extern void initChallenges(void);
|
|
||||||
extern void initControls(void);
|
|
||||||
extern void initFighterDatabase(void);
|
|
||||||
extern void initFonts(void);
|
|
||||||
extern void initGame(void);
|
|
||||||
extern void initGraphics(void);
|
|
||||||
extern void initInput(void);
|
|
||||||
extern void initModalDialog(void);
|
|
||||||
extern void initResources(void);
|
|
||||||
extern void initSounds(void);
|
|
||||||
extern void initStarSystems(void);
|
|
||||||
extern void initStars(void);
|
|
||||||
extern void initStats(void);
|
|
||||||
extern void initTrophies(void);
|
|
||||||
extern void initWidgets(void);
|
|
||||||
extern void loadCapitalShipDefs(void);
|
|
||||||
extern void loadFighterDefs(void);
|
|
||||||
extern void loadItemDefs(void);
|
|
||||||
extern long lookup(char *name);
|
|
||||||
extern void prepareScene(void);
|
|
||||||
extern void presentScene(void);
|
|
||||||
extern char *readFile(char *filename);
|
|
||||||
extern void setLanguage(char *applicationName, char *languageCode);
|
|
||||||
extern void updateCustomResolutionOption(void);
|
|
||||||
extern int writeFile(char *filename, char *data);
|
|
||||||
|
|
||||||
extern App app;
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,7 +18,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
|
#include "../system/atlas.h"
|
||||||
|
#include "../system/draw.h"
|
||||||
|
#include "../system/sound.h"
|
||||||
|
|
||||||
|
extern App app;
|
||||||
|
|
||||||
static AtlasImage *mousePointer;
|
static AtlasImage *mousePointer;
|
||||||
static AtlasImage *mousePointerNormal;
|
static AtlasImage *mousePointerNormal;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2019 Parallel Realities
|
Copyright (C) 2015-2019,2022 Parallel Realities
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
|
@ -18,11 +18,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../common.h"
|
void clearInput(void);
|
||||||
|
void doInput(void);
|
||||||
extern void blit(AtlasImage *atlasImage, int x, int y, int centered);
|
void drawMouse(void);
|
||||||
extern AtlasImage *getAtlasImage(char *filename);
|
void setMouseCursor(int isDrag);
|
||||||
extern void musicSetPlaying(int playing);
|
void doMouseMotion(SDL_MouseMotionEvent *event);
|
||||||
extern void setAtlasColor(int r, int g, int b, int a);
|
void doMouseWheel(SDL_MouseWheelEvent *event);
|
||||||
|
void doMouseUp(SDL_MouseButtonEvent *event);
|
||||||
extern App app;
|
void doMouseDown(SDL_MouseButtonEvent *event);
|
||||||
|
void doKeyUp(SDL_KeyboardEvent *event);
|
||||||
|
void doKeyDown(SDL_KeyboardEvent *event);
|
||||||
|
void initInput(void);
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue