Created common.h to aid with cross compiling.

This commit is contained in:
Steve 2015-12-05 08:15:58 +00:00
parent ea5ac8af30
commit d6982e80ca
44 changed files with 71 additions and 157 deletions

11
build/linux/control Normal file
View File

@ -0,0 +1,11 @@
Source: tbftss
Package: tbftss
Version: ${version}
Section: games
Priority: optional
Installed-Size: ${size}
Architecture: i386
Depends: libsdl2-2.0-0, libsdl2-image-2.0-0, libsdl2-mixer-2.0-0, libsdl2-ttf-2.0-0
Maintainer: stephenjsweeney@battleforthesolarsystem.com
Description: 2D mission-based space shooter, based on the Battle for the Solar System space opera novel trilogy.
Homepage: www.battleforthesolarsystem.com/games/pw

View File

@ -18,10 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../defs.h"
#include "../structs.h"
#include "../common.h"
#define AI_EVADE 0
#define AI_FALLBACK 1

View File

@ -18,10 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../common.h"
#include "../defs.h"
#include "../structs.h"
#include "../json/cJSON.h"
#define SHOW_BATTLE 0

View File

@ -18,10 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../common.h"
#include "../defs.h"
#include "../structs.h"
#include "../json/cJSON.h"
#define TURN_SPEED 2

View File

@ -18,10 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../defs.h"
#include "../structs.h"
#include "../common.h"
extern Battle battle;
extern Entity *player;

View File

@ -18,10 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../defs.h"
#include "../structs.h"
#include "../common.h"
extern void blitScaled(SDL_Texture *texture, int x, int y, int w, int h);
extern SDL_Texture *getTexture(char *name);

View File

@ -18,10 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../defs.h"
#include "../structs.h"
#include "../common.h"
extern void blitRotated(SDL_Texture *t, int x, int y, int angle);
extern void drawFighter(Entity *e);

View File

@ -18,10 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../defs.h"
#include "../structs.h"
#include "../common.h"
extern SDL_Texture *getTexture(char *filename);
extern Entity *spawnEntity(void);

View File

@ -18,10 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../common.h"
#include "../defs.h"
#include "../structs.h"
#include "../json/cJSON.h"
extern SDL_Texture *getTexture(char *filename);

View File

@ -18,9 +18,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../defs.h"
#include "../structs.h"
#include "../common.h"
extern Battle battle;

View File

@ -18,10 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../defs.h"
#include "../structs.h"
#include "../common.h"
#define MAX_HUD_MESSAGES 6

View File

@ -18,10 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../common.h"
#include "../defs.h"
#include "../structs.h"
#include "../json/cJSON.h"
extern char *readFile(char *filename);

View File

@ -18,10 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../defs.h"
#include "../structs.h"
#include "../common.h"
extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...);
extern void limitTextWidth(int width);

View File

@ -18,10 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../defs.h"
#include "../structs.h"
#include "../common.h"
extern void blit(SDL_Texture *texture, int x, int y, int center);
extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...);

View File

@ -18,10 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../defs.h"
#include "../structs.h"
#include "../common.h"
extern void updateChallenges(void);
extern void addHudMessage(SDL_Color c, char *format, ...);

View File

@ -18,10 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../defs.h"
#include "../structs.h"
#include "../common.h"
#define MAX_SELECTABLE_PLAYERS 8
#define MAX_SELECTABLE_TARGETS 8

View File

@ -18,10 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../defs.h"
#include "../structs.h"
#include "../common.h"
extern int getDistance(int x1, int y1, int x2, int y2);
extern void blit(SDL_Texture *texture, int x, int y, int center);

View File

@ -18,10 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../defs.h"
#include "../structs.h"
#include "../common.h"
#define ROPE_DISTANCE 128

View File

@ -18,10 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../common.h"
#include "../defs.h"
#include "../structs.h"
#include "../json/cJSON.h"
extern void completeMission(void);

View File

@ -18,9 +18,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../defs.h"
#include "../structs.h"
#include "../common.h"
extern App app;

View File

@ -18,10 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../defs.h"
#include "../structs.h"
#include "../common.h"
extern SDL_Texture *getTexture(char *filename);
extern int getDistance(int x1, int y1, int x2, int y2);

9
src/common.h Normal file
View File

