mirror of
https://git.zap.org.au/git/trader.git
synced 2025-02-02 15:08:13 -05:00
Add intf.h and intf.c: basic text input/output interface routines
This commit is contained in:
parent
6c90801102
commit
9e4e4b6d11
@ -13,5 +13,7 @@ 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
|
||||
intf.h - Basic text input/output header file
|
||||
intf.c - Basic text input/output routines
|
||||
utils.h - Utility functions header file
|
||||
utils.c - Utility functions needed by Star Traders
|
||||
|
@ -39,9 +39,6 @@
|
||||
* Constants and type declarations *
|
||||
************************************************************************/
|
||||
|
||||
#define MIN_COLUMNS (80) /* Minimum number of columns in terminal */
|
||||
#define MIN_LINES (24) /* Minimum number of lines in terminal */
|
||||
|
||||
#define MAX_X (38) /* Map dimensions MAP_X x MAP_Y */
|
||||
#define MAX_Y (12)
|
||||
#define STAR_RATIO (0.10) /* 10% of map should be stars */
|
||||
@ -107,6 +104,8 @@ typedef enum map_val {
|
||||
MAP_LAST = MAP_A + MAX_COMPANIES - 1
|
||||
} map_val_t;
|
||||
|
||||
#define MAP_COMPANY(x) (MAP_A + x)
|
||||
|
||||
|
||||
// Information about a move
|
||||
typedef struct move_rec {
|
||||
|
32
src/intf.c
Normal file
32
src/intf.c
Normal file
@ -0,0 +1,32 @@
|
||||
/************************************************************************
|
||||
* *
|
||||
* Star Traders: A Game of Interstellar Trading *
|
||||
* Copyright (C) 1990-2011, John Zaitseff *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/*
|
||||
Author: John Zaitseff <J.Zaitseff@zap.org.au>
|
||||
$Id$
|
||||
|
||||
This file, intf.c, contains the actual implementation of basic text
|
||||
input/output routines 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 "system.h"
|
||||
#include "intf.h"
|
43
src/intf.h
Normal file
43
src/intf.h
Normal file
@ -0,0 +1,43 @@
|
||||
/************************************************************************
|
||||
* *
|
||||
* Star Traders: A Game of Interstellar Trading *
|
||||
* Copyright (C) 1990-2011, John Zaitseff *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/*
|
||||
Author: John Zaitseff <J.Zaitseff@zap.org.au>
|
||||
$Id$
|
||||
|
||||
This file, intf.h, contains function declarations for basic text input/
|
||||
output routines for 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_INTF_H
|
||||
#define included_INTF_H 1
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* Constants and type declarations *
|
||||
************************************************************************/
|
||||
|
||||
#define MIN_COLUMNS (80) /* Minimum number of columns in terminal */
|
||||
#define MIN_LINES (24) /* Minimum number of lines in terminal */
|
||||
|
||||
|
||||
#endif /* included_INTF_H */
|
Loading…
x
Reference in New Issue
Block a user