Advanced Strategic Command
edgen.h
Go to the documentation of this file.
1 
5 // $Id: edgen.h,v 1.11 2009-04-18 13:48:37 mbickel Exp $
6 //
7 // $Log: not supported by cvs2svn $
8 // Revision 1.10 2007/04/13 16:15:53 mbickel
9 // Merged ASC2 branch
10 //
11 // Revision 1.8.2.2 2006/06/15 14:15:57 mbickel
12 // Fixed compilation warnings
13 // Added new building subwindows
14 // removed weathersystem
15 //
16 // Revision 1.8.2.1 2006/03/01 21:00:50 mbickel
17 // Clean up of source
18 // Fixed to construction icons
19 //
20 // Revision 1.8 2004/07/12 18:15:05 mbickel
21 // Lots of tweaks and fixed for more portability and compilation with mingw
22 //
23 // Revision 1.7 2001/01/28 14:04:13 mbickel
24 // Some restructuring, documentation and cleanup
25 // The resource network functions are now it their own files, the dashboard
26 // as well
27 // Updated the TODO list
28 //
29 // Revision 1.6 2000/12/23 13:19:46 mbickel
30 // Made ASC compileable with Borland C++ Builder
31 //
32 // Revision 1.5 2000/08/12 12:52:46 mbickel
33 // Made DOS-Version compile and run again.
34 //
35 // Revision 1.4 2000/05/23 20:40:44 mbickel
36 // Removed boolean type
37 //
38 // Revision 1.3 2000/03/29 09:58:45 mbickel
39 // Improved memory handling for DOS version
40 // Many small changes I can't remember ;-)
41 //
42 // Revision 1.2 1999/11/16 03:41:32 tmwilson
43 // Added CVS keywords to most of the files.
44 // Started porting the code to Linux (ifdef'ing the DOS specific stuff)
45 // Wrote replacement routines for kbhit/getch for Linux
46 // Cleaned up parts of the code that gcc barfed on (char vs unsigned char)
47 // Added autoconf/automake capabilities
48 // Added files used by 'automake --gnu'
49 //
50 //
51 /*
52  This file is part of Advanced Strategic Command; http://www.asc-hq.de
53  Copyright (C) 1994-2010 Martin Bickel and Marc Schellenberger
54 
55  This program is free software; you can redistribute it and/or modify
56  it under the terms of the GNU General Public License as published by
57  the Free Software Foundation; either version 2 of the License, or
58  (at your option) any later version.
59 
60  This program is distributed in the hope that it will be useful,
61  but WITHOUT ANY WARRANTY; without even the implied warranty of
62  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
63  GNU General Public License for more details.
64 
65  You should have received a copy of the GNU General Public License
66  along with this program; see the file COPYING. If not, write to the
67  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
68  Boston, MA 02111-1307 USA
69 */
70 
71 #define maxtilevals 7
72 
73 #define cverydeepwater 30
74 #define cdeepwater 29
75 #define cwater 28
76 #define cshallowwater 27
77 #define cland 43
78 #define cmount darkgray
79 
80 #define cforest 44
81 
82 #define cdesert 34
83 
84 #define cfewmaterial 21
85 #define cmediummaterial 22
86 #define cmuchmaterial 23
87 
88 #define cfewfuel 181
89 #define cmediumfuel 182
90 #define cmuchfuel 183
91 
92 #define numofbdts 12
93 
94 #define ctransparent 255
95 
96 #define clland 0
97 #define clforest 1
98 #define cldesert 2
99 #define clmaterial 3
100 #define clfuel 4
101 
102 
103 struct tmemoryblock {
106  int res;
110  Uint8 generated;
113  };
114 
116 
117 class tplasma {
118  public :
120  Uint8 flip;
123  tplasma(void);
124  void membar(int x1 ,int y1 ,int x2 ,int y2, int color );
125  int getmem(int x, int y);
126  int creatememblock(void);
127  void setmemory(int x, int y, int color);
128  /*void preview(int sx, int sy,int barsize);
129  void process(int sx, int sy,int barsize);*/
130  void generateplasma(Uint8 resettile);
131 
132  int xsymm, ysymm;
133  };
134 
135 
136 extern int random(int max);
137 extern int mapgenerator(void);
int actpres
Definition: edgen.h:105
void membar(int x1, int y1, int x2, int y2, int color)
Definition: edgen.cpp:1026
tmemoryblock * pmemoryblock
Definition: edgen.h:115
int color[maxtilevals+1]
Definition: edgen.h:107
Definition: edgen.h:117
int res
Definition: edgen.h:106
int maxx
Definition: edgen.h:119
void setmemory(int x, int y, int color)
Definition: edgen.cpp:1019
int tileval[maxtilevals]
Definition: edgen.h:108
Uint8 flip
Definition: edgen.h:120
int acttile
Definition: edgen.h:112
int * mempointer
Definition: edgen.h:104
int startblocksize
Definition: edgen.h:111
char bordername[maxtilevals][20]
Definition: edgen.h:109
int tilevalcount
Definition: edgen.h:112
int maxvalue
Definition: edgen.h:119
int blockcount
Definition: edgen.h:121
int maxset
Definition: edgen.h:105
pmemoryblock memblock
Definition: edgen.h:122
int random(int max)
Uint8 generated
Definition: edgen.h:110
int getmem(int x, int y)
Definition: edgen.cpp:1011
int maxy
Definition: edgen.h:119
int xsymm
Definition: edgen.h:132
tplasma(void)
Definition: edgen.cpp:877
const T & max(const T &a, const T &b, const T &c)
Definition: misc.h:97
#define maxtilevals
Definition: edgen.h:71
int ysymm
Definition: edgen.h:132
int mapgenerator(void)
Definition: edgen.cpp:858
void generateplasma(Uint8 resettile)
Definition: edgen.cpp:1050
int creatememblock(void)
Definition: edgen.cpp:888