1 //-------------------------------------------------------------------------
2 /*
3 Copyright (C) 1996, 2003 - 3D Realms Entertainment
4 Copyright (C) 2017-2019 Nuke.YKT
5 
6 This file is part of Duke Nukem 3D version 1.5 - Atomic Edition
7 
8 
9 Duke Nukem 3D is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License
11 as published by the Free Software Foundation; either version 2
12 of the License, or (at your option) any later version.
13 
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17 
18 See the GNU General Public License for more details.
19 
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23 
24 Original Source: 1996 - Todd Replogle
25 Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
26 */
27 //-------------------------------------------------------------------------
28 
29 //#define RRRA
30 //#define DESYNCCORRECT
31 //#define RANDCORRECT
32 
33 #include <stdio.h>
34 #include <string.h>
35 #include <stdlib.h>
36 #include <malloc.h>
37 #include <dos.h>
38 #include <bios.h>
39 #include <io.h>
40 #include <fcntl.H>
41 #include <time.h>
42 #include <ctype.h>
43 #include "pragmas.h"
44 #include "function.h"
45 #include "build.h"
46 
47 
48 #define VOLUMEALL
49 #define PLUTOPAK
50 // #define VOLUMEONE
51 // #define ONELEVELDEMO
52 
53 // #define TEN
54 // #define BETA
55 
56 // #define AUSTRALIA
57 
58 #define MAXSLEEPDIST  16384
59 #define SLEEPTIME 24*64
60 
61 #define BYTEVERSION 108
62 
63 #define NUMPAGES 1
64 
65 #define AUTO_AIM_ANGLE          48
66 #define RECSYNCBUFSIZ 2520   //2520 is the (LCM of 1-8)*3
67 #define MOVEFIFOSIZ 256
68 
69 #define FOURSLEIGHT (1<<8)
70 
71 #include "types.h"
72 #include "file_lib.h"
73 #include "develop.h"
74 #include "gamedefs.h"
75 #include "keyboard.h"
76 #include "util_lib.h"
77 #include "function.h"
78 #include "fx_man.h"
79 #include "config.h"
80 #include "sounds.h"
81 #include "control.h"
82 #include "_rts.h"
83 #include "rts.h"
84 #include "soundefs.h"
85 
86 
87 #include "task_man.h"
88 #include "music.h"
89 #include "sndcards.h"
90 
91 #include "names.h"
92 //#include "funct.h"
93 
94 
95 extern int wp1,wp2,wp3,wp4;
96 
97 #define TICRATE (120)
98 #define TICSPERFRAME (TICRATE/26)
99 
100 // #define GC (TICSPERFRAME*44)
101 
102 #define NUM_SOUNDS 500
103 
104 #pragma aux sgn =\
105         "add ebx, ebx",\
106         "sbb eax, eax",\
107         "cmp eax, ebx",\
108         "adc eax, 0",\
109         parm [ebx]\
110 
111 #define    ALT_IS_PRESSED ( KB_KeyPressed( sc_RightAlt ) || KB_KeyPressed( sc_LeftAlt ) )
112 #define    SHIFTS_IS_PRESSED ( KB_KeyPressed( sc_RightShift ) || KB_KeyPressed( sc_LeftShift ) )
113 #ifdef RANDCORRECT
114 #define    RANDOMSCRAP                \
115 {                                     \
116     short r1, r2, r3, r4, r5, r6, r7; \
117     r1 = TRAND;                       \
118     r2 = TRAND;                       \
119     r3 = TRAND;                       \
120     r4 = TRAND;                       \
121     r5 = TRAND;                       \
122     r6 = TRAND;                       \
123     r7 = TRAND;                       \
124     EGS(s->sectnum,s->x+(r7&255)-128,s->y+(r6&255)-128,s->z-(8<<8)-(r5&8191),SCRAP6+(r4&15),-8,16,16,r3&2047,(r2&63)+64,-512-(r1&2047),i,5); \
125 }
126 #else
127 #define    RANDOMSCRAP EGS(s->sectnum,s->x+(TRAND&255)-128,s->y+(TRAND&255)-128,s->z-(8<<8)-(TRAND&8191),SCRAP6+(TRAND&15),-8,16,16,TRAND&2047,(TRAND&63)+64,-512-(TRAND&2047),i,5)
128 #endif
129 
130 #define    BLACK 0
131 #define    DARKBLUE 1
132 #define    DARKGREEN 2
133 #define    DARKCYAN 3
134 #define    DARKRED 4
135 #define    DARKPURPLE 5
136 #define    BROWN 6
137 #define    LIGHTGRAY 7
138 
139 #define    DARKGRAY 8
140 #define    BLUE 9
141 #define    GREEN 10
142 #define    CYAN 11
143 #define    RED 12
144 #define    PURPLE 13
145 #define    YELLOW 14
146 #define    WHITE 15
147 
148 #define    PHEIGHT (40<<8)
149 
150 // #define P(X) printf("%ld\n",X);
151 
152 #define WAIT(X) ototalclock=totalclock+(X);while(totalclock<ototalclock)
153 
154 
155 #define MODE_MENU       1
156 #define MODE_DEMO       2
157 #define MODE_GAME       4
158 #define MODE_EOL        8
159 #define MODE_TYPE       16
160 #define MODE_RESTART    32
161 #define MODE_SENDTOWHOM 64
162 #define MODE_END        128
163 
164 
165 #define MAXANIMWALLS 512
166 #define MAXINTERPOLATIONS 2048
167 #define NUMOFFIRSTTIMEACTIVE 192
168 
169 #define MAXCYCLERS 256
170 #define MAXSCRIPTSIZE 20460
171 #define MAXANIMATES 64
172 
173 #define SP  sprite[i].yvel
174 #define SX  sprite[i].x
175 #define SY  sprite[i].y
176 #define SZ  sprite[i].z
177 #define SS  sprite[i].shade
178 #define PN  sprite[i].picnum
179 #define SA  sprite[i].ang
180 #define SV  sprite[i].xvel
181 #define ZV  sprite[i].zvel
182 #define RX  sprite[i].xrepeat
183 #define RY  sprite[i].yrepeat
184 #define OW  sprite[i].owner
185 #define CS  sprite[i].cstat
186 #define SH  sprite[i].extra
187 #define CX  sprite[i].xoffset
188 #define CY  sprite[i].yoffset
189 #define CD  sprite[i].clipdist
190 #define PL  sprite[i].pal
191 #define SLT  sprite[i].lotag
192 #define SHT  sprite[i].hitag
193 #define SECT sprite[i].sectnum
194 
195 #define face_player 1
196 #define geth 2
197 #define getv 4
198 #define random_angle 8
199 #define face_player_slow 16
200 #define spin 32
201 #define face_player_smart 64
202 #define fleeenemy 128
203 #define jumptoplayer 257
204 #define seekplayer 512
205 #define furthestdir 1024
206 #define dodgebullet 4096
207 #ifdef RRRA
208 #define justjump1 256
209 #define justjump2 8192
210 #define windang 16384
211 #define antifaceplayerslow 32768
212 #endif
213 
214 #define TRAND krand()
215 
216 
217 #ifdef RRRA
218 #define MAX_WEAPONS  17
219 #else
220 #define MAX_WEAPONS  13
221 #endif
222 
223 #define KNEE_WEAPON          0
224 #define PISTOL_WEAPON        1
225 #define SHOTGUN_WEAPON       2
226 #define CHAINGUN_WEAPON      3
227 #define HANDBOMB_WEAPON      4
228 #define RPG_WEAPON           5
229 #define SHRINKER_WEAPON      6
230 #define FREEZE_WEAPON        7
231 #define TRIPBOMB_WEAPON      8
232 #define DEVISTATOR_WEAPON    9
233 #define HANDREMOTE_WEAPON    10
234 #define GROW_WEAPON          11
235 #define BOWLING_WEAPON       12
236 #ifdef RRRA
237 #define RA13_WEAPON          13
238 #define RA14_WEAPON          14
239 #define RA15_WEAPON          15
240 #define RA16_WEAPON          16
241 #endif
242 
243 #define T1  hittype[i].temp_data[0]
244 #define T2  hittype[i].temp_data[1]
245 #define T3  hittype[i].temp_data[2]
246 #define T4  hittype[i].temp_data[3]
247 #define T5  hittype[i].temp_data[4]
248 #define T6  hittype[i].temp_data[5]
249 
250 #define ESCESCAPE if(KB_KeyPressed( sc_Escape ) ) gameexit(" ");
251 
252 #define IFWITHIN(B,E) if((PN)>=(B) && (PN)<=(E))
253 #define KILLIT(KX) {deletesprite(KX);goto BOLT;}
254 
255 
256 #define IFMOVING if(ssp(i,CLIPMASK0))
257 #define IFHIT j=ifhitbyweapon(i);if(j >= 0)
258 #define IFHITSECT j=ifhitsectors(s->sectnum);if(j >= 0)
259 
260 #define AFLAMABLE(X) (X==TREE1||X==TREE2||X==TIRE||X==CONE)
261 
262 
263 #define IFSKILL1 if(player_skill<1)
264 #define IFSKILL2 if(player_skill<2)
265 #define IFSKILL3 if(player_skill<3)
266 #define IFSKILL4 if(player_skill<4)
267 
268 #define rnd(X) ((TRAND>>8)>=(255-(X)))
269 
270 typedef struct
271 {
272     short i;
273     int voice;
274 } SOUNDOWNER;
275 
276 #define __USRHOOKS_H
277 
278 enum USRHOOKS_Errors
279    {
280    USRHOOKS_Warning = -2,
281    USRHOOKS_Error   = -1,
282    USRHOOKS_Ok      = 0
283    };
284 
285 typedef struct
286 {
287     signed char avel, horz;
288     short fvel, svel;
289     unsigned long bits;
290 } input;
291 
292 extern input inputfifo[MOVEFIFOSIZ][MAXPLAYERS], sync[MAXPLAYERS];
293 extern input recsync[RECSYNCBUFSIZ];
294 
295 extern long movefifosendplc;
296 
297 typedef struct
298 {
299     char *ptr;
300     volatile char lock;
301     int  length, num;
302 } SAMPLE;
303 
304 static struct animwalltype
305 {
306         short wallnum;
307         long tag;
308 };
309 extern struct animwalltype animwall[MAXANIMWALLS];
310 extern short numanimwalls,probey,lastprobey;
311 
312 extern char *mymembuf;
313 extern char typebuflen,typebuf[41];
314 extern char MusicPtr[72000];
315 extern long msx[2048],msy[2048];
316 extern short cyclers[MAXCYCLERS][6],numcyclers;
317 extern char myname[13];
318 
319 typedef struct user_defs
320 {
321     char god,warp_on,cashman,eog,showallmap;
322     char show_help,scrollmode,clipping;
323     char user_name[MAXPLAYERS][32];
324     char user_pals[MAXPLAYERS];
325     char ridecule[10][40];
326     char savegame[10][22];
327     char pwlockout[128],rtsname[128];
328     char overhead_on,last_overhead,showweapons;
329 
330     short pause_on,from_bonus;
331     short camerasprite,last_camsprite;
332     short last_level,secretlevel;
333 
334     long const_visibility,uw_framerate;
335     long camera_time,folfvel,folavel,folx,foly,fola;
336     long reccnt;
337 
338     int32 entered_name,screen_tilting,shadows,fta_on,executions,auto_run;
339     int32 coords,tickrate,m_coop,coop,screen_size,lockout,crosshair;
340     int32 wchoice[MAXPLAYERS][MAX_WEAPONS],playerai;
341 
342     int32 respawn_monsters,respawn_items,respawn_inventory,recstat,monsters_off,brightness;
343     int32 m_respawn_items,m_respawn_monsters,m_respawn_inventory,m_recstat,m_monsters_off,detail;
344     int32 m_ffire,ffire,m_player_skill,m_level_number,m_volume_number,multimode;
345     int32 player_skill,level_number,volume_number,m_marker,marker,mouseflip;
346 
347 };
348 
349 typedef struct player_orig
350 {
351     long ox,oy,oz;
352     short oa,os;
353 };
354 
355 
356 extern char numplayersprites;
357 extern char picsiz[MAXTILES];
358 
359 void add_ammo( short, short, short, short );
360 
361 
362 extern long fricxv,fricyv;
363 
364 typedef struct player_struct
365 {
366     long zoom,exitx,exity,loogiex[64],loogiey[64],numloogs,loogcnt;
367     long posx, posy, posz, horiz, ohoriz, ohorizoff, invdisptime;
368     long bobposx,bobposy,oposx,oposy,oposz,pyoff,opyoff;
369     long posxv,posyv,poszv,last_pissed_time,truefz,truecz;
370     long player_par,visibility;
371     long bobcounter,weapon_sway;
372     long pals_time,randomflamex,crack_time;
373     long at280; // stairs
374     short fogtype; // unused
375     long at286, at28a; // noisepos
376     short at28e; // donoise
377     long at290; // noiseradius
378 
379     short ang,oang,angvel,cursectnum,look_ang,last_extra;
380     short ammo_amount[MAX_WEAPONS],wackedbyactor,frag,fraggedself;
381 
382     short curr_weapon, last_weapon, tipincs, horizoff, wantweaponfire;
383 #ifdef RRRA
384     short holoduke_amount,newowner,hurt_delay,hurt_delay2,hbomb_hold_delay;
385 #else
386     short holoduke_amount,newowner,hurt_delay,hbomb_hold_delay;
387 #endif
388     short jumping_counter,airleft,knee_incs,access_incs;
389     short fta,ftq,access_wallnum,access_spritenum;
390     short kickback_pic,got_access,weapon_ang,firstaid_amount;
391     short somethingonplayer,on_crane,i,one_parallax_sectnum;
392     short over_shoulder_on,random_club_frame,fist_incs;
393     short one_eighty_count,cheat_phase;
394     short dummyplayersprite,extra_extra8,quick_kick;
395     short heat_amount,actorsqu,timebeforeexit,customexitsound;
396 
397     short weaprecs[256],weapreccnt,interface_toggle_flag;
398 
399     short rotscrnang,dead_flag,show_empty_weapon;
400     short scuba_amount,jetpack_amount,steroids_amount,shield_amount;
401     short holoduke_on,pycount,weapon_pos,frag_ps,subweapon;
402     short transporter_hold,last_full_weapon,footprintshade,boot_amount;
403 
404     int scream_voice;
405 
406     char gm,on_warping_sector,footprintcount;
407     char hbomb_on,jumping_toggle,rapid_fire_hold,on_ground;
408     char name[13],inven_icon,buttonpalette;
409 
410     char jetpack_on,spritebridge,lastrandomspot;
411     char scuba_on,footprintpal,heat_on;
412 
413     char  holster_weapon,falling_counter,aim_mode;
414     char  gotweapon[MAX_WEAPONS],refresh_inventory,*palette;
415 
416     char toggle_key_flag,knuckle_incs; // ,select_dir;
417     char walking_snd_toggle, palookup, hard_landing;
418     char max_secret_rooms,secret_rooms,/*fire_flag,*/pals[3];
419     short max_actors_killed,actors_killed;
420     char return_to_center;
421     short keys[5];
422     short at57c; // hbomb_time
423     long at57e; // hbomb_offset
424     long at582; // unused ?
425     short drunkang, eatang, drink_amt, eat;
426     long at58e, at592; // drunk, eat timer
427     char at596, at597, at598, at599, at59a; // justdrunk, justeat, unused, shotstate[2]
428     short at59b, at59d; // recoil, yehaa
429 #ifdef RRRA
430     long OnMotorcycle;
431     long MotoOnGround;
432     long raat5b5;
433     long raat5b9;
434     short MotoSpeed;
435     short TiltStatus;
436     short raat5c1;
437     short VBumpTarget;
438     short VBumpNow;
439     long raat5c7;
440     short TurbCount;
441     short raat5cd;
442     short raat5cf;
443     long OnBoat, NotOnWater, raat5d9, raat5dd, raat5e1, SeaSick, nocheat, DrugMode;
444     short raat5f1, raat5f3, raat5f5, raat5f7, raat5f9;
445     short SlotWin;
446     long raat5fd, raat601;
447     short raat605, raat607, raat609;
448     long raat60b;
449 #endif
450 };
451 
452 extern unsigned char tempbuf[2048], packbuf[576];
453 
454 extern long gc,max_player_health,max_armour_amount,max_ammo_amount[MAX_WEAPONS];
455 
456 extern long impact_damage,respawnactortime,respawnitemtime;
457 
458 #define MOVFIFOSIZ 256
459 
460 extern short spriteq[1024],spriteqloc,spriteqamount;
461 extern struct player_struct ps[MAXPLAYERS];
462 extern struct player_orig po[MAXPLAYERS];
463 extern struct user_defs ud;
464 extern short int moustat;
465 extern short int global_random;
466 extern long scaredfallz;
467 extern char buf[80]; //My own generic input buffer
468 
469 extern char fta_quotes[NUMOFFIRSTTIMEACTIVE][64];
470 extern char scantoasc[128],ready2send;
471 extern char scantoascwithshift[128];
472 
473 extern fx_device device;
474 extern SAMPLE Sound[ NUM_SOUNDS ];
475 extern int32 VoiceToggle,AmbienceToggle;
476 extern SOUNDOWNER SoundOwner[NUM_SOUNDS][4];
477 
478 extern char *user_quote;
479 extern short user_quote_time;
480 
481 extern char playerreadyflag[MAXPLAYERS],playerquitflag[MAXPLAYERS];
482 extern char sounds[NUM_SOUNDS][14];
483 
484 extern long script[MAXSCRIPTSIZE],*scriptptr,*insptr,*labelcode,labelcnt;
485 extern char *label,*textptr,error,warning,killit_flag;
486 extern long *actorscrptr[MAXTILES],*parsing_actor;
487 extern char actortype[MAXTILES];
488 extern char *music_pointer;
489 
490 extern char ipath[80],opath[80];
491 
492 extern char music_fn[4][11][13],music_select;
493 extern char env_music_fn[4][13];
494 extern short camsprite;
495 
496 // extern char gotz;
497 extern char inspace(short sectnum);
498 
499 
500 typedef struct weaponhit
501 {
502     char cgg;
503     short picnum,ang,extra,owner,movflag;
504     short tempang,actorstayput,dispicnum;
505     short timetosleep;
506     long floorz,ceilingz,lastvx,lastvy,bposx,bposy,bposz;
507     long temp_data[6];
508 };
509 
510 extern struct weaponhit hittype[MAXSPRITES];
511 
512 extern input loc;
513 extern input recsync[RECSYNCBUFSIZ];
514 extern long avgfvel, avgsvel, avgavel, avghorz, avgbits;
515 
516 extern short numplayers, myconnectindex;
517 extern short connecthead, connectpoint2[MAXPLAYERS];   //Player linked list variables (indeces, not connection numbers)
518 extern short screenpeek;
519 
520 extern int current_menu;
521 extern long tempwallptr,animatecnt;
522 extern long lockclock,frameplace;
523 extern char display_mirror,loadfromgrouponly,rtsplaying;
524 
525 extern long movefifoend[MAXPLAYERS], groupfile;
526 extern long ototalclock;
527 
528 extern long *animateptr[MAXANIMATES], animategoal[MAXANIMATES];
529 extern long animatevel[MAXANIMATES];
530 // extern long oanimateval[MAXANIMATES];
531 extern short neartagsector, neartagwall, neartagsprite;
532 extern long neartaghitdist;
533 extern short animatesect[MAXANIMATES];
534 extern long movefifoplc, vel,svel,angvel,horiz;
535 
536 extern short mirrorwall[64], mirrorsector[64], mirrorcnt;
537 
538 extern void testcallback(long);
539 
540 #define NUMKEYS 19
541 
542 extern long frameplace, chainplace, chainnumpages;
543 extern volatile long checksume;
544 
545 #include "funct.h"
546 
547 // Hack to fix variables layout
548 extern int wp5,wp6,wp7,wp8,wp9,wp10,wp11,wp12,wp13,wp14,wp15,wp16,wp17,wp18,wp19,wp20,wp21,wp22,wp23,wp24;
549 
550 extern char screencapt;
551 extern short soundps[NUM_SOUNDS],soundpe[NUM_SOUNDS],soundvo[NUM_SOUNDS];
552 extern char soundpr[NUM_SOUNDS],soundm[NUM_SOUNDS];
553 extern long soundsiz[NUM_SOUNDS];
554 extern char level_names[44][33];
555 extern long partime[44],designertime[44];
556 #ifdef RRRA
557 extern char volume_names[6][33];
558 #else
559 extern char volume_names[4][33];
560 #endif
561 extern char skill_names[6][33];
562 extern char level_file_names[44][128];
563 
564 extern int32 SoundToggle,MusicToggle;
565 extern short last_threehundred,lastsavedpos;
566 extern char restorepalette;
567 
568 extern short buttonstat;
569 extern long cachecount;
570 extern char boardfilename[128],waterpal[768],slimepal[768],titlepal[768],drealms[768],endingpal[768];
571 extern char betaname[80];
572 extern char cachedebug,earthquaketime;
573 extern char networkmode, waitabort;
574 extern char lumplockbyte[11];
575 
576     //DUKE3D.H - replace the end "my's" with this
577 extern long myx, omyx, myxvel, myy, omyy, myyvel, myz, omyz, myzvel;
578 extern short myhoriz, omyhoriz, myhorizoff, omyhorizoff, globalskillsound;
579 extern short myang, omyang, mycursectnum, myjumpingcounter;
580 extern char myjumpingtoggle, myonground, myhardlanding,myreturntocenter;
581 extern long fakemovefifoplc;
582 extern long myxbak[MOVEFIFOSIZ], myybak[MOVEFIFOSIZ], myzbak[MOVEFIFOSIZ];
583 extern long myhorizbak[MOVEFIFOSIZ];
584 extern short myangbak[MOVEFIFOSIZ];
585 
586 extern short weaponsandammosprites[15];
587 
588 
589 
590 
591 //DUKE3D.H:
592 typedef struct
593 {
594         short frag[MAXPLAYERS], got_access, last_extra, shield_amount, curr_weapon;
595         short ammo_amount[MAX_WEAPONS], holoduke_on;
596         char gotweapon[MAX_WEAPONS], inven_icon, jetpack_on, heat_on;
597         short firstaid_amount, steroids_amount, holoduke_amount, jetpack_amount;
598         short heat_amount, scuba_amount, boot_amount;
599         short last_weapon, weapon_pos, kickback_pic;
600 
601 } STATUSBARTYPE;
602 
603 extern STATUSBARTYPE sbar;
604 extern short frags[MAXPLAYERS][MAXPLAYERS];
605 extern long cameradist, cameraclock, rdnkfriction,show_shareware;
606 extern char networkmode, movesperpacket;
607 extern char gamequit;
608 
609 extern char pus,pub,camerashitable,freezerhurtowner,lasermode;
610 extern char syncstat, syncval[MAXPLAYERS][MOVEFIFOSIZ];
611 extern signed char multiwho, multipos, multiwhat, multiflag;
612 extern long syncvalhead[MAXPLAYERS], syncvaltail, syncvaltottail;
613 extern long numfreezebounces,rpgblastradius,pipebombblastradius,powderkegblastradius,shrinkerblastradius,morterblastradius,bouncemineblastradius,seenineblastradius;
614 extern char stereo,eightytwofifty,playerswhenstarted,playonten;
615 extern long myminlag[MAXPLAYERS], mymaxlag, otherminlag, bufferjitter;
616 
617 extern long numinterpolations, startofdynamicinterpolations;
618 extern long oldipos[MAXINTERPOLATIONS];
619 extern long bakipos[MAXINTERPOLATIONS];
620 extern long *curipos[MAXINTERPOLATIONS];
621 
622 extern long stereomode, stereowidth, stereopixelwidth;
623 
624 extern short chickenplant, thunderon, ufospawn, ufocnt, cdon, hulkspawn, vixenlevel;
625 
626 extern short ambientfx;
627 extern char shadedsector[MAXSECTORS];
628 extern short ambienthitag[64];
629 extern short ambientlotag[64];
630 extern short ambientsprite[64];
631 
632 extern short lastlevel, turdlevel;
633 
634 extern long cdTrackStart[101];
635 extern long cdromtime;
636 extern short oldtrack;
637 extern short whichtrack;
638 extern char rbEnabled;
639 extern char cdhitrack;
640 extern char cdlotrack;
641 extern char cdDrive;
642 extern short cddrives;
643 
644 #ifdef RRRA
645 extern long WindTime;
646 extern long WindDir;
647 extern short word_119BD8;
648 extern short word_119BDA;
649 extern short word_119BDC;
650 extern short BellTime;
651 extern short word_119BE0;
652 extern short word_119BE2;
653 extern short word_119BE4;
654 #endif
655