Subversion Repositories eduke32

Rev

Rev 3727 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1677 terminx 1
//-------------------------------------------------------------------------
2
/*
3
Copyright (C) 2010 EDuke32 developers and contributors
4
 
5
This file is part of EDuke32.
6
 
7
EDuke32 is free software; you can redistribute it and/or
8
modify it under the terms of the GNU General Public License version 2
9
as published by the Free Software Foundation.
10
 
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
 
15
See the GNU General Public License for more details.
16
 
17
You should have received a copy of the GNU General Public License
18
along with this program; if not, write to the Free Software
19
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
20
*/
21
//-------------------------------------------------------------------------
22
 
23
#ifndef __global_h__
24
#define __global_h__
25
 
26
#ifdef __global_c__
27
    #define G_EXTERN
28
#else
29
    #define G_EXTERN extern
30
#endif
31
 
32
#define MAXINTERPOLATIONS MAXSPRITES
2764 helixhorne 33
// KEEPINSYNC lunatic/con_lang.lua
2530 helixhorne 34
#define MAXSKILLS 7
1677 terminx 35
 
3116 hendricks2 36
// duke3d global soup :(
37
 
38
#include "compat.h"
39
#include "build.h"
40
 
41
G_EXTERN int32_t g_numInterpolations;
42
G_EXTERN int32_t g_interpolationLock;
43
G_EXTERN int32_t oldipos[MAXINTERPOLATIONS];
44
G_EXTERN int32_t *curipos[MAXINTERPOLATIONS];
45
G_EXTERN int32_t bakipos[MAXINTERPOLATIONS];
1857 terminx 46
G_EXTERN int32_t connectpoint2[MAXPLAYERS];
47
 
3116 hendricks2 48
#include "duke3d.h"
49
#include "sector.h"
50
#include "quotes.h"
51
 
52
G_EXTERN int32_t myconnectindex, numplayers;
53
 
1677 terminx 54
G_EXTERN DukeStatus_t sbar;
55
G_EXTERN actor_t actor[MAXSPRITES];
3151 helixhorne 56
// g_tile: tile-specific data THAT DOES NOT CHANGE during the course of a game
3102 terminx 57
G_EXTERN tiledata_t g_tile[MAXTILES];
1677 terminx 58
G_EXTERN animwalltype animwall[MAXANIMWALLS];
59
G_EXTERN char *ScriptQuotes[MAXQUOTES],*ScriptQuoteRedefinitions[MAXQUOTES];
60
G_EXTERN char *label;
61
G_EXTERN char EnvMusicFilename[MAXVOLUMES+1][BMAX_PATH];
62
G_EXTERN char g_RTSPlaying;
2738 terminx 63
G_EXTERN int32_t g_musicIndex;
2897 helixhorne 64
G_EXTERN char g_loadFromGroupOnly;
2530 helixhorne 65
G_EXTERN char g_numSkills;
1677 terminx 66
G_EXTERN char myjumpingtoggle,myonground,myhardlanding,myreturntocenter;
67
G_EXTERN char pus,pub;
68
G_EXTERN char ready2send;
69
G_EXTERN char szPlayerName[32];
3727 helixhorne 70
// XXX: menutextbuf overflow possible?
3115 terminx 71
G_EXTERN char tempbuf[MAXSECTORS<<1],packbuf[PACKBUF_SIZE],menutextbuf[128],buf[1024];
1677 terminx 72
G_EXTERN char typebuflen,typebuf[141];
73
G_EXTERN input_t avg;
74
G_EXTERN input_t loc;
75
G_EXTERN input_t recsync[RECSYNCBUFSIZ];
3337 hendricks2 76
G_EXTERN int16_t SpriteDeletionQueue[1024],g_spriteDeleteQueuePos;
1677 terminx 77
G_EXTERN int16_t animatesect[MAXANIMATES];
78
G_EXTERN int16_t camsprite;
79
G_EXTERN int16_t cyclers[MAXCYCLERS][6],g_numCyclers;
80
G_EXTERN int16_t g_globalRandom;
81
G_EXTERN int16_t g_mirrorWall[64],g_mirrorSector[64],g_mirrorCount;
82
G_EXTERN int16_t g_numAnimWalls;
83
G_EXTERN int16_t g_numClouds,clouds[128],cloudx[128],cloudy[128];
84
G_EXTERN int16_t myang,omyang,mycursectnum,myjumpingcounter;
85
G_EXTERN int16_t myhoriz,omyhoriz,myhorizoff,omyhorizoff;
86
G_EXTERN int16_t neartagsector,neartagwall,neartagsprite;
87
G_EXTERN int32_t *animateptr[MAXANIMATES];
88
G_EXTERN int32_t animategoal[MAXANIMATES],animatevel[MAXANIMATES],g_animateCount;
89
G_EXTERN int32_t cloudtotalclock;
90
G_EXTERN int32_t fricxv,fricyv;
91
G_EXTERN int32_t g_currentFrameRate;
92
G_EXTERN int32_t g_currentMenu;
93
G_EXTERN int32_t g_damageCameras,g_freezerSelfDamage;
94
G_EXTERN int32_t g_doQuickSave;
3478 helixhorne 95
G_EXTERN uint16_t g_earthquakeTime;
1677 terminx 96
G_EXTERN int32_t g_gameQuit;
97
G_EXTERN int32_t g_groupFileHandle;
98
G_EXTERN int32_t g_impactDamage,g_maxPlayerHealth;
99
G_EXTERN int32_t g_musicSize;
100
G_EXTERN int32_t g_numLabels,g_numDefaultLabels;
101
G_EXTERN int32_t g_numRealPalettes;
102
G_EXTERN int32_t g_scriptDebug;
103
G_EXTERN int32_t g_showShareware;
3116 hendricks2 104
G_EXTERN int8_t g_numPlayerSprites;
1677 terminx 105
G_EXTERN int32_t g_tripbombLaserMode;
106
G_EXTERN int32_t msx[2048],msy[2048];
107
G_EXTERN int32_t neartaghitdist,lockclock,g_startArmorAmount;
108
G_EXTERN int32_t playerswhenstarted;
109
G_EXTERN int32_t screenpeek;
110
G_EXTERN int32_t startofdynamicinterpolations;
3337 hendricks2 111
G_EXTERN int32_t vel,svel,angvel,horiz,ototalclock;
3102 terminx 112
G_EXTERN intptr_t *g_parsingActorPtr;
2152 helixhorne 113
G_EXTERN intptr_t *g_scriptPtr,*insptr;
114
G_EXTERN int32_t *labelcode,*labeltype;
1677 terminx 115
G_EXTERN intptr_t *script;
2328 helixhorne 116
G_EXTERN map_t MapInfo[(MAXVOLUMES+1)*MAXLEVELS];  // +1 volume for "intro", "briefing" music
3116 hendricks2 117
#pragma pack(push,1)
1677 terminx 118
G_EXTERN playerdata_t g_player[MAXPLAYERS];
119
G_EXTERN playerspawn_t g_playerSpawnPoints[MAXPLAYERS];
3116 hendricks2 120
G_EXTERN input_t inputfifo[MOVEFIFOSIZ][MAXPLAYERS];
121
#pragma pack(pop)
3151 helixhorne 122
G_EXTERN projectile_t ProjectileData[MAXTILES];
3102 terminx 123
G_EXTERN projectile_t SpriteProjectile[MAXSPRITES];
1677 terminx 124
G_EXTERN sound_t g_sounds[MAXSOUNDS];
125
G_EXTERN uint32_t everyothertime;
126
G_EXTERN uint32_t g_moveThingsCount;
127
G_EXTERN vec3_t my,omy,myvel;
128
G_EXTERN volatile char g_soundlocks[MAXSOUNDS];
129
G_EXTERN int32_t g_restorePalette;
130
G_EXTERN int32_t g_screenCapture;
131
G_EXTERN int32_t g_noEnemies;
132
 
