1
0
mirror of https://git.zap.org.au/git/trader.git synced 2024-12-04 14:46:45 -05:00

Move the stock exchange and bank functions (to be written) to exch.c

This commit is contained in:
John Zaitseff 2011-07-16 10:43:19 +10:00
parent ddb214c5fb
commit 2c65c5be4a
7 changed files with 87 additions and 7 deletions

View File

@ -34,6 +34,7 @@ trader_SOURCES = \
globals.c globals.h \
game.c game.h \
move.c move.h \
exch.c exch.h \
fileio.c fileio.h \
help.c help.h \
intf.c intf.h \

View File

@ -12,6 +12,7 @@ source code is split up among the following files:
globals.c globals.h - Global game constants and variables
game.c game.h - Game start and end routines
move.c move.h - Routines for making and processing a move
exch.c exch.h - Stock Exchange and Bank routines
fileio.c fileio.h - Load and save game file routines
help.c help.h - Help text routines: how to play Star Traders
intf.c intf.h - Basic text input/output routines

42
src/exch.c Normal file
View File

@ -0,0 +1,42 @@
/************************************************************************
* *
* Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2011, John Zaitseff *
* *
************************************************************************/
/*
Author: John Zaitseff <J.Zaitseff@zap.org.au>
$Id$
This file, exch.c, contains the implementation of functions dealing
with the Interstellar Stock Exchange and Trading Bank as 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 "trader.h"
/************************************************************************
* Stock Exchange function definitions *
************************************************************************/
void exchange_stock (void)
{
// @@@ To be written
}

42
src/exch.h Normal file
View File

@ -0,0 +1,42 @@
/************************************************************************
* *
* Star Traders: A Game of Interstellar Trading *
* Copyright (C) 1990-2011, John Zaitseff *
* *
************************************************************************/
/*
Author: John Zaitseff <J.Zaitseff@zap.org.au>
$Id$
This file, exch.h, contains declarations for functions dealing with the
Interstellar Stock Exchange and Trading Bank as 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_EXCH_H
#define included_EXCH_H 1
/************************************************************************
* Stock Exchange function declarations *
************************************************************************/
extern void exchange_stock (void);
#endif /* included_EXCH_H */

View File

@ -487,11 +487,6 @@ void end_game (void)
free(buf);
}
void exchange_stock (void)
{
// @@@ To be written
}
/*-----------------------------------------------------------------------
Function: show_map - Display the galaxy map on the screen

View File

@ -42,8 +42,6 @@
extern void init_game (void);
extern void end_game (void);
extern void exchange_stock (void);
extern void show_map (bool show_moves);
extern void show_status (int num);
extern double total_value (int num);

View File

@ -51,6 +51,7 @@
#include "globals.h"
#include "game.h"
#include "move.h"
#include "exch.h"
#include "fileio.h"
#include "help.h"
#include "intf.h"