├── GNU.TXT ├── README.TXT ├── SRC ├── A.ASM ├── BSTUB.C ├── BUILD.C ├── BUILD.H ├── BUILD.TXT ├── BUILD2.TXT ├── BUILDINF.TXT ├── CACHE1D.C ├── ENGINE.C ├── GAME.C ├── K.ASM ├── KDMENG.C ├── MAKEFILE ├── MMULTI.C ├── MULTI.C ├── NAMES.H ├── PRAGMAS.H ├── SREADME.TXT └── VES2.H ├── UTIL ├── BACKMAP5.C ├── BACKMAP6.C ├── CONVMAP6.C ├── CONVMAP7.C ├── EDITART.C ├── KEXTRACT.C ├── KGROUP.C ├── SETUP.C ├── TRANSPAL.C ├── UREADME.TXT ├── WAD2ART.C └── WAD2MAP.C ├── audiolib ├── AUDIO.MAK ├── AUDIO2.MAK ├── DOPUBLIC.BAT ├── GUS │ ├── GUSROTT.INI │ ├── UCALC.EXE │ └── ULTRAMID.INI ├── LIB │ ├── GF1_OSF.LB2 │ ├── GF1_OSF.LBK │ ├── GF1_OSF.LIB │ └── PAWE32.LIB ├── MAKEDB.BAT ├── OBJ │ ├── ADLIBFX.OBJ │ ├── AL_MIDI.OBJ │ ├── AUDIO_WF.LIB │ ├── AWE32.OBJ │ ├── BLASTER.OBJ │ ├── DEBUGIO.OBJ │ ├── DMA.OBJ │ ├── DPMI.OBJ │ ├── FX_MAN.OBJ │ ├── GMTIMBRE.OBJ │ ├── GUS.OBJ │ ├── GUSMIDI.OBJ │ ├── GUSWAVE.OBJ │ ├── IRQ.OBJ │ ├── LL_MAN.OBJ │ ├── MIDI.OBJ │ ├── MPU401.OBJ │ ├── MULTIVOC.OBJ │ ├── MUSIC.OBJ │ ├── MVREVERB.OBJ │ ├── MV_MIX.OBJ │ ├── MV_MIX16.OBJ │ ├── PAS16.OBJ │ ├── PCFX.OBJ │ ├── PITCH.OBJ │ ├── SNDSCAPE.OBJ │ ├── SNDSRC.OBJ │ ├── TASK_MAN.OBJ │ └── USER.OBJ ├── OBJDB │ ├── AL_MIDI.OBJ │ ├── AUDIO_WF.LIB │ ├── AWE32.OBJ │ ├── BLASTER.OBJ │ ├── DEBUGIO.OBJ │ ├── DMA.OBJ │ ├── DPMI.OBJ │ ├── FX_MAN.OBJ │ ├── GMTIMBRE.OBJ │ ├── GUS.OBJ │ ├── GUSMIDI.OBJ │ ├── GUSWAVE.OBJ │ ├── IRQ.OBJ │ ├── LL_MAN.OBJ │ ├── MIDI.OBJ │ ├── MPU401.OBJ │ ├── MULTIVOC.OBJ │ ├── MUSIC.OBJ │ ├── MVREVERB.OBJ │ ├── MV_MIX.OBJ │ ├── MV_MIX16.OBJ │ ├── PAS16.OBJ │ ├── PITCH.OBJ │ ├── SNDSCAPE.OBJ │ ├── SNDSRC.OBJ │ ├── TASK_MAN.OBJ │ └── USER.OBJ ├── PUBLIC │ ├── AUDIO_WF.LIB │ ├── EMIDIAPI.TXT │ ├── INCLUDE │ │ ├── AUDIO_WF.LIB │ │ ├── FX_MAN.H │ │ ├── MUSIC.H │ │ ├── SNDCARDS.H │ │ ├── TASK_MAN.H │ │ ├── USRHOOKS.C │ │ └── USRHOOKS.H │ ├── MIDI.TXT │ ├── NOTES.TXT │ ├── PM │ │ ├── GMTIMBRE.TMB │ │ ├── MAKEFILE │ │ ├── MAKETMB.EXE │ │ ├── OBJ │ │ │ ├── PM.OBJ │ │ │ └── USRHOOKS.OBJ │ │ ├── PM.EXE │ │ ├── PM.TXT │ │ ├── README.TXT │ │ ├── SOURCE │ │ │ ├── PM.C │ │ │ ├── USRHOOKS.C │ │ │ └── USRHOOKS.H │ │ └── TIMBRES.ZIP │ ├── PS │ │ ├── BINDPS.BAT │ │ ├── MAKEFILE │ │ ├── PS.C │ │ ├── PS.EXE │ │ ├── PS.OBJ │ │ ├── USRHOOKS.C │ │ ├── USRHOOKS.H │ │ └── USRHOOKS.OBJ │ └── TIMER │ │ ├── MAKEFILE │ │ ├── OBJ │ │ ├── TIMER.OBJ │ │ └── USRHOOKS.OBJ │ │ ├── SOURCE │ │ ├── TIMER.C │ │ ├── USRHOOKS.C │ │ └── USRHOOKS.H │ │ └── TIMER.EXE ├── SOURCE │ ├── ADLIBFX.C │ ├── ADLIBFX.H │ ├── AL_MIDI.C │ ├── AL_MIDI.H │ ├── ASSERT.H │ ├── AWE32.C │ ├── AWE32.H │ ├── BLASTER.C │ ├── BLASTER.H │ ├── BLASTOLD.C │ ├── CTAWEAPI.H │ ├── CTAWEAPI.INC │ ├── DEBUGIO.C │ ├── DEBUGIO.H │ ├── DMA.C │ ├── DMA.H │ ├── DPMI.C │ ├── DPMI.H │ ├── FX_MAN.C │ ├── FX_MAN.H │ ├── GMTEMP.C │ ├── GMTIMBRE.C │ ├── GMTMBOLD.C │ ├── GUS.C │ ├── GUSMIDI.C │ ├── GUSMIDI.H │ ├── GUSMIDI2.C │ ├── GUSMIDI2.H │ ├── GUSWAVE.C │ ├── GUSWAVE.H │ ├── INTERRUP.H │ ├── IRQ.C │ ├── IRQ.H │ ├── LEEOLD.C │ ├── LEETIMB1.C │ ├── LEETIMBR.C │ ├── LINKLIST.H │ ├── LL_MAN.C │ ├── LL_MAN.H │ ├── MEMCHECK.H │ ├── MIDI.C │ ├── MIDI.H │ ├── MPU401.C │ ├── MPU401.H │ ├── MULTIVOC.C │ ├── MULTIVOC.H │ ├── MUSIC.C │ ├── MUSIC.H │ ├── MV1.C │ ├── MVREVERB.ASM │ ├── MV_MIX.ASM │ ├── MV_MIX1.ASM │ ├── MV_MIX16.ASM │ ├── MV_MIX2.ASM │ ├── MV_MIX3.ASM │ ├── MV_MIX4.ASM │ ├── MV_MIX5.ASM │ ├── MV_MIX6.ASM │ ├── MYPRINT.C │ ├── MYPRINT.H │ ├── NEWGF1.H │ ├── OLDTIMBR.C │ ├── PAS16.C │ ├── PAS16.H │ ├── PCFX.C │ ├── PCFX.H │ ├── PITCH.C │ ├── PITCH.H │ ├── SNDCARDS.H │ ├── SNDSCAPE.C │ ├── SNDSCAPE.H │ ├── SNDSRC.C │ ├── SNDSRC.H │ ├── STANDARD.H │ ├── TASK_MAN.C │ ├── TASK_MAN.H │ ├── USER.C │ ├── USER.H │ ├── USRHOOKS.C │ ├── USRHOOKS.H │ ├── _AL_MIDI.H │ ├── _BLASTER.H │ ├── _GUSWAVE.H │ ├── _MIDI.H │ ├── _MULTIVC.H │ ├── _PAS16.H │ └── _SNDSCAP.H ├── WMAKE.BAT ├── gpl.txt └── readme.txt ├── extras ├── ACTORS.C ├── ANGLES.H ├── ANIMLIB.C ├── ANIMLIB.H ├── AVG.H ├── BB.C ├── CAVE.C ├── CD.C ├── CDROM.H ├── CLRMAP.H ├── COMMON.H ├── CONFIG.C ├── CONFIG.H ├── CONTROL.H ├── CRC.H ├── DEBUG.C ├── DEBUG.H ├── DEBUG4G.C ├── DEBUG4G.H ├── DEVELOP.H ├── DUKE3D.H ├── DYN.H ├── ERROR.H ├── EXTERNAL.H ├── FILE_LIB.H ├── FIXED.H ├── FRAGMENT.C ├── FUNCT.H ├── FUNCTION.C ├── FUNCTION.H ├── FX_MAN.H ├── GAME.C ├── GAMEDEF.C ├── GAMEDEFS.H ├── GAMEN.C ├── GAMERBG.H ├── GIFLIB.H ├── GIFSAVE.H ├── GLOBAL.C ├── GNU.TXT ├── GRUNT.C ├── INTERCEP.H ├── INTERRUP.H ├── JOYSTICK.H ├── KEYBOARD.H ├── LBMLIB.H ├── LINKLIST.H ├── LOCATION.H ├── LUMPTYPE.H ├── MATH.C ├── MATHUTIL.H ├── MENUES.C ├── MIPMAP.H ├── MOUSE.H ├── MUSIC.H ├── NAMES.H ├── PENTTIME.H ├── PLAYER.C ├── PLAYERN.C ├── PRAGMAS.H ├── PRECISE.H ├── PREMAP.C ├── RANDOM.H ├── RGAME.H ├── RGB.H ├── ROX.H ├── RTS.C ├── RTS.H ├── SCRIPLIB.H ├── SE40.C ├── SECTOR.C ├── SNDCARDS.H ├── SOUNDEFS.H ├── SOUNDS.C ├── SOUNDS.H ├── STREAM.H ├── TASK_MAN.H ├── TESTDRV.C ├── TIMELIB.H ├── TIMER.H ├── TOKENLIB.H ├── TYPES.H ├── USRHOOKS.C ├── USRHOOKS.H ├── UTIL_LIB.H ├── VECTOR.H ├── VESA.H ├── VID.H ├── WAD.H ├── WAD2.H ├── WAD2TYPE.H ├── WADTYPE.H ├── WATER.C ├── _ANIMLIB.H ├── _CLRMAP.H ├── _CONTROL.H ├── _DEBUG.H ├── _FILELIB.H ├── _FUNCTIO.H ├── _KEYBOAR.H ├── _LBMLIB.H ├── _RANDOM.H ├── _ROX.H ├── _RTS.H ├── _SCRPLIB.H ├── _TOKENLI.H ├── _UTIL_LB.H ├── _WAD.H ├── _ZONE.H └── _ZONEOLD.H ├── kenbuild_data ├── NAMES.H ├── STUFF.DAT ├── ascboard.map ├── boards.map ├── evilal.map ├── kensig.map ├── nsnoal.map └── nukeland.map ├── source ├── A.OBJ ├── ACTORS.C ├── ANIMLIB.C ├── ANIMLIB.H ├── AUDIO_WF.LIB ├── BUILD.H ├── BUTWCD4.LIB ├── CACHE1D.OBJ ├── CONFIG.C ├── CONFIG.H ├── CONTROL.H ├── DEVELOP.H ├── DUKE3D.H ├── ENGINE.OBJ ├── FILE_LIB.H ├── FUNCT.H ├── FUNCTION.H ├── FX_MAN.H ├── GAME.C ├── GAMEDEF.C ├── GAMEDEFS.H ├── GLOBAL.C ├── GNU.TXT ├── KEYBOARD.H ├── MAKEFILE ├── MAKEFILE.LNK ├── MENUES.C ├── MMULTI.OBJ ├── MOUSE.H ├── MUSIC.H ├── NAMES.H ├── PLAYER.C ├── PRAGMAS.H ├── PREMAP.C ├── RTS.C ├── RTS.H ├── SCRIPLIB.H ├── SECTOR.C ├── SNDCARDS.H ├── SOUNDEFS.H ├── SOUNDS.C ├── SOUNDS.H ├── TASK_MAN.H ├── TYPES.H ├── UTIL_LIB.H ├── _ANIMLIB.H ├── _FUNCTIO.H ├── _RTS.H ├── duke3d.tgt ├── duke3d.wpj └── mact │ ├── GNU.TXT │ └── MACT386.LIB └── testdata ├── DEFS.CON ├── GAME.CON ├── GNU.TXT ├── LOOKUP.DAT └── USER.CON /SRC/A.ASM: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/SRC/A.ASM -------------------------------------------------------------------------------- /SRC/BUILD.H: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/SRC/BUILD.H -------------------------------------------------------------------------------- /SRC/BUILD.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/SRC/BUILD.TXT -------------------------------------------------------------------------------- /SRC/BUILD2.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/SRC/BUILD2.TXT -------------------------------------------------------------------------------- /SRC/BUILDINF.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/SRC/BUILDINF.TXT -------------------------------------------------------------------------------- /SRC/ENGINE.C: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/SRC/ENGINE.C -------------------------------------------------------------------------------- /SRC/GAME.C: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/SRC/GAME.C -------------------------------------------------------------------------------- /SRC/MAKEFILE: -------------------------------------------------------------------------------- 1 | game.exe : game.obj engine.obj cache1d.obj multi.obj a.obj kdmeng.obj k.obj 2 | wlink f game f engine f cache1d f multi f a f kdmeng f k 3 | build.exe : build.obj engine.obj cache1d.obj a.obj bstub.obj 4 | wlink f build f engine f cache1d f a f bstub 5 | 6 | game.obj : game.c build.h names.h pragmas.h 7 | wcc386 game /5r /s /orb 8 | build.obj : build.c build.h pragmas.h 9 | wcc386 build /5r /s /orb 10 | bstub.obj : bstub.c build.h 11 | wcc386 bstub /5r /s /orb 12 | cache1d.obj : cache1d.c pragmas.h 13 | wcc386 cache1d /5r /s /orb 14 | engine.obj : engine.c build.h pragmas.h ves2.h 15 | wcc386 engine /5r /s /orb 16 | a.obj : a.asm 17 | wasm a.asm 18 | multi.obj : multi.c 19 | wcc386 multi /4r /s /or 20 | kdmeng.obj : kdmeng.c makefile. 21 | wcc386 kdmeng /4r /s /or /d2 22 | k.obj : k.asm makefile. 23 | wasm k.asm 24 | -------------------------------------------------------------------------------- /SRC/MMULTI.C: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/SRC/MMULTI.C -------------------------------------------------------------------------------- /SRC/NAMES.H: -------------------------------------------------------------------------------- 1 | //Be careful when changing this file - it is parsed by Editart and Build. 2 | #define SWITCH1ON 15 3 | #define SLIME 34 4 | #define BACKGROUND 37 5 | #define KENPICTURE 48 6 | #define BUILDDISK 49 7 | #define SWITCH2ON 66 8 | #define SWITCH2OFF 69 9 | #define ALPHABET 73 10 | #define NO 74 11 | #define DEMOSIGN 75 12 | #define COIN 76 13 | #define COINSTACK 77 14 | #define GIFTBOX 78 15 | #define DIAMONDS 79 16 | #define EVILALGRAVE 83 17 | #define STATUSBAR 87 18 | #define DAYSKY 89 19 | #define WATERFOUNTAIN 90 20 | #define USEWATERFOUNTAIN 91 21 | #define NIGHTSKY 93 22 | #define BULLET 98 23 | #define BOMB 100 24 | #define CANNON 101 25 | #define GUNONBOTTOM 102 26 | #define BOMBEMITTER 103 27 | #define EXPLOSION 105 28 | #define SPLASH 106 29 | #define BROWNMONSTER 110 30 | #define SKELETON 113 31 | #define AL 114 32 | #define EVILAL 115 33 | #define PLAYER 120 34 | #define SWITCH3OFF 146 35 | #define SWITCH3ON 147 36 | #define AIRPLANE 148 37 | #define SPIRAL 149 38 | #define COMPASS 150 39 | #define FOOTPRINT 156 40 | #define STATUSBARFILL8 160 41 | #define STATUSBARFILL4 161 42 | #define BOUNCYMAT 162 43 | #define MIRROR 165 44 | #define FLOORMIRROR 166 45 | #define GRABBER 167 46 | #define GRABCANNON 168 47 | #define MISSILE 169 48 | #define LAUNCHER 171 49 | #define MIRRORLABEL 4000 50 | -------------------------------------------------------------------------------- /UTIL/EDITART.C: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/UTIL/EDITART.C -------------------------------------------------------------------------------- /UTIL/SETUP.C: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/UTIL/SETUP.C -------------------------------------------------------------------------------- /UTIL/TRANSPAL.C: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/UTIL/TRANSPAL.C -------------------------------------------------------------------------------- /UTIL/UREADME.TXT: -------------------------------------------------------------------------------- 1 | // "Build Engine & Tools" Copyright (c) 1993-1997 Ken Silverman 2 | // Ken Silverman's official web site: "http://www.advsys.net/ken" 3 | // See the included license file "BUILDLIC.TXT" for license info. 4 | 5 | All .C files in this directory are separate programs. Do not link them to 6 | each other. 7 | 8 | To best view my source, set your "Tab Stops" to 3! 9 | 10 | ------------------- Brief description of utility files -------------------- 11 | 12 | BACKMAP6.C: Converts Build MAP format from 7 to 6 13 | 14 | BACKMAP5.C: Converts Build MAP format from 6 to 5 15 | 16 | CONVMAP6.C: Converts Build MAP format from 5 to 6 17 | 18 | CONVMAP7.C: Converts Build MAP format from 6 to 7 19 | 20 | TRANSPAL.C: Palette generation utility 21 | NOTE: This program requires PRAGMAS.H. It is located inside SRC.ZIP. 22 | NOTE: This program requires PALETTE.DAT to be in the directory. You 23 | can extract it from STUFF.DAT by using my KEXTRACT utility. 24 | 25 | EDITART.C: ART collection utility and editor 26 | NOTE: This program requires PALETTE.DAT, TABLES.DAT to be in the 27 | directory you run it from. You can extract these files from 28 | STUFF.DAT by using my KEXTRACT utility. 29 | 30 | KGROUP.C: Use to combine files into a .GRP file (Note: "STUFF.DAT" in my 31 | game directory is actually a .GRP file even though it has a different 32 | file extension) 33 | 34 | KEXTRACT.C: Use to extract files from a .GRP file 35 | 36 | WAD2MAP.C: Doom to Build converter utility. This converts the maps. 37 | Note: this program requires "pragmas.h". It is located inside SRC.ZIP. 38 | 39 | WAD2ART.C: Doom to Build converter utility. This converts the textures. 40 | 41 | SETUP.C: The Build setup program. This code should also work in a 16-bit 42 | compiler. (That's how I got SETUP.EXE so small!) 43 | 44 | ----------------------------------------------------------------------------- 45 | -Ken S. (web page: http://www.advsys.net/ken) 46 | -------------------------------------------------------------------------------- /audiolib/DOPUBLIC.BAT: -------------------------------------------------------------------------------- 1 | call wmake.bat 2 | copy audio_wf.lib public 3 | copy notes.txt public 4 | copy midi.txt public 5 | copy notes.txt public 6 | copy audio_wf.lib public\include 7 | copy source\fx_man.h public\include 8 | copy source\music.h public\include 9 | copy source\sndcards.h public\include 10 | copy source\task_man.h public\include 11 | cd public\timer 12 | wmake 13 | cd ..\..\public\ps 14 | wmake 15 | cd ..\..\public\pm 16 | wmake 17 | cd ..\.. 18 | -------------------------------------------------------------------------------- /audiolib/GUS/UCALC.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/GUS/UCALC.EXE -------------------------------------------------------------------------------- /audiolib/LIB/GF1_OSF.LB2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/LIB/GF1_OSF.LB2 -------------------------------------------------------------------------------- /audiolib/LIB/GF1_OSF.LBK: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/LIB/GF1_OSF.LBK -------------------------------------------------------------------------------- /audiolib/LIB/GF1_OSF.LIB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/LIB/GF1_OSF.LIB -------------------------------------------------------------------------------- /audiolib/LIB/PAWE32.LIB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/LIB/PAWE32.LIB -------------------------------------------------------------------------------- /audiolib/MAKEDB.BAT: -------------------------------------------------------------------------------- 1 | del audio_wf.lib 2 | wmake.exe -f audio.mak "version = debugging" %1 %2 %3 %4 %5 -------------------------------------------------------------------------------- /audiolib/OBJ/ADLIBFX.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/ADLIBFX.OBJ -------------------------------------------------------------------------------- /audiolib/OBJ/AL_MIDI.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/AL_MIDI.OBJ -------------------------------------------------------------------------------- /audiolib/OBJ/AUDIO_WF.LIB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/AUDIO_WF.LIB -------------------------------------------------------------------------------- /audiolib/OBJ/AWE32.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/AWE32.OBJ -------------------------------------------------------------------------------- /audiolib/OBJ/BLASTER.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/BLASTER.OBJ -------------------------------------------------------------------------------- /audiolib/OBJ/DEBUGIO.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/DEBUGIO.OBJ -------------------------------------------------------------------------------- /audiolib/OBJ/DMA.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/DMA.OBJ -------------------------------------------------------------------------------- /audiolib/OBJ/DPMI.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/DPMI.OBJ -------------------------------------------------------------------------------- /audiolib/OBJ/FX_MAN.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/FX_MAN.OBJ -------------------------------------------------------------------------------- /audiolib/OBJ/GMTIMBRE.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/GMTIMBRE.OBJ -------------------------------------------------------------------------------- /audiolib/OBJ/GUS.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/GUS.OBJ -------------------------------------------------------------------------------- /audiolib/OBJ/GUSMIDI.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/GUSMIDI.OBJ -------------------------------------------------------------------------------- /audiolib/OBJ/GUSWAVE.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/GUSWAVE.OBJ -------------------------------------------------------------------------------- /audiolib/OBJ/IRQ.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/IRQ.OBJ -------------------------------------------------------------------------------- /audiolib/OBJ/LL_MAN.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/LL_MAN.OBJ -------------------------------------------------------------------------------- /audiolib/OBJ/MIDI.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/MIDI.OBJ -------------------------------------------------------------------------------- /audiolib/OBJ/MPU401.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/MPU401.OBJ -------------------------------------------------------------------------------- /audiolib/OBJ/MULTIVOC.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/MULTIVOC.OBJ -------------------------------------------------------------------------------- /audiolib/OBJ/MUSIC.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/MUSIC.OBJ -------------------------------------------------------------------------------- /audiolib/OBJ/MVREVERB.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/MVREVERB.OBJ -------------------------------------------------------------------------------- /audiolib/OBJ/MV_MIX.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/MV_MIX.OBJ -------------------------------------------------------------------------------- /audiolib/OBJ/MV_MIX16.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/MV_MIX16.OBJ -------------------------------------------------------------------------------- /audiolib/OBJ/PAS16.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/PAS16.OBJ -------------------------------------------------------------------------------- /audiolib/OBJ/PCFX.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/PCFX.OBJ -------------------------------------------------------------------------------- /audiolib/OBJ/PITCH.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/PITCH.OBJ -------------------------------------------------------------------------------- /audiolib/OBJ/SNDSCAPE.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/SNDSCAPE.OBJ -------------------------------------------------------------------------------- /audiolib/OBJ/SNDSRC.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/SNDSRC.OBJ -------------------------------------------------------------------------------- /audiolib/OBJ/TASK_MAN.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/TASK_MAN.OBJ -------------------------------------------------------------------------------- /audiolib/OBJ/USER.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJ/USER.OBJ -------------------------------------------------------------------------------- /audiolib/OBJDB/AL_MIDI.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJDB/AL_MIDI.OBJ -------------------------------------------------------------------------------- /audiolib/OBJDB/AUDIO_WF.LIB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJDB/AUDIO_WF.LIB -------------------------------------------------------------------------------- /audiolib/OBJDB/AWE32.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJDB/AWE32.OBJ -------------------------------------------------------------------------------- /audiolib/OBJDB/BLASTER.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJDB/BLASTER.OBJ -------------------------------------------------------------------------------- /audiolib/OBJDB/DEBUGIO.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJDB/DEBUGIO.OBJ -------------------------------------------------------------------------------- /audiolib/OBJDB/DMA.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJDB/DMA.OBJ -------------------------------------------------------------------------------- /audiolib/OBJDB/DPMI.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJDB/DPMI.OBJ -------------------------------------------------------------------------------- /audiolib/OBJDB/FX_MAN.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJDB/FX_MAN.OBJ -------------------------------------------------------------------------------- /audiolib/OBJDB/GMTIMBRE.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJDB/GMTIMBRE.OBJ -------------------------------------------------------------------------------- /audiolib/OBJDB/GUS.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJDB/GUS.OBJ -------------------------------------------------------------------------------- /audiolib/OBJDB/GUSMIDI.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJDB/GUSMIDI.OBJ -------------------------------------------------------------------------------- /audiolib/OBJDB/GUSWAVE.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJDB/GUSWAVE.OBJ -------------------------------------------------------------------------------- /audiolib/OBJDB/IRQ.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJDB/IRQ.OBJ -------------------------------------------------------------------------------- /audiolib/OBJDB/LL_MAN.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJDB/LL_MAN.OBJ -------------------------------------------------------------------------------- /audiolib/OBJDB/MIDI.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJDB/MIDI.OBJ -------------------------------------------------------------------------------- /audiolib/OBJDB/MPU401.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJDB/MPU401.OBJ -------------------------------------------------------------------------------- /audiolib/OBJDB/MULTIVOC.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJDB/MULTIVOC.OBJ -------------------------------------------------------------------------------- /audiolib/OBJDB/MUSIC.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJDB/MUSIC.OBJ -------------------------------------------------------------------------------- /audiolib/OBJDB/MVREVERB.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJDB/MVREVERB.OBJ -------------------------------------------------------------------------------- /audiolib/OBJDB/MV_MIX.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJDB/MV_MIX.OBJ -------------------------------------------------------------------------------- /audiolib/OBJDB/MV_MIX16.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJDB/MV_MIX16.OBJ -------------------------------------------------------------------------------- /audiolib/OBJDB/PAS16.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJDB/PAS16.OBJ -------------------------------------------------------------------------------- /audiolib/OBJDB/PITCH.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJDB/PITCH.OBJ -------------------------------------------------------------------------------- /audiolib/OBJDB/SNDSCAPE.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJDB/SNDSCAPE.OBJ -------------------------------------------------------------------------------- /audiolib/OBJDB/SNDSRC.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJDB/SNDSRC.OBJ -------------------------------------------------------------------------------- /audiolib/OBJDB/TASK_MAN.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJDB/TASK_MAN.OBJ -------------------------------------------------------------------------------- /audiolib/OBJDB/USER.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/OBJDB/USER.OBJ -------------------------------------------------------------------------------- /audiolib/PUBLIC/AUDIO_WF.LIB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/PUBLIC/AUDIO_WF.LIB -------------------------------------------------------------------------------- /audiolib/PUBLIC/EMIDIAPI.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/PUBLIC/EMIDIAPI.TXT -------------------------------------------------------------------------------- /audiolib/PUBLIC/INCLUDE/AUDIO_WF.LIB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/PUBLIC/INCLUDE/AUDIO_WF.LIB -------------------------------------------------------------------------------- /audiolib/PUBLIC/INCLUDE/SNDCARDS.H: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /********************************************************************** 21 | module: SNDCARDS.H 22 | 23 | author: James R. Dose 24 | date: March 31, 1994 25 | 26 | Contains enumerated type definitions for sound cards. 27 | 28 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 29 | **********************************************************************/ 30 | 31 | #ifndef __SNDCARDS_H 32 | #define __SNDCARDS_H 33 | 34 | #define ASS_VERSION_STRING "1.12" 35 | 36 | typedef enum 37 | { 38 | // ASS_NoSound, 39 | SoundBlaster, 40 | ProAudioSpectrum, 41 | SoundMan16, 42 | Adlib, 43 | GenMidi, 44 | SoundCanvas, 45 | Awe32, 46 | WaveBlaster, 47 | SoundScape, 48 | UltraSound, 49 | SoundSource, 50 | TandySoundSource, 51 | PC, 52 | NumSoundCards 53 | } soundcardnames; 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /audiolib/PUBLIC/INCLUDE/TASK_MAN.H: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /********************************************************************** 21 | module: TASK_MAN.C 22 | 23 | author: James R. Dose 24 | date: July 25, 1994 25 | 26 | Public header for TASK_MAN.C, a low level timer task scheduler. 27 | 28 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 29 | **********************************************************************/ 30 | 31 | #ifndef __TASK_MAN_H 32 | #define __TASK_MAN_H 33 | 34 | enum TASK_ERRORS 35 | { 36 | TASK_Warning = -2, 37 | TASK_Error = -1, 38 | TASK_Ok = 0 39 | }; 40 | 41 | typedef struct task 42 | { 43 | struct task *next; 44 | struct task *prev; 45 | void ( *TaskService )( struct task * ); 46 | void *data; 47 | long rate; 48 | volatile long count; 49 | int priority; 50 | int active; 51 | } task; 52 | 53 | // TS_InInterrupt is TRUE during a taskman interrupt. 54 | // Use this if you have code that may be used both outside 55 | // and within interrupts. 56 | 57 | extern volatile int TS_InInterrupt; 58 | 59 | void TS_Shutdown( void ); 60 | task *TS_ScheduleTask( void ( *Function )( task * ), int rate, 61 | int priority, void *data ); 62 | int TS_Terminate( task *ptr ); 63 | void TS_Dispatch( void ); 64 | void TS_SetTaskRate( task *Task, int rate ); 65 | void TS_UnlockMemory( void ); 66 | int TS_LockMemory( void ); 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /audiolib/PUBLIC/INCLUDE/USRHOOKS.C: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /********************************************************************** 21 | module: USRHOOKS.C 22 | 23 | author: James R. Dose 24 | date: July 26, 1994 25 | 26 | This module contains cover functions for operations the library 27 | needs that may be restricted by the calling program. This code 28 | is left public for you to modify. 29 | **********************************************************************/ 30 | 31 | #include 32 | #include "usrhooks.h" 33 | 34 | 35 | /*--------------------------------------------------------------------- 36 | Function: USRHOOKS_GetMem 37 | 38 | Allocates the requested amount of memory and returns a pointer to 39 | its location, or NULL if an error occurs. NOTE: pointer is assumed 40 | to be dword aligned. 41 | ---------------------------------------------------------------------*/ 42 | 43 | int USRHOOKS_GetMem 44 | ( 45 | void **ptr, 46 | unsigned long size 47 | ) 48 | 49 | { 50 | void *memory; 51 | 52 | memory = malloc( size ); 53 | if ( memory == NULL ) 54 | { 55 | return( USRHOOKS_Error ); 56 | } 57 | 58 | *ptr = memory; 59 | 60 | return( USRHOOKS_Ok ); 61 | } 62 | 63 | 64 | /*--------------------------------------------------------------------- 65 | Function: USRHOOKS_FreeMem 66 | 67 | Deallocates the memory associated with the specified pointer. 68 | ---------------------------------------------------------------------*/ 69 | 70 | int USRHOOKS_FreeMem 71 | ( 72 | void *ptr 73 | ) 74 | 75 | { 76 | if ( ptr == NULL ) 77 | { 78 | return( USRHOOKS_Error ); 79 | } 80 | 81 | free( ptr ); 82 | 83 | return( USRHOOKS_Ok ); 84 | } 85 | -------------------------------------------------------------------------------- /audiolib/PUBLIC/INCLUDE/USRHOOKS.H: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /********************************************************************** 21 | module: USRHOOKS.H 22 | 23 | author: James R. Dose 24 | date: July 26, 1994 25 | 26 | Public header file for USRHOOKS.C. 27 | 28 | This module contains cover functions for operations the library 29 | needs that may be restricted by the calling program. The function 30 | prototypes in this header should not be modified. 31 | **********************************************************************/ 32 | 33 | #ifndef __USRHOOKS_H 34 | #define __USRHOOKS_H 35 | 36 | /*--------------------------------------------------------------------- 37 | Error definitions 38 | ---------------------------------------------------------------------*/ 39 | 40 | enum USRHOOKS_Errors 41 | { 42 | USRHOOKS_Warning = -2, 43 | USRHOOKS_Error = -1, 44 | USRHOOKS_Ok = 0 45 | }; 46 | 47 | 48 | /*--------------------------------------------------------------------- 49 | Function Prototypes 50 | ---------------------------------------------------------------------*/ 51 | 52 | int USRHOOKS_GetMem( void **ptr, unsigned long size ); 53 | int USRHOOKS_FreeMem( void *ptr ); 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /audiolib/PUBLIC/MIDI.TXT: -------------------------------------------------------------------------------- 1 | 2 | Apogee Sound System MIDI notes: 3 | ------------------------------- 4 | 5 | FM Midi : 6 | 7 | On OPL2 cards 9 voices are available. OPL3 cards have 18 voices. Melodic 8 | mode is used for music. For percussion (channel 10), each key is assigned 9 | a timbre to play at a pitch specified by the patch. This method was chosen 10 | based on the advice of Bobby Prince, Rob Wallace, George Sanger, and Lee 11 | Jackson, all of whom felt the 11 voice mode was too restricting for 12 | musicians. 13 | 14 | Channels 1-16 are now supported. 15 | 16 | Controllers supported 17 | 18 | 6 data entry msb | 19 | 38 data entry lsb | - Only on Set Pitch Bend Range (RPN 0, 0) 20 | 96 data increment | 21 | 97 data decrement | 22 | 7 channel volume 23 | 10 pan (balance) 24 | 121 reset all controllers 25 | 123 all notes off 26 | 27 | 28 | AWE32 : 29 | 30 | All controllers supported by API. 31 | 32 | 33 | Gravis Ultrasound: 34 | 35 | 1 modulation wheel 36 | 6 data entry msb | 37 | 38 data entry lsb | - Only on Set Pitch Bend Range (RPN 0, 0) 38 | 96 data increment | 39 | 97 data decrement | 40 | 7 channel volume 41 | 39 volume lsb ignored 42 | 10 pan (balance) 43 | 11 channel expression (volume) 44 | 43 expression lsb ignored 45 | 64 sustain (damper pedal) 46 | 100 set registered parameter number 47 | 101 set registered parameter number 48 | 121 reset all controllers 49 | 50 | 120 all sounds off | 51 | 123 all notes off | 52 | 124 omni off | - Perform all notes off 53 | 125 omni on | 54 | 126 mono | 55 | 127 mono | 56 | 57 | 58 | General MIDI (all other cards): 59 | 60 | All controllers sent. Support depends on the card. 61 | -------------------------------------------------------------------------------- /audiolib/PUBLIC/NOTES.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/PUBLIC/NOTES.TXT -------------------------------------------------------------------------------- /audiolib/PUBLIC/PM/GMTIMBRE.TMB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/PUBLIC/PM/GMTIMBRE.TMB -------------------------------------------------------------------------------- /audiolib/PUBLIC/PM/MAKEFILE: -------------------------------------------------------------------------------- 1 | .OPTIMIZE 2 | 3 | lib_dir = .. 4 | prg_dir = . 5 | obj_dir = $(prg_dir)\obj 6 | main_dir = $(prg_dir)\source 7 | header_dir = $(main_dir);$(lib_dir)\INCLUDE 8 | tasm_include_dir = /i$(main_dir) /i$(lib_dir)\source 9 | 10 | lib_files = $(lib_dir)\audio_wf.lib 11 | 12 | .h : $(header_dir) 13 | .c : $(header_dir) 14 | .asm : $(header_dir) 15 | .obj : $(obj_dir) 16 | 17 | object_files = pm.obj usrhooks.obj 18 | 19 | tasm_options = /zi /p $(tasm_include_dir) 20 | #wcc_options = /w4 /d2 /i=$(header_dir) 21 | wcc_options = /w4 /d1 /omaxnet /zp4 /5r /i=$(header_dir) 22 | wlink_options = 23 | 24 | pm.exe: $(object_files) $(lib_files) makefile 25 | %create temp.lnk 26 | %append temp.lnk option quiet 27 | %append temp.lnk option stack=128k 28 | %append temp.lnk system dos4g 29 | %append temp.lnk name $^& 30 | %append temp.lnk debug all 31 | %append temp.lnk libfile $(lib_files) 32 | for %i in ($(object_files)) do %append temp.lnk file $(obj_dir)\%i 33 | wlink $(wlink_options) @temp.lnk 34 | #wc2dbg pm.exe 35 | del temp.lnk 36 | 37 | .asm.obj : 38 | tasm $(tasm_options) $[* $(obj_dir)\$^& 39 | 40 | .c.obj : 41 | wcc386 $(wcc_options) $[* /fo=$(obj_dir)\$^& 42 | 43 | pm.obj : pm.c music.h sndcards.h 44 | 45 | usrhooks.obj : usrhooks.c usrhooks.h 46 | -------------------------------------------------------------------------------- /audiolib/PUBLIC/PM/MAKETMB.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/PUBLIC/PM/MAKETMB.EXE -------------------------------------------------------------------------------- /audiolib/PUBLIC/PM/OBJ/PM.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/PUBLIC/PM/OBJ/PM.OBJ -------------------------------------------------------------------------------- /audiolib/PUBLIC/PM/OBJ/USRHOOKS.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/PUBLIC/PM/OBJ/USRHOOKS.OBJ -------------------------------------------------------------------------------- /audiolib/PUBLIC/PM/PM.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/PUBLIC/PM/PM.EXE -------------------------------------------------------------------------------- /audiolib/PUBLIC/PM/PM.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/PUBLIC/PM/PM.TXT -------------------------------------------------------------------------------- /audiolib/PUBLIC/PM/README.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/PUBLIC/PM/README.TXT -------------------------------------------------------------------------------- /audiolib/PUBLIC/PM/SOURCE/USRHOOKS.C: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /********************************************************************** 21 | module: USRHOOKS.C 22 | 23 | author: James R. Dose 24 | date: July 26, 1994 25 | 26 | This module contains cover functions for operations the library 27 | needs that may be restricted by the calling program. This code 28 | is left public for you to modify. 29 | **********************************************************************/ 30 | 31 | #include 32 | #include "usrhooks.h" 33 | 34 | 35 | /*--------------------------------------------------------------------- 36 | Function: USRHOOKS_GetMem 37 | 38 | Allocates the requested amount of memory and returns a pointer to 39 | its location, or NULL if an error occurs. NOTE: pointer is assumed 40 | to be dword aligned. 41 | ---------------------------------------------------------------------*/ 42 | 43 | int USRHOOKS_GetMem 44 | ( 45 | void **ptr, 46 | unsigned long size 47 | ) 48 | 49 | { 50 | void *memory; 51 | 52 | memory = malloc( size ); 53 | if ( memory == NULL ) 54 | { 55 | return( USRHOOKS_Error ); 56 | } 57 | 58 | *ptr = memory; 59 | 60 | return( USRHOOKS_Ok ); 61 | } 62 | 63 | 64 | /*--------------------------------------------------------------------- 65 | Function: USRHOOKS_FreeMem 66 | 67 | Deallocates the memory associated with the specified pointer. 68 | ---------------------------------------------------------------------*/ 69 | 70 | int USRHOOKS_FreeMem 71 | ( 72 | void *ptr 73 | ) 74 | 75 | { 76 | if ( ptr == NULL ) 77 | { 78 | return( USRHOOKS_Error ); 79 | } 80 | 81 | free( ptr ); 82 | 83 | return( USRHOOKS_Ok ); 84 | } 85 | -------------------------------------------------------------------------------- /audiolib/PUBLIC/PM/SOURCE/USRHOOKS.H: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /********************************************************************** 21 | module: USRHOOKS.H 22 | 23 | author: James R. Dose 24 | date: July 26, 1994 25 | 26 | Public header file for USRHOOKS.C. 27 | 28 | This module contains cover functions for operations the library 29 | needs that may be restricted by the calling program. The function 30 | prototypes in this header should not be modified. 31 | **********************************************************************/ 32 | 33 | #ifndef __USRHOOKS_H 34 | #define __USRHOOKS_H 35 | 36 | /*--------------------------------------------------------------------- 37 | Error definitions 38 | ---------------------------------------------------------------------*/ 39 | 40 | enum USRHOOKS_Errors 41 | { 42 | USRHOOKS_Warning = -2, 43 | USRHOOKS_Error = -1, 44 | USRHOOKS_Ok = 0 45 | }; 46 | 47 | 48 | /*--------------------------------------------------------------------- 49 | Function Prototypes 50 | ---------------------------------------------------------------------*/ 51 | 52 | int USRHOOKS_GetMem( void **ptr, unsigned long size ); 53 | int USRHOOKS_FreeMem( void *ptr ); 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /audiolib/PUBLIC/PM/TIMBRES.ZIP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/PUBLIC/PM/TIMBRES.ZIP -------------------------------------------------------------------------------- /audiolib/PUBLIC/PS/BINDPS.BAT: -------------------------------------------------------------------------------- 1 | ren ps.exe ps2.exe 2 | call bind ps2 ps 3 | del ps2.exe 4 | -------------------------------------------------------------------------------- /audiolib/PUBLIC/PS/MAKEFILE: -------------------------------------------------------------------------------- 1 | .OPTIMIZE 2 | 3 | lib_dir = .. 4 | prg_dir = . 5 | obj_dir = $(prg_dir)\ 6 | main_dir = $(prg_dir)\ 7 | header_dir = $(main_dir);$(lib_dir)\INCLUDE 8 | tasm_include_dir = /i$(main_dir) /i$(lib_dir)\source 9 | 10 | lib_files = $(lib_dir)\audio_wf.lib 11 | 12 | .h : $(header_dir) 13 | .c : $(header_dir) 14 | .asm : $(header_dir) 15 | .obj : $(obj_dir) 16 | 17 | object_files = ps.obj usrhooks.obj 18 | 19 | tasm_options = /zi /p $(tasm_include_dir) 20 | #wcc_options = /w4 /d2 /i=$(header_dir) 21 | wcc_options = /w4 /d1 /omaxnet /zp4 /5r /i=$(header_dir) 22 | wlink_options = 23 | 24 | ps.exe: $(object_files) $(lib_files) makefile 25 | %create temp.lnk 26 | %append temp.lnk option quiet 27 | %append temp.lnk option stack=128k 28 | %append temp.lnk system dos4g 29 | %append temp.lnk name $^& 30 | %append temp.lnk debug all 31 | %append temp.lnk libfile $(lib_files) 32 | for %i in ($(object_files)) do %append temp.lnk file $(obj_dir)\%i 33 | wlink $(wlink_options) @temp.lnk 34 | #wc2dbg ps.exe 35 | del temp.lnk 36 | 37 | .asm.obj : 38 | tasm $(tasm_options) $[* $(obj_dir)\$^& 39 | 40 | .c.obj : 41 | wcc386 $(wcc_options) $[* /fo=$(obj_dir)\$^& 42 | 43 | ps.obj : ps.c fx_man.h sndcards.h 44 | 45 | usrhooks.obj : usrhooks.c usrhooks.h 46 | -------------------------------------------------------------------------------- /audiolib/PUBLIC/PS/PS.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/PUBLIC/PS/PS.EXE -------------------------------------------------------------------------------- /audiolib/PUBLIC/PS/PS.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/PUBLIC/PS/PS.OBJ -------------------------------------------------------------------------------- /audiolib/PUBLIC/PS/USRHOOKS.C: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /********************************************************************** 21 | module: USRHOOKS.C 22 | 23 | author: James R. Dose 24 | date: July 26, 1994 25 | 26 | This module contains cover functions for operations the library 27 | needs that may be restricted by the calling program. This code 28 | is left public for you to modify. 29 | **********************************************************************/ 30 | 31 | #include 32 | #include "usrhooks.h" 33 | 34 | 35 | /*--------------------------------------------------------------------- 36 | Function: USRHOOKS_GetMem 37 | 38 | Allocates the requested amount of memory and returns a pointer to 39 | its location, or NULL if an error occurs. NOTE: pointer is assumed 40 | to be dword aligned. 41 | ---------------------------------------------------------------------*/ 42 | 43 | int USRHOOKS_GetMem 44 | ( 45 | void **ptr, 46 | unsigned long size 47 | ) 48 | 49 | { 50 | void *memory; 51 | 52 | memory = malloc( size ); 53 | if ( memory == NULL ) 54 | { 55 | return( USRHOOKS_Error ); 56 | } 57 | 58 | *ptr = memory; 59 | 60 | return( USRHOOKS_Ok ); 61 | } 62 | 63 | 64 | /*--------------------------------------------------------------------- 65 | Function: USRHOOKS_FreeMem 66 | 67 | Deallocates the memory associated with the specified pointer. 68 | ---------------------------------------------------------------------*/ 69 | 70 | int USRHOOKS_FreeMem 71 | ( 72 | void *ptr 73 | ) 74 | 75 | { 76 | if ( ptr == NULL ) 77 | { 78 | return( USRHOOKS_Error ); 79 | } 80 | 81 | free( ptr ); 82 | 83 | return( USRHOOKS_Ok ); 84 | } 85 | -------------------------------------------------------------------------------- /audiolib/PUBLIC/PS/USRHOOKS.H: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /********************************************************************** 21 | module: USRHOOKS.H 22 | 23 | author: James R. Dose 24 | date: July 26, 1994 25 | 26 | Public header file for USRHOOKS.C. 27 | 28 | This module contains cover functions for operations the library 29 | needs that may be restricted by the calling program. The function 30 | prototypes in this header should not be modified. 31 | **********************************************************************/ 32 | 33 | #ifndef __USRHOOKS_H 34 | #define __USRHOOKS_H 35 | 36 | /*--------------------------------------------------------------------- 37 | Error definitions 38 | ---------------------------------------------------------------------*/ 39 | 40 | enum USRHOOKS_Errors 41 | { 42 | USRHOOKS_Warning = -2, 43 | USRHOOKS_Error = -1, 44 | USRHOOKS_Ok = 0 45 | }; 46 | 47 | 48 | /*--------------------------------------------------------------------- 49 | Function Prototypes 50 | ---------------------------------------------------------------------*/ 51 | 52 | int USRHOOKS_GetMem( void **ptr, unsigned long size ); 53 | int USRHOOKS_FreeMem( void *ptr ); 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /audiolib/PUBLIC/PS/USRHOOKS.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/PUBLIC/PS/USRHOOKS.OBJ -------------------------------------------------------------------------------- /audiolib/PUBLIC/TIMER/MAKEFILE: -------------------------------------------------------------------------------- 1 | .OPTIMIZE 2 | 3 | lib_dir = .. 4 | prg_dir = . 5 | obj_dir = $(prg_dir)\obj 6 | main_dir = $(prg_dir)\source 7 | header_dir = $(main_dir);$(lib_dir)\INCLUDE 8 | tasm_include_dir = /i$(main_dir) /i$(lib_dir)\source 9 | 10 | lib_files = $(lib_dir)\audio_wf.lib 11 | 12 | .h : $(header_dir) 13 | .c : $(header_dir) 14 | .asm : $(header_dir) 15 | .obj : $(obj_dir) 16 | 17 | object_files = timer.obj usrhooks.obj 18 | 19 | tasm_options = /zi /p $(tasm_include_dir) 20 | #wcc_options = /w4 /d2 /zm /i=$(header_dir) 21 | wcc_options = /w4 /d1 /omaxnet /zp4 /5r /zm /i=$(header_dir) 22 | wlink_options = 23 | 24 | timer.exe: $(object_files) $(lib_files) makefile 25 | %create temp.lnk 26 | %append temp.lnk option quiet 27 | %append temp.lnk option eliminate 28 | %append temp.lnk system dos4g 29 | %append temp.lnk name $^& 30 | %append temp.lnk debug all 31 | %append temp.lnk libfile $(lib_files) 32 | for %i in ($(object_files)) do %append temp.lnk file $(obj_dir)\%i 33 | wlink $(wlink_options) @temp.lnk 34 | #wc2dbg demo.exe 35 | del temp.lnk 36 | 37 | .asm.obj : 38 | tasm $(tasm_options) $[* $(obj_dir)\$^& 39 | 40 | .c.obj : 41 | wcc386 $(wcc_options) $[* /fo=$(obj_dir)\$^& 42 | 43 | demo.obj : demo.c task_man.h 44 | 45 | usrhooks.obj : usrhooks.c usrhooks.h 46 | -------------------------------------------------------------------------------- /audiolib/PUBLIC/TIMER/OBJ/TIMER.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/PUBLIC/TIMER/OBJ/TIMER.OBJ -------------------------------------------------------------------------------- /audiolib/PUBLIC/TIMER/OBJ/USRHOOKS.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/PUBLIC/TIMER/OBJ/USRHOOKS.OBJ -------------------------------------------------------------------------------- /audiolib/PUBLIC/TIMER/SOURCE/USRHOOKS.C: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /********************************************************************** 21 | module: USRHOOKS.C 22 | 23 | author: James R. Dose 24 | date: July 26, 1994 25 | 26 | This module contains cover functions for operations the library 27 | needs that may be restricted by the calling program. This code 28 | is left public for you to modify. 29 | **********************************************************************/ 30 | 31 | #include 32 | #include "usrhooks.h" 33 | 34 | 35 | /*--------------------------------------------------------------------- 36 | Function: USRHOOKS_GetMem 37 | 38 | Allocates the requested amount of memory and returns a pointer to 39 | its location, or NULL if an error occurs. NOTE: pointer is assumed 40 | to be dword aligned. 41 | ---------------------------------------------------------------------*/ 42 | 43 | int USRHOOKS_GetMem 44 | ( 45 | void **ptr, 46 | unsigned long size 47 | ) 48 | 49 | { 50 | void *memory; 51 | 52 | memory = malloc( size ); 53 | if ( memory == NULL ) 54 | { 55 | return( USRHOOKS_Error ); 56 | } 57 | 58 | *ptr = memory; 59 | 60 | return( USRHOOKS_Ok ); 61 | } 62 | 63 | 64 | /*--------------------------------------------------------------------- 65 | Function: USRHOOKS_FreeMem 66 | 67 | Deallocates the memory associated with the specified pointer. 68 | ---------------------------------------------------------------------*/ 69 | 70 | int USRHOOKS_FreeMem 71 | ( 72 | void *ptr 73 | ) 74 | 75 | { 76 | if ( ptr == NULL ) 77 | { 78 | return( USRHOOKS_Error ); 79 | } 80 | 81 | free( ptr ); 82 | 83 | return( USRHOOKS_Ok ); 84 | } 85 | -------------------------------------------------------------------------------- /audiolib/PUBLIC/TIMER/SOURCE/USRHOOKS.H: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /********************************************************************** 21 | module: USRHOOKS.H 22 | 23 | author: James R. Dose 24 | date: July 26, 1994 25 | 26 | Public header file for USRHOOKS.C. 27 | 28 | This module contains cover functions for operations the library 29 | needs that may be restricted by the calling program. The function 30 | prototypes in this header should not be modified. 31 | **********************************************************************/ 32 | 33 | #ifndef __USRHOOKS_H 34 | #define __USRHOOKS_H 35 | 36 | /*--------------------------------------------------------------------- 37 | Error definitions 38 | ---------------------------------------------------------------------*/ 39 | 40 | enum USRHOOKS_Errors 41 | { 42 | USRHOOKS_Warning = -2, 43 | USRHOOKS_Error = -1, 44 | USRHOOKS_Ok = 0 45 | }; 46 | 47 | 48 | /*--------------------------------------------------------------------- 49 | Function Prototypes 50 | ---------------------------------------------------------------------*/ 51 | 52 | int USRHOOKS_GetMem( void **ptr, unsigned long size ); 53 | int USRHOOKS_FreeMem( void *ptr ); 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /audiolib/PUBLIC/TIMER/TIMER.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/PUBLIC/TIMER/TIMER.EXE -------------------------------------------------------------------------------- /audiolib/SOURCE/ADLIBFX.H: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /********************************************************************** 21 | module: ADLIBFX.H 22 | 23 | author: James R. Dose 24 | date: April 1, 1994 25 | 26 | Public header for ADLIBFX.C 27 | 28 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 29 | **********************************************************************/ 30 | 31 | #ifndef __ADLIBFX_H 32 | #define __ADLIBFX_H 33 | 34 | enum ADLIBFX_Errors 35 | { 36 | ADLIBFX_Warning = -2, 37 | ADLIBFX_Error = -1, 38 | ADLIBFX_Ok = 0, 39 | ADLIBFX_NoVoices, 40 | ADLIBFX_VoiceNotFound, 41 | ADLIBFX_DPMI_Error 42 | }; 43 | 44 | typedef struct 45 | { 46 | unsigned long length; 47 | short int priority; 48 | char mChar, cChar; 49 | char mScale, cScale; 50 | char mAttack, cAttack; 51 | char mSus, cSus; 52 | char mWave, cWave; 53 | char nConn; 54 | char voice; 55 | char mode; 56 | char unused[ 3 ]; 57 | char block; 58 | char data[]; 59 | } ALSound; 60 | 61 | #define ADLIBFX_MaxVolume 255 62 | #define ADLIBFX_MinVoiceHandle 1 63 | 64 | char *ADLIBFX_ErrorString( int ErrorNumber ); 65 | int ADLIBFX_Stop( int handle ); 66 | int ADLIBFX_SetVolume( int handle, int volume ); 67 | int ADLIBFX_SetTotalVolume( int volume ); 68 | int ADLIBFX_GetTotalVolume( void ); 69 | int ADLIBFX_VoiceAvailable( int priority ); 70 | int ADLIBFX_Play( ALSound *sound, int volume, int priority, unsigned long callbackval ); 71 | int ADLIBFX_SoundPlaying( int handle ); 72 | void ADLIBFX_SetCallBack( void ( *function )( unsigned long ) ); 73 | int ADLIBFX_Init( void ); 74 | int ADLIBFX_Shutdown( void ); 75 | #pragma aux ADLIBFX_Shutdown frame; 76 | void PCFX_UnlockMemory( void ); 77 | #pragma aux ADLIBFX_UnlockMemory frame; 78 | int PCFX_LockMemory( void ); 79 | 80 | #endif 81 | -------------------------------------------------------------------------------- /audiolib/SOURCE/AL_MIDI.H: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | #ifndef __AL_MIDI_H 21 | #define __AL_MIDI_H 22 | 23 | enum AL_Errors 24 | { 25 | AL_Warning = -2, 26 | AL_Error = -1, 27 | AL_Ok = 0, 28 | }; 29 | 30 | #define AL_MaxVolume 127 31 | #define AL_DefaultChannelVolume 90 32 | //#define AL_DefaultPitchBendRange 2 33 | #define AL_DefaultPitchBendRange 200 34 | 35 | #define ADLIB_PORT 0x388 36 | 37 | void AL_SendOutputToPort( int port, int reg, int data ); 38 | void AL_SendOutput( int voice, int reg, int data ); 39 | void AL_StereoOn( void ); 40 | void AL_StereoOff( void ); 41 | int AL_ReserveVoice( int voice ); 42 | int AL_ReleaseVoice( int voice ); 43 | void AL_Shutdown( void ); 44 | int AL_Init( int soundcard ); 45 | void AL_SetMaxMidiChannel( int channel ); 46 | void AL_Reset( void ); 47 | void AL_NoteOff( int channel, int key, int velocity ); 48 | void AL_NoteOn( int channel, int key, int vel ); 49 | //Turned off to test if it works with Watcom 10a 50 | // #pragma aux AL_NoteOn frame; 51 | void AL_AllNotesOff( int channel ); 52 | void AL_ControlChange( int channel, int type, int data ); 53 | void AL_ProgramChange( int channel, int patch ); 54 | void AL_SetPitchBend( int channel, int lsb, int msb ); 55 | int AL_DetectFM( void ); 56 | void AL_RegisterTimbreBank( unsigned char *timbres ); 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /audiolib/SOURCE/ASSERT.H: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | #ifndef __ASSERT_H 21 | 22 | #define __ASSERT_H 23 | 24 | #ifdef NDEBUG 25 | 26 | #define ASSERT(f) 27 | 28 | #else 29 | 30 | #pragma aux _Assert aborts; /* _Assert will not return */ 31 | extern void _Assert( char *strFile, unsigned uLine ); /*prototype */ 32 | 33 | #define ASSERT(f) \ 34 | if (f) \ 35 | ; \ 36 | else \ 37 | _Assert( __FILE__, __LINE__ ) 38 | 39 | #endif 40 | 41 | #else 42 | 43 | #error Multiple definition of ASSERT() 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /audiolib/SOURCE/AWE32.C: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/SOURCE/AWE32.C -------------------------------------------------------------------------------- /audiolib/SOURCE/AWE32.H: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /********************************************************************** 21 | module: AWE32.H 22 | 23 | author: James R. Dose 24 | date: August 23, 1994 25 | 26 | Public header for AWE32.C Cover functions for calling the 27 | AWE32 low-level library. 28 | 29 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 30 | **********************************************************************/ 31 | 32 | #ifndef __AWE32_H 33 | #define __AWE32_H 34 | 35 | enum AWE32_ERRORS 36 | { 37 | AWE32_Warning = -2, 38 | AWE32_Error = -1, 39 | AWE32_Ok = 0, 40 | AWE32_SoundBlasterError, 41 | AWE32_NotDetected, 42 | AWE32_UnableToInitialize, 43 | AWE32_MPU401Error, 44 | AWE32_DPMI_Error 45 | }; 46 | 47 | char *AWE32_ErrorString( int ErrorNumber ); 48 | int AWE32_Init( void ); 49 | void AWE32_Shutdown( void ); 50 | void AWE32_NoteOff( int channel, int key, int velocity ); 51 | void AWE32_NoteOn( int channel, int key, int velocity ); 52 | void AWE32_PolyAftertouch( int channel, int key, int pressure ); 53 | void AWE32_ChannelAftertouch( int channel, int pressure ); 54 | void AWE32_ControlChange( int channel, int number, int value ); 55 | void AWE32_ProgramChange( int channel, int program ); 56 | void AWE32_PitchBend( int channel, int lsb, int msb ); 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /audiolib/SOURCE/DEBUGIO.H: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | #ifndef __DEBUGIO_H 21 | #define __DEBUGIO_H 22 | 23 | void DB_SetXY( int x, int y ); 24 | void DB_PutChar( char ch ); 25 | int DB_PrintString( char *string ); 26 | int DB_PrintNum( int number ); 27 | int DB_PrintUnsigned( unsigned long number, int radix ); 28 | int DB_printf( char *fmt, ... ); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /audiolib/SOURCE/DMA.H: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /********************************************************************** 21 | file: DMA.H 22 | 23 | author: James R. Dose 24 | date: February 4, 1994 25 | 26 | Public header file for DMA.C 27 | 28 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 29 | **********************************************************************/ 30 | 31 | #ifndef __DMA_H 32 | #define __DMA_H 33 | 34 | enum DMA_ERRORS 35 | { 36 | DMA_Error = -1, 37 | DMA_Ok = 0, 38 | DMA_ChannelOutOfRange, 39 | DMA_InvalidChannel 40 | }; 41 | 42 | enum DMA_Modes 43 | { 44 | DMA_SingleShotRead, 45 | DMA_SingleShotWrite, 46 | DMA_AutoInitRead, 47 | DMA_AutoInitWrite 48 | }; 49 | 50 | char *DMA_ErrorString 51 | ( 52 | int ErrorNumber 53 | ); 54 | 55 | int DMA_VerifyChannel 56 | ( 57 | int channel 58 | ); 59 | 60 | int DMA_SetupTransfer 61 | ( 62 | int channel, 63 | char *address, 64 | int length, 65 | int mode 66 | ); 67 | 68 | int DMA_EndTransfer 69 | ( 70 | int channel 71 | ); 72 | 73 | char *DMA_GetCurrentPos 74 | ( 75 | int channel 76 | ); 77 | 78 | int DMA_GetTransferCount 79 | ( 80 | int channel 81 | ); 82 | 83 | #endif 84 | -------------------------------------------------------------------------------- /audiolib/SOURCE/GUSMIDI.H: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | #ifndef __GUSMIDI_H 21 | #define __GUSMIDI_H 22 | 23 | extern struct gf1_dma_buff GUS_HoldBuffer; 24 | 25 | enum GUS_Errors 26 | { 27 | GUS_Warning = -2, 28 | GUS_Error = -1, 29 | GUS_Ok = 0, 30 | GUS_OutOfMemory, 31 | GUS_OutOfDosMemory, 32 | GUS_OutOfDRAM, 33 | GUS_GF1Error, 34 | GUS_InvalidIrq, 35 | GUS_ULTRADIRNotSet, 36 | GUS_MissingConfig, 37 | GUS_FileError 38 | }; 39 | 40 | char *GUS_ErrorString( int ErrorNumber ); 41 | int GUS_GetPatchMap( char *name ); 42 | int GUSMIDI_UnloadPatch( int prog ); 43 | int GUSMIDI_LoadPatch( int prog ); 44 | void GUSMIDI_ProgramChange( int channel, int prog ); 45 | void GUSMIDI_NoteOn( int chan, int note, int velocity ); 46 | void GUSMIDI_NoteOff( int chan, int note, int velocity ); 47 | void GUSMIDI_ControlChange( int channel, int number, int value ); 48 | void GUSMIDI_PitchBend( int channel, int lsb, int msb ); 49 | void GUSMIDI_ReleasePatches( void ); 50 | void GUSMIDI_SetVolume( int volume ); 51 | int GUSMIDI_GetVolume( void ); 52 | int GUS_Init( void ); 53 | void GUS_Shutdown( void ); 54 | #pragma aux GUS_Shutdown frame; 55 | int GUSMIDI_Init( void ); 56 | void GUSMIDI_Shutdown( void ); 57 | void *D32DosMemAlloc( unsigned size ); 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /audiolib/SOURCE/GUSMIDI2.H: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | #ifndef __GUSMIDI_H 21 | #define __GUSMIDI_H 22 | 23 | enum GUS_Errors 24 | { 25 | GUS_Warning = -2, 26 | GUS_Error = -1, 27 | GUS_Ok = 0, 28 | GUS_OutOfMemory, 29 | GUS_OutOfDosMemory, 30 | GUS_OutOfDRAM, 31 | GUS_GF1Error, 32 | GUS_InvalidIrq, 33 | GUS_ULTRADIRNotSet, 34 | GUS_MissingConfig, 35 | GUS_FileError, 36 | }; 37 | 38 | char *GUS_ErrorString( int ErrorNumber ); 39 | int GUS_GetPatchMap( char *name ); 40 | int GUSMIDI_UnloadPatch( int prog ); 41 | int GUSMIDI_LoadPatch( int prog ); 42 | void GUSMIDI_ProgramChange( int channel, int prog ); 43 | void GUSMIDI_NoteOn( int chan, int note, int velocity ); 44 | void GUSMIDI_NoteOff( int chan, int note, int velocity ); 45 | void GUSMIDI_ControlChange( int channel, int number, int value ); 46 | void GUSMIDI_PitchBend( int channel, int lsb, int msb ); 47 | void GUSMIDI_ReleasePatches( void ); 48 | void GUSMIDI_SetVolume( int volume ); 49 | int GUSMIDI_GetVolume( void ); 50 | int GUS_Init( void ); 51 | void GUS_Shutdown( void ); 52 | int GUSMIDI_Init( void ); 53 | void GUSMIDI_Shutdown( void ); 54 | void *D32DosMemAlloc( unsigned size ); 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /audiolib/SOURCE/INTERRUP.H: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /********************************************************************** 21 | module: INTERRUP.H 22 | 23 | author: James R. Dose 24 | date: March 31, 1994 25 | 26 | Inline functions for disabling and restoring the interrupt flag. 27 | 28 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 29 | **********************************************************************/ 30 | 31 | #ifndef __INTERRUPT_H 32 | #define __INTERRUPT_H 33 | 34 | unsigned long DisableInterrupts( void ); 35 | void RestoreInterrupts( unsigned long flags ); 36 | 37 | #pragma aux DisableInterrupts = \ 38 | "pushfd", \ 39 | "pop eax", \ 40 | "cli" \ 41 | modify [ eax ]; 42 | 43 | #pragma aux RestoreInterrupts = \ 44 | "push eax", \ 45 | "popfd" \ 46 | parm [ eax ]; 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /audiolib/SOURCE/IRQ.H: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /********************************************************************** 21 | module: IRQ.H 22 | 23 | author: James R. Dose 24 | date: August 8, 1994 25 | 26 | Public header for IRQ.C 27 | 28 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 29 | **********************************************************************/ 30 | 31 | #ifndef __IRQ_H 32 | #define __IRQ_H 33 | 34 | enum IRQ_ERRORS 35 | { 36 | IRQ_Warning = -2, 37 | IRQ_Error = -1, 38 | IRQ_Ok = 0, 39 | }; 40 | 41 | #define VALID_IRQ( irq ) ( ( ( irq ) >= 0 ) && ( ( irq ) <= 15 ) ) 42 | 43 | int IRQ_SetVector 44 | ( 45 | int vector, 46 | void ( __interrupt *function )( void ) 47 | ); 48 | int IRQ_RestoreVector 49 | ( 50 | int vector 51 | ); 52 | 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /audiolib/SOURCE/MEMCHECK.H: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | 21 | -------------------------------------------------------------------------------- /audiolib/SOURCE/MPU401.H: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | #ifndef __MPU401_H 21 | #define __MPU401_H 22 | 23 | #define MPU_DefaultAddress 0x330 24 | 25 | enum MPU_ERRORS 26 | { 27 | MPU_Warning = -2, 28 | MPU_Error = -1, 29 | MPU_Ok = 0, 30 | MPU_DPMI_Error 31 | }; 32 | 33 | #define MPU_NotFound -1 34 | #define MPU_UARTFailed -2 35 | 36 | #define MPU_ReadyToWrite 0x40 37 | #define MPU_ReadyToRead 0x80 38 | #define MPU_CmdEnterUART 0x3f 39 | #define MPU_CmdReset 0xff 40 | #define MPU_CmdAcknowledge 0xfe 41 | 42 | extern int MPU_BaseAddr; 43 | extern unsigned MPU_Delay; 44 | 45 | void MPU_SendCommand( int data ); 46 | void MPU_SendMidi( int data ); 47 | int MPU_Reset( void ); 48 | int MPU_EnterUART( void ); 49 | int MPU_Init( int addr ); 50 | void MPU_ResetMidi( void ); 51 | void MPU_NoteOff( int channel, int key, int velocity ); 52 | void MPU_NoteOn( int channel, int key, int velocity ); 53 | void MPU_PolyAftertouch( int channel, int key, int pressure ); 54 | void MPU_ControlChange( int channel, int number, int value ); 55 | void MPU_ProgramChange( int channel, int program ); 56 | void MPU_ChannelAftertouch( int channel, int pressure ); 57 | void MPU_PitchBend( int channel, int lsb, int msb ); 58 | void MPU_UnlockMemory( void ); 59 | int MPU_LockMemory( void ); 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /audiolib/SOURCE/MYPRINT.C: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/SOURCE/MYPRINT.C -------------------------------------------------------------------------------- /audiolib/SOURCE/MYPRINT.H: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | #ifndef __MYPRINT_H 21 | #define __MYPRINT_H 22 | 23 | enum COLORS 24 | { 25 | BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, LIGHTGRAY, DARKGRAY, 26 | LIGHTBLUE, LIGHTGREEN, LIGHTCYAN, LIGHTRED, LIGHTMAGENTA, YELLOW, WHITE 27 | }; 28 | 29 | #define NONE -1 30 | #define SINGLE_FRAME -1 31 | #define DOUBLE_FRAME -2 32 | 33 | void DrawText( int x, int y, int ch, int foreground, int background ); 34 | void TextBox( int x1, int y1, int x2, int y2, int ch, int foreground, int background ); 35 | void TextFrame( int x1, int y1, int x2, int y2, int type, int foreground, int background ); 36 | void mysetxy( int x, int y ); 37 | void myputch( char ch ); 38 | int printstring( char *string ); 39 | int printnum( int number ); 40 | int printunsigned( unsigned long number, int radix ); 41 | int myprintf( char *fmt, ... ); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /audiolib/SOURCE/PCFX.H: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /********************************************************************** 21 | module: PCFX.H 22 | 23 | author: James R. Dose 24 | date: April 1, 1994 25 | 26 | Public header for ADLIBFX.C 27 | 28 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 29 | **********************************************************************/ 30 | 31 | #ifndef __PCFX_H 32 | #define __PCFX_H 33 | 34 | enum PCFX_Errors 35 | { 36 | PCFX_Warning = -2, 37 | PCFX_Error = -1, 38 | PCFX_Ok = 0, 39 | PCFX_NoVoices, 40 | PCFX_VoiceNotFound, 41 | PCFX_DPMI_Error 42 | }; 43 | 44 | #define PCFX_MaxVolume 255 45 | #define PCFX_MinVoiceHandle 1 46 | 47 | typedef struct 48 | { 49 | unsigned long length; 50 | short int priority; 51 | char data[]; 52 | } PCSound; 53 | 54 | char *PCFX_ErrorString( int ErrorNumber ); 55 | int PCFX_Stop( int handle ); 56 | void PCFX_UseLookup( int use, unsigned value ); 57 | int PCFX_VoiceAvailable( int priority ); 58 | int PCFX_Play( PCSound *sound, int priority, unsigned long callbackval ); 59 | int PCFX_SoundPlaying( int handle ); 60 | int PCFX_SetTotalVolume( int volume ); 61 | int PCFX_GetTotalVolume( void ); 62 | void PCFX_SetCallBack( void ( *function )( unsigned long ) ); 63 | int PCFX_Init( void ); 64 | int PCFX_Shutdown( void ); 65 | #pragma aux PCFX_Shutdown frame; 66 | void PCFX_UnlockMemory( void ); 67 | int PCFX_LockMemory( void ); 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /audiolib/SOURCE/PITCH.H: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /********************************************************************** 21 | module: PITCH.H 22 | 23 | author: James R. Dose 24 | date: June 14, 1994 25 | 26 | Public header for PITCH.C 27 | 28 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 29 | **********************************************************************/ 30 | 31 | #ifndef __PITCH_H 32 | #define __PITCH_H 33 | 34 | enum PITCH_ERRORS 35 | { 36 | PITCH_Warning = -2, 37 | PITCH_Error = -1, 38 | PITCH_Ok = 0, 39 | }; 40 | 41 | //void PITCH_Init( void ); 42 | unsigned long PITCH_GetScale( int pitchoffset ); 43 | void PITCH_UnlockMemory( void ); 44 | int PITCH_LockMemory( void ); 45 | #endif 46 | -------------------------------------------------------------------------------- /audiolib/SOURCE/SNDCARDS.H: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /********************************************************************** 21 | module: SNDCARDS.H 22 | 23 | author: James R. Dose 24 | date: March 31, 1994 25 | 26 | Contains enumerated type definitions for sound cards. 27 | 28 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 29 | **********************************************************************/ 30 | 31 | #ifndef __SNDCARDS_H 32 | #define __SNDCARDS_H 33 | 34 | #define ASS_VERSION_STRING "1.12" 35 | 36 | typedef enum 37 | { 38 | // ASS_NoSound, 39 | SoundBlaster, 40 | ProAudioSpectrum, 41 | SoundMan16, 42 | Adlib, 43 | GenMidi, 44 | SoundCanvas, 45 | Awe32, 46 | WaveBlaster, 47 | SoundScape, 48 | UltraSound, 49 | SoundSource, 50 | TandySoundSource, 51 | PC, 52 | NumSoundCards 53 | } soundcardnames; 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /audiolib/SOURCE/SNDSRC.H: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /********************************************************************** 21 | module: SNDSRC.H 22 | 23 | author: James R. Dose 24 | date: March 26, 1994 25 | 26 | Public header for for SNDSRC.C 27 | 28 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 29 | **********************************************************************/ 30 | 31 | #ifndef __SNDSRC_H 32 | #define __SNDSRC_H 33 | 34 | enum SS_ERRORS 35 | { 36 | SS_Warning = -2, 37 | SS_Error = -1, 38 | SS_Ok = 0, 39 | SS_NotFound, 40 | SS_NoSoundPlaying, 41 | SS_DPMI_Error 42 | }; 43 | 44 | #define SELECT_SOUNDSOURCE_PORT1 "ss1" 45 | #define SELECT_SOUNDSOURCE_PORT2 "ss2" 46 | #define SELECT_SOUNDSOURCE_PORT3 "ss3" 47 | #define SELECT_TANDY_SOUNDSOURCE "sst" 48 | 49 | #define SS_Port1 0x3bc 50 | #define SS_Port2 0x378 51 | #define SS_Port3 0x278 52 | 53 | #define SS_DefaultPort 0x378 54 | #define SS_SampleRate 7000 55 | #define SS_DMAChannel -1 56 | 57 | char *SS_ErrorString( int ErrorNumber ); 58 | void SS_StopPlayback( void ); 59 | int SS_GetCurrentPos( void ); 60 | int SS_BeginBufferedPlayback( char *BufferStart, int BufferSize, int NumDivisions, void ( *CallBackFunc )( void ) ); 61 | int SS_GetPlaybackRate( void ); 62 | int SS_SetMixMode( int mode ); 63 | int SS_SetPort( int port ); 64 | void SS_SetCallBack( void ( *func )( void ) ); 65 | int SS_Init( int soundcard ); 66 | void SS_Shutdown( void ); 67 | void SS_UnlockMemory( void ); 68 | int SS_LockMemory( void ); 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /audiolib/SOURCE/STANDARD.H: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /********************************************************************** 21 | module: STANDARD.H 22 | 23 | author: James R. Dose 24 | date: May 25, 1994 25 | 26 | Header containing standard definitions. 27 | 28 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 29 | **********************************************************************/ 30 | 31 | #ifndef __STANDARD_H 32 | #define __STANDARD_H 33 | 34 | typedef int boolean; 35 | typedef int errorcode; 36 | 37 | #ifndef TRUE 38 | #define TRUE ( 1 == 1 ) 39 | #define FALSE ( !TRUE ) 40 | #endif 41 | 42 | enum STANDARD_ERRORS 43 | { 44 | Warning = -2, 45 | FatalError = -1, 46 | Success = 0 47 | }; 48 | 49 | #define BITSET( data, bit ) \ 50 | ( ( ( data ) & ( bit ) ) == ( bit ) ) 51 | 52 | #define ARRAY_LENGTH( array ) \ 53 | ( sizeof( array ) / sizeof( ( array )[ 0 ] ) ) 54 | 55 | #define WITHIN_BOUNDS( array, index ) \ 56 | ( ( 0 <= ( index ) ) && ( ( index ) < ARRAY_LENGTH( array ) ) ) 57 | 58 | #define FOREVER for( ; ; ) 59 | 60 | #ifdef NDEBUG 61 | #define DEBUGGING 0 62 | #else 63 | #define DEBUGGING 1 64 | #endif 65 | 66 | #define DEBUG_CODE \ 67 | if ( DEBUGGING == 0 ) \ 68 | { \ 69 | } \ 70 | else 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /audiolib/SOURCE/TASK_MAN.H: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /********************************************************************** 21 | module: TASK_MAN.C 22 | 23 | author: James R. Dose 24 | date: July 25, 1994 25 | 26 | Public header for TASK_MAN.C, a low level timer task scheduler. 27 | 28 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 29 | **********************************************************************/ 30 | 31 | #ifndef __TASK_MAN_H 32 | #define __TASK_MAN_H 33 | 34 | enum TASK_ERRORS 35 | { 36 | TASK_Warning = -2, 37 | TASK_Error = -1, 38 | TASK_Ok = 0 39 | }; 40 | 41 | typedef struct task 42 | { 43 | struct task *next; 44 | struct task *prev; 45 | void ( *TaskService )( struct task * ); 46 | void *data; 47 | long rate; 48 | volatile long count; 49 | int priority; 50 | int active; 51 | } task; 52 | 53 | // TS_InInterrupt is TRUE during a taskman interrupt. 54 | // Use this if you have code that may be used both outside 55 | // and within interrupts. 56 | 57 | extern volatile int TS_InInterrupt; 58 | 59 | void TS_Shutdown( void ); 60 | task *TS_ScheduleTask( void ( *Function )( task * ), int rate, 61 | int priority, void *data ); 62 | int TS_Terminate( task *ptr ); 63 | void TS_Dispatch( void ); 64 | void TS_SetTaskRate( task *Task, int rate ); 65 | void TS_UnlockMemory( void ); 66 | int TS_LockMemory( void ); 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /audiolib/SOURCE/USER.H: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /********************************************************************** 21 | module: USER.H 22 | 23 | author: James R. Dose 24 | phone: (214)-271-1365 Ext #221 25 | date: April 26, 1994 26 | 27 | Public header for USER.C 28 | 29 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 30 | **********************************************************************/ 31 | 32 | #ifndef __USER_H 33 | #define __USER_H 34 | 35 | int USER_CheckParameter( const char *parameter ); 36 | char *USER_GetText( const char *parameter ); 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /audiolib/SOURCE/USRHOOKS.C: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /********************************************************************** 21 | module: USRHOOKS.C 22 | 23 | author: James R. Dose 24 | date: July 26, 1994 25 | 26 | This module contains cover functions for operations the library 27 | needs that may be restricted by the calling program. This code 28 | is left public for you to modify. 29 | **********************************************************************/ 30 | 31 | #include 32 | #include "usrhooks.h" 33 | 34 | 35 | /*--------------------------------------------------------------------- 36 | Function: USRHOOKS_GetMem 37 | 38 | Allocates the requested amount of memory and returns a pointer to 39 | its location, or NULL if an error occurs. NOTE: pointer is assumed 40 | to be dword aligned. 41 | ---------------------------------------------------------------------*/ 42 | 43 | int USRHOOKS_GetMem 44 | ( 45 | void **ptr, 46 | unsigned long size 47 | ) 48 | 49 | { 50 | void *memory; 51 | 52 | memory = malloc( size ); 53 | if ( memory == NULL ) 54 | { 55 | return( USRHOOKS_Error ); 56 | } 57 | 58 | *ptr = memory; 59 | 60 | return( USRHOOKS_Ok ); 61 | } 62 | 63 | 64 | /*--------------------------------------------------------------------- 65 | Function: USRHOOKS_FreeMem 66 | 67 | Deallocates the memory associated with the specified pointer. 68 | ---------------------------------------------------------------------*/ 69 | 70 | int USRHOOKS_FreeMem 71 | ( 72 | void *ptr 73 | ) 74 | 75 | { 76 | if ( ptr == NULL ) 77 | { 78 | return( USRHOOKS_Error ); 79 | } 80 | 81 | free( ptr ); 82 | 83 | return( USRHOOKS_Ok ); 84 | } 85 | -------------------------------------------------------------------------------- /audiolib/SOURCE/USRHOOKS.H: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 1994-1995 Apogee Software, Ltd. 3 | 4 | This program is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU General Public License 6 | as published by the Free Software Foundation; either version 2 7 | of the License, or (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | 13 | See the GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | 19 | */ 20 | /********************************************************************** 21 | module: USRHOOKS.H 22 | 23 | author: James R. Dose 24 | date: July 26, 1994 25 | 26 | Public header file for USRHOOKS.C. 27 | 28 | This module contains cover functions for operations the library 29 | needs that may be restricted by the calling program. The function 30 | prototypes in this header should not be modified. 31 | **********************************************************************/ 32 | 33 | #ifndef __USRHOOKS_H 34 | #define __USRHOOKS_H 35 | 36 | /*--------------------------------------------------------------------- 37 | Error definitions 38 | ---------------------------------------------------------------------*/ 39 | 40 | enum USRHOOKS_Errors 41 | { 42 | USRHOOKS_Warning = -2, 43 | USRHOOKS_Error = -1, 44 | USRHOOKS_Ok = 0 45 | }; 46 | 47 | 48 | /*--------------------------------------------------------------------- 49 | Function Prototypes 50 | ---------------------------------------------------------------------*/ 51 | 52 | int USRHOOKS_GetMem( void **ptr, unsigned long size ); 53 | int USRHOOKS_FreeMem( void *ptr ); 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /audiolib/WMAKE.BAT: -------------------------------------------------------------------------------- 1 | del audio_wf.lib 2 | wmake.exe -f audio.mak "version = production" %1 %2 %3 %4 %5 -------------------------------------------------------------------------------- /audiolib/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/audiolib/readme.txt -------------------------------------------------------------------------------- /extras/ANGLES.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #define FINEANGLES 2048 30 | 31 | #define DEG(x) ((((FINEANGLES*FIXED1/360)*(x))+(FIXED1/2))/FIXED1) 32 | 33 | #define PI 3.14159 34 | 35 | #define COS(x) (costable[(x) & (FINEANGLES-1)]) 36 | #define SIN(x) (sintable[(x) & (FINEANGLES-1)]) 37 | -------------------------------------------------------------------------------- /extras/AVG.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifndef __avg_public__ 30 | #define __avg_public__ 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | typedef struct 36 | { 37 | int32 * values; 38 | int32 index; 39 | int32 sum; 40 | int32 average; 41 | int32 shift; 42 | int32 base; 43 | } avg_t; 44 | 45 | // numvalues = number of items to average 46 | // each element is set to initvalue 47 | avg_t * AVG_Init( int32 numvalues, int32 initvalue ); 48 | void AVG_Free( avg_t * avg ); 49 | // value is the new value entered into the table 50 | // returns the current average after inserting the new value 51 | int32 AVG_Value( avg_t * avg, int32 value ); 52 | // returns the current average 53 | int32 AVG_Average( avg_t * avg ); 54 | // returns the current average in floating point (much more precise) 55 | float32 AVG_FloatAverage( avg_t * avg ); 56 | 57 | #ifdef __cplusplus 58 | }; 59 | #endif 60 | #endif 61 | -------------------------------------------------------------------------------- /extras/COMMON.H: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/extras/COMMON.H -------------------------------------------------------------------------------- /extras/CONFIG.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifndef _config_public 30 | #define _config_public 31 | 32 | #define SETUPNAMEPARM "SETUPFILE" 33 | 34 | extern int32 FXDevice; 35 | extern int32 MusicDevice; 36 | extern int32 FXVolume; 37 | extern int32 MusicVolume; 38 | extern fx_blaster_config BlasterConfig; 39 | extern int32 NumVoices; 40 | extern int32 NumChannels; 41 | extern int32 NumBits; 42 | extern int32 MixRate; 43 | extern int32 MidiPort; 44 | extern int32 ReverseStereo; 45 | 46 | extern int32 ControllerType; 47 | extern int32 MouseAiming; 48 | extern int32 ScreenMode; 49 | extern int32 ScreenWidth; 50 | extern int32 ScreenHeight; 51 | 52 | void CONFIG_ReadSetup( void ); 53 | void CONFIG_GetSetupFilename( void ); 54 | void CONFIG_WriteSetup( void ); 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /extras/CRC.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifndef _crc_public 30 | #define _crc_public 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | int32 UpdateCRC(int32 crc, int32 c); 36 | uint16 CalculateCRC (uint8 * src, uint32 size); 37 | 38 | #ifdef __cplusplus 39 | }; 40 | #endif 41 | #endif 42 | -------------------------------------------------------------------------------- /extras/DEBUG4G.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifndef __DEBUG4G__ 30 | #define __DEBUG4G__ 31 | 32 | #include 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | #ifdef NDEBUG 39 | #define dassert(__ignore) ((void)0) 40 | #else 41 | extern void __dassert( char *, char *, int ); 42 | #define dassert(expr) ((expr)?(void)0:__dassert(#expr,__FILE__,__LINE__)) 43 | #endif 44 | 45 | void dprintf_clrscr( void ); 46 | void dprintf_newline( void ); 47 | void dprintf_do( const char *__msg ); 48 | int dprintf( const char *__format, ... ); 49 | int dprintfxy( int x, int y, const char *__format, ... ); 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | 55 | #endif // __DEBUG4G__ 56 | -------------------------------------------------------------------------------- /extras/DEVELOP.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifndef _develop_public 30 | #define _develop_public 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | #define DEVELOPMENT 0 36 | #define SHAREWARE 0 37 | #define LOCATIONINFO 1 38 | #define SOFTWAREERROR 1 39 | #define MEMORYCORRUPTIONTEST 1 40 | #define PRECACHETEST 0 41 | #define DATACORRUPTIONTEST 0 42 | #define RANDOMNUMBERTEST 0 43 | 44 | 45 | #if ( LOCATIONINFO == 1 ) 46 | 47 | #define funcstart() \ 48 | { \ 49 | SoftError( "funcstart : module '%s' at line %d.\n", __FILE__, __LINE__ );\ 50 | } 51 | 52 | #define funcend() \ 53 | { \ 54 | SoftError( " funcend : module '%s' at line %d.\n", __FILE__, __LINE__ );\ 55 | } 56 | 57 | #else 58 | 59 | #define funcstart() 60 | #define funcend() 61 | 62 | #endif 63 | 64 | #ifdef __cplusplus 65 | }; 66 | #endif 67 | #endif 68 | -------------------------------------------------------------------------------- /extras/DYN.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifndef __dyn_public__ 30 | #define __dyn_public__ 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | typedef struct 36 | { 37 | int32 maxnumber; 38 | int32 numberperblock; 39 | int32 arrayblockshift; 40 | int32 datasize; 41 | int32 datashift; 42 | int32 numberblocks; 43 | void ** arrays; 44 | } dyn_t; 45 | 46 | dyn_t * DYN_Create 47 | ( 48 | int32 maxnumber, 49 | int32 numberperblock, 50 | int32 datasize 51 | ); 52 | 53 | void DYN_Destroy 54 | ( 55 | dyn_t * dyn 56 | ); 57 | 58 | void * DYN_Entry 59 | ( 60 | dyn_t * dyn, 61 | int32 itemnumber 62 | ); 63 | 64 | #ifdef __cplusplus 65 | }; 66 | #endif 67 | #endif 68 | -------------------------------------------------------------------------------- /extras/ERROR.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #error Stop including ERROR.H, you blowuh! 30 | -------------------------------------------------------------------------------- /extras/EXTERNAL.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | //**************************************************************************** 30 | // 31 | // Public header for EXTERNAL controller support 32 | // 33 | //**************************************************************************** 34 | 35 | #ifndef _external_public_ 36 | #define _external_public_ 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | // External Controller ID 42 | 43 | #define CONTROLID 0xdead 44 | #define EXTERNALPARM "control" 45 | #define EXTERNAL_GetInput 1 46 | #define EXTERNALAXISUNDEFINED 0x7f 47 | #define EXTERNALBUTTONUNDEFINED 0x7f 48 | #define MAXEXTERNALAXES 6 49 | #define MAXEXTERNALBUTTONS 32 50 | 51 | typedef struct 52 | { 53 | word id; 54 | word intnum; 55 | int32 axes[MAXEXTERNALAXES]; 56 | uint32 buttonstate; 57 | byte buttonmap[MAXEXTERNALBUTTONS][2]; 58 | byte analogaxesmap[MAXEXTERNALAXES]; 59 | word command; 60 | byte digitalaxesmap[MAXEXTERNALAXES][2]; 61 | } ExternalControlInfo; 62 | 63 | #ifdef __cplusplus 64 | }; 65 | #endif 66 | #endif 67 | -------------------------------------------------------------------------------- /extras/GAME.C: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/extras/GAME.C -------------------------------------------------------------------------------- /extras/GIFLIB.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | ///////////////////////////////////////////////////////////////////////////// 30 | // 31 | // GIFLIB.H 32 | // 33 | ///////////////////////////////////////////////////////////////////////////// 34 | 35 | #ifndef _giflib_public_ 36 | #define _giflib_public_ 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | void SaveGIF 42 | ( 43 | char * filename, 44 | byte * uncompressed, 45 | byte * palette, 46 | int32 width, 47 | int32 height 48 | ); 49 | 50 | #ifdef __cplusplus 51 | }; 52 | #endif 53 | #endif 54 | -------------------------------------------------------------------------------- /extras/GIFSAVE.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifndef GIFSAVE_H 30 | #define GIFSAVE_H 31 | 32 | 33 | 34 | enum GIF_Code { 35 | GIF_OK, 36 | GIF_ERRCREATE, 37 | GIF_ERRWRITE, 38 | GIF_OUTMEM 39 | }; 40 | 41 | 42 | 43 | int GIF_Create( 44 | char *filename, 45 | int width, int height, 46 | int numcolors, int colorres 47 | ); 48 | 49 | void GIF_SetColor( 50 | int colornum, 51 | int red, int green, int blue 52 | ); 53 | 54 | int GIF_CompressImage( 55 | int left, int top, 56 | int width, int height, 57 | int (*getpixel)(int x, int y) 58 | ); 59 | 60 | int GIF_Close(void); 61 | 62 | 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /extras/INTERRUP.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifndef __INTERRUPT_H 30 | #define __INTERRUPT_H 31 | 32 | 33 | unsigned long DisableInterrupts( void ); 34 | void RestoreInterrupts( unsigned long flags ); 35 | 36 | 37 | #pragma aux DisableInterrupts = \ 38 | "pushfd", \ 39 | "pop eax", \ 40 | "cli" \ 41 | modify [ eax ]; 42 | 43 | #pragma aux RestoreInterrupts = \ 44 | "push eax", \ 45 | "popfd" \ 46 | parm [ eax ]; 47 | 48 | #endif 49 | 50 | -------------------------------------------------------------------------------- /extras/JOYSTICK.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifndef _joystick_public 30 | #define _joystick_public 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | //*************************************************************************** 36 | // 37 | // Public header for JOYSTICK.ASM. 38 | // 39 | //*************************************************************************** 40 | 41 | extern int32 Joy_x1; 42 | extern int32 Joy_y1; 43 | extern int32 Joy_x2; 44 | extern int32 Joy_y2; 45 | extern byte Joy_mask; 46 | 47 | void JoyStick_Vals( void ); 48 | #if defined(__FLAT__) || defined(__NT__) 49 | #pragma aux JoyStick_Vals modify exact [eax ebx ecx edx esi edi] 50 | #endif 51 | 52 | #define JOYSTICK_GetPos( x1, y1, x2, y2 ) \ 53 | { \ 54 | JoyStick_Vals(); \ 55 | *( x1 ) = Joy_x1; \ 56 | *( y1 ) = Joy_y1; \ 57 | *( x2 ) = Joy_x2; \ 58 | *( y2 ) = Joy_y2; \ 59 | } 60 | 61 | 62 | #ifdef __cplusplus 63 | }; 64 | #endif 65 | #endif 66 | -------------------------------------------------------------------------------- /extras/LBMLIB.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | ///////////////////////////////////////////////////////////////////////////// 30 | // 31 | // LBMLIB.H 32 | // 33 | ///////////////////////////////////////////////////////////////////////////// 34 | 35 | #ifndef _lbmlib_public_ 36 | #define _lbmlib_public_ 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | typedef enum 42 | { 43 | LoadLBM_Okay, 44 | LoadLBM_badsize, 45 | LoadLBM_stencil 46 | } LoadLBM_Status; 47 | 48 | int32 LoadLBM 49 | ( 50 | byte * compressed, 51 | byte * uncompressed, 52 | byte * palette, 53 | int32 * lbmwidth, 54 | int32 * lbmheight 55 | ); 56 | 57 | int32 SaveLBM 58 | ( 59 | byte * uncompressed, 60 | byte * compressed, 61 | byte * palette, 62 | int32 lbmwidth, 63 | int32 lbmheight 64 | ); 65 | #ifdef __cplusplus 66 | }; 67 | #endif 68 | #endif 69 | -------------------------------------------------------------------------------- /extras/LOCATION.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifndef _location_public 30 | #define _location_public 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | #if ( LOCATIONINFO == 1 ) 36 | 37 | #define funcstart() \ 38 | { \ 39 | SoftError( "funcstart : module '%s' at line %d.\n", __FILE__, __LINE__ ); 40 | } \ 41 | 42 | #define funcend() \ 43 | { \ 44 | SoftError( " funcend : module '%s' at line %d.\n", __FILE__, __LINE__ ); 45 | } \ 46 | 47 | 48 | #endif 49 | 50 | #ifdef __cplusplus 51 | }; 52 | #endif 53 | #endif 54 | -------------------------------------------------------------------------------- /extras/MATHUTIL.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | 30 | extern int32 FindDistance2D(int32 dx, int32 dy); 31 | extern int32 FindDistance3D(int32 dx, int32 dy, int32 dz); 32 | extern int32 FindDistance3D_HP(int32 dx, int32 dy, int32 dz); 33 | extern int32 ArcTangentAppx(int32 dx, int32 dy); 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /extras/MIPMAP.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifndef _mipmap_public_ 30 | #define _mipmap_public_ 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | int32 CreateMipMap 36 | ( 37 | int32 origw, 38 | int32 origh, 39 | int32 level, 40 | byte * srcbitmap, 41 | byte * destbitmap, 42 | byte * pal, 43 | boolean usediffusion 44 | ); 45 | 46 | #ifdef __cplusplus 47 | }; 48 | #endif 49 | #endif 50 | -------------------------------------------------------------------------------- /extras/MOUSE.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifndef __mouse_h 30 | #define __mouse_h 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | #define LEFT_MOUSE 1 36 | #define RIGHT_MOUSE 2 37 | #define MIDDLE_MOUSE 4 38 | #define LEFT_MOUSE_PRESSED( button ) ( ( ( button ) & LEFT_MOUSE ) != 0 ) 39 | #define RIGHT_MOUSE_PRESSED( button ) ( ( ( button ) & RIGHT_MOUSE ) != 0 ) 40 | #define MIDDLE_MOUSE_PRESSED( button ) ( ( ( button ) & MIDDLE_MOUSE ) != 0 ) 41 | 42 | boolean MOUSE_Init( void ); 43 | void MOUSE_Shutdown( void ); 44 | void MOUSE_ShowCursor( void ); 45 | void MOUSE_HideCursor( void ); 46 | int32 MOUSE_GetButtons( void ); 47 | void MOUSE_GetPosition( int32*x, int32*y ); 48 | void MOUSE_GetDelta( int32*x, int32*y ); 49 | 50 | #ifdef __cplusplus 51 | }; 52 | #endif 53 | #endif /* __mouse_h */ 54 | -------------------------------------------------------------------------------- /extras/PENTTIME.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | ////////////////////////////////////////////////////////////////////////////// 30 | // 31 | // pentium timer.h 32 | // 33 | ////////////////////////////////////////////////////////////////////////////// 34 | 35 | #ifndef __penttimer_h 36 | #define __penttimer_h 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | void PENT_Init( void ); 42 | void PENT_StartTimer( void ); 43 | void PENT_StopTimer( void ); 44 | float64 PENT_Cycles( void ); 45 | float64 PENT_Time( void ); 46 | 47 | #ifdef __cplusplus 48 | }; 49 | #endif 50 | #endif 51 | -------------------------------------------------------------------------------- /extras/PRECISE.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifndef __precise_public__ 30 | #define __precise_public__ 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | void PRECISION_High( void ); 36 | void PRECISION_Low( void ); 37 | 38 | #ifdef __cplusplus 39 | }; 40 | #endif 41 | #endif 42 | -------------------------------------------------------------------------------- /extras/RANDOM.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifndef _random_public 30 | #define _random_public 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | void InitializeRandomNumberGenerator ( void ); 36 | int32 GetRandomNumberSeed ( void ); 37 | 38 | 39 | #if RANDOMNUMBERTEST 40 | byte GameRandom ( char * string ); 41 | #define GameRandomNumber( string ) GameRandom(string) 42 | #else 43 | byte GameRandom ( void ); 44 | #define GameRandomNumber(string) GameRandom() 45 | #endif 46 | 47 | byte Random ( void ); 48 | #define RandomNumber Random 49 | 50 | void SetRandomNumberIndex ( int32 i ); 51 | int32 GetRandomNumberIndex ( void ); 52 | 53 | #ifdef __cplusplus 54 | }; 55 | #endif 56 | #endif 57 | -------------------------------------------------------------------------------- /extras/RGB.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | //*************************************************************************** 30 | // 31 | // RGB.C - Creates a best fit color table for RGB values. 32 | // 33 | //*************************************************************************** 34 | 35 | #ifndef _rgb_public 36 | #define _rgb_public 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | #define NUM_RED 64 42 | #define NUM_GREEN 64 43 | #define NUM_BLUE 64 44 | 45 | #define REAL_RED( r ) ( ( r ) << 2 ) 46 | #define REAL_GREEN( g ) ( ( g ) << 2 ) 47 | #define REAL_BLUE( b ) ( ( b ) << 2 ) 48 | 49 | #if !defined(__MSDOS__) || defined(__FLAT__) 50 | extern byte RGB_Lookup[ NUM_RED ][ NUM_GREEN ][ NUM_BLUE ]; 51 | #else 52 | extern byte huge RGB_Lookup[ NUM_RED ][ NUM_GREEN ][ NUM_BLUE ]; 53 | #endif 54 | extern byte RGB_EGATable[ 16 ]; 55 | 56 | #define RGB_GetColor( r, g, b ) \ 57 | ( RGB_Lookup[ ( r ) >> 2 ][ ( g ) >> 2 ][ ( b ) >> 2 ] ) 58 | 59 | #define RGB_EGAColor( c ) \ 60 | ( RGB_EGATable[ ( c ) ] ) 61 | 62 | void RGB_FindEGAColors( void ); 63 | byte RGB_FindBestColor( int16 r, int16 g, int16 b, byte *palette ); 64 | void RGB_GetPalette( byte *pal ); 65 | byte RGB_GetBestColor( int16 r, int16 g, int16 b ); 66 | void RGB_MakeColorTable( void ); 67 | #ifdef __cplusplus 68 | }; 69 | #endif 70 | #endif 71 | -------------------------------------------------------------------------------- /extras/ROX.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifndef __rox_public__ 30 | #define __rox_public__ 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | /* 36 | ==================== 37 | = 38 | = ROX_Get 39 | = 40 | = Get a specific data file, the name is the pathname of the data 41 | = directories are separated by either '\' or '/', it is your preference 42 | = The delimiter will be properly resolved for the system you are working 43 | = on. 44 | = zonenum refers to the memory zone in which you would like this piece of 45 | = data to exist. 46 | = tag refers to the memory tag to give the piece of data (refer to zone.h) 47 | = 48 | ==================== 49 | */ 50 | 51 | void * ROX_Get 52 | ( 53 | const char * name, 54 | int32 zonenum, 55 | int32 tag 56 | ); 57 | 58 | void ROX_Init ( void ); 59 | void ROX_Shutdown ( void ); 60 | 61 | #ifdef __cplusplus 62 | }; 63 | #endif 64 | #endif 65 | -------------------------------------------------------------------------------- /extras/RTS.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | //*************************************************************************** 30 | // 31 | // RTS.H 32 | // 33 | //*************************************************************************** 34 | 35 | #ifndef __rts_public__ 36 | #define __rts_public__ 37 | 38 | /* 39 | ==================== 40 | = 41 | = RTS_Init 42 | = 43 | = Files with a .rts extension are idlink files with multiple lumps 44 | = 45 | ==================== 46 | */ 47 | 48 | void RTS_Init (char *filename); 49 | /* 50 | ==================== 51 | = 52 | = RTS_NumSounds 53 | = 54 | ==================== 55 | */ 56 | 57 | int32 RTS_NumSounds (void); 58 | /* 59 | ==================== 60 | = 61 | = RTS_SoundLength 62 | = 63 | = Returns the buffer size needed to load the given lump 64 | = 65 | ==================== 66 | */ 67 | 68 | int32 RTS_SoundLength (int32 lump); 69 | /* 70 | ==================== 71 | = 72 | = RTS_GetSoundName 73 | = 74 | ==================== 75 | */ 76 | 77 | char * RTS_GetSoundName (int32 i); 78 | /* 79 | ==================== 80 | = 81 | = RTS_GetSound 82 | = 83 | ==================== 84 | */ 85 | void *RTS_GetSound (int32 lump); 86 | #endif 87 | -------------------------------------------------------------------------------- /extras/SNDCARDS.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifndef __SNDCARDS_H 30 | #define __SNDCARDS_H 31 | 32 | #define ASS_VERSION_STRING "1.1" 33 | 34 | typedef enum 35 | { 36 | // ASS_NoSound, 37 | SoundBlaster, 38 | ProAudioSpectrum, 39 | SoundMan16, 40 | Adlib, 41 | GenMidi, 42 | SoundCanvas, 43 | Awe32, 44 | WaveBlaster, 45 | SoundScape, 46 | UltraSound, 47 | SoundSource, 48 | TandySoundSource, 49 | PC, 50 | NumSoundCards 51 | } soundcardnames; 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /extras/SOUNDS.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | //**************************************************************************** 30 | // 31 | // sounds.h 32 | // 33 | //**************************************************************************** 34 | 35 | #ifndef _sounds_public_ 36 | #define _sounds_public_ 37 | 38 | extern int32 FXDevice; 39 | extern int32 MusicDevice; 40 | extern int32 FXVolume; 41 | extern int32 MusicVolume; 42 | extern fx_blaster_config BlasterConfig; 43 | extern int32 NumVoices; 44 | extern int32 NumChannels; 45 | extern int32 NumBits; 46 | extern int32 MixRate; 47 | extern int32 MidiPort; 48 | extern int32 ReverseStereo; 49 | 50 | void SoundStartup( void ); 51 | void SoundShutdown( void ); 52 | void MusicStartup( void ); 53 | void MusicShutdown( void ); 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /extras/TASK_MAN.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifndef __TASK_MAN_H 30 | #define __TASK_MAN_H 31 | 32 | enum TASK_ERRORS 33 | { 34 | TASK_Warning = -2, 35 | TASK_Error = -1, 36 | TASK_Ok = 0 37 | }; 38 | 39 | typedef struct task 40 | { 41 | struct task *next; 42 | struct task *prev; 43 | void ( *TaskService )( struct task * ); 44 | void *data; 45 | long rate; 46 | volatile long count; 47 | int priority; 48 | int active; 49 | } task; 50 | 51 | // TS_InInterrupt is TRUE during a taskman interrupt. 52 | // Use this if you have code that may be used both outside 53 | // and within interrupts. 54 | 55 | extern volatile int TS_InInterrupt; 56 | 57 | void TS_Shutdown( void ); 58 | task *TS_ScheduleTask( void ( *Function )( task * ), int rate, 59 | int priority, void *data ); 60 | int TS_Terminate( task *ptr ); 61 | void TS_Dispatch( void ); 62 | void TS_SetTaskRate( task *Task, int rate ); 63 | void TS_UnlockMemory( void ); 64 | int TS_LockMemory( void ); 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /extras/TESTDRV.C: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | void test_drive( char *fn ) 37 | { 38 | union REGS r; 39 | struct SREGS s; 40 | 41 | r.w.ax = 0x1500; 42 | int386(0x2f,&r,&r); 43 | if(r.w.bx != 0) 44 | { 45 | r.w.ax = 0x1502; 46 | int386(0x2f,&r,&r); 47 | printf("%d %d\n",r.h.ah,r.h.al); 48 | } 49 | } 50 | 51 | 52 | main(int argc, char *argv[]) 53 | { 54 | test_drive(argv[1]); 55 | } 56 | 57 | 58 | -------------------------------------------------------------------------------- /extras/TIMELIB.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifndef __timelib_public__ 30 | #define __timelib_public__ 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | void TIMELIB_StartTiming (void); 36 | int32 TIMELIB_StopTiming (void); 37 | 38 | #ifdef __cplusplus 39 | }; 40 | #endif 41 | #endif 42 | -------------------------------------------------------------------------------- /extras/TIMER.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | ////////////////////////////////////////////////////////////////////////////// 30 | // 31 | // timer.h -- Public header for time.c 32 | // 33 | // Simple timer functions. 34 | // 35 | ////////////////////////////////////////////////////////////////////////////// 36 | 37 | #ifndef __timer_h 38 | #define __timer_h 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | #define NO_MORE_TIMERS -1 44 | 45 | int TIME_AddTimer( int TicksPerSecond, volatile int32 *Counter ); 46 | void TIME_RemoveTimer( int which ); 47 | 48 | #ifdef __cplusplus 49 | }; 50 | #endif 51 | #endif /* __timer_h */ 52 | -------------------------------------------------------------------------------- /extras/USRHOOKS.C: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #include 30 | #include "usrhooks.h" 31 | 32 | 33 | /*--------------------------------------------------------------------- 34 | Function: USRHOOKS_GetMem 35 | 36 | Allocates the requested amount of memory and returns a pointer to 37 | its location, or NULL if an error occurs. NOTE: pointer is assumed 38 | to be dword aligned. 39 | ---------------------------------------------------------------------*/ 40 | 41 | int USRHOOKS_GetMem 42 | ( 43 | void **ptr, 44 | unsigned long size 45 | ) 46 | 47 | { 48 | void *memory; 49 | 50 | memory = malloc( size ); 51 | if ( memory == NULL ) 52 | { 53 | return( USRHOOKS_Error ); 54 | } 55 | 56 | *ptr = memory; 57 | 58 | return( USRHOOKS_Ok ); 59 | } 60 | 61 | 62 | /*--------------------------------------------------------------------- 63 | Function: USRHOOKS_FreeMem 64 | 65 | Deallocates the memory associated with the specified pointer. 66 | ---------------------------------------------------------------------*/ 67 | 68 | int USRHOOKS_FreeMem 69 | ( 70 | void *ptr 71 | ) 72 | 73 | { 74 | if ( ptr == NULL ) 75 | { 76 | return( USRHOOKS_Error ); 77 | } 78 | 79 | free( ptr ); 80 | 81 | return( USRHOOKS_Ok ); 82 | } 83 | -------------------------------------------------------------------------------- /extras/USRHOOKS.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifndef __USRHOOKS_H 30 | #define __USRHOOKS_H 31 | 32 | /*--------------------------------------------------------------------- 33 | Error definitions 34 | ---------------------------------------------------------------------*/ 35 | 36 | enum USRHOOKS_Errors 37 | { 38 | USRHOOKS_Warning = -2, 39 | USRHOOKS_Error = -1, 40 | USRHOOKS_Ok = 0 41 | }; 42 | 43 | 44 | /*--------------------------------------------------------------------- 45 | Function Prototypes 46 | ---------------------------------------------------------------------*/ 47 | 48 | int USRHOOKS_GetMem( void **ptr, unsigned long size ); 49 | int USRHOOKS_FreeMem( void *ptr ); 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /extras/UTIL_LIB.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | //*************************************************************************** 30 | // 31 | // UTIL_LIB.C - various utils 32 | // 33 | //*************************************************************************** 34 | 35 | #ifndef _util_lib_public 36 | #define _util_lib_public 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | #if (defined(__MSDOS__) && !defined(__FLAT__)) 42 | extern int16 _argc; 43 | #else 44 | extern int32 _argc; 45 | #endif 46 | extern char ** _argv; 47 | 48 | void RegisterShutdownFunction( void (* shutdown) (void) ); 49 | void Error (char *error, ...); 50 | 51 | char CheckParm (char *check); 52 | 53 | void *SafeMalloc (int32 size); 54 | int32 SafeMallocSize (void * ptr); 55 | void SafeFree (void * ptr); 56 | void SafeRealloc (void ** ptr, int32 newsize); 57 | int32 ParseHex (char *hex); 58 | int32 ParseNum (char *str); 59 | int16 MotoShort (int16 l); 60 | int16 IntelShort (int16 l); 61 | int32 MotoLong (int32 l); 62 | int32 IntelLong (int32 l); 63 | 64 | void HeapSort(char * base, int32 nel, int32 width, int32 (*compare)(), void (*switcher)()); 65 | 66 | #ifdef __cplusplus 67 | }; 68 | #endif 69 | #endif 70 | -------------------------------------------------------------------------------- /extras/VESA.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifndef __vesa_h__ 30 | #define __vesa_h__ 31 | 32 | extern int VESA_bytesperline; /* Bytes per scanline for mode */ 33 | 34 | byte *VESA_SetMode( int32 width, int32 height ); 35 | void VESA_TextMode(void); 36 | void VESA_Shutdown( void ); 37 | 38 | #endif /* __vesa_h__ */ 39 | -------------------------------------------------------------------------------- /extras/WAD2TYPE.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifndef _wad2type_public 30 | #define _wad2type_public 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | // 36 | // ID WAD2 Format 37 | // 38 | 39 | #define WAD2_LUMP_NAME_SIZE 16 40 | #define WAD2EXTENSION "wad" 41 | 42 | #define ID2_STRING "WAD2" 43 | //=============== 44 | // TYPES 45 | //=============== 46 | 47 | typedef struct 48 | { 49 | char name[ WAD2_LUMP_NAME_SIZE ]; 50 | int16 handle; 51 | int16 lumptype; 52 | uint32 position; 53 | uint32 size; 54 | } lumpinfo2_t; 55 | 56 | typedef struct 57 | { 58 | char identification[ 4 ]; // should be ID_STRING 59 | uint32 numlumps; 60 | uint32 infotableofs; 61 | } wad2info_t; 62 | 63 | typedef struct 64 | { 65 | uint32 filepos; 66 | uint32 dsize; 67 | uint32 size; 68 | byte lumptype; 69 | byte compress; 70 | short dummy; 71 | char name[ WAD2_LUMP_NAME_SIZE ]; 72 | } filelump2_t; 73 | 74 | #ifdef __cplusplus 75 | }; 76 | #endif 77 | #endif 78 | -------------------------------------------------------------------------------- /extras/WADTYPE.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifndef _wadtype_public 30 | #define _wadtype_public 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | #define WAD_LUMP_NAME_SIZE 8 36 | #define WADEXTENSION "wad" 37 | 38 | #define ID_STRING "IWAD" 39 | //=============== 40 | // TYPES 41 | //=============== 42 | 43 | typedef struct 44 | { 45 | char name[ WAD_LUMP_NAME_SIZE ]; 46 | int16 handle; 47 | int16 lumptype; 48 | uint32 position; 49 | uint32 size; 50 | } lumpinfo_t; 51 | 52 | typedef struct 53 | { 54 | char identification[ 4 ]; // should be ID_STRING 55 | uint32 numlumps; 56 | uint32 infotableofs; 57 | } wadinfo_t; 58 | 59 | typedef struct 60 | { 61 | uint32 filepos; 62 | uint32 size; 63 | int32 lumptype; 64 | char name[ WAD_LUMP_NAME_SIZE ]; 65 | } filelump_t; 66 | 67 | #ifdef __cplusplus 68 | }; 69 | #endif 70 | #endif 71 | -------------------------------------------------------------------------------- /extras/WATER.C: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | extern long frameplace, chainplace, chainnumpages; 30 | //extern char palette[768]; 31 | EXTERN palette[768]; 32 | 33 | static char waterlookup[256]; 34 | 35 | void InitWater() 36 | { 37 | long i; 38 | 39 | for(i=0;i<256;i++) 40 | waterlookup[i] = (palette[i*3]+palette[i*3+1]+palette[i*3+2])/6; 41 | } 42 | 43 | void DoWater(long dahoriz) 44 | { 45 | long x, y, topleftptr; 46 | short tilenume; 47 | char *ptr, *ptr2, ch, chinc; 48 | 49 | tilenume = 572; //WATER TILE 50 | if ((gotpic[tilenume>>3]&(1<<(tilenume&7))) == 0) return; 51 | gotpic[tilenume>>3] &= ~(1<<(tilenume&7)); 52 | 53 | for(x=0;x= 2) 56 | { 57 | outpw(0x3c4,2+(256<<(x&3))); 58 | outpw(0x3ce,4+((x&3)<<8)); 59 | ptr = (char *)(chainplace+ylookup[dahoriz]+(x>>2)); 60 | topleftptr = chainplace; 61 | } 62 | else 63 | { 64 | ptr = (char *)(frameplace+ylookup[dahoriz]+x); 65 | topleftptr = frameplace; 66 | } 67 | ptr2 = ptr; chinc = 0; 68 | 69 | for(y=dahoriz;y= topleftptr)) 74 | { 75 | ch = min(max(waterlookup[*ptr2]-chinc,0),31)+96; 76 | ptr2 -= ylookup[1]; if (ptr2 < topleftptr) ch = 96; 77 | if (y&1) chinc++; 78 | } 79 | *ptr = ch; 80 | } 81 | else 82 | { ptr2 = ptr; chinc = 0; } 83 | ptr += ylookup[1]; 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /extras/_ANIMLIB.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | ///////////////////////////////////////////////////////////////////////////// 30 | // 31 | // ANIMLIB.H 32 | // 33 | ///////////////////////////////////////////////////////////////////////////// 34 | 35 | #ifndef _animlib_private_ 36 | #define _animlib_private_ 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | #ifdef __cplusplus 42 | }; 43 | #endif 44 | #endif 45 | -------------------------------------------------------------------------------- /extras/_DEBUG.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifndef _debug_private_ 30 | #define _debug_private_ 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | #define MAXDEBUGSTRING 400 36 | #define DEBUGFILE "debug.txt" 37 | typedef struct 38 | { 39 | void (*startup) (void); 40 | void (*print) (char *); 41 | void (*shutdown) (void); 42 | } output_t; 43 | 44 | #ifdef __cplusplus 45 | }; 46 | #endif 47 | #endif 48 | -------------------------------------------------------------------------------- /extras/_FILELIB.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifndef _file_lib_private 30 | #define _file_lib_private 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | #define SOFTWAREERRORFILE ("ERROR.TXT") 36 | 37 | #define MAX_BYTES_TO_READ (0x7fff) 38 | #define MAX_BYTES_TO_WRITE (0x7fff) 39 | 40 | #define MAXFILEHANDLES (20) 41 | #define SLASHES ('\\') 42 | #define MAXCHARS 8 43 | 44 | #ifdef __cplusplus 45 | }; 46 | #endif 47 | #endif 48 | -------------------------------------------------------------------------------- /extras/_KEYBOAR.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | //*************************************************************************** 30 | // 31 | // Keyboard Constants 32 | // 33 | //*************************************************************************** 34 | 35 | #ifndef _keyboard_private 36 | #define _keyboard_private 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | #define KEYQMAX 256 42 | 43 | /* 44 | ============================================================================= 45 | 46 | MACROS 47 | 48 | ============================================================================= 49 | */ 50 | 51 | #define KB_SetKeyDown( scan ) \ 52 | { \ 53 | KB_KeyDown[ ( scan ) ] = true; \ 54 | } 55 | 56 | #define IS_KEYPAD_CODE(scode) \ 57 | ( \ 58 | ( \ 59 | ((scode) >= 0x47) && \ 60 | ((scode) <= 0x53) \ 61 | ) || \ 62 | ( \ 63 | ((scode) >= 0x67) && \ 64 | ((scode) <= 0x68) \ 65 | ) || \ 66 | ( \ 67 | ((scode) == 0x37) \ 68 | ) \ 69 | ) 70 | #ifdef __cplusplus 71 | }; 72 | #endif 73 | #endif 74 | -------------------------------------------------------------------------------- /extras/_RTS.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifndef __rts_private__ 30 | #define __rts_private__ 31 | 32 | //=============== 33 | // TYPES 34 | //=============== 35 | 36 | typedef struct 37 | { 38 | char name[8]; 39 | int32 handle,position,size; 40 | } lumpinfo_t; 41 | 42 | typedef struct 43 | { 44 | char identification[4]; // should be IWAD 45 | int32 numlumps; 46 | int32 infotableofs; 47 | } wadinfo_t; 48 | 49 | typedef struct 50 | { 51 | int32 filepos; 52 | int32 size; 53 | char name[8]; 54 | } filelump_t; 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /extras/_TOKENLI.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | // _tokenlib.h 30 | 31 | #ifndef _tokenlib_private 32 | #define _tokenlib_private 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | 37 | #define TOKENCOMMENT (';') 38 | #define TOKENCOMMENT2 ('#') 39 | #define TOKENEOL ('\n') 40 | #define TOKENNULL ('\0') 41 | #define TOKENSPACE (' ') 42 | 43 | #define MAXTOKENFILES 20 44 | 45 | typedef struct 46 | { 47 | char scriptfilename[128]; 48 | byte * scriptbuffer; 49 | byte * script_p; 50 | byte * scriptend_p; 51 | int32 scriptline; 52 | boolean tokenready; 53 | } token_t; 54 | 55 | #define TOKENFILE(tokenhandle,item) (tokenfiles[(tokenhandle)]->item) 56 | 57 | #ifdef __cplusplus 58 | }; 59 | #endif 60 | #endif 61 | -------------------------------------------------------------------------------- /extras/_UTIL_LB.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifndef _util_lib_private 30 | #define _util_lib_private 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | #define PEL_WRITE_ADR 0x3c8 36 | #define PEL_READ_ADR 0x3c7 37 | #define PEL_DATA 0x3c9 38 | #define PEL_MASK 0x3c6 39 | 40 | 41 | #define SLASHES ('\\') 42 | #define MAXCHARS 8 43 | 44 | #ifdef __cplusplus 45 | }; 46 | #endif 47 | #endif 48 | -------------------------------------------------------------------------------- /extras/_WAD.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is NOT part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | However, it is either an older version of a file that is, or is 7 | some test code written during the development of Duke Nukem 3D. 8 | This file is provided purely for educational interest. 9 | 10 | Duke Nukem 3D is free software; you can redistribute it and/or 11 | modify it under the terms of the GNU General Public License 12 | as published by the Free Software Foundation; either version 2 13 | of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with this program; if not, write to the Free Software 23 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 24 | 25 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 26 | */ 27 | //------------------------------------------------------------------------- 28 | 29 | #ifndef _wad_private 30 | #define _wad_private 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | #define CHECKPERIOD 20 36 | #define MAXLUMPS 4096 37 | 38 | typedef struct 39 | { 40 | int32 filehandle; 41 | int32 numlumps; 42 | filelump_t * fileinfo; 43 | } wadfileinfo_t; 44 | 45 | #ifdef __cplusplus 46 | }; 47 | #endif 48 | #endif 49 | -------------------------------------------------------------------------------- /kenbuild_data/NAMES.H: -------------------------------------------------------------------------------- 1 | //Be careful when changing this file - it is parsed by Editart and Build. 2 | #define SWITCH1ON 15 3 | #define SLIME 34 4 | #define BACKGROUND 37 5 | #define KENPICTURE 48 6 | #define BUILDDISK 49 7 | #define SWITCH2ON 66 8 | #define SWITCH2OFF 69 9 | #define ALPHABET 73 10 | #define NO 74 11 | #define DEMOSIGN 75 12 | #define COIN 76 13 | #define COINSTACK 77 14 | #define GIFTBOX 78 15 | #define DIAMONDS 79 16 | #define EVILALGRAVE 83 17 | #define STATUSBAR 87 18 | #define DAYSKY 89 19 | #define WATERFOUNTAIN 90 20 | #define USEWATERFOUNTAIN 91 21 | #define NIGHTSKY 93 22 | #define BULLET 98 23 | #define BOMB 100 24 | #define CANNON 101 25 | #define GUNONBOTTOM 102 26 | #define BOMBEMITTER 103 27 | #define EXPLOSION 105 28 | #define SPLASH 106 29 | #define BROWNMONSTER 110 30 | #define SKELETON 113 31 | #define AL 114 32 | #define EVILAL 115 33 | #define PLAYER 120 34 | #define SWITCH3OFF 146 35 | #define SWITCH3ON 147 36 | #define AIRPLANE 148 37 | #define SPIRAL 149 38 | #define COMPASS 150 39 | #define FOOTPRINT 156 40 | #define STATUSBARFILL8 160 41 | #define STATUSBARFILL4 161 42 | #define BOUNCYMAT 162 43 | #define MIRROR 165 44 | #define FLOORMIRROR 166 45 | #define GRABBER 167 46 | #define GRABCANNON 168 47 | #define MISSILE 169 48 | #define LAUNCHER 171 49 | #define MIRRORLABEL 4000 50 | -------------------------------------------------------------------------------- /kenbuild_data/STUFF.DAT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/kenbuild_data/STUFF.DAT -------------------------------------------------------------------------------- /kenbuild_data/ascboard.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/kenbuild_data/ascboard.map -------------------------------------------------------------------------------- /kenbuild_data/boards.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/kenbuild_data/boards.map -------------------------------------------------------------------------------- /kenbuild_data/evilal.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/kenbuild_data/evilal.map -------------------------------------------------------------------------------- /kenbuild_data/kensig.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/kenbuild_data/kensig.map -------------------------------------------------------------------------------- /kenbuild_data/nsnoal.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/kenbuild_data/nsnoal.map -------------------------------------------------------------------------------- /kenbuild_data/nukeland.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/kenbuild_data/nukeland.map -------------------------------------------------------------------------------- /source/A.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/source/A.OBJ -------------------------------------------------------------------------------- /source/AUDIO_WF.LIB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/source/AUDIO_WF.LIB -------------------------------------------------------------------------------- /source/BUILD.H: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/source/BUILD.H -------------------------------------------------------------------------------- /source/BUTWCD4.LIB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/source/BUTWCD4.LIB -------------------------------------------------------------------------------- /source/CACHE1D.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/source/CACHE1D.OBJ -------------------------------------------------------------------------------- /source/CONFIG.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | 7 | Duke Nukem 3D is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU General Public License 9 | as published by the Free Software Foundation; either version 2 10 | of the License, or (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | 22 | Original Source: 1996 - Todd Replogle 23 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 24 | */ 25 | //------------------------------------------------------------------------- 26 | 27 | #ifndef _config_public 28 | #define _config_public 29 | 30 | #define SETUPNAMEPARM "SETUPFILE" 31 | 32 | extern int32 FXDevice; 33 | extern int32 MusicDevice; 34 | extern int32 FXVolume; 35 | extern int32 MusicVolume; 36 | extern fx_blaster_config BlasterConfig; 37 | extern int32 NumVoices; 38 | extern int32 NumChannels; 39 | extern int32 NumBits; 40 | extern int32 MixRate; 41 | extern int32 MidiPort; 42 | extern int32 ReverseStereo; 43 | 44 | extern int32 ControllerType; 45 | extern int32 MouseAiming; 46 | extern int32 ScreenMode; 47 | extern int32 ScreenWidth; 48 | extern int32 ScreenHeight; 49 | 50 | void CONFIG_ReadSetup( void ); 51 | void CONFIG_GetSetupFilename( void ); 52 | void CONFIG_WriteSetup( void ); 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /source/DEVELOP.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | 7 | Duke Nukem 3D is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU General Public License 9 | as published by the Free Software Foundation; either version 2 10 | of the License, or (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | 22 | Original Source: 1996 - Todd Replogle 23 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 24 | */ 25 | //------------------------------------------------------------------------- 26 | 27 | #ifndef _develop_public 28 | #define _develop_public 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | #define DEVELOPMENT 0 34 | #define SHAREWARE 0 35 | #define LOCATIONINFO 1 36 | #define SOFTWAREERROR 1 37 | #define MEMORYCORRUPTIONTEST 1 38 | #define PRECACHETEST 0 39 | #define DATACORRUPTIONTEST 0 40 | #define RANDOMNUMBERTEST 0 41 | 42 | 43 | #if ( LOCATIONINFO == 1 ) 44 | 45 | #define funcstart() \ 46 | { \ 47 | SoftError( "funcstart : module '%s' at line %d.\n", __FILE__, __LINE__ );\ 48 | } 49 | 50 | #define funcend() \ 51 | { \ 52 | SoftError( " funcend : module '%s' at line %d.\n", __FILE__, __LINE__ );\ 53 | } 54 | 55 | #else 56 | 57 | #define funcstart() 58 | #define funcend() 59 | 60 | #endif 61 | 62 | #ifdef __cplusplus 63 | }; 64 | #endif 65 | #endif 66 | -------------------------------------------------------------------------------- /source/ENGINE.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/source/ENGINE.OBJ -------------------------------------------------------------------------------- /source/GAME.C: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/source/GAME.C -------------------------------------------------------------------------------- /source/MAKEFILE: -------------------------------------------------------------------------------- 1 | #This make file is used with Watcom C/C++ 32 Compiler v11.0c 2 | #debug = /d2 /w1 3 | #all = debug all 4 | prod = /5r /s /otexan 5 | 6 | duke3d.exe : game.obj actors.obj gamedef.obj global.obj menues.obj player.obj & 7 | premap.obj sector.obj sounds.obj rts.obj cache1d.obj engine.obj & 8 | a.obj mmulti.obj config.obj animlib.obj 9 | wlink $(all) @makefile.lnk 10 | 11 | compileoptions = $(prod) $(debug) -imact 12 | globaldependencies = makefile. duke3d.h global.c 13 | 14 | game.obj : game.c $(globaldependencies) 15 | wcc386 game $(compileoptions) 16 | actors.obj : actors.c $(globaldependencies) 17 | wcc386 actors $(compileoptions) 18 | gamedef.obj : gamedef.c $(globaldependencies) 19 | wcc386 gamedef $(compileoptions) 20 | global.obj : global.c $(globaldependencies) 21 | wcc386 global $(compileoptions) 22 | menues.obj : menues.c $(globaldependencies) 23 | wcc386 menues $(compileoptions) 24 | player.obj : player.c $(globaldependencies) 25 | wcc386 player $(compileoptions) 26 | premap.obj : premap.c $(globaldependencies) 27 | wcc386 premap $(compileoptions) 28 | sector.obj : sector.c $(globaldependencies) 29 | wcc386 sector $(compileoptions) 30 | sounds.obj : sounds.c $(globaldependencies) 31 | wcc386 sounds /zu $(compileoptions) 32 | rts.obj : rts.c $(globaldependencies) 33 | wcc386 rts $(compileoptions) 34 | config.obj : config.c $(globaldependencies) 35 | wcc386 config $(compileoptions) 36 | animlib.obj : animlib.c $(globaldependencies) 37 | wcc386 animlib $(compileoptions) 38 | 39 | -------------------------------------------------------------------------------- /source/MAKEFILE.LNK: -------------------------------------------------------------------------------- 1 | system dos4g 2 | option map 3 | option stack=90k 4 | option u 5 | name duke3d 6 | file game,actors,gamedef,global,menues,player,premap,sector,sounds,rts,config 7 | file engine,cache1d,mmulti,a,animlib 8 | library audio_wf.lib,mact\mact386.lib,butwcd4.lib 9 | -------------------------------------------------------------------------------- /source/MMULTI.OBJ: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/source/MMULTI.OBJ -------------------------------------------------------------------------------- /source/MOUSE.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | 7 | Duke Nukem 3D is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU General Public License 9 | as published by the Free Software Foundation; either version 2 10 | of the License, or (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | 22 | Original Source: 1996 - Todd Replogle 23 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 24 | */ 25 | //------------------------------------------------------------------------- 26 | 27 | #ifndef __mouse_h 28 | #define __mouse_h 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | #define LEFT_MOUSE 1 34 | #define RIGHT_MOUSE 2 35 | #define MIDDLE_MOUSE 4 36 | #define LEFT_MOUSE_PRESSED( button ) ( ( ( button ) & LEFT_MOUSE ) != 0 ) 37 | #define RIGHT_MOUSE_PRESSED( button ) ( ( ( button ) & RIGHT_MOUSE ) != 0 ) 38 | #define MIDDLE_MOUSE_PRESSED( button ) ( ( ( button ) & MIDDLE_MOUSE ) != 0 ) 39 | 40 | boolean MOUSE_Init( void ); 41 | void MOUSE_Shutdown( void ); 42 | void MOUSE_ShowCursor( void ); 43 | void MOUSE_HideCursor( void ); 44 | int32 MOUSE_GetButtons( void ); 45 | void MOUSE_GetPosition( int32*x, int32*y ); 46 | void MOUSE_GetDelta( int32*x, int32*y ); 47 | 48 | #ifdef __cplusplus 49 | }; 50 | #endif 51 | #endif /* __mouse_h */ 52 | -------------------------------------------------------------------------------- /source/RTS.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | 7 | Duke Nukem 3D is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU General Public License 9 | as published by the Free Software Foundation; either version 2 10 | of the License, or (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | 22 | Original Source: 1996 - Todd Replogle 23 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 24 | */ 25 | //------------------------------------------------------------------------- 26 | 27 | //*************************************************************************** 28 | // 29 | // RTS.H 30 | // 31 | //*************************************************************************** 32 | 33 | #ifndef __rts_public__ 34 | #define __rts_public__ 35 | 36 | /* 37 | ==================== 38 | = 39 | = RTS_Init 40 | = 41 | = Files with a .rts extension are idlink files with multiple lumps 42 | = 43 | ==================== 44 | */ 45 | 46 | void RTS_Init (char *filename); 47 | /* 48 | ==================== 49 | = 50 | = RTS_NumSounds 51 | = 52 | ==================== 53 | */ 54 | 55 | int32 RTS_NumSounds (void); 56 | /* 57 | ==================== 58 | = 59 | = RTS_SoundLength 60 | = 61 | = Returns the buffer size needed to load the given lump 62 | = 63 | ==================== 64 | */ 65 | 66 | int32 RTS_SoundLength (int32 lump); 67 | /* 68 | ==================== 69 | = 70 | = RTS_GetSoundName 71 | = 72 | ==================== 73 | */ 74 | 75 | char * RTS_GetSoundName (int32 i); 76 | /* 77 | ==================== 78 | = 79 | = RTS_GetSound 80 | = 81 | ==================== 82 | */ 83 | void *RTS_GetSound (int32 lump); 84 | #endif 85 | -------------------------------------------------------------------------------- /source/SNDCARDS.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | 7 | Duke Nukem 3D is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU General Public License 9 | as published by the Free Software Foundation; either version 2 10 | of the License, or (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | 22 | Original Source: 1994 - Jim Dose 23 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 24 | */ 25 | //------------------------------------------------------------------------- 26 | 27 | #ifndef __SNDCARDS_H 28 | #define __SNDCARDS_H 29 | 30 | #define ASS_VERSION_STRING "1.1" 31 | 32 | typedef enum 33 | { 34 | // ASS_NoSound, 35 | SoundBlaster, 36 | ProAudioSpectrum, 37 | SoundMan16, 38 | Adlib, 39 | GenMidi, 40 | SoundCanvas, 41 | Awe32, 42 | WaveBlaster, 43 | SoundScape, 44 | UltraSound, 45 | SoundSource, 46 | TandySoundSource, 47 | PC, 48 | NumSoundCards 49 | } soundcardnames; 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /source/SOUNDS.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | 7 | Duke Nukem 3D is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU General Public License 9 | as published by the Free Software Foundation; either version 2 10 | of the License, or (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | 22 | Original Source: 1996 - Todd Replogle 23 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 24 | */ 25 | //------------------------------------------------------------------------- 26 | 27 | //**************************************************************************** 28 | // 29 | // sounds.h 30 | // 31 | //**************************************************************************** 32 | 33 | #ifndef _sounds_public_ 34 | #define _sounds_public_ 35 | 36 | extern int32 FXDevice; 37 | extern int32 MusicDevice; 38 | extern int32 FXVolume; 39 | extern int32 MusicVolume; 40 | extern fx_blaster_config BlasterConfig; 41 | extern int32 NumVoices; 42 | extern int32 NumChannels; 43 | extern int32 NumBits; 44 | extern int32 MixRate; 45 | extern int32 MidiPort; 46 | extern int32 ReverseStereo; 47 | 48 | void SoundStartup( void ); 49 | void SoundShutdown( void ); 50 | void MusicStartup( void ); 51 | void MusicShutdown( void ); 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /source/TASK_MAN.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | 7 | Duke Nukem 3D is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU General Public License 9 | as published by the Free Software Foundation; either version 2 10 | of the License, or (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | 22 | Original Source: 1994 - Jim Dose 23 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 24 | */ 25 | //------------------------------------------------------------------------- 26 | 27 | #ifndef __TASK_MAN_H 28 | #define __TASK_MAN_H 29 | 30 | enum TASK_ERRORS 31 | { 32 | TASK_Warning = -2, 33 | TASK_Error = -1, 34 | TASK_Ok = 0 35 | }; 36 | 37 | typedef struct task 38 | { 39 | struct task *next; 40 | struct task *prev; 41 | void ( *TaskService )( struct task * ); 42 | void *data; 43 | long rate; 44 | volatile long count; 45 | int priority; 46 | int active; 47 | } task; 48 | 49 | // TS_InInterrupt is TRUE during a taskman interrupt. 50 | // Use this if you have code that may be used both outside 51 | // and within interrupts. 52 | 53 | extern volatile int TS_InInterrupt; 54 | 55 | void TS_Shutdown( void ); 56 | task *TS_ScheduleTask( void ( *Function )( task * ), int rate, 57 | int priority, void *data ); 58 | int TS_Terminate( task *ptr ); 59 | void TS_Dispatch( void ); 60 | void TS_SetTaskRate( task *Task, int rate ); 61 | void TS_UnlockMemory( void ); 62 | int TS_LockMemory( void ); 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /source/UTIL_LIB.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | 7 | Duke Nukem 3D is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU General Public License 9 | as published by the Free Software Foundation; either version 2 10 | of the License, or (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | 22 | Original Source: 1996 - Todd Replogle 23 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 24 | */ 25 | //------------------------------------------------------------------------- 26 | 27 | //*************************************************************************** 28 | // 29 | // UTIL_LIB.C - various utils 30 | // 31 | //*************************************************************************** 32 | 33 | #ifndef _util_lib_public 34 | #define _util_lib_public 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | #if (defined(__MSDOS__) && !defined(__FLAT__)) 40 | extern int16 _argc; 41 | #else 42 | extern int32 _argc; 43 | #endif 44 | extern char ** _argv; 45 | 46 | void RegisterShutdownFunction( void (* shutdown) (void) ); 47 | void Error (char *error, ...); 48 | 49 | char CheckParm (char *check); 50 | 51 | void *SafeMalloc (int32 size); 52 | int32 SafeMallocSize (void * ptr); 53 | void SafeFree (void * ptr); 54 | void SafeRealloc (void ** ptr, int32 newsize); 55 | int32 ParseHex (char *hex); 56 | int32 ParseNum (char *str); 57 | int16 MotoShort (int16 l); 58 | int16 IntelShort (int16 l); 59 | int32 MotoLong (int32 l); 60 | int32 IntelLong (int32 l); 61 | 62 | void HeapSort(char * base, int32 nel, int32 width, int32 (*compare)(), void (*switcher)()); 63 | 64 | #ifdef __cplusplus 65 | }; 66 | #endif 67 | #endif 68 | -------------------------------------------------------------------------------- /source/_ANIMLIB.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | 7 | Duke Nukem 3D is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU General Public License 9 | as published by the Free Software Foundation; either version 2 10 | of the License, or (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | 22 | Original Source: 1996 - Todd Replogle 23 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 24 | */ 25 | //------------------------------------------------------------------------- 26 | 27 | ///////////////////////////////////////////////////////////////////////////// 28 | // 29 | // ANIMLIB.H 30 | // 31 | ///////////////////////////////////////////////////////////////////////////// 32 | 33 | #ifndef _animlib_private_ 34 | #define _animlib_private_ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | #ifdef __cplusplus 40 | }; 41 | #endif 42 | #endif 43 | -------------------------------------------------------------------------------- /source/_RTS.H: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------- 2 | /* 3 | Copyright (C) 1996, 2003 - 3D Realms Entertainment 4 | 5 | This file is part of Duke Nukem 3D version 1.5 - Atomic Edition 6 | 7 | Duke Nukem 3D is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU General Public License 9 | as published by the Free Software Foundation; either version 2 10 | of the License, or (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | 22 | Original Source: 1996 - Todd Replogle 23 | Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms 24 | */ 25 | //------------------------------------------------------------------------- 26 | 27 | #ifndef __rts_private__ 28 | #define __rts_private__ 29 | 30 | //=============== 31 | // TYPES 32 | //=============== 33 | 34 | typedef struct 35 | { 36 | char name[8]; 37 | int32 handle,position,size; 38 | } lumpinfo_t; 39 | 40 | typedef struct 41 | { 42 | char identification[4]; // should be IWAD 43 | int32 numlumps; 44 | int32 infotableofs; 45 | } wadinfo_t; 46 | 47 | typedef struct 48 | { 49 | int32 filepos; 50 | int32 size; 51 | char name[8]; 52 | } filelump_t; 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /source/duke3d.wpj: -------------------------------------------------------------------------------- 1 | 40 2 | projectIdent 3 | 0 4 | VpeMain 5 | 1 6 | WRect 7 | 2432 8 | 1024 9 | 6336 10 | 7040 11 | 2 12 | MProject 13 | 3 14 | MCommand 15 | 0 16 | 4 17 | MCommand 18 | 0 19 | 1 20 | 5 21 | WFileName 22 | 10 23 | duke3d.tgt 24 | 6 25 | WVList 26 | 1 27 | 7 28 | VComponent 29 | 8 30 | WRect 31 | 0 32 | 0 33 | 6272 34 | 4096 35 | 0 36 | 0 37 | 9 38 | WFileName 39 | 10 40 | duke3d.tgt 41 | 0 42 | 0 43 | 7 44 | -------------------------------------------------------------------------------- /source/mact/MACT386.LIB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/source/mact/MACT386.LIB -------------------------------------------------------------------------------- /testdata/LOOKUP.DAT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/videogamepreservation/dukenukem3d/ef609159bd352985a0c63734a11241d86c873fe5/testdata/LOOKUP.DAT --------------------------------------------------------------------------------