3337 hendricks2 133
#ifndef __global_c__
134
G_EXTERN const char *s_buildRev;
135
G_EXTERN const char *s_buildDate;
136
G_EXTERN int32_t g_spriteGravity;
137
G_EXTERN int16_t g_spriteDeleteQueueSize;
138
G_EXTERN char EpisodeNames[MAXVOLUMES][33];
139
G_EXTERN char SkillNames[MAXSKILLS][33];
140
G_EXTERN char GametypeNames[MAXGAMETYPES][33];
141
G_EXTERN int32_t GametypeFlags[MAXGAMETYPES];
142
G_EXTERN char g_numGametypes;
143
G_EXTERN char g_numVolumes;
144
G_EXTERN int32_t g_timerTicsPerSecond;
145
G_EXTERN int32_t g_actorRespawnTime;
146
G_EXTERN int32_t g_itemRespawnTime;
147
G_EXTERN int32_t g_scriptSize;
148
G_EXTERN int16_t BlimpSpawnSprites[15];
149
G_EXTERN int32_t g_playerFriction;
150
G_EXTERN int32_t g_numFreezeBounces;
151
G_EXTERN int32_t g_lastSaveSlot;
3803 terminx 152
G_EXTERN int32_t g_rpgBlastRadius;
153
G_EXTERN int32_t g_pipebombBlastRadius;
154
G_EXTERN int32_t g_tripbombBlastRadius;
155
G_EXTERN int32_t g_shrinkerBlastRadius;
156
G_EXTERN int32_t g_morterBlastRadius;
157
G_EXTERN int32_t g_bouncemineBlastRadius;
158
G_EXTERN int32_t g_seenineBlastRadius;
3337 hendricks2 159
G_EXTERN char CheatKeys[2];
160
G_EXTERN char setupfilename[BMAX_PATH];
1677 terminx 161
#endif
3337 hendricks2 162
 
163
#endif