Original Doom 2 Dos Source code as found on Mac/Dos archive.org leak.

This commit is contained in:
justin
2024-04-09 19:46:44 -07:00
commit 9f642ee002
86 changed files with 86 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
// AM_data.h : The vector graphics for the automap
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
#ifndef __AMMAP_H__
+1
View File
@@ -0,0 +1 @@
// the asteroids-ish game inside of the automap
+1
View File
@@ -0,0 +1 @@
#ifndef __AMOIDS__
+1
View File
@@ -0,0 +1 @@
// dither.c
+1
View File
@@ -0,0 +1 @@
// dither.h
+1
View File
@@ -0,0 +1 @@
// DoomData.h
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
//
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
#ifndef __HULIB__
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
#ifndef __HU_STUFF_H__
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
#include "sndserver.h" #include <stdlib.h> #include <stdio.h> #include <audio.h> #include "irix.h" #define al_QUEUESIZE SAMPLECOUNT*2 //#define al_QUEUESIZE SAMPLECOUNT extern int snd_verbose; extern int myargc; extern char **myargv; static ALconfig al_config; static ALport al_outport; void I_InitMusic(void) { } void I_InitSound(int samplerate, int samplesize) { long paramset[16*2]; if (samplesize == 24) samplesize = 32; // takes care of padding for 24-bit sound ALseterrorhandler(0); // turn off audio library error handler al_config = ALnewconfig(); // create new config for specific rate & format // ALsetchannels(al_config, AL_MONO); // mono ALsetchannels(al_config, AL_STEREO); // stereo ALsetqueuesize(al_config, al_QUEUESIZE); // submission queue size ALsetsampfmt(al_config, AL_SAMPFMT_TWOSCOMP); // 2's complement fmt ALsetwidth(al_config, samplesize/8); // word size al_outport = ALopenport("iddigout1", "w", al_config); if (!al_outport) { fprintf(stderr, "Could not open audio port\n"); exit(-1); } paramset[0] = AL_OUTPUT_RATE; paramset[1] = samplerate; ALsetparams(AL_DEFAULT_DEVICE, paramset, 2); paramset[0*2] = AL_INPUT_SOURCE; paramset[1*2] = AL_LEFT_INPUT_ATTEN; paramset[2*2] = AL_RIGHT_INPUT_ATTEN; paramset[3*2] = AL_INPUT_RATE; paramset[4*2] = AL_OUTPUT_RATE; paramset[5*2] = AL_LEFT_SPEAKER_GAIN; paramset[6*2] = AL_RIGHT_SPEAKER_GAIN; paramset[7*2] = AL_INPUT_COUNT; paramset[8*2] = AL_OUTPUT_COUNT; paramset[9*2] = AL_UNUSED_COUNT; paramset[10*2] = AL_SYNC_INPUT_TO_AES; paramset[11*2] = AL_SYNC_OUTPUT_TO_AES; paramset[12*2] = AL_MONITOR_CTL; paramset[13*2] = AL_LEFT_MONITOR_ATTEN; paramset[14*2] = AL_RIGHT_MONITOR_ATTEN; ALgetparams(AL_DEFAULT_DEVICE, paramset, 15*2); if (snd_verbose) { fprintf(stderr, "AL_INPUT_SOURCE=%d\n", paramset[0*2+1]); fprintf(stderr, "AL_LEFT_INPUT_ATTEN=%d\n", paramset[1*2+1]); fprintf(stderr, "AL_RIGHT_INPUT_ATTEN=%d\n", paramset[2*2+1]); fprintf(stderr, "AL_INPUT_RATE=%d\n", paramset[3*2+1]); fprintf(stderr, "AL_OUTPUT_RATE=%d\n", paramset[4*2+1]); fprintf(stderr, "AL_LEFT_SPEAKER_GAIN=%d\n", paramset[5*2+1]); fprintf(stderr, "AL_RIGHT_SPEAKER_GAIN=%d\n", paramset[6*2+1]); fprintf(stderr, "AL_INPUT_COUNT=%d\n", paramset[7*2+1]); fprintf(stderr, "AL_OUTPUT_COUNT=%d\n", paramset[8*2+1]); fprintf(stderr, "AL_UNUSED_COUNT=%d\n", paramset[9*2+1]); fprintf(stderr, "AL_SYNC_INPUT_TO_AES=%d\n", paramset[10*2+1]); fprintf(stderr, "AL_SYNC_OUTPUT_TO_AES=%d\n", paramset[11*2+1]); fprintf(stderr, "AL_MONITOR_CTL=%d\n", paramset[12*2+1]); fprintf(stderr, "AL_LEFT_MONITOR_ATTEN=%d\n", paramset[13*2+1]); fprintf(stderr, "AL_RIGHT_MONITOR_ATTEN=%d\n", paramset[14*2+1]); fprintf(stderr, "ALgetchannels()=%d\n", ALgetchannels(al_config)); fprintf(stderr, "ALgetqueuesize()=%d\n", ALgetqueuesize(al_config)); fprintf(stderr, "ALgetsampfmt()=%d\n", ALgetsampfmt(al_config)); fprintf(stderr, "ALgetwidth()=%d\n", ALgetwidth(al_config)); } } signed char debugbuffer[1024][8]; void I_SubmitOutputBuffer(void *samples, int samplecount) { int i; /* for (i=0 ; i<1024 ; i++) { debugbuffer[i][0] = ((signed char *) samples)[i]; debugbuffer[i][1] = ((signed char *) samples)[i+1]; } ALwritesamps(al_outport, debugbuffer, 1024); */ ALwritesamps(al_outport, samples, samplecount*2); } void I_ShutdownSound(void) { ALfreeconfig(al_config); ALcloseport(al_outport); } void I_ShutdownMusic(void) { }
+1
View File
@@ -0,0 +1 @@
#ifndef __IRIX_H__ #define __IRIX_H__ void I_InitMusic(void); void I_InitSound(int samplerate, int samplesound); void I_SubmitOutputBuffer(void *samples, int samplecount); void I_ShutdownSound(void); void I_ShutdownMusic(void); #endif
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
#ifndef __I_HEADER_H__ #define __I_HEADER_H__ #include "DoomDef.h" //-------- //SOUND IO //-------- #define FREQ_LOW 0x40 #define FREQ_NORM 0x80 #define FREQ_HIGH 0xff void I_SetMasterVolume(int volume); void I_TurnOffSfx(void); void I_TurnOnSfx(void); void I_TurnOffMusic(void); void I_TurnOnMusic(void); // MUSIC I/O // int I_RegisterSong(void *songdata); // called by anything that wants to register a song lump with the sound lib // calls Paul's function of the similar name to register music only. // note that the song data is the same for any sound card and is paul's // MUS format. Returns a handle which will be passed to all other music // functions. void I_UnregisterSong(int handle); // called by anything which is finished with a song and no longer needs // the sound library to be aware of it. All songs should be stopped // before calling this, but it will double check and stop it if necessary. void I_LoopSong(int handle); // called by anything that wishes to start music. // plays a song, and when the song is done, starts playing it again in // an endless loop. the start is faded in over three seconds. void I_FadeOutSong(int handle, int fotime); // called by anything that wishes to stop music. // fades out the song over <fotime> milliseconds. void I_StopSong(int handle); // called by anything that wishes to stop music. // stops a song abruptly. // SFX I/O // void *I_GetSoundEffect (char *soundname); // called by routines which wish to play a sound effect at some later // time. Pass it the lump name of a sound effect WITHOUT the sfx // prefix. This means the maximum name length is 7 letters/digits. // The prefixes for different sound cards are 'S','M','A', and 'P'. // They refer to the card type. The routine will cache in the // appropriate sound effect when it is played. void I_UngetSoundEffect (void *soundset); // called by routines which wish to no longer use the sounds at all // frees up the associated structure. It stops any currently playing // sound effects. void I_StartSound (channel_t *c, int vol, int sep, int pitch, int priority); // Starts a sound in a particular sound channel void I_UpdateSoundParams(channel_t *c, int vol, int sep, int pitch); // Updates the volume, separation, and pitch of a sound channel void I_StopSound(channel_t *c); // Stops a sound channel int I_SoundIsPlaying(channel_t *c); // called by S_*()'s to see if a channel is still playing. Returns 0 // if no longer playing, 1 if playing. #endif
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
.386 .MODEL small .DATA .CODE IF 0 #define PEL_WRITE_ADR 0x3c8 #define PEL_READ_ADR 0x3c7 #define PEL_DATA 0x3c9 ENDIF ;================ ; ; I_DivException ; ;================ PROC I_DivException_ PUBLIC I_DivException_ mov edx,03c9h mov al,63 out dx,al mov ebx,0ffffffh mov eax,[ebx] retf ENDP ;================ ; ; I_SetDivException ; ;================ PROC I_SetDivException_ PUBLIC I_SetDivException_ pusha mov eax,0212h mov ebx,0 mov ecx,cs mov edx,OFFSET I_DivException_ int 31h jnc good popa mov eax,0 ret good: popa mov eax,1 ret ENDP ;================ ; ; I_ReadJoystick ; ; Read the absolute joystick values ; returns false if not connected ;================ .data _joystickx dd 0 _joysticky dd 0 PUBLIC _joystickx, _joysticky .code PROC I_ReadJoystick_ PUBLIC I_ReadJoystick_ pusha pushf ; state of interrupt flag cli mov dx,0201h in al,dx out dx,al ; Clear the resistors mov ah,1 ; Get masks into registers mov ch,2 xor esi,esi ; Clear count registers xor edi,edi xor ebx,ebx ; Clear high byte of bx for later mov ebp,10000 ; joystick is disconnected if value is this big jloop: in al,dx ; Get bits indicating whether all are finished dec ebp ; Check bounding register jz bad ; We have a silly value - abort mov bl,al ; Duplicate the bits and bl,ah ; Mask off useless bits (in [xb]) add esi,ebx ; Possibly increment count register mov cl,bl ; Save for testing later mov bl,al and bl,ch ; [yb] add edi,ebx add cl,bl jnz jloop ; If both bits were 0, drop out done: mov [_joystickx],esi shr edi,1 ; because 2s were added mov [_joysticky],edi popf ; restore interrupt flag popa mov eax,1 ; read was ok ret bad: popf ; restore interrupt flag popa xor eax,eax ; read was bad ret ENDP END
+1
View File
@@ -0,0 +1 @@
#include "doomdef.h" void main (int argc, char **argv) { myargc = argc; myargv = argv; D_DoomMain (); }
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
#ifndef __SOUND__ #define __SOUND__ #define SND_TICRATE 140 // tic rate for updating sound #define SND_MAXSONGS 40 // max number of songs in game #define SND_SAMPLERATE 11025 // sample rate of sound effects typedef enum { snd_none, snd_PC, snd_Adlib, snd_SB, snd_PAS, snd_GUS, snd_MPU, snd_MPU2, snd_MPU3, snd_AWE, snd_ENS, snd_CODEC, NUM_SCARDS } cardenum_t; #endif
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
#include "doomdef.h" #include "p_local.h" //================================================================== // // TELEPORTATION // //================================================================== int EV_Teleport( line_t *line,int side,mobj_t *thing ) { int i; int tag; mobj_t *m,*fog; unsigned an; thinker_t *thinker; sector_t *sector; fixed_t oldx, oldy, oldz; if (thing->flags & MF_MISSILE) return 0; // don't teleport missiles if (side == 1) // don't teleport if hit back of line, return 0; // so you can get out of teleporter tag = line->tag; for (i = 0; i < numsectors; i++) if (sectors[ i ].tag == tag ) { thinker = thinkercap.next; for (thinker = thinkercap.next ; thinker != &thinkercap ; thinker = thinker->next) { if (thinker->function != P_MobjThinker) continue; // not a mobj m = (mobj_t *)thinker; if (m->type != MT_TELEPORTMAN ) continue; // not a teleportman sector = m->subsector->sector; if (sector-sectors != i ) continue; // wrong sector oldx = thing->x; oldy = thing->y; oldz = thing->z; if (!P_TeleportMove (thing, m->x, m->y)) return 0; thing->z = thing->floorz; if (thing->player) thing->player->viewz = thing->z+thing->player->viewheight; // spawn teleport fog at source and destination fog = P_SpawnMobj (oldx, oldy, oldz, MT_TFOG); S_StartSound (fog, sfx_telept); an = m->angle >> ANGLETOFINESHIFT; fog = P_SpawnMobj (m->x+20*finecosine[an], m->y+20*finesine[an] , thing->z, MT_TFOG); S_StartSound (fog, sfx_telept); if (thing->player) thing->reactiontime = 18; // don't move for a bit thing->angle = m->angle; thing->momx = thing->momy = thing->momz = 0; return 1; } } return 0; }
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
#ifndef __SOUNDSH__ #define __SOUNDSH__ #include "soundst.h" /* * Identifiers for all music in game. */ typedef enum { mus_None, mus_e1m1, mus_e1m2, mus_e1m3, mus_e1m4, mus_e1m5, mus_e1m6, mus_e1m7, mus_e1m8, mus_e1m9, mus_e2m1, mus_e2m2, mus_e2m3, mus_e2m4, mus_e2m5, mus_e2m6, mus_e2m7, mus_e2m8, mus_e2m9, mus_e3m1, mus_e3m2, mus_e3m3, mus_e3m4, mus_e3m5, mus_e3m6, mus_e3m7, mus_e3m8, mus_e3m9, mus_inter, mus_intro, mus_bunny, mus_victor, mus_introa, mus_runnin, mus_stalks, mus_countd, mus_betwee, mus_doom, mus_the_da, mus_shawn, mus_ddtblu, mus_in_cit, mus_dead, mus_stlks2, mus_theda2, mus_doom2, mus_ddtbl2, mus_runni2, mus_dead2, mus_stlks3, mus_romero, mus_shawn2, mus_messag, mus_count2, mus_ddtbl3, mus_ampie, mus_theda3, mus_adrian, mus_messg2, mus_romer2, mus_tense, mus_shawn3, mus_openin, mus_evil, mus_ultima, mus_read_m, mus_dm2ttl, mus_dm2int, NUMMUSIC } musicenum_t; /* * Identifiers for all sfx in game. */ typedef enum { sfx_None, sfx_pistol, sfx_shotgn, sfx_sgcock, sfx_dshtgn, sfx_dbopn, sfx_dbcls, sfx_dbload, sfx_plasma, sfx_bfg, sfx_sawup, sfx_sawidl, sfx_sawful, sfx_sawhit, sfx_rlaunc, sfx_rxplod, sfx_firsht, sfx_firxpl, sfx_pstart, sfx_pstop, sfx_doropn, sfx_dorcls, sfx_stnmov, sfx_swtchn, sfx_swtchx, sfx_plpain, sfx_dmpain, sfx_popain, sfx_vipain, sfx_mnpain, sfx_pepain, sfx_slop, sfx_itemup, sfx_wpnup, sfx_oof, sfx_telept, sfx_posit1, sfx_posit2, sfx_posit3, sfx_bgsit1, sfx_bgsit2, sfx_sgtsit, sfx_cacsit, sfx_brssit, sfx_cybsit, sfx_spisit, sfx_bspsit, sfx_kntsit, sfx_vilsit, sfx_mansit, sfx_pesit, sfx_sklatk, sfx_sgtatk, sfx_skepch, sfx_vilatk, sfx_claw, sfx_skeswg, sfx_pldeth, sfx_pdiehi, sfx_podth1, sfx_podth2, sfx_podth3, sfx_bgdth1, sfx_bgdth2, sfx_sgtdth, sfx_cacdth, sfx_skldth, sfx_brsdth, sfx_cybdth, sfx_spidth, sfx_bspdth, sfx_vildth, sfx_kntdth, sfx_pedth, sfx_skedth, sfx_posact, sfx_bgact, sfx_dmact, sfx_bspact, sfx_bspwlk, sfx_vilact, sfx_noway, sfx_barexp, sfx_punch, sfx_hoof, sfx_metal, sfx_chgun, sfx_tink, sfx_bdopn, sfx_bdcls, sfx_itmbk, sfx_flame, sfx_flamst, sfx_getpow, sfx_bospit, sfx_boscub, sfx_bossit, sfx_bospn, sfx_bosdth, sfx_manatk, sfx_mandth, sfx_sssit, sfx_ssdth, sfx_keenpn, sfx_keendt, sfx_skeact, sfx_skesit, sfx_skeatk, sfx_radio, NUMSFX } sfxenum_t; extern musicinfo_t S_music[]; extern sfxinfo_t S_sfx[]; #endif
+1
View File
@@ -0,0 +1 @@
#ifndef __SOUNDSTH__ #define __SOUNDSTH__ #define S_MAX_VOLUME 127 #define S_CLIPPING_DIST (1200*0x10000) // when to clip out sounds #define S_CLOSE_DIST (200*0x10000) // when sounds should be max'd out #define S_ATTENUATOR ((S_CLIPPING_DIST-S_CLOSE_DIST)>>FRACBITS) #define NORM_PITCH 128 #define NORM_PRIORITY 64 #define NORM_VOLUME snd_MaxVolume #define S_PITCH_PERTURB 1 #define NORM_SEP 128 #define S_STEREO_SWING (96*0x10000) #define S_IFRACVOL 30 // % attenuation from front to back #define NA 0 #define S_NUMCHANNELS 2 // See gensounds.h and gensounds.c for what soundst.h is made of. typedef struct { char *name; // up to 6-character name int lumpnum; // lump number of music void *data; // music data int handle; // music handle once registered } musicinfo_t; typedef struct sfxinfo_struct sfxinfo_t; struct sfxinfo_struct { char *name; // up to 6-character name int singularity; // Sfx singularity (only one at a time) int priority; // Sfx priority sfxinfo_t *link; // referenced sound if a link int pitch; // pitch if a link int volume; // volume if a link void *data; // sound data int usefulness; // this is checked every second to see if sound // can be thrown out (if 0, then decrement, if -1, // then throw out, if > 0, then it's in use) int lumpnum; // lump number of sfx }; typedef struct { sfxinfo_t *sfxinfo; // sound information (if null, channel avail.) void *origin; // origin of sound int handle; // handle of the sound being played } channel_t; enum {Music, Sfx, SfxLink}; enum {PC=1, Adlib=2, SB=4, Midi=8}; // cards available enum {sfxThrowOut=-1, sfxNotUsed=0}; // Initialize the sound code at start of level // void S_Start(void); // Start sound for thing at <origin> using <sound_id> from sounds.h // extern void S_StartSound(void *origin, int sound_id); // Will start a sound at a given volume. extern void S_StartSoundAtVolume(void *origin, int sound_id, int volume); // Stop sound for thing at <origin> // extern void S_StopSound(void *origin); // Start music using <music_id> from sounds.h // extern void S_StartMusic(int music_id); // Start music using <music_id> from sounds.h, and set whether looping // extern void S_ChangeMusic(int music_id, int looping); // Stops the music // extern void S_StopMusic(void); void S_PauseSound(void); void S_ResumeSound(void); // Updates music & sounds // extern void S_UpdateSounds(void *listener); void S_SetMusicVolume(int volume); void S_SetSfxVolume(int volume); // Initializes sound stuff, including volume // void S_Init(int , int); //-------- //SOUND IO //-------- #define FREQ_LOW 0x40 #define FREQ_NORM 0x80 #define FREQ_HIGH 0xff void I_SetMusicVolume(int volume); void I_SetSfxVolume(int volume); // MUSIC I/O // void I_PauseSong(int handle); void I_ResumeSong(int handle); void I_PlaySong(int handle, int looping); // called by anything that wishes to start music. // plays a song, and when the song is done, starts playing it again in // an endless loop. void I_StopSong(int handle); // stops a song over 3 seconds. int I_RegisterSong(void *data); // registers a song handle to song data void I_UnRegisterSong(int handle); // see above then think backwards int I_QrySongPlaying(int handle); // is the song playing? // SFX I/O // void I_SetChannels(int channels); int I_GetSfxLumpNum (sfxinfo_t *); int I_StartSound (int id, void *data, int vol, int sep, int pitch, int priority); // Starts a sound in a particular sound channel void I_UpdateSoundParams(int handle, int vol, int sep, int pitch); // Updates the volume, separation, and pitch of a sound channel void I_StopSound(int handle); // Stops a sound channel int I_SoundIsPlaying(int handle); // called by S_*()'s to see if a channel is still playing. Returns 0 // if no longer playing, 1 if playing. extern sfxinfo_t S_sfx[]; // the complete set of sound effects extern musicinfo_t S_music[]; // the complete set of music #endif
+1
View File
@@ -0,0 +1 @@
// ST_lib.c : the status bar widget code #include <ctype.h> #include "doomdef.h" #include "st_stuff.h" #include "st_lib.h" #include "r_local.h" extern boolean automapactive; // in AM_map.c patch_t *sttminus; void STlib_init(void) { sttminus = (patch_t *) W_CacheLumpName("STTMINUS", PU_STATIC); } void STlib_initNum(st_number_t *n, int x, int y, patch_t **pl, int *num, boolean *on, int width) { n->x = x; n->y = y; n->oldnum = 0; n->width = width; n->num = num; n->on = on; n->p = pl; } // A fairly efficient way to draw a number based on differences from the // old number. void STlib_drawNum(st_number_t *n, boolean refresh) { int numdigits = n->width; int num = *n->num; int w = SHORT(n->p[0]->width), h = SHORT(n->p[0]->height); int x = n->x; int neg; n->oldnum = *n->num; neg = num < 0; if (neg) { if (numdigits == 2 && num < -9) num = -9; else if (numdigits == 3 && num < -99) num = -99; num = -num; } // clear the area x = n->x - numdigits*w; if (n->y - ST_Y < 0) I_Error("drawNum: n->y - ST_Y < 0"); V_CopyRect(x, n->y - ST_Y, BG, w*numdigits, h, x, n->y, FG); // if non-number, don't draw it if (num == 1994) return; x = n->x; // in the special case of 0, you draw 0 if (!num) V_DrawPatch(x - w, n->y, FG, n->p[ 0 ]); // draw the new number while (num && numdigits--) { x -= w; V_DrawPatch(x, n->y, FG, n->p[ num % 10 ]); num /= 10; } // draw a minus sign if necessary if (neg) V_DrawPatch(x - 8, n->y, FG, sttminus); } void STlib_updateNum(st_number_t *n, boolean refresh) { if (*n->on) STlib_drawNum(n, refresh); } void STlib_initPercent(st_percent_t *p, int x, int y, patch_t **pl, int *num, boolean *on, patch_t *percent) { STlib_initNum(&p->n, x, y, pl, num, on, 3); p->p = percent; } void STlib_updatePercent(st_percent_t *per, int refresh) { if (refresh && *per->n.on) V_DrawPatch(per->n.x, per->n.y, FG, per->p); STlib_updateNum(&per->n, refresh); } void STlib_initMultIcon(st_multicon_t *i, int x, int y, patch_t **il, int *inum, boolean *on) { i->x = x; i->y = y; i->oldinum = -1; i->inum = inum; i->on = on; i->p = il; } void STlib_updateMultIcon(st_multicon_t *mi, boolean refresh) { int w, h, x, y; if (*mi->on && (mi->oldinum != *mi->inum || refresh) && (*mi->inum!=-1)) { if (mi->oldinum != -1) { x = mi->x - SHORT(mi->p[mi->oldinum]->leftoffset); y = mi->y - SHORT(mi->p[mi->oldinum]->topoffset); w = SHORT(mi->p[mi->oldinum]->width); h = SHORT(mi->p[mi->oldinum]->height); if (y - ST_Y < 0) I_Error("updateMultIcon: y - ST_Y < 0"); V_CopyRect(x, y-ST_Y, BG, w, h, x, y, FG); } V_DrawPatch(mi->x, mi->y, FG, mi->p[*mi->inum]); mi->oldinum = *mi->inum; } } void STlib_initBinIcon(st_binicon_t *b, int x, int y, patch_t *i, boolean *val, boolean *on) { b->x = x; b->y = y; b->oldval = 0; b->val = val; b->on = on; b->p = i; } void STlib_updateBinIcon(st_binicon_t *bi, boolean refresh) { int x, y, w, h; if (*bi->on && (bi->oldval != *bi->val || refresh)) { x = bi->x - SHORT(bi->p->leftoffset); y = bi->y - SHORT(bi->p->topoffset); w = SHORT(bi->p->width); h = SHORT(bi->p->height); if (y - ST_Y < 0) I_Error("updateBinIcon: y - ST_Y < 0"); if (*bi->val) V_DrawPatch(bi->x, bi->y, FG, bi->p); else V_CopyRect(x, y-ST_Y, BG, w, h, x, y, FG); bi->oldval = *bi->val; } }
+1
View File
@@ -0,0 +1 @@
#ifndef __STLIB__ #define __STLIB__ // background and foreground screen numbers #define BG 4 #define FG 0 /* * Typedefs of widgets */ // Number widget typedef struct { int x, y; // upper right-hand corner of the number (right-justified) int width; // max # of digits in number int oldnum; // last number value int *num; // pointer to current value boolean *on; // pointer to boolean stating whether to update number patch_t **p; // list of patches for 0-9 int data; // user data } st_number_t; // Percent widget (child of number widget) typedef struct { st_number_t n; // number information patch_t *p; // percent sign graphic } st_percent_t; // Multiple Icon widget typedef struct { int x, y; // center-justified location of icons int oldinum; // last icon number int *inum; // pointer to current icon boolean *on; // pointer to boolean stating whether to update icon patch_t **p; // list of icons int data; // user data } st_multicon_t; // Binary Icon widget typedef struct { int x, y; // center-justified location of icon int oldval; // last icon value boolean *val; // pointer to current icon status boolean *on; // pointer to boolean stating whether to update icon patch_t *p; // icon int data; // user data } st_binicon_t; /* * Widget creation, access, and update routines */ // initializes widget library void STlib_init(void); // Number widget routines void STlib_initNum(st_number_t *n, int x, int y, patch_t **pl, int *num, boolean *on, int width); void STlib_updateNum(st_number_t *n, boolean refresh); // Percent widget routines void STlib_initPercent(st_percent_t *p, int x, int y, patch_t **pl, int *num, boolean *on, patch_t *percent); void STlib_updatePercent(st_percent_t *per, int refresh); // Multiple Icon widget routines void STlib_initMultIcon(st_multicon_t *mi, int x, int y, patch_t **il, int *inum, boolean *on); void STlib_updateMultIcon(st_multicon_t *mi, boolean refresh); // Binary Icon widget routines void STlib_initBinIcon(st_binicon_t *b, int x, int y, patch_t *i, boolean *val, boolean *on); void STlib_updateBinIcon(st_binicon_t *bi, boolean refresh); #endif
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
#ifndef __STSTUFF_H__ #define __STSTUFF_H__ // For damage/bonus red-/gold-shifts #define STARTREDPALS 1 #define STARTBONUSPALS 9 #define NUMREDPALS 8 #define NUMBONUSPALS 4 #define RADIATIONPAL 13 // N/256*100% probability that the normal face state will change #define ST_FACEPROBABILITY 96 // for Responder #define ST_TOGGLECHAT KEY_ENTER // Location/size of status bar #define ST_WIDTH SCREENWIDTH #define ST_HEIGHT 32 #define ST_X 0 #define ST_X2 104 #define ST_Y (SCREENHEIGHT - ST_HEIGHT) #define ST_FX 143 #define ST_FY 169 // Should be set to patch width for tall numbers later on #define ST_TALLNUMWIDTH (tallnum[0]->width) // number of status faces #define ST_NUMPAINFACES 5 #define ST_NUMSTRAIGHTFACES 3 #define ST_NUMTURNFACES 2 #define ST_NUMSPECIALFACES 3 #define ST_FACESTRIDE (ST_NUMSTRAIGHTFACES+ST_NUMTURNFACES+ST_NUMSPECIALFACES) #define ST_NUMEXTRAFACES 2 #define ST_NUMFACES (ST_FACESTRIDE*ST_NUMPAINFACES+ST_NUMEXTRAFACES) #define ST_TURNOFFSET (ST_NUMSTRAIGHTFACES) #define ST_OUCHOFFSET (ST_TURNOFFSET + ST_NUMTURNFACES) #define ST_EVILGRINOFFSET (ST_OUCHOFFSET + 1) #define ST_RAMPAGEOFFSET (ST_EVILGRINOFFSET + 1) #define ST_GODFACE (ST_NUMPAINFACES*ST_FACESTRIDE) #define ST_DEADFACE (ST_GODFACE+1) #define ST_FACESX 143 #define ST_FACESY 168 #define ST_EVILGRINCOUNT (2*TICRATE) #define ST_STRAIGHTFACECOUNT (TICRATE/2) #define ST_TURNCOUNT (1*TICRATE) #define ST_OUCHCOUNT (1*TICRATE) #define ST_RAMPAGEDELAY (2*TICRATE) #define ST_MUCHPAIN 20 // location and size of statistics, justified according to widget type #define ST_AMMOWIDTH 3 // AMMO number pos. #define ST_AMMOX 44 #define ST_AMMOY 171 #define ST_HEALTHWIDTH 3 // HEALTH number pos. #define ST_HEALTHX 90 #define ST_HEALTHY 171 #define ST_ARMSX 111 #define ST_ARMSY 172 #define ST_ARMSBGX 104 #define ST_ARMSBGY 168 #define ST_ARMSXSPACE 12 #define ST_ARMSYSPACE 10 #define ST_FRAGSX 138 #define ST_FRAGSY 171 #define ST_FRAGSWIDTH 2 #define ST_ARMORWIDTH 3 // ARMOR number pos. #define ST_ARMORX 221 #define ST_ARMORY 171 #define ST_KEY0WIDTH 8 #define ST_KEY0HEIGHT 5 #define ST_KEY0X 239 #define ST_KEY0Y 171 #define ST_KEY1WIDTH ST_KEY0WIDTH #define ST_KEY1X 239 #define ST_KEY1Y 181 #define ST_KEY2WIDTH ST_KEY0WIDTH #define ST_KEY2X 239 #define ST_KEY2Y 191 #define ST_AMMO0WIDTH 3 #define ST_AMMO0HEIGHT 6 #define ST_AMMO0X 288 #define ST_AMMO0Y 173 #define ST_AMMO1WIDTH ST_AMMO0WIDTH #define ST_AMMO1X 288 #define ST_AMMO1Y 179 #define ST_AMMO2WIDTH ST_AMMO0WIDTH #define ST_AMMO2X 288 #define ST_AMMO2Y 191 #define ST_AMMO3WIDTH ST_AMMO0WIDTH #define ST_AMMO3X 288 #define ST_AMMO3Y 185 #define ST_MAXAMMO0WIDTH 3 #define ST_MAXAMMO0HEIGHT 5 #define ST_MAXAMMO0X 314 #define ST_MAXAMMO0Y 173 #define ST_MAXAMMO1WIDTH ST_MAXAMMO0WIDTH #define ST_MAXAMMO1X 314 #define ST_MAXAMMO1Y 179 #define ST_MAXAMMO2WIDTH ST_MAXAMMO0WIDTH #define ST_MAXAMMO2X 314 #define ST_MAXAMMO2Y 191 #define ST_MAXAMMO3WIDTH ST_MAXAMMO0WIDTH #define ST_MAXAMMO3X 314 #define ST_MAXAMMO3Y 185 #define ST_WEAPON0X 110 // pistol #define ST_WEAPON0Y 172 #define ST_WEAPON1X 122 // shotgun #define ST_WEAPON1Y 172 #define ST_WEAPON2X 134 // chain gun #define ST_WEAPON2Y 172 #define ST_WEAPON3X 110 // missile launcher #define ST_WEAPON3Y 181 #define ST_WEAPON4X 122 // plasma gun #define ST_WEAPON4Y 181 #define ST_WEAPON5X 134 // bfg #define ST_WEAPON5Y 181 #define ST_WPNSX 109 // WPNS title #define ST_WPNSY 191 #define ST_DETHX 109 // DETH title #define ST_DETHY 191 // incoming messages window location //#define ST_MSGTEXTX (viewwindowx) //#define ST_MSGTEXTY (viewwindowy+viewheight-18) #define ST_MSGTEXTX 0 #define ST_MSGTEXTY 0 #define ST_MSGWIDTH 52 // in characters #define ST_MSGHEIGHT 1 // in lines #define ST_OUTTEXTX 0 #define ST_OUTTEXTY 6 #define ST_OUTWIDTH 52 // in characters #define ST_OUTHEIGHT 1 // in lines #define ST_MAPWIDTH (strlen(mapnames[(gameepisode-1)*9+(gamemap-1)])) #define ST_MAPTITLEX (SCREENWIDTH - ST_MAPWIDTH * ST_CHATFONTWIDTH) #define ST_MAPTITLEY 0 #define ST_MAPHEIGHT 1 // states for status bar code typedef enum { AutomapState, FirstPersonState } st_stateenum_t; // states for the chat code typedef enum { StartChatState, WaitDestState, GetChatState } st_chatstateenum_t; extern weaponinfo_t weaponinfo[]; // found in P_pspr.c boolean ST_Responder(event_t *ev); #endif
+1
View File
@@ -0,0 +1 @@
#include "sndserver.h" #include <stdlib.h> #include <stdio.h> #include <fcntl.h> #include <unistd.h> #include <sys/audioio.h> #include <sys/types.h> #include <stropts.h> #include <sys/conf.h> #include <sys/bufmod.h> #include "irix.h" int audio_fd; void myioctl(int fd, int command, void *arg) { int rc; extern int errno; rc = ioctl(fd, command, arg); if (rc < 0) { fprintf(stderr, "ioctl(dsp,%d,arg) failed\n", command); fprintf(stderr, "errno=%d\n", errno); } } void I_InitMusic(void) { } void I_InitSound(int samplerate, int samplesize) { int i; char *audio_filename = "/dev/audio"; audio_info_t audio_info; if (getenv("AUDIODEV")) audio_filename = getenv("AUDIODEV"); audio_fd = open(audio_filename, O_RDWR); if (audio_fd<0) fprintf(stderr, "Could not open %s\n", audio_filename); myioctl(audio_fd, AUDIO_GETINFO, &audio_info); AUDIO_INITINFO(&audio_info); audio_info.play.sample_rate = 11025; myioctl(audio_fd, AUDIO_SETINFO, &audio_info); AUDIO_INITINFO(&audio_info); audio_info.play.channels = 2; myioctl(audio_fd, AUDIO_SETINFO, &audio_info); AUDIO_INITINFO(&audio_info); audio_info.play.precision = 16; myioctl(audio_fd, AUDIO_SETINFO, &audio_info); AUDIO_INITINFO(&audio_info); audio_info.play.encoding = AUDIO_ENCODING_LINEAR; myioctl(audio_fd, AUDIO_SETINFO, &audio_info); AUDIO_INITINFO(&audio_info); audio_info.play.buffer_size = 1024; myioctl(audio_fd, AUDIO_SETINFO, &audio_info); } void I_SubmitOutputBuffer(void *samples, int samplecount) { /* myioctl(audio_fd, AUDIO_DRAIN, 0); */ write(audio_fd, samples, samplecount*4); } void I_ShutdownSound(void) { close(audio_fd); } void I_ShutdownMusic(void) { }
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
#include <stdio.h> main() { FILE *f; f=popen("sndserver -quiet", "w"); }
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
#include <malloc.h> #include <fcntl.h> #include <sys/stat.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <ctype.h> #include <unistd.h> #include "sndserver.h" #include "wadread.h" int *sfxlengths; typedef struct wadinfo_struct { char identification[4]; int numlumps; int infotableofs; } wadinfo_t; typedef struct filelump_struct { int filepos; int size; char name[8]; } filelump_t; typedef struct lumpinfo_struct { int handle; int filepos; int size; char name[8]; } lumpinfo_t; lumpinfo_t *lumpinfo; int numlumps; void **lumpcache; #define strcmpi strcasecmp #ifndef __BIG_ENDIAN__ #define LONG(x) (x) #define SHORT(x) (x) #else #define LONG(x) ((long)SwapLONG((unsigned long) (x))) #define SHORT(x) ((short)SwapSHORT((unsigned short) (x))) unsigned long SwapLONG(unsigned long x) { return (x>>24) | ((x>>8) & 0xff00) | ((x<<8) & 0xff0000) | (x<<24); } unsigned short SwapSHORT(unsigned short x) { return (x>>8) | (x<<8); } #endif static void derror(char *msg) { fprintf(stderr, "\nwadread error: %s\n", msg); exit(-1); } void strupr (char *s) { while (*s) *s++ = toupper(*s); } int filelength (int handle) { struct stat fileinfo; if (fstat (handle,&fileinfo) == -1) fprintf (stderr, "Error fstating\n"); return fileinfo.st_size; } void openwad(char *wadname) { int wadfile, tableoffset, tablelength, tablefilelength; int i; wadinfo_t header; filelump_t *filetable; // open and read the wadfile header wadfile = open(wadname, O_RDONLY); if (wadfile < 0) derror("Could not open wadfile"); read(wadfile, &header, sizeof header); if (strncmp(header.identification, "IWAD", 4)) derror("wadfile has weirdo header"); numlumps = LONG(header.numlumps); tableoffset = LONG(header.infotableofs); tablelength = numlumps * sizeof(lumpinfo_t); tablefilelength = numlumps * sizeof(filelump_t); lumpinfo = (lumpinfo_t *) malloc(tablelength); filetable = (filelump_t *) ((char*)lumpinfo + tablelength - tablefilelength); // get the lumpinfo table lseek(wadfile, tableoffset, SEEK_SET); read(wadfile, filetable, tablefilelength); // process the table to make the endianness right and shift it down for (i=0 ; i<numlumps ; i++) { strncpy(lumpinfo[i].name, filetable[i].name, 8); lumpinfo[i].handle = wadfile; lumpinfo[i].filepos = LONG(filetable[i].filepos); lumpinfo[i].size = LONG(filetable[i].size); // fprintf(stderr, "lump [%.8s] exists\n", lumpinfo[i].name); } } void *loadlump(char *lumpname, int *size) { int i; void *lump; for (i=0 ; i<numlumps ; i++) { if (!strncasecmp(lumpinfo[i].name, lumpname, 8)) break; } if (i == numlumps) { // fprintf(stderr, "Could not find lumpname [%s]\n", lumpname); lump = 0; } else { lump = (void *) malloc(lumpinfo[i].size); lseek(lumpinfo[i].handle, lumpinfo[i].filepos, SEEK_SET); read(lumpinfo[i].handle, lump, lumpinfo[i].size); *size = lumpinfo[i].size; } return lump; } void *getsfx(char *sfxname, int *len) { unsigned char *sfx; unsigned char *paddedsfx; int i, size, paddedsize; char name[20]; sprintf(name, "ds%s", sfxname); sfx = (unsigned char *) loadlump(name, &size); // pad the sound effect out to the mixing buffer size paddedsize = ((size-8 + (SAMPLECOUNT-1)) / SAMPLECOUNT) * SAMPLECOUNT; paddedsfx = (unsigned char *) realloc(sfx, paddedsize+8); for (i=size ; i<paddedsize+8 ; i++) paddedsfx[i] = 128; *len = paddedsize; return (void *) (paddedsfx + 8); }
+1
View File
@@ -0,0 +1 @@
#ifndef __WADREAD_H__ #define __WADREAD_H__ // // Opens the wadfile specified. Must be called before any calls to // loadlump() or getsfx(). // void openwad(char *wadname); // // Gets a sound effect from the wad file. The pointer points to the // start of the data. Returns a 0 if the sfx was not // found. Sfx names should be no longer than 6 characters. All data is // rounded up in size to the nearest MIXBUFFERSIZE and is padded out with // 0x80's. Returns the data length in len. // void *getsfx(char *sfxname, int *len); #endif
+1
View File
@@ -0,0 +1 @@
#ifndef __WIDATA__ #define __WIDATA__ #include "wi_stuff.h" // GLOBAL LOCATIONS #define WI_TITLEY 2 #define WI_SPACINGY 33 // SINGPLE-PLAYER STUFF #define SP_STATSX 50 #define SP_STATSY 50 #define SP_TIMEX 16 #define SP_TIMEY (SCREENHEIGHT-32) // NET GAME STUFF #define NG_STATSY 50 #define NG_STATSX (32 + SHORT(star->width)/2 + 32*!dofrags) #define NG_SPACINGX 64 // DEATHMATCH STUFF #define DM_MATRIXX 42 #define DM_MATRIXY 68 #define DM_SPACINGX 40 #define DM_TOTALSX 269 #define DM_KILLERSX 10 #define DM_KILLERSY 100 #define DM_VICTIMSX 5 #define DM_VICTIMSY 50 static point_t lnodes[NUMEPISODES][NUMMAPS] = { // Episode 0 World Map { { 185, 164 }, // location of level 0 (CJ) { 148, 143 }, // location of level 1 (CJ) { 69, 122 }, // location of level 2 (CJ) { 209, 102 }, // location of level 3 (CJ) { 116, 89 }, // location of level 4 (CJ) { 166, 55 }, // location of level 5 (CJ) { 71, 56 }, // location of level 6 (CJ) { 135, 29 }, // location of level 7 (CJ) { 71, 24 } // location of level 8 (CJ) }, // Episode 1 World Map should go here { { 254, 25 }, // location of level 0 (CJ) { 97, 50 }, // location of level 1 (CJ) { 188, 64 }, // location of level 2 (CJ) { 128, 78 }, // location of level 3 (CJ) { 214, 92 }, // location of level 4 (CJ) { 133, 130 }, // location of level 5 (CJ) { 208, 136 }, // location of level 6 (CJ) { 148, 140 }, // location of level 7 (CJ) { 235, 158 } // location of level 8 (CJ) }, // Episode 2 World Map should go here { { 156, 168 }, // location of level 0 (CJ) { 48, 154 }, // location of level 1 (CJ) { 174, 95 }, // location of level 2 (CJ) { 265, 75 }, // location of level 3 (CJ) { 130, 48 }, // location of level 4 (CJ) { 279, 23 }, // location of level 5 (CJ) { 198, 48 }, // location of level 6 (CJ) { 140, 25 }, // location of level 7 (CJ) { 281, 136 } // location of level 8 (CJ) } }; // animation locations for episode 0 (1) static anim_t epsd0animinfo[] = { { ANIM_ALWAYS, TICRATE/3, 3, { 224, 104 } }, { ANIM_ALWAYS, TICRATE/3, 3, { 184, 160 } }, { ANIM_ALWAYS, TICRATE/3, 3, { 112, 136 } }, { ANIM_ALWAYS, TICRATE/3, 3, { 72, 112 } }, { ANIM_ALWAYS, TICRATE/3, 3, { 88, 96 } }, { ANIM_ALWAYS, TICRATE/3, 3, { 64, 48 } }, { ANIM_ALWAYS, TICRATE/3, 3, { 192, 40 } }, { ANIM_ALWAYS, TICRATE/3, 3, { 136, 16 } }, { ANIM_ALWAYS, TICRATE/3, 3, { 80, 16 } }, { ANIM_ALWAYS, TICRATE/3, 3, { 64, 24 } } }; static anim_t epsd1animinfo[] = { { ANIM_LEVEL, TICRATE/3, 1, { 128, 136 }, 1 }, { ANIM_LEVEL, TICRATE/3, 1, { 128, 136 }, 2 }, { ANIM_LEVEL, TICRATE/3, 1, { 128, 136 }, 3 }, { ANIM_LEVEL, TICRATE/3, 1, { 128, 136 }, 4 }, { ANIM_LEVEL, TICRATE/3, 1, { 128, 136 }, 5 }, { ANIM_LEVEL, TICRATE/3, 1, { 128, 136 }, 6 }, { ANIM_LEVEL, TICRATE/3, 1, { 128, 136 }, 7 }, { ANIM_LEVEL, TICRATE/3, 3, { 192, 144 }, 8 }, { ANIM_LEVEL, TICRATE/3, 1, { 128, 136 }, 8 } }; static anim_t epsd2animinfo[] = { { ANIM_ALWAYS, TICRATE/3, 3, { 104, 168 } }, { ANIM_ALWAYS, TICRATE/3, 3, { 40, 136 } }, { ANIM_ALWAYS, TICRATE/3, 3, { 160, 96 } }, { ANIM_ALWAYS, TICRATE/3, 3, { 104, 80 } }, { ANIM_ALWAYS, TICRATE/3, 3, { 120, 32 } }, { ANIM_ALWAYS, TICRATE/4, 3, { 40, 0 } } }; static int NUMANIMS[NUMEPISODES] = { sizeof(epsd0animinfo)/sizeof(anim_t), sizeof(epsd1animinfo)/sizeof(anim_t), sizeof(epsd2animinfo)/sizeof(anim_t) }; static anim_t *anims[NUMEPISODES] = { epsd0animinfo, epsd1animinfo, epsd2animinfo }; #endif
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
#ifndef __WBSTUFF__ #define __WBSTUFF__ #include "doomdef.h" #define NUMEPISODES 3 #define NUMMAPS 9 #define PAUSELEN (TICRATE*2) // in tics #define SCORESTEP 100 #define SHOWNEXTLOCDELAY 4 // in seconds #define SHOWLASTLOCDELAY SHOWNEXTLOCDELAY // in seconds #define ANIMPERIOD 32 // in tics #define STARDIST 10 // pixel distance from "(YOU)" to "PLAYER N" #define FB 0 #define WK 1 // States for the intermission typedef enum { NoState = -1, StatCount, ShowNextLoc } stateenum_t; // States for single-player #define SP_KILLS 0 #define SP_ITEMS 2 #define SP_SECRET 4 #define SP_FRAGS 6 #define SP_TIME 8 #define SP_PAR ST_TIME #define SP_PAUSE 1 typedef struct { int x, y; } point_t; typedef enum { ANIM_ALWAYS, ANIM_RANDOM, ANIM_LEVEL } animenum_t; typedef struct { animenum_t type; int period; // period in tics between animations int nanims; // number of animation frames point_t loc;// location of animation int data1; // ALWAYS: n/a, RANDOM: period deviation (<256), LEVEL: level int data2; // ALWAYS: n/a, RANDOM: random base period, LEVEL: n/a patch_t *p[3]; // actual graphics for frames of animations // following must be initialized to zero before use! int nexttic;// next value of bcnt (used in conjunction with period) int lastdrawn; // last drawn animation frame int ctr; // next frame number to animate int state; // used by RANDOM and LEVEL when animating } anim_t; #endif
+1
View File
File diff suppressed because one or more lines are too long
+1
View File
File diff suppressed because one or more lines are too long