]> cvs.zerfleddert.de Git - micropolis/blob - src/sim/headers/sim.h
d6a31a11eb56a5952a79034a6c0bfc7a0333b204
[micropolis] / src / sim / headers / sim.h
1 /* sim.h: Main include file
2 *
3 * Micropolis, Unix Version. This game was released for the Unix platform
4 * in or about 1990 and has been modified for inclusion in the One Laptop
5 * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If
6 * you need assistance with this program, you may contact:
7 * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org.
8 *
9 * This program is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 3 of the License, or (at
12 * your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details. You should have received a
18 * copy of the GNU General Public License along with this program. If
19 * not, see <http://www.gnu.org/licenses/>.
20 *
21 * ADDITIONAL TERMS per GNU GPL Section 7
22 *
23 * No trademark or publicity rights are granted. This license does NOT
24 * give you any right, title or interest in the trademark SimCity or any
25 * other Electronic Arts trademark. You may not distribute any
26 * modification of this program using the trademark SimCity or claim any
27 * affliation or association with Electronic Arts Inc. or its employees.
28 *
29 * Any propagation or conveyance of this program must include this
30 * copyright notice and these terms.
31 *
32 * If you convey this program (or any modifications of it) and assume
33 * contractual liability for the program to recipients of it, you agree
34 * to indemnify Electronic Arts for any liability that those contractual
35 * assumptions impose on Electronic Arts.
36 *
37 * You may not misrepresent the origins of this program; modified
38 * versions of the program must be marked as such and not identified as
39 * the original program.
40 *
41 * This disclaimer supplements the one included in the General Public
42 * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS
43 * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY
44 * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF
45 * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS
46 * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES,
47 * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY,
48 * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY
49 * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING,
50 * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST
51 * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL
52 * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE
53 * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE
54 * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE
55 * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR
56 * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME
57 * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED
58 * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A
59 * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY
60 * NOT APPLY TO YOU.
61 */
62
63 /* workaround sun c compiler junk */
64
65 #ifdef sun
66
67 #define _TTYCHARS_
68 #define CTRL(c) (#c[0]&037)
69
70 #ifndef SOLARIS2
71 #define __sys_ioccom_h
72 #define _IOCPARM_MASK 0xff /* parameters must be < 256 bytes */
73 #define _IOC_VOID 0x20000000 /* no parameters */
74 #define _IOC_OUT 0x40000000 /* copy out parameters */
75 #define _IOC_IN 0x80000000 /* copy in parameters */
76 #define _IOC_INOUT (_IOC_IN|_IOC_OUT)
77 #define _IO(x,y) (_IOC_VOID|(#x[0]<<8)|y)
78 #define _IOR(x,y,t) (_IOC_OUT|((sizeof(t)&_IOCPARM_MASK)<<16)|(#x[0]<<8)|y)
79 #define _IORN(x,y,t) (_IOC_OUT|(((t)&_IOCPARM_MASK)<<16)|(#x[0]<<8)|y)
80 #define _IOW(x,y,t) (_IOC_IN|((sizeof(t)&_IOCPARM_MASK)<<16)|(#x[0]<<8)|y)
81 #define _IOWN(x,y,t) (_IOC_IN|(((t)&_IOCPARM_MASK)<<16)|(#x[0]<<8)|y)
82 #define _IOWR(x,y,t) (_IOC_INOUT|((sizeof(t)&_IOCPARM_MASK)<<16)|(#x[0]<<8)|y)
83 #define _IOWRN(x,y,t) (_IOC_INOUT|(((t)&_IOCPARM_MASK)<<16)|(#x[0]<<8)|y)
84 #endif
85
86 #endif
87
88
89 #include <stdio.h>
90 #include <stdlib.h>
91 #include <assert.h>
92 #include <ctype.h>
93 #include <setjmp.h>
94 #include <malloc.h>
95 #include <errno.h>
96 #include <signal.h>
97 #include <math.h>
98 #include <unistd.h>
99 #include <sys/types.h>
100 #include <sys/time.h>
101 #include <sys/stat.h>
102 #include <sys/file.h>
103 #include <sys/ioctl.h>
104 #include <sys/resource.h>
105 #ifndef MSDOS
106 #ifndef HPUX
107 #include <alloca.h>
108 #endif
109 #include <sys/mman.h>
110 #include <netinet/in.h>
111 #include <arpa/inet.h>
112 #endif
113
114 #ifdef sun
115 #ifdef SOLARIS2
116 #include <sys/systeminfo.h>
117 #else
118 #include <sys/vadvise.h>
119 #endif
120 #endif
121
122 #ifdef sgi
123 #if 0
124 #include <audio.h>
125 #endif
126 #endif
127
128 #include <sys/ipc.h>
129 #include <sys/shm.h>
130 #include <X11/Xlib.h>
131 #include <X11/Xutil.h>
132 #include <X11/Xatom.h>
133 #include <X11/extensions/XShm.h>
134
135 //#include <xpmtk.h>
136 #include <X11/xpm.h>
137
138 /* gcc compat workaround! */
139 #define _STDDEF_H
140
141 #include "tclxtend.h"
142 #include "tclint.h"
143 #include "tclunix.h"
144 #include "tkconfig.h"
145 #include "tkint.h"
146
147 #include "mac.h"
148 #include "view.h"
149 #include "macros.h"
150
151 /* Constants */
152
153 #define TRUE 1
154 #define FALSE 0
155
156 #ifdef MEGA
157 #define SimWidth (120 * MEGA)
158 #define SimHeight (100 * MEGA)
159 #else
160 #define SimWidth 120
161 #define SimHeight 100
162 #endif
163
164 #define WORLD_X SimWidth
165 #define WORLD_Y SimHeight
166 #define HWLDX (SimWidth >>1)
167 #define HWLDY (SimHeight >>1)
168 #define QWX (SimWidth >>2)
169 #define QWY (SimHeight >>2)
170 #define SmX (SimWidth >>3)
171 #define SmY ((SimHeight + 7) >>3)
172
173 #define EDITOR_W (WORLD_X * 16)
174 #define EDITOR_H (WORLD_Y * 16)
175 #define MAP_W (WORLD_X * 3)
176 #define MAP_H (WORLD_Y * 3)
177
178 #define NIL 0
179 #define HORIZ 1
180 #define VERT 0
181
182 #define PROBNUM 10
183
184 #define HISTLEN 480
185 #define MISCHISTLEN 240
186
187 #define POWERMAPROW ((WORLD_X + 15) / 16)
188
189 #ifdef MEGA
190 #define POWERMAPLEN ((QUAD)(2 * POWERMAPROW * WORLD_Y))
191 #define POWERWORD(x, y) ((((QUAD)(x)) >>4) + (((QUAD)(y)) * POWERMAPROW))
192 #else
193 #define POWERMAPLEN 1700 /* ??? PWRMAPSIZE */
194 #define POWERWORD(x, y) (((x) >>4) + ((y) <<3))
195 #endif
196
197 #define SETPOWERBIT(x, y) PowerMap[POWERWORD((x), (y))] |= 1 << ((x) & 15)
198 #define PWRMAPSIZE (POWERMAPROW * WORLD_Y)
199 #define PWRSTKSIZE ((WORLD_X * WORLD_Y) / 4)
200
201 #define ALMAP 0 /* all */
202 #define REMAP 1 /* residential */
203 #define COMAP 2 /* commercial */
204 #define INMAP 3 /* industrial */
205
206 #define PRMAP 4 /* power */
207 #define RDMAP 5 /* road */
208
209 #define PDMAP 6 /* population density */
210 #define RGMAP 7 /* rate of growth */
211
212 #define TDMAP 8 /* traffic density */
213 #define PLMAP 9 /* pollution */
214 #define CRMAP 10 /* crime */
215 #define LVMAP 11 /* land value */
216
217 #define FIMAP 12 /* fire radius */
218 #define POMAP 13 /* police radius */
219 #define DYMAP 14 /* dynamic */
220
221 #define NMAPS 15
222
223 /* These adjust frequency in Simulate() */
224
225 #define VALVERATE 2
226 #define CENSUSRATE 4
227 #define TAXFREQ 48
228
229 /* These are names of the 16 colors */
230 #define COLOR_WHITE 0
231 #define COLOR_YELLOW 1
232 #define COLOR_ORANGE 2
233 #define COLOR_RED 3
234 #define COLOR_DARKRED 4
235 #define COLOR_DARKBLUE 5
236 #define COLOR_LIGHTBLUE 6
237 #define COLOR_BROWN 7
238 #define COLOR_LIGHTGREEN 8
239 #define COLOR_DARKGREEN 9
240 #define COLOR_OLIVE 10
241 #define COLOR_LIGHTBROWN 11
242 #define COLOR_LIGHTGRAY 12
243 #define COLOR_MEDIUMGRAY 13
244 #define COLOR_DARKGRAY 14
245 #define COLOR_BLACK 15
246
247 /* Status Bits */
248
249 #define PWRBIT 32768 /*20 bit 15 */
250 #define CONDBIT 16384 /*10 bit 14 */
251 #define BURNBIT 8192 /*8 bit 13 */
252 #define BULLBIT 4096 /*4 bit 12 */
253 #define ANIMBIT 2048 /*2 bit 11 */
254 #define ZONEBIT 1024 /*1 bit 10 */
255 #define ALLBITS 64512 /* mask for upper 6 bits */
256 #define LOMASK 1023 /* mask for low 10 bits */
257
258 #define BLBNBIT (BULLBIT+BURNBIT)
259 #define BLBNCNBIT (BULLBIT+BURNBIT+CONDBIT)
260 #define BNCNBIT (BURNBIT+CONDBIT)
261
262 /* Object & Sound Numbers */
263
264 #define TRA 1
265 #define COP 2
266 #define AIR 3
267 #define SHI 4
268 #define GOD 5
269 #define TOR 6
270 #define EXP 7
271 #define BUS 8
272
273 /* Max # of Objects */
274
275 #define OBJN 9
276
277 /* Graph Histories */
278 #define RES_HIST 0
279 #define COM_HIST 1
280 #define IND_HIST 2
281 #define MONEY_HIST 3
282 #define CRIME_HIST 4
283 #define POLLUTION_HIST 5
284 #define HISTORIES 6
285 #define ALL_HISTORIES ((1 <<HISTORIES) - 1)
286
287 /* Character Mapping */
288
289 #define DIRT 0
290 #define RIVER 2
291 #define REDGE 3
292 #define CHANNEL 4
293 #define FIRSTRIVEDGE 5
294 #define LASTRIVEDGE 20
295 #define TREEBASE 21
296 #define LASTTREE 36
297 #define WOODS 37
298 #define UNUSED_TRASH1 38
299 #define UNUSED_TRASH2 39
300 #define WOODS2 40
301 #define WOODS3 41
302 #define WOODS4 42
303 #define WOODS5 43
304 #define RUBBLE 44
305 #define LASTRUBBLE 47
306 #define FLOOD 48
307 #define LASTFLOOD 51
308 #define RADTILE 52
309 #define UNUSED_TRASH3 53
310 #define UNUSED_TRASH4 54
311 #define UNUSED_TRASH5 55
312 #define FIRE 56
313 #define FIREBASE 56
314 #define LASTFIRE 63
315 #define ROADBASE 64
316 #define HBRIDGE 64
317 #define VBRIDGE 65
318 #define ROADS 66
319 #define INTERSECTION 76
320 #define HROADPOWER 77
321 #define VROADPOWER 78
322 #define BRWH 79
323 #define LTRFBASE 80
324 #define BRWV 95
325 #define BRWXXX1 111
326 #define BRWXXX2 127
327 #define BRWXXX3 143
328 #define HTRFBASE 144
329 #define BRWXXX4 159
330 #define BRWXXX5 175
331 #define BRWXXX6 191
332 #define LASTROAD 206
333 #define BRWXXX7 207
334 #define POWERBASE 208
335 #define HPOWER 208
336 #define VPOWER 209
337 #define LHPOWER 210
338 #define LVPOWER 211
339 #define RAILHPOWERV 221
340 #define RAILVPOWERH 222
341 #define LASTPOWER 222
342 #define UNUSED_TRASH6 223
343 #define RAILBASE 224
344 #define HRAIL 224
345 #define VRAIL 225
346 #define LHRAIL 226
347 #define LVRAIL 227
348 #define HRAILROAD 237
349 #define VRAILROAD 238
350 #define LASTRAIL 238
351 #define ROADVPOWERH 239 /* bogus? */
352 #define RESBASE 240
353 #define FREEZ 244
354 #define HOUSE 249
355 #define LHTHR 249
356 #define HHTHR 260
357 #define RZB 265
358 #define HOSPITAL 409
359 #define CHURCH 418
360 #define COMBASE 423
361 #define COMCLR 427
362 #define CZB 436
363 #define INDBASE 612
364 #define INDCLR 616
365 #define LASTIND 620
366 #define IND1 621
367 #define IZB 625
368 #define IND2 641
369 #define IND3 644
370 #define IND4 649
371 #define IND5 650
372 #define IND6 676
373 #define IND7 677
374 #define IND8 686
375 #define IND9 689
376 #define PORTBASE 693
377 #define PORT 698
378 #define LASTPORT 708
379 #define AIRPORTBASE 709
380 #define RADAR 711
381 #define AIRPORT 716
382 #define COALBASE 745
383 #define POWERPLANT 750
384 #define LASTPOWERPLANT 760
385 #define FIRESTBASE 761
386 #define FIRESTATION 765
387 #define POLICESTBASE 770
388 #define POLICESTATION 774
389 #define STADIUMBASE 779
390 #define STADIUM 784
391 #define FULLSTADIUM 800
392 #define NUCLEARBASE 811
393 #define NUCLEAR 816
394 #define LASTZONE 826
395 #define LIGHTNINGBOLT 827
396 #define HBRDG0 828
397 #define HBRDG1 829
398 #define HBRDG2 830
399 #define HBRDG3 831
400 #define RADAR0 832
401 #define RADAR1 833
402 #define RADAR2 834
403 #define RADAR3 835
404 #define RADAR4 836
405 #define RADAR5 837
406 #define RADAR6 838
407 #define RADAR7 839
408 #define FOUNTAIN 840
409 #define INDBASE2 844
410 #define TELEBASE 844
411 #define TELELAST 851
412 #define SMOKEBASE 852
413 #define TINYEXP 860
414 #define SOMETINYEXP 864
415 #define LASTTINYEXP 867
416 #define COALSMOKE1 916
417 #define COALSMOKE2 920
418 #define COALSMOKE3 924
419 #define COALSMOKE4 928
420 #define FOOTBALLGAME1 932
421 #define FOOTBALLGAME2 940
422 #define VBRDG0 948
423 #define VBRDG1 949
424 #define VBRDG2 950
425 #define VBRDG3 951
426
427 #define TILE_COUNT 960
428
429 /*
430 * These describe the wand values, the object dragged around on the screen.
431 */
432
433 #define residentialState 0
434 #define commercialState 1
435 #define industrialState 2
436 #define fireState 3
437 #define queryState 4
438 #define policeState 5
439 #define wireState 6
440 #define dozeState 7
441 #define rrState 8
442 #define roadState 9
443 #define chalkState 10
444 #define eraserState 11
445 #define stadiumState 12
446 #define parkState 13
447 #define seaportState 14
448 #define powerState 15
449 #define nuclearState 16
450 #define airportState 17
451 #define networkState 18
452
453
454 #define firstState residentialState
455 #define lastState networkState
456
457 #if 0
458 #define specialState 16
459 #define monsterGoalState 17
460 #define helicopterGoalState 18
461 #define blackState 19
462 #define whiteState 20
463 #define redState 21
464 #define orangeState 23
465 #define blueState 24
466 #define greenState 25
467 #define brownState 26
468 #endif
469
470
471 #define STATE_CMD 0
472 #define STATE_TILES 1
473 #define STATE_OVERLAYS 2
474 #define STATE_GRAPHS 3
475
476
477 extern short *Map[WORLD_X]; /* Main Map 120 x 100 */
478 extern Byte *PopDensity[HWLDX]; /* 2X2 Maps 60 x 50 */
479 extern Byte *TrfDensity[HWLDX];
480 extern Byte *PollutionMem[HWLDX];
481 extern Byte *LandValueMem[HWLDX];
482 extern Byte *CrimeMem[HWLDX];
483 extern Byte *tem[HWLDX];
484 extern Byte *tem2[HWLDX];
485 extern Byte *TerrainMem[QWX]; /* 4X4 Maps 30 x 25 */
486 extern Byte *Qtem[QWX];
487 extern short RateOGMem[SmX][SmY];
488 extern short FireStMap[SmX][SmY]; /* 8X8 Maps 15 x 13 */
489 extern short PoliceMap[SmX][SmY];
490 extern short PoliceMapEffect[SmX][SmY];
491 extern short ComRate[SmX][SmY];
492 extern short FireRate[SmX][SmY];
493 extern short STem[SmX][SmY];
494 extern short SpriteXOffset[OBJN];
495 extern short SpriteYOffset[OBJN];
496 extern short SMapX, SMapY;
497 extern short CChr, CChr9;
498 extern short RoadTotal, RailTotal, FirePop;
499 extern short ResPop, ComPop, IndPop, TotalPop, LastTotalPop;
500 extern short ResZPop, ComZPop, IndZPop, TotalZPop;
501 extern short HospPop, ChurchPop, StadiumPop;
502 extern short PolicePop, FireStPop;
503 extern short CoalPop, NuclearPop, PortPop, APortPop;
504 extern short NeedHosp, NeedChurch;
505 extern short CrimeAverage, PolluteAverage, LVAverage;
506 extern char *MicropolisVersion;
507 extern char *CityName;
508 extern char *CityFileName;
509 extern char *StartupName;
510 extern short StartingYear;
511 extern QUAD CityTime;
512 extern QUAD LastCityTime;
513 extern QUAD LastCityMonth;
514 extern QUAD LastCityYear;
515 extern QUAD LastFunds;
516 extern QUAD LastR, LastC, LastI;
517 extern short GameLevel;
518 extern short Cycle;
519 extern short ScenarioID;
520 extern short ShakeNow;
521 extern QUAD DonDither;
522 extern int DoOverlay;
523
524 extern short *ResHis, ResHisMax;
525 extern short *ComHis, ComHisMax;
526 extern short *IndHis, IndHisMax;
527 extern short *MoneyHis, *CrimeHis, *PollutionHis, *MiscHis;
528 extern short *PowerMap;
529
530 extern float roadPercent, policePercent, firePercent;
531 extern QUAD RoadSpend, PoliceSpend, FireSpend;
532 extern QUAD roadMaxValue, policeMaxValue, fireMaxValue;
533 extern QUAD TaxFund, RoadFund, PoliceFund, FireFund;
534 extern short RoadEffect, PoliceEffect, FireEffect;
535 extern short TaxFlag, CityTax;
536 extern QUAD TotalFunds;
537
538 extern QUAD costOf[];
539
540 extern short flagBlink;
541 extern unsigned char tileSynch;
542 extern short aniTile[];
543 extern unsigned char aniSynch[];
544 extern int TilesAnimated;
545 extern int DoAnimation;
546 extern int DoMessages;
547 extern int DoNotices;
548 extern unsigned char ColorIntensities[];
549
550 extern short MesX, MesY;
551 extern short MesNum, MessagePort;
552 extern QUAD LastMesTime;
553
554 extern short SimSpeed;
555 extern short SimMetaSpeed;
556 extern short NoDisasters;
557 extern short autoBulldoze;
558 extern short autoBudget;
559 extern short autoGo;
560 extern short UserSoundOn;
561
562 extern short DisasterEvent;
563 extern short DisasterWait;
564
565 extern short ResCap, ComCap, IndCap;
566 extern short RValve, CValve, IValve;
567 extern short PwrdZCnt;
568 extern short unPwrdZCnt;
569
570 extern char *HomeDir, *ResourceDir, *HostName;
571
572 extern short Graph10Max, Graph120Max;
573 extern short Res2HisMax, Com2HisMax, Ind2HisMax;
574 extern unsigned char *History10[HISTORIES], *History120[HISTORIES];
575 extern short CityScore;
576 extern short deltaCityScore;
577 extern short ScoreType;
578 extern short ScoreWait;
579 extern short CityClass;
580 extern short PolMaxX, PolMaxY;
581 extern int PowerStackNum;
582 extern short TrafficAverage;
583 extern short PosStackN;
584 extern short SMapXStack[], SMapYStack[];
585 extern short Zsource;
586 extern short HaveLastMessage;
587 extern short PdestX, PdestY;
588 extern short CdestX, CdestY;
589 extern int absDist;
590 extern short CopFltCnt;
591 extern short GodCnt;
592 extern short GdestX, GdestY;
593 extern short GorgX, GorgY;
594 extern short GodControl;
595 extern short CopControl;
596 extern short CdestX, CdestY;
597 extern short TrafMaxX, TrafMaxY;
598 extern short CrimeMaxX, CrimeMaxY;
599 extern short FloodX, FloodY;
600 extern short CrashX, CrashY;
601 extern short CCx, CCy;
602 extern QUAD CityPop, deltaCityPop;
603 extern char *cityClassStr[6];
604 extern short CityYes, CityNo;
605 extern short ProblemTable[PROBNUM];
606 extern short ProblemVotes[PROBNUM];
607 extern short ProblemOrder[4];
608 extern QUAD CityAssValue;
609
610 extern short InitSimLoad;
611 extern short DoInitialEval;
612 extern int Startup;
613 extern int StartupGameLevel;
614 extern int PerformanceTiming;
615 extern double FlushTime;
616
617 extern char *optarg;
618 extern int optind;
619 extern struct timeval start_time, now_time, beat_time, last_now_time;
620 extern Sim *sim;
621 extern int WireMode;
622 extern int MultiPlayerMode;
623 extern int SugarMode;
624 extern int sim_delay;
625 extern int sim_skips;
626 extern int sim_skip;
627 extern int sim_paused;
628 extern int sim_paused_speed;
629 extern int sim_tty;
630 #ifdef CAM
631 extern int sim_just_cam;
632 #endif
633 extern int heat_steps;
634 extern int heat_flow;
635 extern int heat_rule;
636 extern int UpdateDelayed;
637 extern int DynamicData[32];
638 extern int Players;
639 extern int Votes;
640 extern int BobHeight;
641 extern int OverRide;
642 extern int Expensive;
643 extern int PendingTool;
644 extern int PendingX;
645 extern int PendingY;
646 extern int TreeLevel;
647 extern int LakeLevel;
648 extern int CurveLevel;
649 extern int CreateIsland;
650 extern short specialBase;
651 extern short PunishCnt;
652 extern short Dozing;
653 extern short toolSize[];
654 extern short toolOffset[];
655 extern QUAD toolColors[];
656 extern char *Displays;
657 extern char *FirstDisplay;
658 extern char *dateStr[12];
659
660 extern short NewMap;
661 extern short NewMapFlags[NMAPS];
662 extern short NewGraph;
663 extern short ValveFlag;
664 extern short MustUpdateFunds;
665 extern short MustUpdateOptions;
666 extern short CensusChanged;
667 extern short EvalChanged;
668 extern short MeltX, MeltY;
669 extern int NeedRest;
670 extern int ExitReturn;
671
672 extern Tcl_Interp *tk_mainInterp;
673 extern Tk_Window MainWindow;
674 extern int FlushStyle;
675 extern int GotXError;
676
677 extern short Rand(short range);
678 extern short RandInt(void);
679
680 extern Sim *MakeNewSim();
681 extern SimView *MakeNewView();
682 extern SimSprite *GetSprite();
683 extern SimSprite *MakeSprite();
684 extern SimSprite *MakeNewSprite();
685
686 extern int setSpeed(short speed);
687 extern int setSkips(int skips);
688 extern int SetGameLevel(short level);
689 extern int SetGameLevelFunds(short level);
690
691 extern struct XDisplay *XDisplays;
Impressum, Datenschutz