@ -0,0 +1,9 @@
#include "stdlib.h"
#include "stdio.h"
#include "string.h"
#include "math.h"
#include "SDL2/SDL.h"
#include "defs.h"
#include "structs.h"

View File

@ -18,10 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../defs.h"
#include "../structs.h"
#include "../common.h"
extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...);
extern void drawMouse(void);

View File

@ -18,11 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "SDL2/SDL_ttf.h"
#include "../common.h"
#include "../defs.h"
#include "../structs.h"
#include "SDL2/SDL_ttf.h"
extern void blit(SDL_Texture *texture, int x, int y, int centered);
extern char *getFileLocation(char *filename);

View File

@ -18,10 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../defs.h"
#include "../structs.h"
#include "../common.h"
#define SHOW_GALAXY 0
#define SHOW_STAR_SYSTEM 1

View File

@ -18,11 +18,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../common.h"
#include "time.h"
#include "../defs.h"
#include "../structs.h"
#include "../json/cJSON.h"
extern long lookup(char *name);

View File

@ -18,10 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../common.h"
#include "../defs.h"
#include "../structs.h"
#include "../json/cJSON.h"
extern char *readFile(char *filename);

View File

@ -18,10 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../defs.h"
#include "../structs.h"
#include "../common.h"
#define MAX_STAT_ITEMS 9

View File

@ -18,9 +18,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../defs.h"
#include "../structs.h"
#include "../common.h"
extern Game game;

View File

@ -18,10 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../defs.h"
#include "../structs.h"
#include "../common.h"
#define NUM_FIGHTERS 12

View File

@ -23,9 +23,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <unistd.h>
#include <errno.h>
#include "SDL2/SDL.h"
#include "../../defs.h"
#include "../../structs.h"
#include "../../common.h"
extern App app;

View File

@ -18,15 +18,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../common.h"
#include "../json/cJSON.h"
#include "SDL2/SDL_image.h"
#include "SDL2/SDL_mixer.h"
#include "SDL2/SDL_ttf.h"
#include "../defs.h"
#include "../structs.h"
#include "../json/cJSON.h"
extern int fileExists(char *filename);
extern char *readFile(char *filename);
extern int writeFile(char *filename, char *data);

View File

@ -18,10 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../defs.h"
#include "../structs.h"
#include "../common.h"
extern SDL_Texture *getTexture(char *filename);
extern void blit(SDL_Texture *texture, int x, int y, int centered);

View File

@ -18,10 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../common.h"
#include "sys/stat.h"
#include "../defs.h"
#include "../structs.h"
extern App app;

View File

@ -18,10 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../common.h"
#include "../defs.h"
#include "../structs.h"
#include "../json/cJSON.h"
extern char *readFile(char *filename);

View File

@ -18,7 +18,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../defs.h"
#include "../structs.h"
#include "../common.h"

View File

@ -18,11 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "SDL2/SDL_mixer.h"
#include "../common.h"
#include "../defs.h"
#include "../structs.h"
#include "SDL2/SDL_mixer.h"
extern void selectWidget(const char *name, const char *group);
extern Widget *getWidget(const char *name, const char *group);

View File

@ -18,10 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../common.h"
#include "../defs.h"
#include "../structs.h"
#include "../json/cJSON.h"
extern int writeFile(char *filename, char *data);

View File

@ -18,12 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "SDL2/SDL_mixer.h"
#include "../common.h"
#include "../defs.h"
#include "../structs.h"
#include "../json/cJSON.h"
#include "SDL2/SDL_mixer.h"
#define MAX_BATTLE_SOUND_DISTANCE 1500

View File

@ -18,10 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL_image.h"
#include "../common.h"
#include "../defs.h"
#include "../structs.h"
#include "SDL2/SDL_image.h"
extern char *getFileLocation(char *filename);

View File

@ -18,10 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../defs.h"
#include "../structs.h"
#include "../common.h"
extern void prepareScene(void);
extern void presentScene(void);

View File

@ -18,6 +18,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../defs.h"
#include "../common.h"

View File

@ -18,10 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../common.h"
#include "../defs.h"
#include "../structs.h"
#include "../json/cJSON.h"
extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...);

View File

@ -18,10 +18,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "SDL2/SDL.h"
#include "../common.h"
#include "../defs.h"
#include "../structs.h"
#include "../json/cJSON.h"
extern void initBattle(void);