From 9a39c84bf4efdedaf0ed3b6651aae384e21c76a4 Mon Sep 17 00:00:00 2001 From: John Zaitseff Date: Mon, 4 Jul 2011 15:54:39 +1000 Subject: [PATCH] Add source files game.c and game.h These files will eventually contain many of the game functions. --- src/Makefile.am | 1 + src/README | 2 ++ src/game.c | 38 ++++++++++++++++++++++++++++++++++++++ src/game.h | 35 +++++++++++++++++++++++++++++++++++ src/trader.h | 2 ++ 5 files changed, 78 insertions(+) create mode 100644 src/game.c create mode 100644 src/game.h diff --git a/src/Makefile.am b/src/Makefile.am index 5e4d35d..0944784 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -32,6 +32,7 @@ bin_PROGRAMS = trader trader_SOURCES = \ trader.c trader.h \ globals.c globals.h \ + game.c game.h \ help.c help.h \ intf.c intf.h \ utils.c utils.h \ diff --git a/src/README b/src/README index 31a5b1f..f4f8657 100644 --- a/src/README +++ b/src/README @@ -13,6 +13,8 @@ source code is split up among the following files: system.h - All system header files are included here globals.h - Global game constants and variables globals.c - Global game variables + game.h - Game functions header file + game.c - Game functions for Star Traders help.h - Help text routines header file help.c - Help text routines: how to play Star Traders intf.h - Basic text input/output header file diff --git a/src/game.c b/src/game.c new file mode 100644 index 0000000..c649474 --- /dev/null +++ b/src/game.c @@ -0,0 +1,38 @@ +/************************************************************************ +* * +* Star Traders: A Game of Interstellar Trading * +* Copyright (C) 1990-2011, John Zaitseff * +* * +************************************************************************/ + +/* + Author: John Zaitseff + $Id$ + + This file, game.c, contains the implementation of the game functions + used in Star Traders. + + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation, either version 3 of the License, or (at your + option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see http://www.gnu.org/licenses/. +*/ + + +#include "system.h" +#include "globals.h" +#include "game.h" + + +/************************************************************************ +* Game function definitions * +************************************************************************/ diff --git a/src/game.h b/src/game.h new file mode 100644 index 0000000..afb434c --- /dev/null +++ b/src/game.h @@ -0,0 +1,35 @@ +/************************************************************************ +* * +* Star Traders: A Game of Interstellar Trading * +* Copyright (C) 1990-2011, John Zaitseff * +* * +************************************************************************/ + +/* + Author: John Zaitseff + $Id$ + + This file, game.h, contains declarations for the main game functions + used in Star Traders. + + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation, either version 3 of the License, or (at your + option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see http://www.gnu.org/licenses/. +*/ + + +#ifndef included_GAME_H +#define included_GAME_H 1 + + +#endif /* included_GAME_H */ diff --git a/src/trader.h b/src/trader.h index 675b2ec..4a8481d 100644 --- a/src/trader.h +++ b/src/trader.h @@ -45,6 +45,8 @@ #include "system.h" #include "globals.h" +#include "game.h" +#include "help.h" #include "intf.h" #include "utils.h"