├── GFX ├── DPMIAPI.C ├── DPMIAPI.H ├── EXITAPI.H ├── GFX.LIB ├── GFXAPI.C ├── GFXAPI.H ├── GFXAPI_A.ASM ├── GLBAPI.C ├── GLBAPI.H ├── IMSAPI.C ├── IMSAPI.H ├── KBDAPI.C ├── KBDAPI.H ├── KEYS.H ├── MAKEFILE ├── OBJDEF.MIF ├── PREFAPI.C ├── PREFAPI.H ├── PTRAPI.C ├── PTRAPI.H ├── PTRAPI_A.ASM ├── SWDAPI.H ├── TSMAPI.C ├── TSMAPI.H ├── VMEMAPI.C ├── VMEMAPI.H ├── exitapi.c ├── swdapi.c └── types.h ├── LICENSE ├── README.md ├── SOURCE ├── # ├── ANIMS.C ├── ANIMS.H ├── ASK.INC ├── BONUS.C ├── BONUS.H ├── DERBIS.C ├── ENEMY.C ├── ENEMY.H ├── ESHOT.C ├── ESHOT.H ├── FILE0000.INC ├── FILE0001.INC ├── FILE0002.INC ├── FILE0003.INC ├── FILE0004.INC ├── FLAME.C ├── FLAME.H ├── FX.C ├── FX.H ├── GETGLB.C ├── HANGAR.INC ├── HELP.C ├── HELP.H ├── HELPWIN.INC ├── INPUT.C ├── INPUT.H ├── INTRO.C ├── INTRO.H ├── LOAD.INC ├── LOADCOMP.INC ├── LOADSAVE.C ├── LOADSAVE.H ├── LOCKER.INC ├── MAIN.INC ├── MAKEFILE ├── MAP.H ├── MOVIE.C ├── MOVIE.H ├── MOVIE_A.ASM ├── MSG.INC ├── NEWCHAR.INC ├── OBJDEF.MIF ├── OBJECTS.C ├── OBJECTS.H ├── OKREG.INC ├── OPTS.INC ├── ORDER.INC ├── PUBLIC.H ├── RAP.BAT ├── RAP.C ├── RAPTOR.H ├── REGIST.INC ├── REGVER.H ├── SHADOWS.C ├── SHADOWS.H ├── SHIPCOMP.INC ├── SHOTS.C ├── SHOTS.H ├── STORE.C ├── STORE.H ├── STORE.INC ├── TEMP.C ├── TEST.LST ├── TILE.C ├── TILE.H ├── TILE_A.ASM ├── WINDOWS.C ├── WINDOWS.H └── WINGAME.INC ├── apodmx ├── APODMX.LIB ├── DMX.C ├── DMX.H ├── DPMIAPI.C ├── DPMIAPI.H ├── FX_MAN.H ├── GPL-2.0.TXT ├── MAKEFILE ├── MUS2MID.C ├── MUS2MID.H ├── MUSIC.H ├── PCFX.H ├── README.md ├── SNDCARDS.H ├── TASK_MAN.H ├── TSMAPI.C ├── TSMAPI.H ├── USRHOOKS.C └── USRHOOKS.H └── audiolib ├── AL_109 └── AL_109.LIB ├── AUDIO.MAK ├── BATCHLST.TXT ├── DOBUILD.BAT ├── DOCLEAN.BAT ├── LIB ├── GF1_OSF.LB2 ├── GF1_OSF.LBK ├── GF1_OSF.LIB └── PAWE32.LIB ├── 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 ├── gpl.txt ├── notes-restoration.md ├── origlibs ├── 11 │ └── AUDIO_WF.LIB ├── 104 │ └── AUDIO_WF.LIB └── 109 │ └── AUDIO_WF.LIB └── readme.txt /GFX/DPMIAPI.C: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 1993-1996 Id Software, Inc. 3 | // Copyright (C) 1993-2008 Raven Software 4 | // Copyright (C) 2015-2021 Nuke.YKT 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | #include 17 | #include "dpmiapi.h" 18 | 19 | int DPMI_LockMemory(void *address, unsigned length); 20 | int DPMI_UnlockMemory(void *address, unsigned length); 21 | 22 | int _dpmi_lockregion(void *address, unsigned length) 23 | { 24 | return DPMI_LockMemory(address, length); 25 | } 26 | 27 | int _dpmi_unlockregion(void *address, unsigned length) 28 | { 29 | return DPMI_UnlockMemory(address, length); 30 | } 31 | 32 | int _dpmi_dosalloc(unsigned short size, unsigned int* segment) 33 | { 34 | char *ptr; 35 | int i; 36 | int ret = DPMI_GetDOSMemory(&ptr, &i, size << 4); 37 | if (!ret) 38 | *segment = (unsigned int)ptr >> 4; 39 | return ret; 40 | } 41 | 42 | static struct SREGS segregs; 43 | static union REGS regs; 44 | 45 | int _dpmi_getmemsize(void) 46 | { 47 | int meminfo[32]; 48 | int heap; 49 | 50 | memset (meminfo,0,sizeof(meminfo)); 51 | segread(&segregs); 52 | segregs.es = segregs.ds; 53 | regs.w.ax = 0x500; // get memory info 54 | regs.x.edi = (int)&meminfo; 55 | int386x( 0x31, ®s, ®s, &segregs ); 56 | 57 | heap = meminfo[0]; 58 | 59 | return heap; 60 | } 61 | -------------------------------------------------------------------------------- /GFX/DPMIAPI.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: DPMI.H 22 | 23 | author: James R. Dose 24 | date: March 31, 1994 25 | 26 | Inline functions for performing DPMI calls. 27 | 28 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 29 | **********************************************************************/ 30 | 31 | #ifndef __DPMI_H 32 | #define __DPMI_H 33 | 34 | /* These functions simply call DPMI_LockMemory and DPMI_UnlockMemory, 35 | respectively. They're used for compatibility with existing sources or 36 | object files that use any of the _dpmi_lockregion and _dpmi_unlockregion 37 | symbols, and would be incompatible if these were simply defined as macros. */ 38 | int _dpmi_lockregion(void *address, unsigned length); 39 | int _dpmi_unlockregion(void *address, unsigned length); 40 | int _dpmi_dosalloc(unsigned short size, unsigned int *segment); 41 | int _dpmi_getmemsize(void); 42 | 43 | enum DPMI_Errors 44 | { 45 | DPMI_Warning = -2, 46 | DPMI_Error = -1, 47 | DPMI_Ok = 0 48 | }; 49 | 50 | typedef struct 51 | { 52 | unsigned long EDI; 53 | unsigned long ESI; 54 | unsigned long EBP; 55 | unsigned long Reserved; 56 | unsigned long EBX; 57 | unsigned long EDX; 58 | unsigned long ECX; 59 | unsigned long EAX; 60 | unsigned short Flags; 61 | unsigned short ES; 62 | unsigned short DS; 63 | unsigned short FS; 64 | unsigned short GS; 65 | unsigned short IP; 66 | unsigned short CS; 67 | unsigned short SP; 68 | unsigned short SS; 69 | } dpmi_regs; 70 | 71 | unsigned long DPMI_GetRealModeVector( int num ); 72 | void DPMI_SetRealModeVector( int num, unsigned long vector ); 73 | int DPMI_CallRealModeFunction( dpmi_regs *callregs ); 74 | int DPMI_GetDOSMemory( void **ptr, int *descriptor, unsigned length ); 75 | int DPMI_FreeDOSMemory( int descriptor ); 76 | int DPMI_LockMemory( void *address, unsigned length ); 77 | int DPMI_LockMemoryRegion( void *start, void *end ); 78 | int DPMI_UnlockMemory( void *address, unsigned length ); 79 | int DPMI_UnlockMemoryRegion( void *start, void *end ); 80 | 81 | #define DPMI_Lock( variable ) \ 82 | ( DPMI_LockMemory( &( variable ), sizeof( variable ) ) ) 83 | 84 | #define DPMI_Unlock( variable ) \ 85 | ( DPMI_UnlockMemory( &( variable ), sizeof( variable ) ) ) 86 | 87 | #pragma aux DPMI_GetDOSMemory = \ 88 | "mov eax, 0100h", \ 89 | "add ebx, 15", \ 90 | "shr ebx, 4", \ 91 | "int 31h", \ 92 | "jc DPMI_Exit", \ 93 | "movzx eax, ax", \ 94 | "shl eax, 4", \ 95 | "mov [ esi ], eax", \ 96 | "mov [ edi ], edx", \ 97 | "sub eax, eax", \ 98 | "DPMI_Exit:", \ 99 | parm [ esi ] [ edi ] [ ebx ] modify exact [ eax ebx edx ]; 100 | 101 | #pragma aux DPMI_FreeDOSMemory = \ 102 | "mov eax, 0101h", \ 103 | "int 31h", \ 104 | "jc DPMI_Exit", \ 105 | "sub eax, eax", \ 106 | "DPMI_Exit:", \ 107 | parm [ edx ] modify exact [ eax ]; 108 | 109 | #endif 110 | -------------------------------------------------------------------------------- /GFX/EXITAPI.H: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * EXITapi - Program Exiting routines 3 | *---------------------------------------------------------------------------- 4 | * Copyright (C) 1992 Scott Hostynski All Rights Reserved 5 | *---------------------------------------------------------------------------- 6 | * 7 | * Created by: Scott Host 8 | * Date: Oct, 1992 9 | * 10 | * CONTENTS: exitapi.c exitapi.h 11 | * 12 | * EXTERN MODULES - Main module of your program 13 | * 14 | * NOTES: Use EXIT_Install ( function pointer ) and set it to a routine 15 | * that Shuts down all your systems 16 | *---------------------------------------------------------------------------*/ 17 | 18 | #ifndef _TYPES_H 19 | #include "types.h" 20 | #endif 21 | 22 | #ifndef _EXITAPI 23 | #define _EXITAPI 24 | 25 | #undef ASSERT 26 | 27 | #ifdef __386__ 28 | #ifdef DEBUG 29 | void EXIT_Assert( char *, char *, unsigned ); 30 | #define ASSERT(exp) \ 31 | ( (exp) ? (void) 0 : EXIT_Assert(#exp, __FILE__, __LINE__) ) 32 | #else 33 | #define ASSERT(__ignore) ((void)0) 34 | #endif 35 | 36 | #else 37 | #ifdef DEBUG 38 | #define ASSERT(exp) \ 39 | ( (exp) ? (void) 0 : EXIT_Assert(#exp, __FILE__, __LINE__) ) 40 | #else 41 | #define ASSERT(exp) ((void)0) 42 | #endif 43 | #endif 44 | 45 | /*************************************************************************** 46 | EXIT_Install() Sets User routine to shut down systems 47 | ***************************************************************************/ 48 | VOID 49 | EXIT_Install( 50 | VOID (*SD)(INT) // INPUT : pointer to function 51 | ); 52 | 53 | /*************************************************************************** 54 | EXIT_Error() - Terminate Program in Error with message 55 | ***************************************************************************/ 56 | VOID 57 | EXIT_Error( 58 | char *instr, // INPUT : message string ot format 59 | ... // INPUT : args for instr 60 | ); 61 | 62 | /*************************************************************************** 63 | EXIT_Clean() - Terminate Program Clean 64 | ***************************************************************************/ 65 | VOID 66 | EXIT_Clean( 67 | VOID 68 | ); 69 | 70 | #endif 71 |  72 |  -------------------------------------------------------------------------------- /GFX/GFX.LIB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skynettx/dosraptor/4403569505c215c6cebe02cc3344e670499def1d/GFX/GFX.LIB -------------------------------------------------------------------------------- /GFX/IMSAPI.C: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * IMSapi - Input Managenment System 3 | *---------------------------------------------------------------------------- 4 | * Copyright (C) 1992 Scott Hostynski All Rights Reserved 5 | *---------------------------------------------------------------------------- 6 | * 7 | * Created by: Scott Host 8 | * Date: Oct, 1992 9 | * 10 | * CONTENTS: imsapi.c imsapi.h keys.h 11 | * 12 | * EXTERN MODULES - ptrapi, kbdapi, tsmapi 13 | * 14 | *---------------------------------------------------------------------------*/ 15 | #include 16 | #include 17 | #include 18 | 19 | #include "ptrapi.h" 20 | #include "kbdapi.h" 21 | #include "tsmapi.h" 22 | #include "gfxapi.h" 23 | 24 | /*************************************************************************** 25 | IMS_StartAck () - Starts up checking for a happening 26 | ***************************************************************************/ 27 | VOID 28 | IMS_StartAck ( 29 | VOID 30 | ) 31 | { 32 | KBD_Clear(); 33 | 34 | mouse_b1_ack = FALSE; 35 | mouse_b2_ack = FALSE; 36 | mouse_b3_ack = FALSE; 37 | kbd_ack = FALSE; 38 | } 39 | 40 | /*************************************************************************** 41 | IMS_CheckAck () - Tells if somthing has happend since last IMS_StartAck 42 | ***************************************************************************/ 43 | BOOL 44 | IMS_CheckAck ( 45 | VOID 46 | ) 47 | { 48 | INT rval = FALSE; 49 | 50 | if ( mouse_b1_ack ) 51 | rval = TRUE; 52 | 53 | if ( mouse_b2_ack ) 54 | rval = TRUE; 55 | 56 | if ( kbd_ack ) 57 | rval = TRUE; 58 | 59 | return ( rval ); 60 | } 61 | 62 | /*************************************************************************** 63 | IMS_IsAck() - Returns TRUE if ptr button or key pressed 64 | ***************************************************************************/ 65 | BOOL 66 | IMS_IsAck( 67 | VOID 68 | ) 69 | { 70 | BOOL ret_val = FALSE; 71 | 72 | if ( KBD_LASTSCAN ) 73 | { 74 | KBD_LASTSCAN = FALSE; 75 | ret_val = TRUE; 76 | } 77 | else if ( PTR_B1 ) 78 | ret_val = TRUE; 79 | else if ( PTR_B2 ) 80 | ret_val = TRUE; 81 | else if ( PTR_B3 ) 82 | ret_val = TRUE; 83 | 84 | return ( ret_val ); 85 | } 86 | 87 | /*************************************************************************** 88 | IMS_WaitAck() - Waits for a pointer button or key press 89 | ***************************************************************************/ 90 | VOID 91 | IMS_WaitAck ( 92 | VOID 93 | ) 94 | { 95 | IMS_StartAck(); 96 | 97 | for (;;) 98 | { 99 | if ( IMS_CheckAck() ) 100 | break; 101 | } 102 | 103 | IMS_StartAck(); 104 | } 105 | 106 | /*************************************************************************** 107 | IMS_WaitTimed() - Wait for aprox secs 108 | ***************************************************************************/ 109 | INT // RETURN: keypress (lastscan) 110 | IMS_WaitTimed ( 111 | INT secs // INPUT : seconds to wait 112 | ) 113 | { 114 | volatile INT hold; 115 | volatile INT loop; 116 | INT rval; 117 | 118 | KBD_LASTSCAN = SC_NONE; 119 | rval = KBD_LASTSCAN; 120 | 121 | IMS_StartAck(); 122 | 123 | while ( secs > 0 ) 124 | { 125 | for ( loop = 0; loop < 55; loop++ ) 126 | { 127 | hold = FRAME_COUNT; 128 | while ( FRAME_COUNT == hold ); 129 | 130 | if ( IMS_CheckAck() ) 131 | { 132 | rval = 1; 133 | goto end_func; 134 | } 135 | 136 | } 137 | secs--; 138 | } 139 | 140 | end_func: 141 | loop = 100; 142 | while (IMS_IsAck()) 143 | loop--; 144 | 145 | IMS_StartAck(); 146 | 147 | return ( rval ); 148 | } 149 | 150 |  151 | -------------------------------------------------------------------------------- /GFX/IMSAPI.H: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * IMSapi - Input Managenment System 3 | *---------------------------------------------------------------------------- 4 | * Copyright (C) 1992 Scott Hostynski All Rights Reserved 5 | *---------------------------------------------------------------------------- 6 | * 7 | * Created by: Scott Host 8 | * Date: Oct, 1992 9 | * 10 | * CONTENTS: imsapi.c imsapi.h keys.h 11 | * 12 | * EXTERN MODULES - ptrapi, kbdapi, tsmapi 13 | * 14 | *---------------------------------------------------------------------------*/ 15 | 16 | #ifndef _TYPES_H 17 | #include 18 | #endif 19 | 20 | #ifndef _IMSAPI 21 | #define _IMSAPI 22 | 23 | /*************************************************************************** 24 | IMS_StartAck () - Starts up checking for a happening 25 | ***************************************************************************/ 26 | VOID 27 | IMS_StartAck ( 28 | VOID 29 | ); 30 | 31 | /*************************************************************************** 32 | IMS_CheckAck () - Tells if somthing has happend since last IMS_StartAck 33 | ***************************************************************************/ 34 | BOOL 35 | IMS_CheckAck ( 36 | VOID 37 | ); 38 | 39 | /*************************************************************************** 40 | IMS_IsAck() - Returns TRUE if ptr button or key pressed 41 | ***************************************************************************/ 42 | BOOL 43 | IMS_IsAck( 44 | VOID 45 | ); 46 | 47 | /*************************************************************************** 48 | IMS_WaitAck() - Waits for a pointer button or key press 49 | ***************************************************************************/ 50 | VOID 51 | IMS_WaitAck ( 52 | VOID 53 | ); 54 | 55 | /*************************************************************************** 56 | IMS_WaitTimed() - Wait for aprox secs 57 | ***************************************************************************/ 58 | INT // RETURN: keypress (lastscan) 59 | IMS_WaitTimed ( 60 | INT secs // INPUT : seconds to wait 61 | ); 62 | 63 | #endif 64 |  -------------------------------------------------------------------------------- /GFX/KBDAPI.H: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * KBDapi - keyboard routines 3 | *---------------------------------------------------------------------------- 4 | * Copyright (C) 1992 Scott Hostynski All Rights Reserved 5 | *---------------------------------------------------------------------------- 6 | * 7 | * Created by: Scott Host 8 | * Date: Oct, 1992 9 | * 10 | * CONTENTS: kbdapi.c kbdapi.h keys.h 11 | * 12 | * EXTERN MODULES - NONE 13 | * 14 | *---------------------------------------------------------------------------*/ 15 | 16 | #ifndef _TYPES_H 17 | #include 18 | #endif 19 | 20 | #ifndef SC_NONE 21 | #include "keys.h" 22 | #endif 23 | 24 | #ifndef _KBDAPI 25 | #define _KBDAPI 26 | 27 | /*************************************************************************** 28 | KBD_Clear() - Resets all flags 29 | ***************************************************************************/ 30 | VOID 31 | KBD_Clear ( 32 | VOID 33 | ); 34 | 35 | /*************************************************************************** 36 | KBD_SetKeyboardHook() - Sets User function to call from keyboard handler 37 | ***************************************************************************/ 38 | VOID // RETURN: none 39 | KBD_SetKeyboardHook ( 40 | VOID (*hook)(VOID) // INPUT : pointer to function 41 | ); 42 | 43 | /*************************************************************************** 44 | KBD_Ascii2Scan () - converts most ASCII chars to keyboard scan code 45 | ***************************************************************************/ 46 | INT // RETURN: scan code 47 | KBD_Ascii2Scan ( 48 | INT ascii // INPUT : ASCII character 49 | ); 50 | 51 | /*************************************************************************** 52 | KBD_Wait() - Waits for Key to be released 53 | ***************************************************************************/ 54 | VOID 55 | KBD_Wait ( 56 | INT scancode // SCANCODE see keys.h 57 | ); 58 | 59 | /*************************************************************************** 60 | KBD_IsKey() - Tests to see if key is down if so waits for release 61 | ***************************************************************************/ 62 | BOOL 63 | KBD_IsKey ( 64 | INT scancode // SCANCODE see keys.h 65 | ); 66 | 67 | /*************************************************************************** 68 | KBD_Install() - Sets up keyboard system 69 | ***************************************************************************/ 70 | void 71 | KBD_Install ( 72 | VOID 73 | ); 74 | 75 | /*************************************************************************** 76 | KBD_End() - Shuts down KBD system 77 | ***************************************************************************/ 78 | VOID 79 | KBD_End ( 80 | VOID 81 | ); 82 | 83 | /*************************************************************************** 84 | KBD_Key() - returns true/false for scancode 85 | ***************************************************************************/ 86 | MACRO VOID 87 | KBD_Key ( 88 | INT scancode // INPUT : scan code to read 89 | ); 90 | 91 | extern BOOL paused, capslock, kbd_ack; 92 | extern BOOL keyboard[256]; 93 | extern INT lastscan; 94 | extern INT lastascii; 95 | 96 | #define KBD_Key(c) keyboard[c] 97 | #define KBD_ISPAUSED paused 98 | #define KBD_ISCAPS (capslock+keyboard[SC_LEFT_SHIFT]+keyboard[SC_RIGHT_SHIFT]) 99 | #define KBD_LASTSCAN lastscan 100 | #define KBD_LASTASCII lastascii 101 | 102 | #endif 103 |  -------------------------------------------------------------------------------- /GFX/KEYS.H: -------------------------------------------------------------------------------- 1 | // SCAN CODES 2 | #define SC_NONE 0x0000 3 | #define SC_BAD 0x00ff 4 | #define SC_ESC 0x0001 5 | #define SC_F1 0x003b 6 | #define SC_F2 0x003c 7 | #define SC_F3 0x003d 8 | #define SC_F4 0x003e 9 | #define SC_F5 0x003f 10 | #define SC_F6 0x0040 11 | #define SC_F7 0x0041 12 | #define SC_F8 0x0042 13 | #define SC_F9 0x0043 14 | #define SC_F10 0x0044 15 | #define SC_F11 0x0057 16 | #define SC_F12 0x0058 17 | #define SC_TAB 0x000f 18 | #define SC_SLASH 0x002b 19 | #define SC_CAPS_LOCK 0x003a 20 | #define SC_LEFT_SHIFT 0x002a 21 | #define SC_CTRL 0x001d 22 | #define SC_ALT 0x0038 23 | #define SC_SCROLL_LOCK 0x0046 24 | #define SC_BACKSPACE 0x000e 25 | #define SC_ENTER 0x001c 26 | #define SC_RIGHT_SHIFT 0x0036 27 | #define SC_RIGHT_ALT 0xe038 28 | #define SC_RIGHT_CTRL 0xe010 29 | #define SC_EXT_INSERT 0xe052 30 | #define SC_EXT_DELETE 0xe053 31 | #define SC_EXT_HOME 0xe047 32 | #define SC_EXT_END 0xe04f 33 | #define SC_EXT_PAGEUP 0xe049 34 | #define SC_EXT_PAGEDN 0xe051 35 | #define SC_EXT_UP 0xe048 36 | #define SC_EXT_DN 0xe050 37 | #define SC_EXT_LEFT 0xe04b 38 | #define SC_EXT_RIGHT 0xe04d 39 | #define SC_EXT_ENTER 0xe01c 40 | #define SC_NUMLOCK 0x0045 41 | #define SC_INSERT 0x0052 42 | #define SC_DELETE 0x0053 43 | #define SC_HOME 0x0047 44 | #define SC_END 0x004f 45 | #define SC_PAGEUP 0x0049 46 | #define SC_PAGEDN 0x0051 47 | #define SC_UP 0x0048 48 | #define SC_DOWN 0x0050 49 | #define SC_LEFT 0x004b 50 | #define SC_RIGHT 0x004d 51 | #define SC_1 0x0002 52 | #define SC_2 0x0003 53 | #define SC_3 0x0004 54 | #define SC_4 0x0005 55 | #define SC_5 0x0006 56 | #define SC_6 0x0007 57 | #define SC_7 0x0008 58 | #define SC_8 0x0009 59 | #define SC_9 0x000a 60 | #define SC_0 0x000b 61 | #define SC_Q 0x0010 62 | #define SC_W 0x0011 63 | #define SC_E 0x0012 64 | #define SC_R 0x0013 65 | #define SC_T 0x0014 66 | #define SC_Y 0x0015 67 | #define SC_U 0x0016 68 | #define SC_I 0x0017 69 | #define SC_O 0x0018 70 | #define SC_P 0x0019 71 | #define SC_A 0x001e 72 | #define SC_S 0x001f 73 | #define SC_D 0x0020 74 | #define SC_F 0x0021 75 | #define SC_G 0x0022 76 | #define SC_H 0x0023 77 | #define SC_J 0x0024 78 | #define SC_K 0x0025 79 | #define SC_L 0x0026 80 | #define SC_Z 0x002c 81 | #define SC_X 0x002d 82 | #define SC_C 0x002e 83 | #define SC_V 0x002f 84 | #define SC_B 0x0030 85 | #define SC_N 0x0031 86 | #define SC_M 0x0032 87 | #define SC_SPACE 0x0039 88 | #define SC_RELEASE 0x0080 89 | #define SC_MINUS 12 90 | 91 |  -------------------------------------------------------------------------------- /GFX/MAKEFILE: -------------------------------------------------------------------------------- 1 | # Makefile for Makeing a Library 2 | 3 | #which memory model and processor to use by default 4 | PROCESSOR = 386 # for the 32-bit compilers 5 | 6 | # name the compiler 7 | CC = wcc$(PROCESSOR) 8 | FC = wfc$(PROCESSOR) 9 | ASM = tasm 10 | 11 | !ifeq PROCESSOR 386 12 | MODEL = f # flat 13 | !else 14 | MODEL = l # large 15 | !endif 16 | 17 | # options to use 18 | #CFLAGS = -m$(MODEL) -zq -od -d2 -zp4 -ei -W4 19 | CFLAGS = -m$(MODEL) -zq -s -oxt -zp4 -ei -W4 20 | #CFLAGS = -m$(MODEL) -zq -od -s -zp4 -ei -W4 21 | FFLAGS = -m$(MODEL) -noterm 22 | AFLAGS = -mx -ml 23 | 24 | .EXTENSIONS: 25 | .EXTENSIONS: .exe .rex .lib .obj .wbj .asm .c .for 26 | 27 | .BEFORE 28 | @set INCLUDE=..\apodmx;.;$(%watcom)\h; 29 | @set LIB=$(%watcom)\lib386;$(%lib) 30 | @set DOS4G=QUIET 31 | 32 | !include objdef.mif 33 | 34 | # explicit rules 35 | 36 | all : gfx.lib .symbolic 37 | @%null 38 | 39 | gfx.lib : $(objs) 40 | %make temp.lnk 41 | wlib $^@ /n /b @temp.lnk 42 | 43 | # implicit rules 44 | 45 | temp.lnk : objdef.mif makefile 46 | %create $^@ 47 | for %i in ($(objs)) do %append $^@ -+%i 48 | 49 | .c.obj : 50 | $(CC) $^& $(CFLAGS) 51 | 52 | .c.wbj : 53 | $(CC) $^& $(CFLAGS) -zw -fo=$^&.wbj 54 | 55 | .for.obj : 56 | $(FC) $^& $(FFLAGS) 57 | 58 | .asm.obj : 59 | $(ASM) $(AFLAGS) $^&; 60 | 61 | # clean build DIR 62 | 63 | clean : .SYMBOLIC 64 | del *.obj 65 | del *.lib 66 | -------------------------------------------------------------------------------- /GFX/OBJDEF.MIF: -------------------------------------------------------------------------------- 1 | 2 | OBJS = vmemapi.obj & 3 | prefapi.obj & 4 | dpmiapi.obj & 5 | ptrapi.obj & 6 | gfxapi_a.obj & 7 | gfxapi.obj & 8 | exitapi.obj & 9 | glbapi.obj & 10 | imsapi.obj & 11 | kbdapi.obj & 12 | swdapi.obj & 13 | tsmapi.obj & 14 | ptrapi_a.obj 15 | 16 | -------------------------------------------------------------------------------- /GFX/TSMAPI.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include "task_man.h" 3 | #include "tsmapi.h" 4 | 5 | typedef struct { 6 | task *t; 7 | void (*callback)(void); 8 | int paused; 9 | } task_t; 10 | 11 | #define MAX_TASKS 8 12 | 13 | task_t tasks[MAX_TASKS]; 14 | 15 | void TSM_Install(int rate) { 16 | memset(tasks, 0, sizeof(tasks)); 17 | } 18 | 19 | void tsm_funch(task *t) { 20 | int i = (int)t->data; 21 | if (!tasks[i].paused) 22 | tasks[i].callback(); 23 | } 24 | 25 | int TSM_NewService(void(*function)(void), int rate, int priority, int pause) { 26 | int i; 27 | for (i = 0; i < MAX_TASKS; i++) 28 | { 29 | if (tasks[i].t == NULL) 30 | break; 31 | } 32 | if (i == MAX_TASKS) 33 | return -1; 34 | tasks[i].callback = function; 35 | tasks[i].paused = pause; 36 | tasks[i].t = TS_ScheduleTask(tsm_funch, rate, priority, (void*)i); 37 | TS_Dispatch(); 38 | return i; 39 | } 40 | 41 | void TSM_DelService(int id) { 42 | if (id >= 0) 43 | { 44 | TS_Terminate(tasks[id].t); 45 | tasks[id].t = NULL; 46 | } 47 | } 48 | 49 | void TSM_PauseService(int id) { 50 | if (id >= 0) 51 | { 52 | tasks[id].paused = 1; 53 | } 54 | } 55 | 56 | void TSM_ResumeService(int id) { 57 | if (id >= 0) 58 | { 59 | tasks[id].paused = 0; 60 | } 61 | } 62 | 63 | void TSM_Remove(void) { 64 | TS_Shutdown(); 65 | } 66 | 67 | -------------------------------------------------------------------------------- /GFX/TSMAPI.H: -------------------------------------------------------------------------------- 1 | #ifndef _TSMAPI_H_ 2 | #define _TSMAPI_H_ 3 | void TSM_Install(int rate); 4 | int TSM_NewService(void(*function)(void), int rate, int priority, int pause); 5 | void TSM_DelService(int id); 6 | void TSM_Remove(void); 7 | void TSM_PauseService(int id); 8 | void TSM_ResumeService(int id); 9 | #endif 10 | -------------------------------------------------------------------------------- /GFX/VMEMAPI.H: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * VMEMapi - Virtual Memory Routines 3 | *---------------------------------------------------------------------------- 4 | * 5 | * Created by: Paul Radek 6 | * Date: Nov, 1993 7 | * 8 | * CONTENTS:glbapi.c glbapi.h 9 | * 10 | * EXTERN MODULES - Main module of your program 11 | * 12 | * NOTES: 13 | * 14 | *---------------------------------------------------------------------------*/ 15 | 16 | #ifndef _TYPES_H 17 | #include "types.h" 18 | #endif 19 | 20 | #ifndef _VMEMAPI 21 | #define _VMEMAPI 22 | 23 | typedef struct 24 | { 25 | BYTE *obj; 26 | DWORD age; 27 | // DWORD id; 28 | } VM_OWNER; 29 | 30 | 31 | /************************************************************************* 32 | VM_InitMemory - Assign memory block to be used as virtual memory. 33 | - Can be called multiple times to add additional memory. 34 | *************************************************************************/ 35 | PUBLIC void 36 | VM_InitMemory( 37 | BYTE *memory, // INPUT : Memory to be added to the pool 38 | DWORD size // INPUT : Size of memory 39 | ); 40 | 41 | /************************************************************************* 42 | VM_Malloc - Allocates a block of memory - swapping out other blocks if 43 | needed. 44 | *************************************************************************/ 45 | PUBLIC VOID * 46 | VM_Malloc( 47 | UINT size, // INPUT : Size of object 48 | VM_OWNER *owner, // INPUT : Owner Structure, NULL=Locked 49 | BOOL discard // INPUT : Discard memory to satisfy request. 50 | ); 51 | 52 | /************************************************************************* 53 | * VM_Touch - touch a peice of memory to keep track of most recently used. 54 | *************************************************************************/ 55 | PUBLIC VOID 56 | VM_Touch( 57 | VM_OWNER *owner // INPUT : Owner of memory to touch. 58 | ); 59 | 60 | /************************************************************************* 61 | VM_Free - frees a block of memory allocated by VM_Malloc 62 | *************************************************************************/ 63 | PUBLIC VOID 64 | VM_Free( 65 | VOID *mem // INPUT : Memory Object to Free 66 | ); 67 | 68 | /************************************************************************* 69 | VM_Lock - Locks a block of memory from being swapped out. 70 | *************************************************************************/ 71 | PUBLIC VOID 72 | VM_Lock( 73 | VOID *mem // INPUT : Memory Object to Free 74 | ); 75 | 76 | /************************************************************************* 77 | VM_Unlock - Unlocks a block of memory allowing it to be swapped out. 78 | *************************************************************************/ 79 | PUBLIC VOID 80 | VM_Unlock( 81 | VOID *mem, // INPUT : Memory Object to Free 82 | VM_OWNER *owner // INPUT : Owner Structure, NULL=Locked 83 | ); 84 | 85 | /************************************************************************* 86 | VM_GetCoreInfo - Get information on core resource 87 | *************************************************************************/ 88 | PUBLIC VOID 89 | VM_GetCoreInfo( 90 | DWORD *largest, // OUTPUT: Largest block free 91 | DWORD *totalfree, // OUTPUT: Total amount free 92 | DWORD *totallocked, // OUTPUT: Total amount locked 93 | DWORD *totalused, // OUTPUT: Total amount used 94 | DWORD *discarded // OUTPUT: Number of items discarded 95 | ); 96 | 97 | #endif 98 | -------------------------------------------------------------------------------- /GFX/exitapi.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * EXITapi - Program Exiting routines 3 | *---------------------------------------------------------------------------- 4 | * Copyright (C) 1992 Scott Hostynski All Rights Reserved 5 | *---------------------------------------------------------------------------- 6 | * 7 | * Created by: Scott Host 8 | * Date: Oct, 1992 9 | * 10 | * CONTENTS: exitapi.c exitapi.h 11 | * 12 | * EXTERN MODULES - Main module of your program 13 | * 14 | * NOTES: Use EXIT_Install ( function pointer ) and set it to a routine 15 | * that Shuts down all your systems 16 | *---------------------------------------------------------------------------*/ 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | #include "exitapi.h" 23 | 24 | PRIVATE VOID (*ShutDown)(INT) = (VOID (*))0; 25 | PRIVATE CHAR * clean_exit_msg = "Clean Exit"; 26 | PRIVATE CHAR * serial = "32768SH"; 27 | 28 | /*************************************************************************** 29 | EXIT_Install() Sets User routine to shut down systems 30 | ***************************************************************************/ 31 | VOID 32 | EXIT_Install( 33 | VOID (*SD)(INT) // INPUT : pointer to function 34 | ) 35 | { 36 | ShutDown = SD; 37 | } 38 | 39 | /*************************************************************************** 40 | EXIT_Error() - Terminate Program in Error with message 41 | ***************************************************************************/ 42 | VOID 43 | EXIT_Error( 44 | char *instr, // INPUT : message string ot format 45 | ... // INPUT : args for instr 46 | ) 47 | { 48 | va_list args; 49 | 50 | if (ShutDown) 51 | ShutDown(1); 52 | 53 | va_start ( args, instr ); 54 | vprintf ( instr, args ); 55 | va_end ( args ); 56 | 57 | exit(1); 58 | } 59 | 60 | /*************************************************************************** 61 | EXIT_Assert() - Terminate Program in Error with Assertion 62 | ***************************************************************************/ 63 | VOID 64 | EXIT_Assert( 65 | char *expression, // INPUT : expression that failed 66 | char *filename, // INPUT : filename assert occured in 67 | unsigned linenum // INPUT : line number of assert statement 68 | ) 69 | { 70 | if (ShutDown) 71 | ShutDown(2); 72 | 73 | printf( "Assertion failed: %s, %s, %d\n", 74 | expression, filename, linenum ); 75 | 76 | exit(1); 77 | } 78 | 79 | 80 | /*************************************************************************** 81 | EXIT_Clean() - Terminate Program Clean 82 | ***************************************************************************/ 83 | VOID 84 | EXIT_Clean( 85 | VOID 86 | ) 87 | { 88 | if (ShutDown) 89 | ShutDown(0); 90 | else 91 | printf ("\n%s\n", clean_exit_msg ); 92 | 93 | exit(0); 94 | } 95 |  -------------------------------------------------------------------------------- /GFX/types.h: -------------------------------------------------------------------------------- 1 | #ifndef _TYPES_H 2 | #define _TYPES_H 3 | 4 | typedef enum 5 | { 6 | FALSE, 7 | TRUE 8 | }BOOL; 9 | 10 | #define LOCAL static 11 | #define PRIVATE static 12 | #define PUBLIC 13 | #define TSMCALL 14 | #define SPECIAL 15 | #define MACRO 16 | #define NUL (VOID *)0 17 | #define EMPTY ~0 18 | #define ASIZE(a) (sizeof(a)/sizeof((a)[0])) 19 | #define FMUL32(a) ( ( a ) << 5 ) 20 | 21 | typedef unsigned char BYTE; 22 | typedef unsigned short WORD; 23 | typedef unsigned int DWORD; 24 | typedef void VOID; 25 | typedef char CHAR; 26 | typedef short SHORT; 27 | typedef unsigned short USHORT; 28 | typedef int INT; 29 | typedef unsigned int UINT; 30 | 31 | int random(int); 32 | #define random( x ) ( rand() % x ) 33 | 34 | #endif -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DOS Raptor 2 | This is the original Raptor Call Of The Shadows DOS source code v1.2 with the Apogee Sound System and the 3 | DMX wrapper APODMX instead of the proprietary DMX library. 4 | 5 | ## Build 6 | To build all libraries and the exe under DOS use Watcom C 10.0 and TASM 3.1. 7 | For a build that more closely matches the original exe file v1.2 (without DMX library) you will need the following: 8 | ``` 9 | AUDIOLIB: Watcom C 10.0 and TASM 3.1 10 | APODMX: A compatible version of Watcom C32 11 | GFX: Watcom C 9.5b and TASM 3.1 12 | SOURCE: Watcom C 10.0 and TASM 3.1 13 | ``` 14 | 15 | ## License 16 | DOS Raptor is distributed under the GPL Version 2 or newer, see [LICENSE](https://github.com/skynettx/dosraptor/blob/master/LICENSE). 17 | 18 | ## Thanks 19 | All my thanks go to [Scott Host](https://www.mking.com), [nukeykt](https://github.com/nukeykt) and [NY00123](https://github.com/NY00123) without them this release would not have been possible. 20 | -------------------------------------------------------------------------------- /SOURCE/#: -------------------------------------------------------------------------------- 1 | 2 | main() = 4626536 3 | Init - 4 | Shareware EXE! 5 | Music Enabled (Roland Sound Canvas) 6 | SoundFx Enabled (Sound Blaster) 7 | DMX_Init() = 24 8 | 9 | CENTER Joystick and press a button 10 | PUSH the Joystick in the UPPER LEFT and press a button 11 | PUSH the Joystick in the LOWER RIGHT and press a button 12 | INPUT xh = 342 xl = 12 13 | INPUT yh = 410 yl = 12 14 | LIMIT xh = 11 xl = -77 15 | LIMIT yh = 12 yl = -91 16 | CENTER sx = 398 sy = 471 17 | 18 | _dpmi_getmemsize() = 3112960 19 | Lowmem = 431408 20 | Highmem = 3096576 21 | Loading Graphics 22 | -------------------------------------------------------------------------------- /SOURCE/ASK.INC: -------------------------------------------------------------------------------- 1 | // ASK.INC defines 2 | 3 | #define ASK_WINDOW 0x0002 // WINDOW 4 | 5 | #define ASK_0000 0x0000 // BUMPIN 6 | #define ASK_0001 0x0001 // BUMPOUT 7 | #define ASK_0002 0x0002 // BUMPOUT 8 | #define ASK_0003 0x0003 // BUMPOUT 9 | #define ASK_0004 0x0004 // BUMPOUT 10 | #define ASK_DRAGBAR 0x0005 // DRAGBAR 11 | #define ASK_YES 0x0006 // BUTTON FIELD 12 | #define ASK_NO 0x0007 // BUTTON FIELD 13 | -------------------------------------------------------------------------------- /SOURCE/BONUS.H: -------------------------------------------------------------------------------- 1 | #define MAX_BONUS 12 2 | 3 | #ifndef _OBJAPI 4 | #include "objects.h" 5 | #endif 6 | 7 | #ifndef _BONUSAPI 8 | #define _BONUSAPI 9 | 10 | #define BONUS_WIDTH 16 11 | #define BONUS_HEIGHT 16 12 | 13 | #define MAX_MONEY ( MAX_BONUS - 3 ) 14 | 15 | typedef struct BONUS_S 16 | { 17 | struct BONUS_S * prev; // LINK LIST PREV 18 | struct BONUS_S * next; // LINK LIST NEXT 19 | DWORD item; // GLB item 20 | INT curframe; // CURRENT ANIM FRAME 21 | INT curglow; // CURRENT GLOW FRAME 22 | INT x; // X POSITION 23 | INT y; // Y POSITION 24 | INT bx; // BONUS X POSITION 25 | INT by; // BONUS Y POSITION 26 | INT gx; // GLOW X POSITION 27 | INT gy; // GLOW Y POSITION 28 | INT pos; // POS IN CIRCLE 29 | BOOL dflag; // DONEFLAG 30 | INT countdown; // COUNTDOWN TO REMOVE 31 | OBJ_TYPE type; // OBJECT TYPE 32 | OBJ_LIB * lib; // POINTER TO OBJECT LIBRARY 33 | }BONUS; 34 | 35 | /*************************************************************************** 36 | BONUS_Clear () - Clears out All bonuses 37 | ***************************************************************************/ 38 | VOID 39 | BONUS_Clear ( 40 | VOID 41 | ); 42 | 43 | /*************************************************************************** 44 | BONUS_Init () - Sets up Bonus stuff 45 | ***************************************************************************/ 46 | VOID 47 | BONUS_Init ( 48 | VOID 49 | ); 50 | 51 | /*************************************************************************** 52 | BONUS_Add () - Adds A BONUS to Game so player can Try to pick it up 53 | ***************************************************************************/ 54 | VOID 55 | BONUS_Add ( 56 | OBJ_TYPE type, // INPUT : OBJECT TYPE 57 | INT x, // INPUT : X POSITION 58 | INT y // INPUT : Y POSITION 59 | ); 60 | 61 | /*************************************************************************** 62 | BONUS_Think () - Does all BONUS Thinking 63 | ***************************************************************************/ 64 | VOID 65 | BONUS_Think ( 66 | VOID 67 | ); 68 | 69 | /*************************************************************************** 70 | BONUS_Display () - Displays Active Bonuses in game 71 | ***************************************************************************/ 72 | VOID 73 | BONUS_Display ( 74 | VOID 75 | ); 76 | 77 | #endif 78 |  -------------------------------------------------------------------------------- /SOURCE/DERBIS.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "raptor.h" 6 | #include "file0001.inc" 7 | 8 | #define MAX_DERBIS 15 9 | 10 | typedef struct DERB_S 11 | { 12 | struct DERB_S * prev; // LINK LIST PREV 13 | struct DERB_S * next; // LINK LIST NEXT 14 | INT dir; // DIRECTION 0 - 7 15 | INT x; 16 | INT y; 17 | }DERBS; 18 | 19 | PRIVATE ESHOT derbs [ MAX_DERBIS ]; 20 | 21 | PRIVATE ESHOT first_derb; 22 | PRIVATE ESHOT last_derb; 23 | PRIVATE ESHOT * free_derb; 24 | 25 | /*************************************************************************** 26 | DERB_Clear () - Clears out ESHOT Linklist 27 | ***************************************************************************/ 28 | VOID 29 | DERB_Clear ( 30 | VOID 31 | ) 32 | { 33 | INT loop; 34 | 35 | eshotnum = 0; 36 | 37 | first_derb.prev = NUL; 38 | first_derb.next = &last_derb; 39 | 40 | last_derb.prev = &first_derb; 41 | last_derb.next = NUL; 42 | 43 | free_derb = eshots; 44 | 45 | memset ( eshots, 0, sizeof ( eshots ) ); 46 | 47 | for ( loop = 0; loop < MAX_ESHOT-1; loop++ ) 48 | eshots[ loop ].next = &eshots [ loop + 1 ]; 49 | } 50 | 51 | /*-------------------------------------------------------------------------* 52 | DERB_Get () - gets a Free ESHOT OBJECT from linklist 53 | *-------------------------------------------------------------------------*/ 54 | PRIVATE ESHOT * 55 | DERB_Get ( 56 | VOID 57 | ) 58 | { 59 | ESHOT * new; 60 | 61 | if ( !free_derb ) 62 | return ( NUL ); 63 | 64 | eshotnum++; 65 | if ( eshothigh < eshotnum ) 66 | eshothigh = eshotnum; 67 | 68 | new = free_derb; 69 | free_derb = free_derb->next; 70 | 71 | memset ( new, 0 ,sizeof ( ESHOT ) ); 72 | 73 | new->next = &last_derb; 74 | new->prev = last_derb.prev; 75 | last_derb.prev = new; 76 | new->prev->next = new; 77 | 78 | return ( new ); 79 | } 80 | 81 | /*-------------------------------------------------------------------------* 82 | DERB_Remove () - Removes SHOT OBJECT from linklist 83 | *-------------------------------------------------------------------------*/ 84 | PRIVATE ESHOT * 85 | DERB_Remove ( 86 | ESHOT * sh 87 | ) 88 | { 89 | ESHOT * next; 90 | 91 | eshotnum--; 92 | 93 | next = sh->prev; 94 | 95 | sh->next->prev = sh->prev; 96 | sh->prev->next = sh->next; 97 | 98 | memset ( sh, 0, sizeof ( ESHOT ) ); 99 | 100 | sh->next = free_derb; 101 | 102 | free_derb = sh; 103 | 104 | return ( next ); 105 | } 106 | 107 |  -------------------------------------------------------------------------------- /SOURCE/ESHOT.H: -------------------------------------------------------------------------------- 1 | #ifndef _ESHOTAPI 2 | #define _ESHOTAPI 3 | 4 | typedef enum 5 | { 6 | ES_ATPLAYER, // 0 7 | ES_ATDOWN, // 1 8 | ES_ANGLELEFT, // 2 9 | ES_ANGLERIGHT, // 3 10 | ES_MISSLE, // 4 11 | ES_LASER, // 5 12 | ES_MINES, // 6 13 | ES_PLASMA, // 7 14 | ES_COCONUTS // 8 15 | }ESHOT_TYPE; 16 | 17 | /*************************************************************************** 18 | ESHOT_Clear () - Clears out ESHOT Linklist 19 | ***************************************************************************/ 20 | VOID 21 | ESHOT_Clear ( 22 | VOID 23 | ); 24 | 25 | /*************************************************************************** 26 | ESHOT_Init () - Inits ESHOT system and clears link list 27 | ***************************************************************************/ 28 | VOID 29 | ESHOT_Init ( 30 | VOID 31 | ); 32 | 33 | /*************************************************************************** 34 | ESHOT_Shoot() - Shoots ENEMY GUNS 35 | ***************************************************************************/ 36 | VOID 37 | ESHOT_Shoot ( 38 | SPRITE_SHIP * enemy, // INPUT : pointer to Enemy stuff 39 | INT gun_num // INPUT : gun number to shoot 40 | ); 41 | 42 | /*************************************************************************** 43 | ESHOT_Think () - Does All Thinking for shot system 44 | ***************************************************************************/ 45 | VOID 46 | ESHOT_Think ( 47 | VOID 48 | ); 49 | 50 | /*************************************************************************** 51 | ESHOT_Display () - Displays All active Shots 52 | ***************************************************************************/ 53 | VOID 54 | ESHOT_Display ( 55 | VOID 56 | ); 57 | 58 | #endif 59 |  -------------------------------------------------------------------------------- /SOURCE/FILE0004.INC: -------------------------------------------------------------------------------- 1 | // f:\raptor\FILE0004.GLB defines 2 | 3 | #define SPRITE4_ITM 0x00040000 //ITEM:000 4 | #define FLATSG4_ITM 0x00040001 //ITEM:001 5 | #define MAP6G3_MAP 0x00040002 //ITEM:002 6 | #define MAP7G3_MAP 0x00040003 //ITEM:003 7 | #define MAP8G3_MAP 0x00040004 //ITEM:004 8 | #define MAP9G3_MAP 0x00040005 //ITEM:005 9 | #define TARG1G4_PIC 0x00040006 //ITEM:006 10 | #define TARG2G4_PIC 0x00040011 //ITEM:017 11 | #define CALI1_PIC 0x0004001c //ITEM:028 12 | #define CALI2_PIC 0x0004002a //ITEM:042 13 | #define CALI3_PIC 0x0004002b //ITEM:043 14 | #define CALI4_PIC 0x0004002c //ITEM:044 15 | #define CALI5_PIC 0x0004002d //ITEM:045 16 | #define WORMLEFT_PIC 0x0004002e //ITEM:046 17 | #define IOTARG_PIC 0x00040036 //ITEM:054 18 | #define IOBOSS1_PIC 0x00040044 //ITEM:068 19 | #define IOBOSS2_PIC 0x00040048 //ITEM:072 20 | #define IOBOSS3_PIC 0x0004004c //ITEM:076 21 | #define IOBOSS4_PIC 0x00040052 //ITEM:082 22 | #define IOBOSS5_PIC 0x00040056 //ITEM:086 23 | #define IOBOSS6_PIC 0x0004005a //ITEM:090 24 | #define IOBOSS7_PIC 0x0004005f //ITEM:095 25 | #define IOBOSS8_PIC 0x00040064 //ITEM:100 26 | #define IOBOSS9_PIC 0x00040069 //ITEM:105 27 | #define BASETRG1_PIC 0x0004006e //ITEM:110 28 | #define BASETRG2_PIC 0x0004006f //ITEM:111 29 | #define BASETRG3_PIC 0x00040070 //ITEM:112 30 | #define DMOONTRG_PIC 0x00040080 //ITEM:128 31 | #define STAG01G4_PIC 0x00040087 //ITEM:135 32 | #define STAG02G4_PIC 0x00040088 //ITEM:136 33 | #define STAG03G4_PIC 0x00040089 //ITEM:137 34 | #define EBOSS1_PIC 0x0004008a //ITEM:138 35 | #define EBOSS2_PIC 0x00040090 //ITEM:144 36 | #define EBOSS3_PIC 0x00040097 //ITEM:151 37 | #define EBOSS4_PIC 0x0004009e //ITEM:158 38 | #define EBOSS5_PIC 0x000400a5 //ITEM:165 39 | #define EBOSS6_PIC 0x000400ac //ITEM:172 40 | #define EBOSS7_PIC 0x000400b3 //ITEM:179 41 | #define EBOSS8_PIC 0x000400ba //ITEM:186 42 | #define EBOSS9_PIC 0x000400c1 //ITEM:193 43 | #define EBOSS10_PIC 0x000400c8 //ITEM:200 44 | #define EBOSS11_PIC 0x000400ce //ITEM:206 45 | #define STARTG4TILES 0x000400d4 //LABEL: 46 | #define ENDG4TILES 0x00040615 //LABEL: 47 | #define BOGUS4 0x00040616 //LABEL: 48 | -------------------------------------------------------------------------------- /SOURCE/FLAME.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "raptor.h" 6 | 7 | #include "file0001.inc" 8 | #include "file0002.inc" 9 | #include "file0003.inc" 10 | #include "file0004.inc" 11 | 12 | #define MAX_SHADES 8 13 | 14 | PRIVATE BYTE * stable[ MAX_SHADES ]; 15 | PRIVATE BYTE stmem [ MAX_SHADES ] [ 512 ]; 16 | 17 | /*************************************************************************** 18 | FLAME_Init () - Inits Flame Tables and stuff 19 | ***************************************************************************/ 20 | VOID 21 | FLAME_Init ( 22 | VOID 23 | ) 24 | { 25 | INT loop; 26 | 27 | for ( loop = 0; loop < MAX_SHADES; loop++ ) 28 | { 29 | stable [ loop ] = stmem [ loop ]; 30 | 31 | stable [ loop ] = (BYTE *)(((INT)stable[loop]+255)&~0xff); 32 | 33 | GFX_MakeLightTable ( palette, stable[loop], (MAX_SHADES-loop)*2 ); 34 | } 35 | } 36 | 37 | /*************************************************************************** 38 | FLAME_InitShades () - Inits shading stuff 39 | ***************************************************************************/ 40 | VOID 41 | FLAME_InitShades ( 42 | VOID 43 | ) 44 | { 45 | INT loop; 46 | 47 | for ( loop = 0; loop < MAX_SHADES; loop++ ) 48 | GFX_MakeLightTable ( palette, stable[loop], (MAX_SHADES-loop)*2 ); 49 | } 50 | 51 | /*************************************************************************** 52 | FLAME_Up () - Shows Flame shooting upward 53 | ***************************************************************************/ 54 | VOID 55 | FLAME_Up ( 56 | INT ix, // INPUT : x position 57 | INT iy, // INPUT : y position 58 | INT width, // INPUT : width of shade 59 | INT frame // INPUT : frame 60 | ) 61 | { 62 | INT height [ 2 ] = { 5, 10 }; 63 | BYTE * outbuf; 64 | INT y; 65 | INT loop; 66 | DWORD curs; 67 | DWORD addx; 68 | INT num; 69 | 70 | if ( opt_detail < 1 ) return; 71 | 72 | frame = frame % 2; 73 | 74 | iy -= ( height [ frame ] - 1 ); 75 | 76 | if ( GFX_ClipLines ( NUL, &ix, &iy, &width, &height [ frame ] ) ) 77 | { 78 | y = iy; 79 | 80 | addx = ( MAX_SHADES << 16 ) / height [ frame ]; 81 | curs = addx * ( height [ frame ] - 1 ); 82 | 83 | for ( loop = 0; loop < height [ frame ]; loop++ ) 84 | { 85 | outbuf = displaybuffer + ix + ylookup [ y ]; 86 | 87 | y++; 88 | 89 | num = ( curs>>16 ); 90 | 91 | if ( num >= 8 ) 92 | { 93 | EXIT_Error ("flame > 8 %u", curs>>16 ); 94 | } 95 | 96 | if ( num < 0 ) 97 | { 98 | EXIT_Error ("flame < 0"); 99 | } 100 | 101 | GFX_Shade ( outbuf, width, stable [ num ] ); 102 | 103 | curs -= addx; 104 | } 105 | } 106 | } 107 | 108 | /*************************************************************************** 109 | FLAME_Down () - Shows Flame shooting downward 110 | ***************************************************************************/ 111 | VOID 112 | FLAME_Down ( 113 | INT ix, // INPUT : x position 114 | INT iy, // INPUT : y position 115 | INT width, // INPUT : width of shade 116 | INT frame // INPUT : frame 117 | ) 118 | { 119 | INT height [ 2 ] = { 8, 12 }; 120 | BYTE * outbuf; 121 | INT y; 122 | INT loop; 123 | DWORD curs; 124 | DWORD addx; 125 | 126 | frame = frame % 2; 127 | 128 | if ( GFX_ClipLines ( NUL, &ix, &iy, &width, &height [ frame ] ) ) 129 | { 130 | y = iy; 131 | 132 | curs = 0; 133 | addx = ( MAX_SHADES << 16 ) / height [ frame ]; 134 | 135 | for ( loop = 0; loop < height [ frame ]; loop++ ) 136 | { 137 | outbuf = displaybuffer + ix + ylookup [ y ]; 138 | 139 | y++; 140 | 141 | GFX_Shade ( outbuf, width, stable [ ( curs>>16 ) ] ); 142 | 143 | curs += addx; 144 | } 145 | } 146 | } 147 | 148 |  -------------------------------------------------------------------------------- /SOURCE/FLAME.H: -------------------------------------------------------------------------------- 1 | #ifndef _TYPES_H 2 | #include "types.h" 3 | #endif 4 | 5 | #ifndef _FLAMES 6 | #define _FLAMES 7 | 8 | /*************************************************************************** 9 | FLAME_Init () - Inits Flame Tables and stuff 10 | ***************************************************************************/ 11 | VOID 12 | FLAME_Init ( 13 | VOID 14 | ); 15 | 16 | /*************************************************************************** 17 | FLAME_InitShades () - Inits shading stuff 18 | ***************************************************************************/ 19 | VOID 20 | FLAME_InitShades ( 21 | VOID 22 | ); 23 | 24 | /*************************************************************************** 25 | FLAME_Up () - Shows Flame shooting upward 26 | ***************************************************************************/ 27 | VOID 28 | FLAME_Up ( 29 | INT ix, // INPUT : x position 30 | INT iy, // INPUT : y position 31 | INT width, // INPUT : width of shade 32 | INT frame // INPUT : frame 33 | ); 34 | 35 | /*************************************************************************** 36 | FLAME_Down () - Shows Flame shooting downward 37 | ***************************************************************************/ 38 | VOID 39 | FLAME_Down ( 40 | INT ix, // INPUT : x position 41 | INT iy, // INPUT : y position 42 | INT width, // INPUT : width of shade 43 | INT frame // INPUT : frame 44 | ); 45 | 46 | #endif 47 |  -------------------------------------------------------------------------------- /SOURCE/GETGLB.C: -------------------------------------------------------------------------------- 1 | mem = GLB_GetItem ( SHOT3_TXT ); 2 | loop = GLB_ItemSize ( SHOT3_TXT ); 3 | GLB_SaveFile ("SHOT3.TXT", mem, loop ); 4 | exit(0); 5 |  -------------------------------------------------------------------------------- /SOURCE/HANGAR.INC: -------------------------------------------------------------------------------- 1 | // HANGAR.INC defines 2 | 3 | #define HANG_WINDOW 0x0000 // WINDOW 4 | 5 | #define HANG_PIC 0x0000 // ICON 6 | #define HANG_TEXT 0x0001 // TEXT FIELD 7 | #define HANG_MISSION 0x0002 // VIEW AREA 8 | #define HANG_SUPPLIES 0x0003 // VIEW AREA 9 | #define HANG_MAIN_MENU 0x0004 // VIEW AREA 10 | #define HANG_QSAVE 0x0005 // VIEW AREA 11 | -------------------------------------------------------------------------------- /SOURCE/HELP.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include "raptor.h" 9 | #include "helpwin.inc" 10 | #include "file0000.inc" 11 | #include "file0001.inc" 12 | 13 | PRIVATE DWORD startitem; 14 | PRIVATE INT curpage; 15 | PRIVATE INT maxpages; 16 | 17 | /*************************************************************************** 18 | HELP_Init() - inits the help stuff 19 | ***************************************************************************/ 20 | VOID 21 | HELP_Init ( 22 | VOID 23 | ) 24 | { 25 | INT enditem; 26 | 27 | startitem = GLB_GetItemID ("STARTHELP"); 28 | enditem = GLB_GetItemID ("ENDHELP"); 29 | 30 | if ( !reg_flag ) 31 | startitem += (DWORD)2; 32 | 33 | maxpages = ( enditem - startitem - 1 ); 34 | 35 | startitem++; 36 | 37 | curpage = 0; 38 | } 39 | 40 | /*************************************************************************** 41 | HELP_Win() - Displays the help window at the specified page 42 | ***************************************************************************/ 43 | VOID 44 | HELP_Win( 45 | CHAR * strpage // INPUT : GLB string item 46 | ) 47 | { 48 | CHAR temp[20]; 49 | SWD_DLG dlg; 50 | INT window; 51 | BOOL update = TRUE; 52 | DWORD item; 53 | 54 | item = GLB_GetItemID ( strpage ); 55 | 56 | if ( item == EMPTY ) 57 | EXIT_Error ("HELP() - Invalid Page"); 58 | 59 | curpage = item - startitem; 60 | 61 | KBD_Clear(); 62 | window = SWD_InitWindow ( HELP_SWD ); 63 | 64 | SND_Patch ( FX_DOOR, 127 ); 65 | 66 | mainloop: 67 | 68 | if ( update ) 69 | { 70 | update = FALSE; 71 | 72 | if ( curpage >= 0 ) 73 | curpage = curpage % maxpages; 74 | else 75 | curpage = maxpages + curpage; 76 | 77 | SWD_SetFieldItem ( window, HELP_TEXT, startitem + (DWORD)curpage ); 78 | 79 | sprintf (temp, "PAGE : %02u", curpage+1 ); 80 | SWD_SetFieldText ( window, HELP_HEADER, temp ); 81 | 82 | SWD_ShowAllWindows(); 83 | GFX_DisplayUpdate(); 84 | } 85 | 86 | SWD_Dialog ( &dlg ); 87 | 88 | switch ( dlg.keypress ) 89 | { 90 | case SC_HOME: 91 | update = TRUE; 92 | curpage = 0; 93 | break; 94 | 95 | case SC_F1: 96 | update = TRUE; 97 | curpage = 1; 98 | break; 99 | 100 | case SC_END: 101 | update = TRUE; 102 | curpage = maxpages-1; 103 | break; 104 | 105 | case SC_DOWN: 106 | case SC_RIGHT: 107 | case SC_PAGEDN: 108 | update = TRUE; 109 | curpage++; 110 | break; 111 | 112 | case SC_UP: 113 | case SC_LEFT: 114 | case SC_PAGEUP: 115 | update = TRUE; 116 | curpage--; 117 | break; 118 | } 119 | 120 | if ( KBD_IsKey ( SC_ESC ) ) 121 | goto func_exit; 122 | 123 | if ( KBD_Key ( SC_X ) && KBD_Key ( SC_ALT ) ) 124 | WIN_AskExit(); 125 | 126 | switch ( dlg.cur_act ) 127 | { 128 | case S_FLD_COMMAND: 129 | switch ( dlg.cur_cmd ) 130 | { 131 | case F_SELECT: 132 | switch ( dlg.field ) 133 | { 134 | case HELP_DONE: 135 | goto func_exit; 136 | 137 | case HELP_DOWN: 138 | update = TRUE; 139 | curpage++; 140 | break; 141 | 142 | case HELP_UP: 143 | update = TRUE; 144 | curpage--; 145 | break; 146 | } 147 | } 148 | } 149 | 150 | goto mainloop; 151 | 152 | func_exit: 153 | 154 | SWD_DestroyWindow ( window ); 155 | SWD_ShowAllWindows(); 156 | GFX_DisplayUpdate(); 157 | 158 | return; 159 | } 160 |  -------------------------------------------------------------------------------- /SOURCE/HELP.H: -------------------------------------------------------------------------------- 1 | #ifndef _HELP_H 2 | #define _HELP_H 3 | 4 | /*************************************************************************** 5 | HELP_Init() - inits the help stuff 6 | ***************************************************************************/ 7 | VOID 8 | HELP_Init ( 9 | VOID 10 | ); 11 | 12 | /*************************************************************************** 13 | HELP_Win() - Displays the help window at the specified page 14 | ***************************************************************************/ 15 | VOID 16 | HELP_Win( 17 | CHAR * strpage // INPUT : GLB string item 18 | ); 19 | 20 | #endif 21 |  -------------------------------------------------------------------------------- /SOURCE/HELPWIN.INC: -------------------------------------------------------------------------------- 1 | // HELPWIN.INC defines 2 | 3 | #define HELP_WINDOW 0x0000 // WINDOW 4 | 5 | #define HELP_0000 0x0000 // BUMPIN 6 | #define HELP_0001 0x0001 // BUMPIN 7 | #define HELP_0002 0x0002 // BUMPOUT 8 | #define HELP_0003 0x0003 // BUMPOUT 9 | #define HELP_0004 0x0004 // ICON 10 | #define HELP_UP 0x0005 // BUTTON FIELD 11 | #define HELP_DOWN 0x0006 // BUTTON FIELD 12 | #define HELP_DONE 0x0007 // BUTTON FIELD 13 | #define HELP_TEXT 0x0008 // TEXT FIELD 14 | #define HELP_HEADER 0x0009 // TEXT FIELD 15 | #define HELP_000A 0x000a // TEXT FIELD 16 | -------------------------------------------------------------------------------- /SOURCE/INTRO.H: -------------------------------------------------------------------------------- 1 | #ifndef _INTRO_H 2 | #define _INTRO_H 3 | 4 | /*************************************************************************** 5 | INTRO_Landing () - Ship Landing on Base 6 | ***************************************************************************/ 7 | BOOL 8 | INTRO_Landing ( 9 | VOID 10 | ); 11 | 12 | /*************************************************************************** 13 | INTRO_BaseLanding() - BaseLanding PLays all needed MOVES 14 | ***************************************************************************/ 15 | VOID 16 | INTRO_BaseLanding ( 17 | VOID 18 | ); 19 | 20 | /*************************************************************************** 21 | INTRO_Takeoff() - Ships taking Off 22 | ***************************************************************************/ 23 | BOOL 24 | INTRO_Takeoff ( 25 | VOID 26 | ); 27 | 28 | /*************************************************************************** 29 | INTRO_PlayMain() - Plays Main Intro 30 | ***************************************************************************/ 31 | BOOL 32 | INTRO_PlayMain ( 33 | VOID 34 | ); 35 | 36 | /*************************************************************************** 37 | INTRO_Taiwan ( 38 | ***************************************************************************/ 39 | VOID 40 | INTRO_Taiwan ( 41 | VOID 42 | ); 43 | 44 | /*************************************************************************** 45 | INTRO_Credits() - Credits Screen 46 | ***************************************************************************/ 47 | BOOL 48 | INTRO_Credits ( 49 | VOID 50 | ); 51 | 52 | /*************************************************************************** 53 | INTRO_EndGame() - Ends the current game anims 54 | ***************************************************************************/ 55 | VOID 56 | INTRO_EndGame ( 57 | INT game 58 | ); 59 | 60 | /*************************************************************************** 61 | INTRO_Death () - Death Scene 62 | ***************************************************************************/ 63 | BOOL 64 | INTRO_Death ( 65 | VOID 66 | ); 67 | 68 | #endif 69 |  -------------------------------------------------------------------------------- /SOURCE/LOAD.INC: -------------------------------------------------------------------------------- 1 | // LOAD.INC defines 2 | 3 | #define LOAD_WINDOW 0x0000 // WINDOW 4 | 5 | #define LOAD_0000 0x0000 // BUMPIN 6 | #define LOAD_IDPIC 0x0001 // ICON 7 | #define LOAD_NEXT 0x0002 // BUTTON FIELD 8 | #define LOAD_PREV 0x0003 // BUTTON FIELD 9 | #define LOAD_DEL 0x0004 // BUTTON FIELD 10 | #define LOAD_LOAD 0x0005 // BUTTON FIELD 11 | #define LOAD_CANCEL 0x0006 // BUTTON FIELD 12 | #define LOAD_0007 0x0007 // TEXT FIELD 13 | #define LOAD_0008 0x0008 // TEXT FIELD 14 | #define LOAD_NAME 0x0009 // TEXT FIELD 15 | #define LOAD_CALL 0x000a // TEXT FIELD 16 | #define LOAD_000B 0x000b // TEXT FIELD 17 | #define LOAD_CREDITS 0x000c // TEXT FIELD 18 | -------------------------------------------------------------------------------- /SOURCE/LOADCOMP.INC: -------------------------------------------------------------------------------- 1 | // LOADCOMP.INC defines 2 | 3 | #define LCOMP_WINDOW 0x0000 // WINDOW 4 | 5 | #define LCOMP_LITE1 0x0000 // ICON 6 | #define LCOMP_LITE2 0x0001 // ICON 7 | #define LCOMP_LITE3 0x0002 // ICON 8 | #define LCOMP_SCREEN 0x0003 // ICON 9 | #define LCOMP_CLOSE 0x0004 // CLOSE GADGET 10 | #define LCOMP_SECRET 0x0005 // BUTTON FIELD 11 | #define LCOMP_B1 0x0006 // BUTTON FIELD 12 | #define LCOMP_B2 0x0007 // BUTTON FIELD 13 | #define LCOMP_B3 0x0008 // BUTTON FIELD 14 | #define LCOMP_SECTOR 0x0009 // TEXT FIELD 15 | #define LCOMP_WAVE 0x000a // TEXT FIELD 16 | #define LCOMP_LEVEL 0x000b // VIEW AREA 17 | -------------------------------------------------------------------------------- /SOURCE/LOADSAVE.H: -------------------------------------------------------------------------------- 1 | #ifndef _LOADSAVE 2 | #define _LOADSAVE 3 | 4 | /*************************************************************************** 5 | RAP_SetPlayerDiff () - Set Player Difficulty 6 | ***************************************************************************/ 7 | VOID 8 | RAP_SetPlayerDiff ( 9 | VOID 10 | ); 11 | 12 | /*************************************************************************** 13 | RAP_ClearPlayer () - Clear Player stuff 14 | ***************************************************************************/ 15 | VOID 16 | RAP_ClearPlayer ( 17 | VOID 18 | ); 19 | 20 | /*************************************************************************** 21 | RAP_IsPlayer () - Returns TRUE if a player is defined 22 | ***************************************************************************/ 23 | BOOL 24 | RAP_IsPlayer ( 25 | VOID 26 | ); 27 | 28 | /*************************************************************************** 29 | RAP_AreSavedFiles() - Returns TRUE if thier are previously saved game files 30 | ***************************************************************************/ 31 | BOOL 32 | RAP_AreSavedFiles ( 33 | VOID 34 | ); 35 | 36 | /*************************************************************************** 37 | RAP_FFSaveFile() - Finds a filename to use 38 | ***************************************************************************/ 39 | BOOL 40 | RAP_FFSaveFile ( 41 | VOID 42 | ); 43 | 44 | /*************************************************************************** 45 | RAP_IsSaveFile() - Returns True if thier is a sopt to save a character 46 | ***************************************************************************/ 47 | BOOL 48 | RAP_IsSaveFile ( 49 | PLAYEROBJ * in_plr 50 | ); 51 | 52 | /*************************************************************************** 53 | RAP_LoadPlayer () - Loads player from disk 54 | ***************************************************************************/ 55 | BOOL 56 | RAP_LoadPlayer ( 57 | VOID 58 | ); 59 | 60 | /*************************************************************************** 61 | RAP_SavePlayer() - Saves player data to filename 62 | ***************************************************************************/ 63 | BOOL 64 | RAP_SavePlayer ( 65 | VOID 66 | ); 67 | 68 | /*************************************************************************** 69 | RAP_LoadMap () - Loads A level Map 70 | ***************************************************************************/ 71 | VOID 72 | RAP_LoadMap ( 73 | VOID 74 | ); 75 | 76 | /*************************************************************************** 77 | RAP_FreeMap() - Frees up cached map stuff 78 | ***************************************************************************/ 79 | VOID 80 | RAP_FreeMap ( 81 | VOID 82 | ); 83 | 84 | /*************************************************************************** 85 | RAP_LoadWin() - 86 | ***************************************************************************/ 87 | INT 88 | RAP_LoadWin( 89 | VOID 90 | ); 91 | 92 | /*************************************************************************** 93 | RAP_InitLoadSave() - Inits the load and save path stuff 94 | ***************************************************************************/ 95 | CHAR * 96 | RAP_InitLoadSave ( 97 | VOID 98 | ); 99 | 100 | /*************************************************************************** 101 | RAP_SetupFilename() - Gets current setup.ini path and name 102 | ***************************************************************************/ 103 | CHAR * 104 | RAP_SetupFilename ( 105 | VOID 106 | ); 107 | 108 | #endif 109 |  -------------------------------------------------------------------------------- /SOURCE/LOCKER.INC: -------------------------------------------------------------------------------- 1 | // LOCKER.INC defines 2 | 3 | #define LOCK_WINDOW 0x0000 // WINDOW 4 | 5 | #define LOCK_CLOSE 0x0000 // CLOSE GADGET 6 | #define LOCK_TEXT 0x0001 // TEXT FIELD 7 | #define LOCK_CHAR 0x0002 // VIEW AREA 8 | #define LOCK_TOHANGER 0x0003 // VIEW AREA 9 | #define LOCK_REGISTER 0x0004 // VIEW AREA 10 | -------------------------------------------------------------------------------- /SOURCE/MAIN.INC: -------------------------------------------------------------------------------- 1 | // MAIN.INC defines 2 | 3 | #define MAIN_WINDOW 0x0000 // WINDOW 4 | 5 | #define MAIN_0000 0x0000 // ICON 6 | #define MAIN_NEW 0x0001 // BUTTON FIELD 7 | #define MAIN_LOAD 0x0002 // BUTTON FIELD 8 | #define MAIN_OPTS 0x0003 // BUTTON FIELD 9 | #define MAIN_ORDER 0x0004 // BUTTON FIELD 10 | #define MAIN_CREDITS 0x0005 // BUTTON FIELD 11 | #define MAIN_QUIT 0x0006 // BUTTON FIELD 12 | #define MAIN_RETURN 0x0007 // BUTTON FIELD 13 | #define MAIN_DEMO 0x0008 // TEXT FIELD 14 | #define MAIN_0009 0x0009 // TEXT FIELD 15 | -------------------------------------------------------------------------------- /SOURCE/MAKEFILE: -------------------------------------------------------------------------------- 1 | # Makefile for Makeing a Library 2 | 3 | #which memory model and processor to use by default 4 | PROCESSOR = 386 # for the 32-bit compilers 5 | 6 | # name the compiler 7 | CC = wcc$(PROCESSOR) 8 | FC = wfc$(PROCESSOR) 9 | ASM = tasm 10 | 11 | !ifeq PROCESSOR 386 12 | MODEL = f # flat 13 | !else 14 | MODEL = l # large 15 | !endif 16 | 17 | # options to use 18 | #CFLAGS = -m$(MODEL) -zq -od -d2 -zp4 -ei -W4 19 | #CFLAGS = -m$(MODEL) -zq -s -oxt -zp4 -ei -W4 20 | CFLAGS = -m$(MODEL) -zq -od -s -zp4 -ei -W4 21 | FFLAGS = -m$(MODEL) -noterm 22 | AFLAGS = -mx -ml 23 | 24 | .EXTENSIONS: 25 | .EXTENSIONS: .exe .rex .lib .obj .wbj .asm .c .for 26 | 27 | .BEFORE 28 | @set INCLUDE=.;$(%watcom)\h;..\apodmx;..\gfx; 29 | @set LIB=..\apodmx;..\gfx;..\audiolib\AL_109; 30 | @set DOS4G=QUIET 31 | 32 | !include objdef.mif 33 | 34 | # explicit rules 35 | 36 | all : rap.exe .symbolic 37 | @%null 38 | 39 | rap.exe : $(objs) 40 | %make temp.lnk 41 | wlink @temp.lnk 42 | 43 | # implicit rules 44 | 45 | temp.lnk : objdef.mif makefile 46 | %create $^@ 47 | %append $^@ NAME rap 48 | %append $^@ DEBUG all 49 | %append $^@ OPT MAP=test.map 50 | %append $^@ OPT STACK=8192 51 | %append $^@ OPT CASEEXACT 52 | %append $^@ LIBRARY APODMX.lib 53 | %append $^@ LIBRARY AL_109.lib 54 | %append $^@ LIBRARY GFX.LIB 55 | %append $^@ LIB NOEMU387.LIB 56 | %append $^@ SYSTEM dos4g 57 | for %i in ($(objs)) do %append $^@ FILE %i 58 | 59 | .c.obj : 60 | $(CC) $^& $(CFLAGS) 61 | 62 | .c.wbj : 63 | $(CC) $^& $(CFLAGS) -zw -fo=$^&.wbj 64 | 65 | .for.obj : 66 | $(FC) $^& $(FFLAGS) 67 | 68 | .asm.obj : 69 | $(ASM) $(AFLAGS) $^&; 70 | 71 | # clean build DIR 72 | 73 | clean : .SYMBOLIC 74 | del *.obj 75 | del *.exe 76 | -------------------------------------------------------------------------------- /SOURCE/MAP.H: -------------------------------------------------------------------------------- 1 | #define MAX_FLIGHT 30 2 | 3 | #define MAP_ROWS 150 4 | #define MAP_ONSCREEN 8 5 | #define MAP_COLS 9 6 | #define MAP_BLOCKSIZE 32 7 | #define MAP_BOTTOM 200 - 18 8 | #define MAP_TOP 2 9 | #define MAP_LEFT 16 10 | #define MAP_RIGHT ( 320 - 16 ) 11 | #define MAP_SIZE ( MAP_ROWS * MAP_COLS ) 12 | 13 | #define MAX_TILES 2048 14 | #define MAX_GUNS 24 15 | 16 | #define ENGINE_COLOR 254 17 | #define SHOT_COLOR 255 18 | 19 | typedef struct 20 | { 21 | INT x; 22 | INT y; 23 | INT x2; 24 | INT y2; 25 | INT delx; 26 | INT dely; 27 | INT addx; 28 | INT addy; 29 | INT maxloop; 30 | INT err; 31 | BOOL done; 32 | }MOVEOBJ; 33 | 34 | // ENEMY SHIPS 35 | // SHOOT 36 | // MOVE 37 | // CRASH INTO PLAYER 38 | // ANIMATED 39 | // TAKE DAMAGE 40 | // SKY/GROUND 41 | 42 | typedef enum 43 | { 44 | F_REPEAT, 45 | F_LINEAR, 46 | F_KAMI, 47 | F_GROUND, 48 | F_GROUNDLEFT, 49 | F_GROUNDRIGHT, 50 | }FLIGHT_TYPE; 51 | 52 | typedef struct 53 | { 54 | INT linkflat; 55 | SHORT bonus; 56 | SHORT bounty; 57 | }FLATS; 58 | 59 | typedef struct 60 | { 61 | SHORT flats; 62 | SHORT fgame; 63 | }MAZEDATA; 64 | 65 | typedef struct 66 | { 67 | DWORD sizerec; 68 | DWORD spriteoff; 69 | INT numsprites; 70 | MAZEDATA map[ MAP_SIZE ]; 71 | }MAZELEVEL; 72 | 73 | typedef enum 74 | { 75 | GANIM_NORM, 76 | GANIM_SHOOT, 77 | GANIM_MULTI 78 | }ANIMTYPE; 79 | 80 | typedef enum 81 | { 82 | EXP_AIRSMALL1, // 0 83 | EXP_AIRMED, // 1 NORMAL AIR ( norm ) 84 | EXP_AIRLARGE, // 2 bigger that 32 by 32 85 | EXP_GRDSMALL, // 3 smaller than 32 by 32 86 | EXP_GRDMED, // 4 NORMAL GROUND ( norm ) 87 | EXP_GRDLARGE, // 5 bigger than 32 by 32 88 | EXP_BOSS, // 6 BIG BOSS SHIP ( AIR ) 89 | EXP_PERSON, // 7 ONE LITTLE PERSON BLWING UP 90 | EXP_ENERGY, // 8 ENERGY SHIP BLOWING UP 91 | EXP_PLATOON, // 9 ONE LITTLE PERSON BLWING UP 92 | EXP_AIRSMALL2 // 10 93 | }EXP_TYPE; 94 | 95 | typedef struct 96 | { 97 | CHAR iname[16]; // ITEM NAME 98 | DWORD item; // * GLB ITEM # 99 | INT bonus; // BONUS # ( -1 == NONE ) 100 | EXP_TYPE exptype; // EXPLOSION TYPE 101 | INT shotspace; // SLOWDOWN SPEED 102 | BOOL ground; // IS ON GROUND 103 | BOOL suck; // CAN SUCK WEAPON AFFECT 104 | INT frame_rate; // FRAME RATE 105 | INT num_frames; // NUM FRAMES 106 | INT countdown; // COUNT DOWN TO START ANIM 107 | INT rewind; // FRAMES TO REWIND 108 | ANIMTYPE animtype; // FREE SPACE FOR LATER USE 109 | BOOL shadow; // USE SHADOW ( TRUE/FALSE ) 110 | INT bossflag; // SHOULD THIS BE CONSIDERED A BOSS 111 | INT hits; // HIT POINTS 112 | INT money; // $$ AMOUNT WHEN KILLED 113 | INT shootstart; // SHOOT START OFFSET 114 | INT shootcnt; // HOW MANY TO SHOOT 115 | INT shootframe; // FRAME RATE TO SHOOT 116 | INT movespeed; // MOVEMENT SPEED 117 | INT numflight; // NUMBER OF FLIGHT POSITIONS 118 | INT repos; // REPEAT TO POSITION 119 | FLIGHT_TYPE flighttype; // FLIGHT TYPE 120 | INT numguns; // NUMBER OF GUNS 121 | INT numengs; // NUMBER OF ENGINES 122 | INT sfx; // SFX # TO PLAY 123 | INT song; // SONG # TO PLAY 124 | SHORT shoot_type[MAX_GUNS]; // ENEMY SHOOT TYPE 125 | SHORT engx[MAX_GUNS]; // X POS ENGINE FLAME 126 | SHORT engy[MAX_GUNS]; // Y POS ENGINE FLAME 127 | SHORT englx[MAX_GUNS]; // WIDTH OF ENGINE FLAME 128 | SHORT shootx[MAX_GUNS]; // X POS SHOOT FROM 129 | SHORT shooty[MAX_GUNS]; // Y POS SHOOT FROM 130 | SHORT flightx[MAX_FLIGHT]; // FLIGHT X POS 131 | SHORT flighty[MAX_FLIGHT]; // FLIGHT Y POS 132 | }SPRITE; 133 | 134 | typedef struct 135 | { 136 | INT link; 137 | INT slib; 138 | INT x; 139 | INT y; 140 | INT game; 141 | DWORD level; 142 | }CSPRITE; 143 | 144 |  -------------------------------------------------------------------------------- /SOURCE/MOVIE.H: -------------------------------------------------------------------------------- 1 | #ifndef _MOVIE_H 2 | #define _MOVIE_H 3 | 4 | typedef enum 5 | { 6 | M_ANIM, 7 | M_PIC, 8 | M_SEE_THRU 9 | }FRAMETYPE; 10 | 11 | typedef enum 12 | { 13 | M_NORM, 14 | M_FADEIN, 15 | M_FADEOUT, 16 | M_PALETTE, 17 | M_ERASE 18 | }FRAMEOPT; 19 | 20 | typedef enum 21 | { 22 | S_PLAY, 23 | S_FADEIN, 24 | S_FADEOUT, 25 | S_STOP 26 | }SONGOPTS; 27 | 28 | typedef struct 29 | { 30 | FRAMETYPE opt; // TYPE OF DRAWING REQUIRED 31 | INT framerate; // FRAME RATE OF UPDATE 32 | INT numframes; // NUMBER OF FRAMES LEFT 33 | DWORD item; // ITEM # OF PICTURE 34 | FRAMEOPT startf; // START FRAME OPTS 35 | INT startsteps; // # OF STEPS IF FADEIN 36 | FRAMEOPT endf; // END FRAME OPTS 37 | INT endsteps; // # OF STEPS IN FADEOUT 38 | INT red; // RED VAL FOR FADEOUT 39 | INT green; // GREEN VAL FOR FADEOUT 40 | INT blue; // BLUE VAL FOR FADEOUT 41 | INT holdframe; // NUMBER OF TICS TO HOLD FRAME 42 | INT songid; // SONG ID TO PLAY 43 | SONGOPTS songopt; // SONG OPTS 44 | INT songstep; // SONG STEPS FOR FADES 45 | INT soundfx; // SOUND FX START 46 | INT fx_vol; // SOUND FX VOLUME 47 | INT fx_xpos; // SOUND FX XPOS 48 | }FRAME; 49 | 50 | /************************************************************************* 51 | MOVIE_BPatch() Plays Sound FX in background for one anim 52 | *************************************************************************/ 53 | VOID 54 | MOVIE_BPatch ( 55 | INT soundfx 56 | ); 57 | 58 | /************************************************************************* 59 | MOVIE_ShowFrame () - Shows an animation frame 60 | *************************************************************************/ 61 | VOID 62 | MOVIE_ShowFrame ( 63 | BYTE * inpic // INPUT : pointer to animpic 64 | ); 65 | 66 | /************************************************************************* 67 | MOVIE_Play () - Playes an Animation 68 | *************************************************************************/ 69 | INT 70 | MOVIE_Play ( 71 | FRAME * frame, // INPUT : pointer to array of frame defs 72 | INT numplay, // INPUT : number of times to play 73 | BYTE * palette // INPUT : pointer to palette 74 | ); 75 | 76 | /************************************************************************* 77 | ANIM_Render () - Renders an ANIM FRAME 78 | *************************************************************************/ 79 | #pragma aux ANIM_Render "_*" modify [ EAX EBX ECX EDX ESI EDI ] 80 | VOID 81 | ANIM_Render ( 82 | BYTE * inmem 83 | ); 84 | 85 | #endif 86 |  -------------------------------------------------------------------------------- /SOURCE/MOVIE_A.ASM: -------------------------------------------------------------------------------- 1 | ;/**************************************************************************** 2 | ;* GFXapi - Graphic Library for 320x200 256 color vga/mcga 3 | ;*---------------------------------------------------------------------------- 4 | ;* Copyright (C) 1992 Scott Hostynski All Rights Reserved 5 | ;*---------------------------------------------------------------------------- 6 | ;* 7 | ;* Created by: Scott Host 8 | ;* Date: Oct, 1992 9 | ;* Modifed: Mar, 1993 ( made work with Watcom C ) 10 | ;* 11 | ;* CONTENTS: gfxapi.c gfxapi_a.asm gfxapi.h 12 | ;* 13 | ;* EXTERN MODULES - NONE 14 | ;* 15 | ;*---------------------------------------------------------------------------*/ 16 | .386 17 | .MODEL FLAT, C 18 | 19 | SCREENWIDTH = 320 20 | SCREENHEIGHT = 200 21 | 22 | ANIM_S_SIZE = 8 23 | 24 | .DATA 25 | 26 | EXTRN displaybuffer:DWORD 27 | EXTRN displayscreen:DWORD 28 | 29 | .CODE 30 | 31 | PUBLIC ANIM_Render 32 | 33 | ;************************************************************************* 34 | ;************************************************************************* 35 | ANIM_Render proc 36 | ; edx:inmem:DWORD 37 | 38 | mov edx, displaybuffer 39 | mov esi, eax ; arg2 40 | mov ecx, 0 41 | mov ebx, ecx 42 | 43 | ALIGN 4 44 | anim_loop: 45 | mov bx, WORD PTR [esi] 46 | cmp WORD PTR bx, 0H 47 | je anim_exit 48 | 49 | mov bx, WORD PTR + 04H[esi] 50 | mov cx, WORD PTR + 06H[esi] 51 | 52 | add esi, ANIM_S_SIZE 53 | mov edi, edx 54 | add edi, ebx 55 | 56 | mov eax, ecx 57 | and ecx, 03H 58 | rep movsb 59 | mov ecx, eax 60 | shr ecx, 02H 61 | rep movsd 62 | 63 | jmp anim_loop 64 | 65 | anim_exit: 66 | ret 67 | ENDP 68 | 69 | 70 | END 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 |  -------------------------------------------------------------------------------- /SOURCE/MSG.INC: -------------------------------------------------------------------------------- 1 | // MSG.INC defines 2 | 3 | #define INFO_WINDOW 0x0002 // WINDOW 4 | 5 | #define INFO_0000 0x0000 // BUMPIN 6 | #define INFO_0001 0x0001 // BUMPOUT 7 | #define INFO_0002 0x0002 // BUMPOUT 8 | #define INFO_0003 0x0003 // BUMPOUT 9 | #define INFO_0004 0x0004 // BUMPOUT 10 | #define INFO_MSG 0x0005 // DRAGBAR 11 | -------------------------------------------------------------------------------- /SOURCE/NEWCHAR.INC: -------------------------------------------------------------------------------- 1 | // NEWCHAR.INC defines 2 | 3 | #define _WINDOW 0x0000 // WINDOW 4 | 5 | #define _0000 0x0000 // INPUT FIELD 6 | -------------------------------------------------------------------------------- /SOURCE/OBJDEF.MIF: -------------------------------------------------------------------------------- 1 | 2 | OBJS = rap.obj & 3 | tile.obj & 4 | shots.obj & 5 | eshot.obj & 6 | shadows.obj & 7 | enemy.obj & 8 | flame.obj & 9 | objects.obj & 10 | bonus.obj & 11 | fx.obj & 12 | input.obj & 13 | anims.obj & 14 | movie.obj & 15 | store.obj & 16 | intro.obj & 17 | loadsave.obj & 18 | help.obj & 19 | windows.obj & 20 | tile_a.obj & 21 | movie_a.obj 22 | 23 | 24 | -------------------------------------------------------------------------------- /SOURCE/OKREG.INC: -------------------------------------------------------------------------------- 1 | // OKREG.INC defines 2 | 3 | #define OKREG_WINDOW 0x0002 // WINDOW 4 | 5 | #define OKREG_0000 0x0000 // BUMPIN 6 | #define OKREG_0001 0x0001 // BUMPIN 7 | #define OKREG_0002 0x0002 // ICON 8 | #define OKREG_0003 0x0003 // ICON 9 | #define OKREG_0004 0x0004 // ICON 10 | #define OKREG_0005 0x0005 // ICON 11 | #define OKREG_TRAIN 0x0006 // BUTTON FIELD 12 | #define OKREG_EASY 0x0007 // BUTTON FIELD 13 | #define OKREG_MED 0x0008 // BUTTON FIELD 14 | #define OKREG_HARD 0x0009 // BUTTON FIELD 15 | #define OKREG_ABORT 0x000a // BUTTON FIELD 16 | #define OKREG_000B 0x000b // TEXT FIELD 17 | -------------------------------------------------------------------------------- /SOURCE/OPTS.INC: -------------------------------------------------------------------------------- 1 | // OPTS.INC defines 2 | 3 | #define OPTS_WINDOW 0x0002 // WINDOW 4 | 5 | #define OPTS_0000 0x0000 // BUMPIN 6 | #define OPTS_0001 0x0001 // BUMPIN 7 | #define OPTS_0002 0x0002 // BUMPIN 8 | #define OPTS_PIC1 0x0003 // ICON 9 | #define OPTS_PIC2 0x0004 // ICON 10 | #define OPTS_PIC3 0x0005 // ICON 11 | #define OPTS_DETAIL 0x0006 // BUTTON FIELD 12 | #define OPTS_EXIT 0x0007 // BUTTON FIELD 13 | #define OPTS_0008 0x0008 // TEXT FIELD 14 | #define OPTS_0009 0x0009 // TEXT FIELD 15 | #define OPTS_000A 0x000a // TEXT FIELD 16 | #define OPTS_VMUSIC 0x000b // VIEW AREA 17 | #define OPTS_VFX 0x000c // VIEW AREA 18 | -------------------------------------------------------------------------------- /SOURCE/ORDER.INC: -------------------------------------------------------------------------------- 1 | // ORDER.INC defines 2 | 3 | #define _WINDOW 0x0000 // WINDOW 4 | 5 | #define _0000 0x0000 // ICON 6 | #define _0001 0x0001 // ICON 7 | #define _0002 0x0002 // ICON 8 | #define _0003 0x0003 // ICON 9 | #define _0004 0x0004 // ICON 10 | #define _0005 0x0005 // ICON 11 | #define _0006 0x0006 // TEXT FIELD 12 | -------------------------------------------------------------------------------- /SOURCE/PUBLIC.H: -------------------------------------------------------------------------------- 1 | #ifndef _PUBLIC 2 | #define _PUBLIC 3 | 4 | #define DMX_FLAG 1 5 | 6 | typedef enum 7 | { 8 | K_OK, 9 | K_NEXTFRAME, 10 | K_SKIPALL, 11 | K_EXITDOS 12 | }KEYOPTS; 13 | 14 | typedef enum 15 | { 16 | R_YESNO, 17 | R_QUANTITY 18 | }ASKBUY; 19 | 20 | typedef struct 21 | { 22 | BYTE b1; 23 | BYTE b2; 24 | BYTE b3; 25 | BYTE b4; 26 | SHORT px; 27 | SHORT py; 28 | SHORT playerpic; 29 | SHORT fil; 30 | }RECORD; 31 | 32 | typedef struct 33 | { 34 | CHAR name [ 20 ]; 35 | CHAR callsign [ 12 ]; 36 | INT id_pic; 37 | DWORD score; // MONEY/POINTS 38 | INT sweapon; // CURENT SPECIAL WEAPON 39 | INT cur_game; // CURRENT GAME 40 | INT game_wave[3]; // CURRENT WAVE 41 | INT numobjs; // NUMBER OF OBJECTS TO FOLLOW 42 | INT diff[4]; // DIFFICULTY LEVEL 43 | BOOL trainflag; 44 | BOOL fintrain; 45 | }PLAYEROBJ; 46 | 47 | #define END_DURATION ( 20 * 3 ) 48 | #define END_EXPLODE ( 24 ) 49 | #define END_FLYOFF ( 20 * 2 ) 50 | 51 | #define DIFF_0 0 // TRAINING MODE 52 | #define DIFF_1 1 // EASY MODE 53 | #define DIFF_2 2 // NORMAL MODE 54 | #define DIFF_3 3 // HARD MODE 55 | 56 | #define GAME1 ( gameflag[0] ) 57 | #define GAME2 ( gameflag[1] ) 58 | #define GAME3 ( gameflag[2] + gameflag[3] ) 59 | 60 | #define SHIELD_COLOR_RUN 9 61 | #define SHIELD_LOW 10 62 | 63 | #define PLAYERWIDTH 32 64 | #define PLAYERHEIGHT 32 65 | #define PLAYERMINX 5 66 | #define PLAYERMAXX 314 67 | #define PLAYERINITX 160-(PLAYERWIDTH/2) 68 | #define PLAYERINITY 160 69 | 70 | #define MINPLAYERY 0 71 | #define MAXPLAYERY 160 72 | 73 | #define GREEN 100 74 | #define RED 34 75 | #define YELLOW 50 76 | 77 | #define MAP_ABORT -1 78 | #define MAP_NEXT -2 79 | 80 | //#define MAX_BADGUYS 300 81 | #define MAX_ONSCREEN 30 82 | 83 | /*************************************************************************** 84 | InitMobj() - Inits an object to be moved 85 | ***************************************************************************/ 86 | VOID 87 | InitMobj( 88 | MOVEOBJ * cur // INPUT : pointer to MOVEOBJ 89 | ); 90 | 91 | /*************************************************************************** 92 | MoveMobj() - gets next postion for an Object 93 | ***************************************************************************/ 94 | VOID 95 | MoveMobj( 96 | MOVEOBJ * cur // INPUT : pointer to MOVEOBJ 97 | ); 98 | 99 | /*************************************************************************** 100 | MoveSobj() - gets next postion for an Object at speed 101 | ***************************************************************************/ 102 | INT 103 | MoveSobj( 104 | MOVEOBJ * cur, // INPUT : pointer to MOVEOBJ 105 | INT speed // INPUT : speed to plot at 106 | ); 107 | 108 | /*************************************************************************** 109 | AskExit () - Opens Windows and Askes if USer wants 2 quit 110 | ***************************************************************************/ 111 | VOID 112 | AskExit ( 113 | VOID 114 | ); 115 | 116 | /*************************************************************************** 117 | Do_Game () - The main game thing this is it dude 118 | ***************************************************************************/ 119 | BOOL // TRUE=Aborted, FALSE = timeout 120 | Do_Game ( 121 | VOID 122 | ); 123 | 124 | extern PLAYEROBJ plr ; 125 | extern INT choose_special [] ; 126 | extern INT cur_special ; 127 | extern INT player_cx ; 128 | extern INT player_cy ; 129 | extern INT playerx ; 130 | extern INT playery ; 131 | extern INT playerbasepic ; 132 | extern INT playerpic ; 133 | extern INT numbadguys ; 134 | extern INT cur_game ; 135 | extern INT game_wave[4] ; 136 | extern MAZELEVEL * ml ; 137 | 138 | extern BYTE * palette; 139 | extern INT o_engine []; 140 | extern INT o_gun1 []; 141 | extern INT o_gun2 []; 142 | extern INT o_gun3 []; 143 | extern FLATS * flatlib []; 144 | extern BOOL startfadeflag; 145 | extern BYTE * patch1; 146 | extern BYTE * patch2; 147 | extern BOOL end_wave; 148 | extern INT gl_cnt; 149 | extern BOOL testflag; 150 | extern BOOL gameflag[]; 151 | extern INT startendwave; 152 | extern BOOL reg_flag; 153 | extern BOOL lowmem_flag; 154 | extern INT curplr_diff; 155 | extern BOOL bday_flag; 156 | extern INT bday_num; 157 | extern INT demo_flag; 158 | 159 | #endif 160 | 161 |  -------------------------------------------------------------------------------- /SOURCE/RAP.BAT: -------------------------------------------------------------------------------- 1 | CLS 2 | @ECHO OFF 3 | ECHO STAY OUT OF MY STUFF !!!! 4 |  -------------------------------------------------------------------------------- /SOURCE/RAPTOR.H: -------------------------------------------------------------------------------- 1 | #ifndef _TYPES_H 2 | #include "types.h" 3 | #endif 4 | 5 | #include "exitapi.h" 6 | #include "gfxapi.h" 7 | #include "ptrapi.h" 8 | #include "kbdapi.h" 9 | #include "glbapi.h" 10 | #include "swdapi.h" 11 | #include "tsmapi.h" 12 | #include "imsapi.h" 13 | #include "vmemapi.h" 14 | 15 | #define MAX_SHIELD 100 16 | #define MAX_SUPER 100 17 | 18 | #ifndef _FLAMES_H 19 | #include "flame.h" 20 | #endif 21 | 22 | #ifndef _INTRO_H 23 | #include "intro.h" 24 | #endif 25 | 26 | #ifndef _MAPHEADER 27 | #include "map.h" 28 | #endif 29 | 30 | #ifndef _FXAPI 31 | #include "fx.h" 32 | #endif 33 | 34 | #ifndef _PUBLIC 35 | #include "public.h" 36 | #endif 37 | 38 | #ifdef DMX_FLAG 39 | #include "dmx.h" 40 | #endif 41 | 42 | #ifndef _ENEMY 43 | #include "enemy.h" 44 | #endif 45 | 46 | #ifndef _SHADOWS 47 | #include "shadows.h" 48 | #endif 49 | 50 | #ifndef _TILEAPI 51 | #include "tile.h" 52 | #endif 53 | 54 | #ifndef _OBJAPI 55 | #include "objects.h" 56 | #endif 57 | 58 | #ifndef _BONUSAPI 59 | #include "bonus.h" 60 | #endif 61 | 62 | #ifndef _STOREAPI 63 | #include "store.h" 64 | #endif 65 | 66 | #ifndef _ANIMAPI 67 | #include "anims.h" 68 | #endif 69 | 70 | #ifndef _SHOTSAPI 71 | #include "shots.h" 72 | #endif 73 | 74 | #ifndef _ESHOTAPI 75 | #include "eshot.h" 76 | #endif 77 | 78 | #ifndef _MOVIE 79 | #include "movie.h" 80 | #endif 81 | 82 | #ifndef _INPUT_H 83 | #include "input.h" 84 | #endif 85 | 86 | #ifndef _LOADSAVE_H 87 | #include "loadsave.h" 88 | #endif 89 | 90 | #ifndef _HELP_H 91 | #include "help.h" 92 | #endif 93 | 94 | #ifndef _WINDOW_H 95 | #include "windows.h" 96 | #endif 97 | 98 |  -------------------------------------------------------------------------------- /SOURCE/REGIST.INC: -------------------------------------------------------------------------------- 1 | // REGIST.INC defines 2 | 3 | #define REG_WINDOW 0x0000 // WINDOW 4 | 5 | #define REG_IDPIC 0x0000 // ICON 6 | #define REG_NAME 0x0001 // INPUT FIELD 7 | #define REG_CALLSIGN 0x0002 // INPUT FIELD 8 | #define REG_TEXT 0x0003 // TEXT FIELD 9 | #define REG_VIEWEXIT 0x0004 // VIEW AREA 10 | #define REG_VIEWID 0x0005 // VIEW AREA 11 | #define REG_VIEWREG 0x0006 // VIEW AREA 12 | -------------------------------------------------------------------------------- /SOURCE/REGVER.H: -------------------------------------------------------------------------------- 1 | #define REG_VERSION 1 2 | -------------------------------------------------------------------------------- /SOURCE/SHADOWS.H: -------------------------------------------------------------------------------- 1 | #ifndef _SHADOWS 2 | #define _SHADOWS 3 | 4 | extern INT num_shadows; 5 | extern INT num_gshadows; 6 | 7 | /*************************************************************************** 8 | SHADOW_Draw () - Draws AIR shadows in 3D perspective 9 | ***************************************************************************/ 10 | VOID 11 | SHADOW_Draw ( 12 | BYTE * pic, // INPUT : pointer to sprite data 13 | INT x, // INPUT : x position of sprite 14 | INT y // INPUT : y position of sprite 15 | ); 16 | 17 | /*************************************************************************** 18 | SHADOW_Init() - Allocate memory and set 3D view 19 | ***************************************************************************/ 20 | VOID 21 | SHADOW_Init ( 22 | VOID 23 | ); 24 | 25 | /*************************************************************************** 26 | SHADOW_MakeShades() - Make shade tables 27 | ***************************************************************************/ 28 | VOID 29 | SHADOW_MakeShades ( 30 | VOID 31 | ); 32 | 33 | /*************************************************************************** 34 | SHADOW_Add() - Add a Air ship shadow 35 | ***************************************************************************/ 36 | VOID 37 | SHADOW_Add ( 38 | DWORD item, // INPUT : GLB item 39 | INT x, // INPUT : x position 40 | INT y // INPUT : y position 41 | ); 42 | 43 | /*************************************************************************** 44 | SHADOW_GAdd() - Adds Ground shadow 45 | ***************************************************************************/ 46 | VOID 47 | SHADOW_GAdd ( 48 | DWORD item, // INPUT : GLB item 49 | INT x, // INPUT : x position 50 | INT y // INPUT : y position 51 | ); 52 | 53 | /*************************************************************************** 54 | SHADOW_DisplaySky () - Display Sky Shadows 55 | ***************************************************************************/ 56 | VOID 57 | SHADOW_DisplaySky ( 58 | VOID 59 | ); 60 | 61 | /*************************************************************************** 62 | SHADOW_DisplayGround() - Display Ground Shadows 63 | ***************************************************************************/ 64 | VOID 65 | SHADOW_DisplayGround ( 66 | VOID 67 | ); 68 | 69 | VOID SHADOW_Clear ( VOID ); 70 | 71 | #define SHADOW_Clear() ( num_shadows = num_gshadows = 0 ) 72 | 73 | #endif 74 |  -------------------------------------------------------------------------------- /SOURCE/SHIPCOMP.INC: -------------------------------------------------------------------------------- 1 | // SHIPCOMP.INC defines 2 | 3 | #define COMP_WINDOW 0x0000 // WINDOW 4 | 5 | #define COMP_LITE1 0x0000 // ICON 6 | #define COMP_LITE2 0x0001 // ICON 7 | #define COMP_LITE3 0x0002 // ICON 8 | #define COMP_CLOSE 0x0003 // CLOSE GADGET 9 | #define COMP_GAME1 0x0004 // BUTTON FIELD 10 | #define COMP_GAME2 0x0005 // BUTTON FIELD 11 | #define COMP_SECRET 0x0006 // BUTTON FIELD 12 | #define COMP_B1 0x0007 // BUTTON FIELD 13 | #define COMP_B2 0x0008 // BUTTON FIELD 14 | #define COMP_B3 0x0009 // BUTTON FIELD 15 | #define COMP_GAME3 0x000a // BUTTON FIELD 16 | #define COMP_AUTO 0x000b // BUTTON FIELD 17 | -------------------------------------------------------------------------------- /SOURCE/SHOTS.H: -------------------------------------------------------------------------------- 1 | #define MAX_SHOTS 70 2 | 3 | #ifndef _OBJAPI 4 | #include "objects.h" 5 | #endif 6 | 7 | #ifndef _SHOTSAPI 8 | #define _SHOTSAPI 9 | 10 | typedef enum 11 | { 12 | S_ALL, 13 | S_AIR, 14 | S_GROUND, 15 | S_GRALL, 16 | S_GTILE, 17 | S_SUCK 18 | }HIT_TYPE; 19 | 20 | typedef enum 21 | { 22 | S_SHOOT, 23 | S_LINE, 24 | S_BEAM 25 | }BEAM_TYPE; 26 | 27 | typedef struct 28 | { 29 | DWORD lumpnum; // LUMPNUM OF PIC(S) 30 | BYTE * pic[ 10 ]; // POINTER TO PIC 31 | BOOL shadow; // SHADOW ON/OFF 32 | OBJ_TYPE type; // SHOT TYPE 33 | INT hits; // DAMAGE SHOT WILL DO 34 | INT speed; // START SPEED 35 | INT maxspeed; // MAXIMUM SPEED 36 | INT startframe; // START ANIM ON FRAME 37 | INT numframes; // NUMBER OF FRAMES OF ANIM 38 | INT shoot_rate; // SHOOT EVERY (N) FRAMES 39 | INT cur_shoot; // HOLDS FRAME COUNT DOWN 40 | BOOL delayflag; // DEALAYED ANIM START 41 | BOOL smoke; // SMOKE TRAIL 42 | BOOL use_plot; // TRUE = PLOT X,Y ( SLOWER ) 43 | BOOL move_flag; // DOES SHOT NEED MOVEMENT 44 | HIT_TYPE ht; // SHOT HIT TYPE ( AIR/GROUND ) 45 | BOOL fplrx; // FOLLOW PLAYER X POS 46 | BOOL fplry; // FOLLOW PLAYER Y POS 47 | BOOL meffect; // TRACK MOVE TO FIND HIT ? 48 | BEAM_TYPE beam; // BEAM WEAPON TYPE 49 | GFX_PIC * h; 50 | INT hlx; 51 | INT hly; 52 | }SHOT_LIB; 53 | 54 | typedef struct SHOTS_S 55 | { 56 | struct SHOTS_S * prev; // Link List Prev 57 | struct SHOTS_S * next; // Link List Next 58 | BYTE * pic; // pointer to cur frame pic 59 | INT x; // cur shot center x 60 | INT y; // cur shot center y 61 | MOVEOBJ move; // MOVE stuff 62 | INT speed; // cur speed 63 | INT curframe; // current anim frame 64 | BOOL doneflag; // shot done = TRUE 65 | BOOL delayflag; // DEALAYED ANIM START 66 | INT startx; // PLAYER X OFFSET; 67 | INT starty; // PLAYER Y OFFSET; 68 | SHOT_LIB * lib; 69 | INT cnt; 70 | }SHOTS; 71 | 72 | /*************************************************************************** 73 | SHOTS_Clear () * Clears out SHOTS Linklist 74 | ***************************************************************************/ 75 | VOID 76 | SHOTS_Clear ( 77 | VOID 78 | ); 79 | 80 | /*************************************************************************** 81 | SHOTS_Init () - Inits SHOTS system and clears link list 82 | ***************************************************************************/ 83 | VOID 84 | SHOTS_Init ( 85 | VOID 86 | ); 87 | 88 | /*************************************************************************** 89 | SHOTS_PlayerShoot() - Shoots the specified weapon 90 | ***************************************************************************/ 91 | BOOL 92 | SHOTS_PlayerShoot ( 93 | OBJ_TYPE type // INPUT : OBJECT TYPE 94 | ); 95 | 96 | /*************************************************************************** 97 | SHOTS_Think () - Does All Thinking for shot system 98 | ***************************************************************************/ 99 | VOID 100 | SHOTS_Think ( 101 | VOID 102 | ); 103 | 104 | /*************************************************************************** 105 | SHOTS_Display () - Displays All active Shots 106 | ***************************************************************************/ 107 | VOID 108 | SHOTS_Display ( 109 | VOID 110 | ); 111 | 112 | #endif 113 |  -------------------------------------------------------------------------------- /SOURCE/STORE.H: -------------------------------------------------------------------------------- 1 | #ifndef _STOREAPI 2 | #define _STOREAPI 3 | 4 | /*************************************************************************** 5 | STORE_Init () - Inits Store Things 6 | ***************************************************************************/ 7 | VOID 8 | STORE_Init ( 9 | VOID 10 | ); 11 | 12 | /*************************************************************************** 13 | STORE_Enter () - Lets User go in store and buy and sell things 14 | ***************************************************************************/ 15 | VOID 16 | STORE_Enter ( 17 | VOID 18 | ); 19 | 20 | #endif 21 |  -------------------------------------------------------------------------------- /SOURCE/STORE.INC: -------------------------------------------------------------------------------- 1 | // STORE.INC defines 2 | 3 | #define STOR_WINDOW 0x0000 // WINDOW 4 | #define STOR_ID 0x0000 // ICON 5 | #define STOR_CALLSIGN 0x0001 // DRAGBAR 6 | #define STOR_PREV 0x0002 // BUTTON FIELD 7 | #define STOR_NEXT 0x0003 // BUTTON FIELD 8 | #define STOR_BUY 0x0004 // BUTTON FIELD 9 | #define STOR_BUYIT 0x0005 // BUTTON FIELD 10 | #define STOR_SELL 0x0006 // BUTTON FIELD 11 | #define STOR_COMP 0x0007 // TEXT FIELD 12 | #define STOR_TEXT 0x0008 // TEXT FIELD 13 | #define STOR_COST 0x0009 // TEXT FIELD 14 | #define STOR_SCORE 0x000a // TEXT FIELD 15 | #define STOR_STATS 0x000b // TEXT FIELD 16 | #define STOR_TEXTCOST 0x000c // TEXT FIELD 17 | #define STOR_NUM 0x000d // TEXT FIELD 18 | #define STOR_VBUY 0x000e // VIEW AREA 19 | #define STOR_VPREV 0x000f // VIEW AREA 20 | #define STOR_VNEXT 0x0010 // VIEW AREA 21 | #define STOR_VSCREEN 0x0011 // VIEW AREA 22 | #define STOR_VACCEPT 0x0012 // VIEW AREA 23 | #define STOR_VSELL 0x0013 // VIEW AREA 24 | #define STOR_VEXIT 0x0014 // VIEW AREA 25 |  -------------------------------------------------------------------------------- /SOURCE/TEMP.C: -------------------------------------------------------------------------------- 1 | PTR_DrawCursor ( FALSE ); 2 | GFX_FadeOut ( 0, 0, 0, 64 ); 3 | memset ( displaybuffer, 0, 64000 ); 4 | GFX_MarkUpdate ( 0, 0, 320, 200 ); 5 | GFX_DisplayUpdate(); 6 | GFX_SetPalette ( palette, 0 ); 7 | SND_PlaySong ( SONG11_MUS ); 8 | INTRO_PlayMain(); 9 | SWD_ShowAllWindows(); 10 | GFX_DisplayUpdate(); 11 | GFX_FadeIn ( palette, 64 ); 12 | PTR_DrawCursor ( TRUE ); 13 |  -------------------------------------------------------------------------------- /SOURCE/TILE_A.ASM: -------------------------------------------------------------------------------- 1 | ;/**************************************************************************** 2 | ;* PTRapi - Cursor routines 3 | ;*---------------------------------------------------------------------------- 4 | ;* Copyright (C) 1992 Scott Hostynski All Rights Reserved 5 | ;*---------------------------------------------------------------------------- 6 | ;* 7 | ;* Created by: Scott Host 8 | ;* Date: Oct, 1992 9 | ;* Modifed: Mar, 1993 ( made work with Watcom C ) 10 | ;* 11 | ;* 12 | ;* CONTENTS: ptrapi.c ptrapi_a.asm ptrapi.h 13 | ;* 14 | ;* EXTERN MODULES - GFX, TSM and MOUSE.LIB 15 | ;* 16 | ;*---------------------------------------------------------------------------*/ 17 | .386 18 | .MODEL FLAT, C 19 | 20 | SCREENWIDTH = 320 21 | SCREENHEIGHT = 200 22 | 23 | TILEWIDTH = 32 24 | TILEHEIGHT = 32 25 | MAP_LEFT = 16; 26 | 27 | .DATA 28 | 29 | EXTRN tileloopy:DWORD 30 | EXTRN displaybuffer:DWORD 31 | EXTRN displayscreen:DWORD 32 | EXTRN g_mapleft:DWORD 33 | 34 | .CODE 35 | 36 | EXTRN tilepic:DWORD 37 | EXTRN tilestart:DWORD 38 | 39 | PUBLIC TILE_Draw 40 | PUBLIC TILE_ClipDraw 41 | PUBLIC TILE_DisplayScreen 42 | PUBLIC TILE_ShakeScreen 43 | 44 | ;========================================================================= 45 | ;TILE_Draw Fast 32 by 32 Tile draw 46 | ;========================================================================= 47 | TILE_Draw proc 48 | 49 | mov esi, [tilepic] 50 | mov edi, [tilestart] 51 | 52 | mov ebx, (TILEWIDTH/4) 53 | mov edx, SCREENWIDTH - TILEWIDTH 54 | 55 | REPT TILEHEIGHT - 1 56 | mov ecx, ebx 57 | rep movsd 58 | add edi, edx 59 | ENDM 60 | mov ecx, ebx 61 | rep movsd 62 | 63 | ret 64 | ENDP 65 | 66 | ;========================================================================= 67 | ; 68 | ;========================================================================= 69 | TILE_ClipDraw proc 70 | 71 | mov esi, [tilepic] 72 | mov edi, [tilestart] 73 | 74 | mov eax, (TILEWIDTH/4) 75 | mov edx, SCREENWIDTH - TILEWIDTH 76 | mov ebx, tileloopy 77 | dec ebx 78 | 79 | ALIGN 4 80 | ClipDraw: 81 | mov ecx, eax 82 | rep movsd 83 | add edi, edx 84 | dec ebx 85 | jns ClipDraw 86 | 87 | ret 88 | ENDP 89 | 90 | 91 | ;************************************************************************* 92 | ;************************************************************************* 93 | TILE_ShakeScreen proc 94 | 95 | mov esi, [displaybuffer] 96 | mov edi, [displayscreen] 97 | 98 | add esi, MAP_LEFT - 4 99 | add edi, g_mapleft 100 | sub edi, 4 101 | 102 | mov eax, (296/4) 103 | mov edx, 24 104 | REPT 200 105 | mov ecx, eax 106 | rep movsd 107 | add edi, edx 108 | add esi, edx 109 | ENDM 110 | 111 | ret 112 | ENDP 113 | 114 | ;************************************************************************* 115 | ;************************************************************************* 116 | TILE_DisplayScreen proc 117 | 118 | mov esi, [displaybuffer] 119 | mov edi, [displayscreen] 120 | 121 | add esi, MAP_LEFT 122 | add edi, MAP_LEFT 123 | 124 | mov eax, (288/4) 125 | mov edx, 32 126 | REPT 200 127 | mov ecx, eax 128 | rep movsd 129 | add edi, edx 130 | add esi, edx 131 | ENDM 132 | 133 | ret 134 | ENDP 135 | 136 | END 137 | 138 | 139 | 140 | 141 | 142 | 143 |  -------------------------------------------------------------------------------- /SOURCE/WINDOWS.H: -------------------------------------------------------------------------------- 1 | #ifndef _WINDOW_H 2 | #define _WINDOW_H 3 | 4 | /*************************************************************************** 5 | WIN_WinGame () - WIndow text for winners of a game 6 | ***************************************************************************/ 7 | VOID 8 | WIN_WinGame ( 9 | INT game // INPUT : game number 0,1,2 10 | ); 11 | 12 | /*************************************************************************** 13 | WIN_Msg () - Display a Message for ten secs or until user Acks somting 14 | ***************************************************************************/ 15 | VOID 16 | WIN_Msg ( 17 | CHAR * msg // INPUT : pointer to message to ask 18 | ); 19 | 20 | /*************************************************************************** 21 | WIN_Pause () - Display a Pause Message Wait until user does somthing 22 | ***************************************************************************/ 23 | VOID 24 | WIN_Pause ( 25 | VOID 26 | ); 27 | 28 | /*************************************************************************** 29 | WIN_Order () - Display a Pause Message Wait until user does somthing 30 | ***************************************************************************/ 31 | VOID 32 | WIN_Order ( 33 | VOID 34 | ); 35 | 36 | /*************************************************************************** 37 | WIN_AskBool () - Askes USER a YES/NO Question???? 38 | ***************************************************************************/ 39 | BOOL // RETURN: TRUE/FALSE 40 | WIN_AskBool ( 41 | CHAR * question // INPUT : pointer to message to ask 42 | ); 43 | 44 | /*************************************************************************** 45 | WIN_AskExit () - Opens Windows and Askes if USer wants 2 quit 46 | ***************************************************************************/ 47 | VOID 48 | WIN_AskExit ( 49 | VOID 50 | ); 51 | 52 | /*************************************************************************** 53 | WIN_MainMenu () - Main Menu 54 | ***************************************************************************/ 55 | VOID 56 | WIN_MainMenu ( 57 | VOID 58 | ); 59 | 60 | /*************************************************************************** 61 | WIN_Register () - Register Window 62 | ***************************************************************************/ 63 | BOOL 64 | RAP_Register ( 65 | VOID 66 | ); 67 | 68 | /*************************************************************************** 69 | WIN_Locker () - Locker Room Window 70 | ***************************************************************************/ 71 | INT 72 | RAP_Locker ( 73 | VOID 74 | ); 75 | 76 | /*************************************************************************** 77 | WIN_Hangar() - Does the hanger dude 78 | ***************************************************************************/ 79 | INT 80 | WIN_Hangar ( 81 | VOID 82 | ); 83 | 84 | /*************************************************************************** 85 | WIN_ShipComp () - Does Game Selection 1, 2 or 3 86 | ***************************************************************************/ 87 | BOOL 88 | WIN_ShipComp ( 89 | VOID 90 | ); 91 | 92 | /*************************************************************************** 93 | WIN_LoadComp() - Shows computer loading screen 94 | ***************************************************************************/ 95 | VOID 96 | WIN_LoadComp ( 97 | VOID 98 | ); 99 | 100 | /*************************************************************************** 101 | WIN_SetLoadLevel() 102 | ***************************************************************************/ 103 | VOID 104 | WIN_SetLoadLevel ( 105 | INT level 106 | ); 107 | 108 | /*************************************************************************** 109 | WIN_EndLoad () - Shows Ship computer while loading level 110 | ***************************************************************************/ 111 | VOID 112 | WIN_EndLoad ( 113 | VOID 114 | ); 115 | 116 | /*************************************************************************** 117 | WIN_MainLoop() - Handles Locker/Register/Store/Hangar and starting game 118 | ***************************************************************************/ 119 | VOID 120 | WIN_MainLoop ( 121 | VOID 122 | ); 123 | 124 | extern DWORD id_pics[4]; 125 | 126 | typedef enum 127 | { 128 | DEM_INTRO, 129 | DEM_CREDITS, 130 | DEM_DEMO1G1, 131 | DEM_DEMO2G1, 132 | DEM_DEMO3G1, 133 | DEM_DEMO1G2, 134 | DEM_DEMO2G2, 135 | DEM_DEMO3G2, 136 | DEM_DEMO1G3, 137 | DEM_DEMO2G3, 138 | DEM_DEMO3G3 139 | } DEMOTYPE; 140 | 141 | extern INT opt_detail; 142 | 143 | #endif 144 | 145 | 146 | 147 | 148 |  -------------------------------------------------------------------------------- /SOURCE/WINGAME.INC: -------------------------------------------------------------------------------- 1 | // WINGAME.INC defines 2 | 3 | #define WIN_WINDOW 0x0000 // WINDOW 4 | 5 | #define WIN_0000 0x0000 // BUMPIN 6 | #define WIN_0001 0x0001 // CLOSE GADGET 7 | #define WIN_TEXT 0x0002 // TEXT FIELD 8 | -------------------------------------------------------------------------------- /apodmx/APODMX.LIB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skynettx/dosraptor/4403569505c215c6cebe02cc3344e670499def1d/apodmx/APODMX.LIB -------------------------------------------------------------------------------- /apodmx/DMX.H: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2015 Alexey Khokholov (Nuke.YKT) 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. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef _DMX_H_ 16 | #define _DMX_H_ 17 | 18 | #include "tsmapi.h" 19 | 20 | typedef int SFX_HANDLE; 21 | 22 | int AL_DetectFM(void); 23 | int MPU_Init(int addr); 24 | int GUS_Init(void); 25 | void GUS_Shutdown(void); 26 | 27 | void MUS_PauseSong(int handle); 28 | void MUS_ResumeSong(int handle); 29 | void MUS_SetMasterVolume(int volume); 30 | int MUS_RegisterSong(void *data); 31 | int MUS_UnregisterSong(int handle); 32 | int MUS_QrySongPlaying(int handle); 33 | int MUS_StopSong(int handle); 34 | int MUS_ChainSong(int handle, int next); 35 | int MUS_PlaySong(int handle, int volume); 36 | int MUS_FadeInSong(int handle, int ms); 37 | int MUS_FadeOutSong(int handle, int ms); 38 | int SFX_PlayPatch(void *vdata, int pitch, int sep, int vol, int unk1, int unk2); 39 | void SFX_StopPatch(int handle); 40 | int SFX_Playing(int handle); 41 | void SFX_SetOrigin(int handle, int pitch, int sep, int vol); 42 | int GF1_Detect(void); 43 | void GF1_SetMap(void *data, int len); 44 | int SB_Detect(int *port, int *irq, int *dma, int *unk); 45 | void SB_SetCard(int port, int irq, int dma); 46 | int AL_Detect(int *port, int *unk); 47 | void AL_SetCard(int port, void *data); 48 | int MPU_Detect(int *port, int *unk); 49 | void MPU_SetCard(int port); 50 | int DMX_Init(int rate, int maxsng, int mdev, int sdev); 51 | void DMX_DeInit(void); 52 | void WAV_PlayMode(int channels, int samplerate); 53 | int CODEC_Detect(int *a, int *b); 54 | int ENS_Detect(void); 55 | int MV_Detect(void); 56 | 57 | 58 | #define AHW_PC_SPEAKER 1 59 | #define AHW_ADLIB 2 60 | #define AHW_AWE32 4 61 | #define AHW_SOUND_BLASTER 8 62 | #define AHW_MPU_401 16 63 | #define AHW_ULTRA_SOUND 32 64 | #define AHW_MEDIA_VISION 64 65 | #define AHW_ENSONIQ 256 66 | #define AHW_CODEC 512 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /apodmx/DPMIAPI.C: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 1993-1996 Id Software, Inc. 3 | // Copyright (C) 1993-2008 Raven Software 4 | // Copyright (C) 2015-2021 Nuke.YKT 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | #include 17 | #include "dpmiapi.h" 18 | 19 | int DPMI_LockMemory(void *address, unsigned length); 20 | int DPMI_UnlockMemory(void *address, unsigned length); 21 | 22 | int _dpmi_lockregion(void *address, unsigned length) 23 | { 24 | return DPMI_LockMemory(address, length); 25 | } 26 | 27 | int _dpmi_unlockregion(void *address, unsigned length) 28 | { 29 | return DPMI_UnlockMemory(address, length); 30 | } 31 | 32 | int _dpmi_dosalloc(unsigned short size, unsigned int* segment) 33 | { 34 | char *ptr; 35 | int i; 36 | int ret = DPMI_GetDOSMemory(&ptr, &i, size << 4); 37 | if (!ret) 38 | *segment = (unsigned int)ptr >> 4; 39 | return ret; 40 | } 41 | 42 | static struct SREGS segregs; 43 | static union REGS regs; 44 | 45 | int _dpmi_getmemsize(void) 46 | { 47 | int meminfo[32]; 48 | int heap; 49 | 50 | memset (meminfo,0,sizeof(meminfo)); 51 | segread(&segregs); 52 | segregs.es = segregs.ds; 53 | regs.w.ax = 0x500; // get memory info 54 | regs.x.edi = (int)&meminfo; 55 | int386x( 0x31, ®s, ®s, &segregs ); 56 | 57 | heap = meminfo[0]; 58 | 59 | return heap; 60 | } 61 | -------------------------------------------------------------------------------- /apodmx/DPMIAPI.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: DPMI.H 22 | 23 | author: James R. Dose 24 | date: March 31, 1994 25 | 26 | Inline functions for performing DPMI calls. 27 | 28 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 29 | **********************************************************************/ 30 | 31 | #ifndef __DPMI_H 32 | #define __DPMI_H 33 | 34 | /* These functions simply call DPMI_LockMemory and DPMI_UnlockMemory, 35 | respectively. They're used for compatibility with existing sources or 36 | object files that use any of the _dpmi_lockregion and _dpmi_unlockregion 37 | symbols, and would be incompatible if these were simply defined as macros. */ 38 | int _dpmi_lockregion(void *address, unsigned length); 39 | int _dpmi_unlockregion(void *address, unsigned length); 40 | int _dpmi_dosalloc(unsigned short size, unsigned int *segment); 41 | int _dpmi_getmemsize(void); 42 | 43 | enum DPMI_Errors 44 | { 45 | DPMI_Warning = -2, 46 | DPMI_Error = -1, 47 | DPMI_Ok = 0 48 | }; 49 | 50 | typedef struct 51 | { 52 | unsigned long EDI; 53 | unsigned long ESI; 54 | unsigned long EBP; 55 | unsigned long Reserved; 56 | unsigned long EBX; 57 | unsigned long EDX; 58 | unsigned long ECX; 59 | unsigned long EAX; 60 | unsigned short Flags; 61 | unsigned short ES; 62 | unsigned short DS; 63 | unsigned short FS; 64 | unsigned short GS; 65 | unsigned short IP; 66 | unsigned short CS; 67 | unsigned short SP; 68 | unsigned short SS; 69 | } dpmi_regs; 70 | 71 | unsigned long DPMI_GetRealModeVector( int num ); 72 | void DPMI_SetRealModeVector( int num, unsigned long vector ); 73 | int DPMI_CallRealModeFunction( dpmi_regs *callregs ); 74 | int DPMI_GetDOSMemory( void **ptr, int *descriptor, unsigned length ); 75 | int DPMI_FreeDOSMemory( int descriptor ); 76 | int DPMI_LockMemory( void *address, unsigned length ); 77 | int DPMI_LockMemoryRegion( void *start, void *end ); 78 | int DPMI_UnlockMemory( void *address, unsigned length ); 79 | int DPMI_UnlockMemoryRegion( void *start, void *end ); 80 | 81 | #define DPMI_Lock( variable ) \ 82 | ( DPMI_LockMemory( &( variable ), sizeof( variable ) ) ) 83 | 84 | #define DPMI_Unlock( variable ) \ 85 | ( DPMI_UnlockMemory( &( variable ), sizeof( variable ) ) ) 86 | 87 | #pragma aux DPMI_GetDOSMemory = \ 88 | "mov eax, 0100h", \ 89 | "add ebx, 15", \ 90 | "shr ebx, 4", \ 91 | "int 31h", \ 92 | "jc DPMI_Exit", \ 93 | "movzx eax, ax", \ 94 | "shl eax, 4", \ 95 | "mov [ esi ], eax", \ 96 | "mov [ edi ], edx", \ 97 | "sub eax, eax", \ 98 | "DPMI_Exit:", \ 99 | parm [ esi ] [ edi ] [ ebx ] modify exact [ eax ebx edx ]; 100 | 101 | #pragma aux DPMI_FreeDOSMemory = \ 102 | "mov eax, 0101h", \ 103 | "int 31h", \ 104 | "jc DPMI_Exit", \ 105 | "sub eax, eax", \ 106 | "DPMI_Exit:", \ 107 | parm [ edx ] modify exact [ eax ]; 108 | 109 | #endif 110 | -------------------------------------------------------------------------------- /apodmx/MAKEFILE: -------------------------------------------------------------------------------- 1 | # Apogee Sound System backed DMX wrapper makefile 2 | 3 | # -------------------------------------------------------------------------- 4 | # 5 | # 4r use 80486 timings and register argument passing 6 | # c compile only 7 | # d1 include line number debugging information 8 | # d2 include full sybolic debugging information 9 | # ei force enums to be of type int 10 | # j change char default from unsigned to signed 11 | # oa relax aliasing checking 12 | # od do not optimize 13 | # oe[=#] expand functions inline, # = quads (default 20) 14 | # oi use the inline library functions 15 | # om generate inline 80x87 code for math functions 16 | # ot optimize for time 17 | # ox maximum optimization 18 | # s remove stack overflow checks 19 | # zp1 align structures on bytes 20 | # zq use quiet mode 21 | # /i=dir add include directories 22 | # 23 | # -------------------------------------------------------------------------- 24 | 25 | CCOPTS = /d2 /omaxet /zp1 /4r /ei /j /zq 26 | 27 | GLOBOBJS = & 28 | dmx.obj & 29 | dpmiapi.obj & 30 | usrhooks.obj & 31 | mus2mid.obj & 32 | tsmapi.obj 33 | 34 | apodmx.lib : $(GLOBOBJS) 35 | wlib $^@ /n /b $< 36 | 37 | tsmapi.obj : tsmapi.c 38 | wcc386 $(CCOPTS) /zu tsmapi 39 | 40 | .c.obj : 41 | wcc386 $(CCOPTS) $[* 42 | 43 | clean : .SYMBOLIC 44 | del *.obj 45 | del *.lib 46 | -------------------------------------------------------------------------------- /apodmx/MUS2MID.H: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // Copyright(C) 2006 Ben Ryves 2006 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // 17 | // mus2mid.h - Ben Ryves 2006 - http://benryves.com - benryves@benryves.com 18 | // Use to convert a MUS file into a single track, type 0 MIDI file. 19 | 20 | #ifndef MUS2MID_H 21 | #define MUS2MID_H 22 | 23 | int mus2mid(FILE *musinput, FILE *midioutput, int rate, int adlibhack); 24 | 25 | #endif /* #ifndef MUS2MID_H */ 26 | 27 | -------------------------------------------------------------------------------- /apodmx/MUSIC.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: MUSIC.H 22 | 23 | author: James R. Dose 24 | date: March 25, 1994 25 | 26 | Public header for MUSIC.C 27 | 28 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 29 | **********************************************************************/ 30 | 31 | #ifndef __MUSIC_H 32 | #define __MUSIC_H 33 | 34 | #include "sndcards.h" 35 | 36 | extern int MUSIC_ErrorCode; 37 | 38 | enum MUSIC_ERRORS 39 | { 40 | MUSIC_Warning = -2, 41 | MUSIC_Error = -1, 42 | MUSIC_Ok = 0, 43 | MUSIC_ASSVersion, 44 | MUSIC_SoundCardError, 45 | MUSIC_MPU401Error, 46 | MUSIC_InvalidCard, 47 | MUSIC_MidiError, 48 | MUSIC_TaskManError, 49 | MUSIC_FMNotDetected, 50 | MUSIC_DPMI_Error 51 | }; 52 | 53 | typedef struct 54 | { 55 | unsigned long tickposition; 56 | unsigned long milliseconds; 57 | unsigned int measure; 58 | unsigned int beat; 59 | unsigned int tick; 60 | } songposition; 61 | 62 | #define MUSIC_LoopSong ( 1 == 1 ) 63 | #define MUSIC_PlayOnce ( !MUSIC_LoopSong ) 64 | 65 | char *MUSIC_ErrorString( int ErrorNumber ); 66 | int MUSIC_Init( int SoundCard, int Address ); 67 | int MUSIC_Shutdown( void ); 68 | void MUSIC_SetMaxFMMidiChannel( int channel ); 69 | void MUSIC_SetVolume( int volume ); 70 | void MUSIC_SetMidiChannelVolume( int channel, int volume ); 71 | void MUSIC_ResetMidiChannelVolumes( void ); 72 | int MUSIC_GetVolume( void ); 73 | void MUSIC_SetLoopFlag( int loopflag ); 74 | int MUSIC_SongPlaying( void ); 75 | void MUSIC_Continue( void ); 76 | void MUSIC_Pause( void ); 77 | int MUSIC_StopSong( void ); 78 | int MUSIC_PlaySong( unsigned char *song, int loopflag ); 79 | void MUSIC_SetContext( int context ); 80 | int MUSIC_GetContext( void ); 81 | void MUSIC_SetSongTick( unsigned long PositionInTicks ); 82 | void MUSIC_SetSongTime( unsigned long milliseconds ); 83 | void MUSIC_SetSongPosition( int measure, int beat, int tick ); 84 | void MUSIC_GetSongPosition( songposition *pos ); 85 | void MUSIC_GetSongLength( songposition *pos ); 86 | int MUSIC_FadeVolume( int tovolume, int milliseconds ); 87 | int MUSIC_FadeActive( void ); 88 | void MUSIC_StopFade( void ); 89 | void MUSIC_RerouteMidiChannel( int channel, int cdecl ( *function )( int event, int c1, int c2 ) ); 90 | void MUSIC_RegisterTimbreBank( unsigned char *timbres ); 91 | 92 | #endif 93 | -------------------------------------------------------------------------------- /apodmx/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 | -------------------------------------------------------------------------------- /apodmx/README.md: -------------------------------------------------------------------------------- 1 | The Apogee Sound System backed DMX wrapper 2 | ========================================== 3 | 4 | This is a DMX sound library wrapper, which is powered by the 5 | Apogee Sound System, the latter being written by Jim Dose for 6 | 3D Realms. When used together, they form a replacement for DMX. 7 | 8 | The DMX wrapper was written by Nuke.YKT for PCDoom, a DOS port 9 | of id Software's Doom title from the 90s. 10 | It also includes the mus2mid converter, contributed by Ben Ryves for 11 | Simon Howard's Chocolate Doom port, as well as the PC Speaker frequency table, 12 | dumped by Gez from a DOOM2.EXE file and later also added to Chocolate Doom. 13 | A few years later, this wrapper was modified by NY00123; Mostly to be built 14 | as a standalone library, while removing dependencies on game code. 15 | 16 | Terms of use 17 | ------------ 18 | 19 | This wrapper is licensed under the terms of the GNU GPLv2+. 20 | See GPL-2.0.txt for more details. 21 | 22 | Prerequisites for building the wrapper 23 | -------------------------------------- 24 | 25 | A compatible version of Watcom C32 that supports targeting DOS. 26 | 27 | How to build 28 | ------------ 29 | 30 | 1. Prepare a working setup of Watcom. 31 | 2. Enter "wmake". This should create the wrapper under the file APODMX.LIB. 32 | When using it to link with a program which depends on DMX, you'll also 33 | need to separately bring the Apogee Sound System library. 34 | Version 1.09 is known to be compatible. 35 | -------------------------------------------------------------------------------- /apodmx/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.09" 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 | -------------------------------------------------------------------------------- /apodmx/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 | -------------------------------------------------------------------------------- /apodmx/TSMAPI.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include "task_man.h" 3 | #include "tsmapi.h" 4 | 5 | typedef struct { 6 | task *t; 7 | void (*callback)(void); 8 | int paused; 9 | } task_t; 10 | 11 | #define MAX_TASKS 8 12 | 13 | task_t tasks[MAX_TASKS]; 14 | 15 | void TSM_Install(int rate) { 16 | memset(tasks, 0, sizeof(tasks)); 17 | } 18 | 19 | void tsm_funch(task *t) { 20 | int i = (int)t->data; 21 | if (!tasks[i].paused) 22 | tasks[i].callback(); 23 | } 24 | 25 | int TSM_NewService(void(*function)(void), int rate, int priority, int pause) { 26 | int i; 27 | for (i = 0; i < MAX_TASKS; i++) 28 | { 29 | if (tasks[i].t == NULL) 30 | break; 31 | } 32 | if (i == MAX_TASKS) 33 | return -1; 34 | tasks[i].callback = function; 35 | tasks[i].paused = pause; 36 | tasks[i].t = TS_ScheduleTask(tsm_funch, rate, priority, (void*)i); 37 | TS_Dispatch(); 38 | return i; 39 | } 40 | 41 | void TSM_DelService(int id) { 42 | if (id >= 0) 43 | { 44 | TS_Terminate(tasks[id].t); 45 | tasks[id].t = NULL; 46 | } 47 | } 48 | 49 | void TSM_PauseService(int id) { 50 | if (id >= 0) 51 | { 52 | tasks[id].paused = 1; 53 | } 54 | } 55 | 56 | void TSM_ResumeService(int id) { 57 | if (id >= 0) 58 | { 59 | tasks[id].paused = 0; 60 | } 61 | } 62 | 63 | void TSM_Remove(void) { 64 | TS_Shutdown(); 65 | } 66 | 67 | -------------------------------------------------------------------------------- /apodmx/TSMAPI.H: -------------------------------------------------------------------------------- 1 | #ifndef _TSMAPI_H_ 2 | #define _TSMAPI_H_ 3 | void TSM_Install(int rate); 4 | int TSM_NewService(void(*function)(void), int rate, int priority, int pause); 5 | void TSM_DelService(int id); 6 | void TSM_Remove(void); 7 | void TSM_PauseService(int id); 8 | void TSM_ResumeService(int id); 9 | #endif 10 | -------------------------------------------------------------------------------- /apodmx/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 | -------------------------------------------------------------------------------- /apodmx/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/AL_109/AL_109.LIB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skynettx/dosraptor/4403569505c215c6cebe02cc3344e670499def1d/audiolib/AL_109/AL_109.LIB -------------------------------------------------------------------------------- /audiolib/BATCHLST.TXT: -------------------------------------------------------------------------------- 1 | [1] Apogee Sound System 1.04 (Watcom 10.0b) 2 | [2] Apogee Sound System 1.09 (Watcom 10.0b) 3 | [3] Apogee Sound System 1.1 (Watcom 10.0b) 4 | 5 | [0] Cancel and quit 6 | 7 | -------------------------------------------------------------------------------- /audiolib/DOBUILD.BAT: -------------------------------------------------------------------------------- 1 | @echo off 2 | cls 3 | type BATCHLST.TXT 4 | choice /C:1230 /N Please select what to build: 5 | echo. 6 | if ERRORLEVEL 4 goto end 7 | if ERRORLEVEL 3 goto al_11 8 | if ERRORLEVEL 2 goto al_109 9 | if ERRORLEVEL 1 goto al950724 10 | 11 | :al950724 12 | set ASSREV=19950724 13 | set DIR=AL950724 14 | goto task 15 | :al_109 16 | set ASSREV=19960108 17 | set DIR=AL_109 18 | goto task 19 | :al_11 20 | set ASSREV=19960116 21 | set DIR=AL_11 22 | goto task 23 | 24 | :task 25 | md %DIR% 26 | md %DIR%\OBJ 27 | wmake.exe -f audio.mak "version = production" "libver_libdef = %DIR%" "libver_assrev = %ASSREV%" 28 | :end 29 | -------------------------------------------------------------------------------- /audiolib/DOCLEAN.BAT: -------------------------------------------------------------------------------- 1 | @echo off 2 | cls 3 | type BATCHLST.TXT 4 | choice /C:1230 /N Please select what to clean: 5 | echo. 6 | if ERRORLEVEL 4 goto end 7 | if ERRORLEVEL 1 set DIR=AL950724 8 | if ERRORLEVEL 2 set DIR=AL_109 9 | if ERRORLEVEL 3 set DIR=AL_11 10 | 11 | del %DIR%\OBJ\*.* 12 | del %DIR%\*.* 13 | :end 14 | -------------------------------------------------------------------------------- /audiolib/LIB/GF1_OSF.LB2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skynettx/dosraptor/4403569505c215c6cebe02cc3344e670499def1d/audiolib/LIB/GF1_OSF.LB2 -------------------------------------------------------------------------------- /audiolib/LIB/GF1_OSF.LBK: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skynettx/dosraptor/4403569505c215c6cebe02cc3344e670499def1d/audiolib/LIB/GF1_OSF.LBK -------------------------------------------------------------------------------- /audiolib/LIB/GF1_OSF.LIB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skynettx/dosraptor/4403569505c215c6cebe02cc3344e670499def1d/audiolib/LIB/GF1_OSF.LIB -------------------------------------------------------------------------------- /audiolib/LIB/PAWE32.LIB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skynettx/dosraptor/4403569505c215c6cebe02cc3344e670499def1d/audiolib/LIB/PAWE32.LIB -------------------------------------------------------------------------------- /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 | // *** VERSIONS RESTORATION *** 33 | // Uncomment seemingly older value for earlier versions 34 | #if (LIBVER_ASSREV < 19950821L) 35 | #define AL_DefaultPitchBendRange 2 36 | #else 37 | #define AL_DefaultPitchBendRange 200 38 | #endif 39 | 40 | #define ADLIB_PORT 0x388 41 | 42 | void AL_SendOutputToPort( int port, int reg, int data ); 43 | #if (LIBVER_ASSREV < 19950821L) // *** VERSIONS RESTORATION *** 44 | void AL_SendOutput( int reg, int data ); 45 | #else 46 | void AL_SendOutput( int voice, int reg, int data ); 47 | #endif 48 | void AL_StereoOn( void ); 49 | void AL_StereoOff( void ); 50 | int AL_ReserveVoice( int voice ); 51 | int AL_ReleaseVoice( int voice ); 52 | void AL_Shutdown( void ); 53 | int AL_Init( int soundcard ); 54 | void AL_SetMaxMidiChannel( int channel ); 55 | void AL_Reset( void ); 56 | void AL_NoteOff( int channel, int key, int velocity ); 57 | void AL_NoteOn( int channel, int key, int vel ); 58 | //Turned off to test if it works with Watcom 10a 59 | // #pragma aux AL_NoteOn frame; 60 | void AL_AllNotesOff( int channel ); 61 | void AL_ControlChange( int channel, int type, int data ); 62 | void AL_ProgramChange( int channel, int patch ); 63 | void AL_SetPitchBend( int channel, int lsb, int msb ); 64 | int AL_DetectFM( void ); 65 | void AL_RegisterTimbreBank( unsigned char *timbres ); 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /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/skynettx/dosraptor/4403569505c215c6cebe02cc3344e670499def1d/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/CTAWEAPI.INC: -------------------------------------------------------------------------------- 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 | ;/****************************************************************************\ 22 | ;* * 23 | ;* CTAWEAPI.INC SB AWE32 DOS Assembly Header * 24 | ;* * 25 | ;* (C) Copyright Creative Technology Ltd. 1992-94. All rights reserved * 26 | ;* worldwide. * 27 | ;* * 28 | ;* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY * 29 | ;* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE * 30 | ;* IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR * 31 | ;* PURPOSE. * 32 | ;* * 33 | ;* You have a royalty-free right to use, modify, reproduce and * 34 | ;* distribute the Sample Files (and/or any modified version) in * 35 | ;* any way you find useful, provided that you agree to * 36 | ;* the Creative's Software Licensing Aggreement and you also agree that * 37 | ;* Creative has no warranty obligations or liability for any Sample Files. * 38 | ;* * 39 | ;\****************************************************************************/ 40 | ; 41 | ;/****************************************************************************\ 42 | ;* File name : CTAWEAPI.INC * 43 | ;* * 44 | ;* Programmer : Creative SB AWE32 Team * 45 | ;* Creative Technology Ltd, 1994. All rights reserved. * 46 | ;* * 47 | ;* Version : 2.0b * 48 | ;* * 49 | ;\****************************************************************************/ 50 | 51 | SCRATCH STRUC 52 | DB 702 DUP(0) 53 | SCRATCH ENDS 54 | 55 | GCHANNEL STRUC 56 | DB 20 DUP(0) 57 | GCHANNEL ENDS 58 | 59 | MIDICHANNEL STRUC 60 | DB 32 DUP(0) 61 | MIDICHANNEL ENDS 62 | 63 | SOUNDFONT STRUC 64 | DB 124 DUP(0) 65 | SOUNDFONT ENDS 66 | 67 | NRPNCHANNEL STRUC 68 | DB 96 DUP(0) 69 | NRPNCHANNEL ENDS 70 | 71 | SOUNDPAD STRUC 72 | SPad1 DD 0 73 | SPad2 DD 0 74 | SPad3 DD 0 75 | SPad4 DD 0 76 | SPad5 DD 0 77 | SPad6 DD 0 78 | SPad7 DD 0 79 | SOUNDPAD ENDS 80 | 81 | AWE32_ALLOCMEM EQU 0001h 82 | AWE32_FREEMEM EQU 0002h 83 | 84 | AWE32ERR_ALLOCMEM EQU 1 85 | AWE32ERR_SBKFORMAT EQU 2 86 | AWE32ERR_DRAMSIZE EQU 3 87 | AWE32ERR_SBKREAD EQU 4 88 | 89 | -------------------------------------------------------------------------------- /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/DPMI.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: DPMI.H 22 | 23 | author: James R. Dose 24 | date: March 31, 1994 25 | 26 | Inline functions for performing DPMI calls. 27 | 28 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 29 | **********************************************************************/ 30 | 31 | #ifndef __DPMI_H 32 | #define __DPMI_H 33 | 34 | enum DPMI_Errors 35 | { 36 | DPMI_Warning = -2, 37 | DPMI_Error = -1, 38 | DPMI_Ok = 0 39 | }; 40 | 41 | typedef struct 42 | { 43 | unsigned long EDI; 44 | unsigned long ESI; 45 | unsigned long EBP; 46 | unsigned long Reserved; 47 | unsigned long EBX; 48 | unsigned long EDX; 49 | unsigned long ECX; 50 | unsigned long EAX; 51 | unsigned short Flags; 52 | unsigned short ES; 53 | unsigned short DS; 54 | unsigned short FS; 55 | unsigned short GS; 56 | unsigned short IP; 57 | unsigned short CS; 58 | unsigned short SP; 59 | unsigned short SS; 60 | } dpmi_regs; 61 | 62 | unsigned long DPMI_GetRealModeVector( int num ); 63 | void DPMI_SetRealModeVector( int num, unsigned long vector ); 64 | int DPMI_CallRealModeFunction( dpmi_regs *callregs ); 65 | int DPMI_GetDOSMemory( void **ptr, int *descriptor, unsigned length ); 66 | int DPMI_FreeDOSMemory( int descriptor ); 67 | int DPMI_LockMemory( void *address, unsigned length ); 68 | int DPMI_LockMemoryRegion( void *start, void *end ); 69 | int DPMI_UnlockMemory( void *address, unsigned length ); 70 | int DPMI_UnlockMemoryRegion( void *start, void *end ); 71 | 72 | #define DPMI_Lock( variable ) \ 73 | ( DPMI_LockMemory( &( variable ), sizeof( variable ) ) ) 74 | 75 | #define DPMI_Unlock( variable ) \ 76 | ( DPMI_UnlockMemory( &( variable ), sizeof( variable ) ) ) 77 | 78 | #pragma aux DPMI_GetDOSMemory = \ 79 | "mov eax, 0100h", \ 80 | "add ebx, 15", \ 81 | "shr ebx, 4", \ 82 | "int 31h", \ 83 | "jc DPMI_Exit", \ 84 | "movzx eax, ax", \ 85 | "shl eax, 4", \ 86 | "mov [ esi ], eax", \ 87 | "mov [ edi ], edx", \ 88 | "sub eax, eax", \ 89 | "DPMI_Exit:", \ 90 | parm [ esi ] [ edi ] [ ebx ] modify exact [ eax ebx edx ]; 91 | 92 | #pragma aux DPMI_FreeDOSMemory = \ 93 | "mov eax, 0101h", \ 94 | "int 31h", \ 95 | "jc DPMI_Exit", \ 96 | "sub eax, eax", \ 97 | "DPMI_Exit:", \ 98 | parm [ edx ] modify exact [ eax ]; 99 | 100 | #endif 101 | -------------------------------------------------------------------------------- /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/GUSWAVE.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: GUSWAVE.H 22 | 23 | author: James R. Dose 24 | date: March 23, 1994 25 | 26 | Public header for for GUSWAVE.C 27 | 28 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 29 | **********************************************************************/ 30 | 31 | #ifndef __GUSWAVE_H 32 | #define __GUSWAVE_H 33 | 34 | #define GUSWAVE_MinVoiceHandle 1 35 | 36 | enum GUSWAVE_Errors 37 | { 38 | GUSWAVE_Warning = -2, 39 | GUSWAVE_Error = -1, 40 | GUSWAVE_Ok = 0, 41 | GUSWAVE_GUSError, 42 | GUSWAVE_NotInstalled, 43 | GUSWAVE_NoVoices, 44 | GUSWAVE_UltraNoMem, 45 | GUSWAVE_UltraNoMemMIDI, 46 | GUSWAVE_VoiceNotFound, 47 | GUSWAVE_InvalidVOCFile, 48 | GUSWAVE_InvalidWAVFile 49 | }; 50 | 51 | char *GUSWAVE_ErrorString( int ErrorNumber ); 52 | int GUSWAVE_VoicePlaying( int handle ); 53 | int GUSWAVE_VoicesPlaying( void ); 54 | int GUSWAVE_Kill( int handle ); 55 | int GUSWAVE_KillAllVoices( void ); 56 | int GUSWAVE_SetPitch( int handle, int pitchoffset ); 57 | int GUSWAVE_SetPan3D( int handle, int angle, int distance ); 58 | void GUSWAVE_SetVolume( int volume ); 59 | int GUSWAVE_GetVolume( void ); 60 | int GUSWAVE_VoiceAvailable( int priority ); 61 | int GUSWAVE_PlayVOC( char *sample, int pitchoffset, int angle, int volume, 62 | int priority, unsigned long callbackval ); 63 | int GUSWAVE_PlayWAV( char *sample, int pitchoffset, int angle, int volume, 64 | int priority, unsigned long callbackval ); 65 | int GUSWAVE_StartDemandFeedPlayback( void ( *function )( char **ptr, unsigned long *length ), 66 | // *** VERSIONS RESTORATION *** 67 | #if (LIBVER_ASSREV < 19950821L) 68 | int rate, int pitchoffset, int angle, 69 | #else 70 | int channels, int bits, int rate, int pitchoffset, int angle, 71 | #endif 72 | int volume, int priority, unsigned long callbackval ); 73 | void GUSWAVE_SetCallBack( void ( *function )( unsigned long ) ); 74 | void GUSWAVE_SetReverseStereo( int setting ); 75 | int GUSWAVE_GetReverseStereo( void ); 76 | int GUSWAVE_Init( int numvoices ); 77 | void GUSWAVE_Shutdown( void ); 78 | #pragma aux GUSWAVE_Shutdown frame; 79 | 80 | #endif 81 | -------------------------------------------------------------------------------- /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/LL_MAN.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: LL_MAN.C 22 | 23 | author: James R. Dose 24 | date: January 1, 1994 25 | 26 | Linked list management routines. 27 | 28 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 29 | **********************************************************************/ 30 | 31 | #define LOCKMEMORY 32 | 33 | #include 34 | #include "ll_man.h" 35 | 36 | #ifdef LOCKMEMORY 37 | #include "dpmi.h" 38 | #endif 39 | #if (LIBVER_ASSREV < 20021225L) // *** VERSIONS RESTORATION *** 40 | #include "memcheck.h" 41 | #endif 42 | 43 | #define OFFSET( structure, offset ) \ 44 | ( *( ( char ** )&( structure )[ offset ] ) ) 45 | 46 | 47 | /********************************************************************** 48 | 49 | Memory locked functions: 50 | 51 | **********************************************************************/ 52 | 53 | 54 | #define LL_LockStart LL_AddNode 55 | 56 | 57 | void LL_AddNode 58 | ( 59 | char *item, 60 | char **head, 61 | char **tail, 62 | int next, 63 | int prev 64 | ) 65 | 66 | { 67 | OFFSET( item, prev ) = NULL; 68 | OFFSET( item, next ) = *head; 69 | 70 | if ( *head ) 71 | { 72 | OFFSET( *head, prev ) = item; 73 | } 74 | else 75 | { 76 | *tail = item; 77 | } 78 | 79 | *head = item; 80 | } 81 | 82 | void LL_RemoveNode 83 | ( 84 | char *item, 85 | char **head, 86 | char **tail, 87 | int next, 88 | int prev 89 | ) 90 | 91 | { 92 | if ( OFFSET( item, prev ) == NULL ) 93 | { 94 | *head = OFFSET( item, next ); 95 | } 96 | else 97 | { 98 | OFFSET( OFFSET( item, prev ), next ) = OFFSET( item, next ); 99 | } 100 | 101 | if ( OFFSET( item, next ) == NULL ) 102 | { 103 | *tail = OFFSET( item, prev ); 104 | } 105 | else 106 | { 107 | OFFSET( OFFSET( item, next ), prev ) = OFFSET( item, prev ); 108 | } 109 | 110 | OFFSET( item, next ) = NULL; 111 | OFFSET( item, prev ) = NULL; 112 | } 113 | 114 | 115 | /*--------------------------------------------------------------------- 116 | Function: LL_LockEnd 117 | 118 | Used for determining the length of the functions to lock in memory. 119 | ---------------------------------------------------------------------*/ 120 | 121 | static void LL_LockEnd 122 | ( 123 | void 124 | ) 125 | 126 | { 127 | } 128 | 129 | 130 | /*--------------------------------------------------------------------- 131 | Function: LL_UnlockMemory 132 | 133 | Unlocks all neccessary data. 134 | ---------------------------------------------------------------------*/ 135 | 136 | void LL_UnlockMemory 137 | ( 138 | void 139 | ) 140 | 141 | { 142 | #ifdef LOCKMEMORY 143 | 144 | DPMI_UnlockMemoryRegion( LL_LockStart, LL_LockEnd ); 145 | 146 | #endif 147 | } 148 | 149 | 150 | /*--------------------------------------------------------------------- 151 | Function: LL_LockMemory 152 | 153 | Locks all neccessary data. 154 | ---------------------------------------------------------------------*/ 155 | 156 | int LL_LockMemory 157 | ( 158 | void 159 | ) 160 | 161 | { 162 | 163 | #ifdef LOCKMEMORY 164 | 165 | int status; 166 | 167 | status = DPMI_LockMemoryRegion( LL_LockStart, LL_LockEnd ); 168 | if ( status != DPMI_Ok ) 169 | { 170 | return( LL_Error ); 171 | } 172 | 173 | #endif 174 | 175 | return( LL_Ok ); 176 | } 177 | -------------------------------------------------------------------------------- /audiolib/SOURCE/LL_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: LL_MAN.H 22 | 23 | author: James R. Dose 24 | date: February 4, 1994 25 | 26 | Public header for LL_MAN.C. Linked list management routines. 27 | 28 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 29 | **********************************************************************/ 30 | 31 | #ifndef __LL_MAN_H 32 | #define __LL_MAN_H 33 | 34 | enum LL_Errors 35 | { 36 | LL_Warning = -2, 37 | LL_Error = -1, 38 | LL_Ok = 0 39 | }; 40 | 41 | typedef struct list 42 | { 43 | void *start; 44 | void *end; 45 | } list; 46 | 47 | void LL_AddNode( char *node, char **head, char **tail, int next, int prev ); 48 | void LL_RemoveNode( char *node, char **head, char **tail, int next, int prev ); 49 | void LL_UnlockMemory( void ); 50 | int LL_LockMemory( void ); 51 | 52 | #define LL_AddToHead( type, listhead, node ) \ 53 | LL_AddNode( ( char * )( node ), \ 54 | ( char ** )&( ( listhead )->start ), \ 55 | ( char ** )&( ( listhead )->end ), \ 56 | ( int )&( ( type * ) 0 )->next, \ 57 | ( int )&( ( type * ) 0 )->prev ) 58 | 59 | #define LL_AddToTail( type, listhead, node ) \ 60 | LL_AddNode( ( char * )( node ), \ 61 | ( char ** )&( ( listhead )->end ), \ 62 | ( char ** )&( ( listhead )->start ), \ 63 | ( int )&( ( type * ) 0 )->prev, \ 64 | ( int )&( ( type * ) 0 )->next ) 65 | 66 | #define LL_Remove( type, listhead, node ) \ 67 | LL_RemoveNode( ( char * )( node ), \ 68 | ( char ** )&( ( listhead )->start ), \ 69 | ( char ** )&( ( listhead )->end ), \ 70 | ( int )&( ( type * ) 0 )->next, \ 71 | ( int )&( ( type * ) 0 )->prev ) 72 | 73 | #define LL_NextNode( node ) ( ( node )->next ) 74 | #define LL_PreviousNode( node ) ( ( node )->prev ) 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /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/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 | /********************************************************************** 21 | module: MIDI.H 22 | 23 | author: James R. Dose 24 | date: May 25, 1994 25 | 26 | Public header for MIDI.C. Midi song file playback routines. 27 | 28 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 29 | **********************************************************************/ 30 | 31 | #ifndef __MIDI_H 32 | #define __MIDI_H 33 | 34 | enum MIDI_Errors 35 | { 36 | MIDI_Warning = -2, 37 | MIDI_Error = -1, 38 | MIDI_Ok = 0, 39 | MIDI_NullMidiModule, 40 | MIDI_InvalidMidiFile, 41 | MIDI_UnknownMidiFormat, 42 | MIDI_NoTracks, 43 | MIDI_InvalidTrack, 44 | MIDI_NoMemory, 45 | MIDI_DPMI_Error 46 | }; 47 | 48 | 49 | #define MIDI_PASS_THROUGH 1 50 | #define MIDI_DONT_PLAY 0 51 | 52 | #define MIDI_MaxVolume 255 53 | 54 | extern char MIDI_PatchMap[ 128 ]; 55 | 56 | typedef struct 57 | { 58 | void ( *NoteOff )( int channel, int key, int velocity ); 59 | void ( *NoteOn )( int channel, int key, int velocity ); 60 | void ( *PolyAftertouch )( int channel, int key, int pressure ); 61 | void ( *ControlChange )( int channel, int number, int value ); 62 | void ( *ProgramChange )( int channel, int program ); 63 | void ( *ChannelAftertouch )( int channel, int pressure ); 64 | void ( *PitchBend )( int channel, int lsb, int msb ); 65 | void ( *ReleasePatches )( void ); 66 | void ( *LoadPatch )( int number ); 67 | void ( *SetVolume )( int volume ); 68 | int ( *GetVolume )( void ); 69 | } midifuncs; 70 | 71 | void MIDI_RerouteMidiChannel( int channel, int cdecl ( *function )( int event, int c1, int c2 ) ); 72 | int MIDI_AllNotesOff( void ); 73 | void MIDI_SetUserChannelVolume( int channel, int volume ); 74 | void MIDI_ResetUserChannelVolume( void ); 75 | int MIDI_Reset( void ); 76 | int MIDI_SetVolume( int volume ); 77 | int MIDI_GetVolume( void ); 78 | void MIDI_SetMidiFuncs( midifuncs *funcs ); 79 | void MIDI_SetContext( int context ); 80 | int MIDI_GetContext( void ); 81 | void MIDI_SetLoopFlag( int loopflag ); 82 | void MIDI_ContinueSong( void ); 83 | void MIDI_PauseSong( void ); 84 | int MIDI_SongPlaying( void ); 85 | void MIDI_StopSong( void ); 86 | int MIDI_PlaySong( unsigned char *song, int loopflag ); 87 | // *** VERSIONS RESTORATION *** 88 | #if (LIBVER_ASSREV < 19950821L) 89 | void MIDI_SetPosition( int pos ); 90 | int MIDI_GetPosition(void); 91 | #else 92 | void MIDI_SetTempo( int tempo ); 93 | int MIDI_GetTempo( void ); 94 | void MIDI_SetSongTick( unsigned long PositionInTicks ); 95 | void MIDI_SetSongTime( unsigned long milliseconds ); 96 | void MIDI_SetSongPosition( int measure, int beat, int tick ); 97 | void MIDI_GetSongPosition( songposition *pos ); 98 | void MIDI_GetSongLength( songposition *pos ); 99 | #endif 100 | void MIDI_LoadTimbres( void ); 101 | void MIDI_UnlockMemory( void ); 102 | int MIDI_LockMemory( void ); 103 | 104 | #endif 105 | -------------------------------------------------------------------------------- /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/MUSIC.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: MUSIC.H 22 | 23 | author: James R. Dose 24 | date: March 25, 1994 25 | 26 | Public header for MUSIC.C 27 | 28 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 29 | **********************************************************************/ 30 | 31 | #ifndef __MUSIC_H 32 | #define __MUSIC_H 33 | 34 | #include "sndcards.h" 35 | 36 | extern int MUSIC_ErrorCode; 37 | 38 | enum MUSIC_ERRORS 39 | { 40 | MUSIC_Warning = -2, 41 | MUSIC_Error = -1, 42 | MUSIC_Ok = 0, 43 | MUSIC_ASSVersion, 44 | MUSIC_SoundCardError, 45 | MUSIC_MPU401Error, 46 | MUSIC_InvalidCard, 47 | MUSIC_MidiError, 48 | MUSIC_TaskManError, 49 | MUSIC_FMNotDetected, 50 | MUSIC_DPMI_Error 51 | }; 52 | 53 | typedef struct 54 | { 55 | unsigned long tickposition; 56 | unsigned long milliseconds; 57 | unsigned int measure; 58 | unsigned int beat; 59 | unsigned int tick; 60 | } songposition; 61 | 62 | #define MUSIC_LoopSong ( 1 == 1 ) 63 | #define MUSIC_PlayOnce ( !MUSIC_LoopSong ) 64 | 65 | char *MUSIC_ErrorString( int ErrorNumber ); 66 | int MUSIC_Init( int SoundCard, int Address ); 67 | int MUSIC_Shutdown( void ); 68 | void MUSIC_SetMaxFMMidiChannel( int channel ); 69 | void MUSIC_SetVolume( int volume ); 70 | void MUSIC_SetMidiChannelVolume( int channel, int volume ); 71 | void MUSIC_ResetMidiChannelVolumes( void ); 72 | int MUSIC_GetVolume( void ); 73 | void MUSIC_SetLoopFlag( int loopflag ); 74 | int MUSIC_SongPlaying( void ); 75 | void MUSIC_Continue( void ); 76 | void MUSIC_Pause( void ); 77 | int MUSIC_StopSong( void ); 78 | int MUSIC_PlaySong( unsigned char *song, int loopflag ); 79 | // *** VERSIONS RESTORATION *** 80 | #if (LIBVER_ASSREV < 19950821L) 81 | void MUSIC_SetPosition( int pos ); 82 | int MUSIC_GetPosition( void ); 83 | #else 84 | void MUSIC_SetContext( int context ); 85 | int MUSIC_GetContext( void ); 86 | void MUSIC_SetSongTick( unsigned long PositionInTicks ); 87 | void MUSIC_SetSongTime( unsigned long milliseconds ); 88 | void MUSIC_SetSongPosition( int measure, int beat, int tick ); 89 | void MUSIC_GetSongPosition( songposition *pos ); 90 | void MUSIC_GetSongLength( songposition *pos ); 91 | #endif 92 | int MUSIC_FadeVolume( int tovolume, int milliseconds ); 93 | int MUSIC_FadeActive( void ); 94 | void MUSIC_StopFade( void ); 95 | void MUSIC_RerouteMidiChannel( int channel, int cdecl ( *function )( int event, int c1, int c2 ) ); 96 | void MUSIC_RegisterTimbreBank( unsigned char *timbres ); 97 | 98 | #endif 99 | -------------------------------------------------------------------------------- /audiolib/SOURCE/MV_MIX1.ASM: -------------------------------------------------------------------------------- 1 | .386 2 | .MODEL flat 3 | 4 | .data 5 | .code 6 | SEGMENT text USE32 7 | ALIGN 16 8 | 9 | ;================ 10 | ; 11 | ; MV_Mix8BitMonoFast 12 | ; 13 | ;================ 14 | 15 | ; eax - position 16 | ; edx - rate 17 | ; ecx - Volume table 18 | ; ebx - Harsh clip table 19 | ; edi - to 20 | ; esi - start 21 | 22 | MixBufferSize equ 256 23 | 24 | PROC MV_Mix8BitMonoFast_ 25 | PUBLIC MV_Mix8BitMonoFast_ 26 | 27 | push ebp 28 | 29 | ; mov edi,[to] 30 | ; mov esi,[start] 31 | ; mov ebp,[position] 32 | ; mov edx,[Rate] 33 | mov ebp, eax 34 | 35 | ; Rate scale ptr 36 | ; mov edx,[rate] 37 | mov eax,OFFSET apatch1+2 ; convice tasm to modify code... 38 | mov [eax],edx 39 | 40 | ; Volume table ptr 41 | ; mov ecx,[VolumeTable] 42 | mov eax,OFFSET apatch2+3 ; convice tasm to modify code... 43 | mov [eax],ecx 44 | 45 | ; Harsh Clip table ptr 46 | ; mov ebx,HarshClipTable ; get harsh clip table address 47 | add ebx,128 48 | mov eax,OFFSET apatch3+3 ; convice tasm to modify code... 49 | mov [eax],ebx 50 | 51 | mov ecx, MixBufferSize 52 | 53 | ; eax - scratch 54 | ; ebx - scratch 55 | ; edx - scratch 56 | ; ecx - count 57 | ; edi - destination 58 | ; esi - source 59 | ; ebp - frac pointer 60 | ; apatch1 - volume table 61 | ; apatch2 - volume table 62 | ; apatch3 - harsh clip table 63 | ; apatch4 - harsh clip table 64 | ; apatch5 - sample rate 65 | ; apatch6 - sample rate 66 | 67 | ALIGN 16 68 | mix8Mloop: 69 | mov eax,ebp ; begin calculating first sample 70 | apatch1: 71 | add ebp,12345678h ; advance frac pointer 72 | shr eax,16 ; finish calculation for first sample 73 | movzx eax, byte ptr [esi+eax] ; get first sample 74 | movzx edx, byte ptr [edi] ; get current sample from destination 75 | apatch2: 76 | movsx eax, byte ptr [eax+12345678h] ; volume translate first sample 77 | apatch3: 78 | mov eax, [eax + edx + 12345678h] ; harsh clip new sample 79 | mov [edi], al ; write new sample to destination 80 | inc edi ; move destination to second sample 81 | dec ecx ; decrement count 82 | jnz mix8Mloop ; loop 83 | 84 | pop ebp 85 | ret 86 | 87 | ENDP 88 | 89 | ENDS 90 | 91 | END 92 | -------------------------------------------------------------------------------- /audiolib/SOURCE/MYPRINT.C: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skynettx/dosraptor/4403569505c215c6cebe02cc3344e670499def1d/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/PAS16.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: PAS16.H 22 | 23 | author: James R. Dose 24 | date: March 27, 1994 25 | 26 | Public header for for PAS16.C 27 | 28 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 29 | **********************************************************************/ 30 | 31 | #ifndef __PAS16_H 32 | #define __PAS16_H 33 | 34 | enum PAS_ERRORS 35 | { 36 | PAS_Warning = -2, 37 | PAS_Error = -1, 38 | PAS_Ok = 0, 39 | PAS_DriverNotFound, 40 | PAS_DmaError, 41 | PAS_InvalidIrq, 42 | PAS_UnableToSetIrq, 43 | PAS_Dos4gwIrqError, 44 | PAS_NoSoundPlaying, 45 | PAS_CardNotFound, 46 | PAS_DPMI_Error, 47 | PAS_OutOfMemory 48 | }; 49 | 50 | #define PAS_MaxMixMode STEREO_16BIT 51 | #define PAS_DefaultSampleRate 11000 52 | #define PAS_DefaultMixMode MONO_8BIT 53 | #define PAS_MaxIrq 15 54 | 55 | #define PAS_MinSamplingRate 4000 56 | #define PAS_MaxSamplingRate 44000 57 | 58 | extern unsigned int PAS_DMAChannel; 59 | 60 | char *PAS_ErrorString( int ErrorNumber ); 61 | void PAS_SetPlaybackRate( unsigned rate ); 62 | unsigned PAS_GetPlaybackRate( void ); 63 | int PAS_SetMixMode( int mode ); 64 | void PAS_StopPlayback( void ); 65 | int PAS_GetCurrentPos( void ); 66 | int PAS_BeginBufferedPlayback( char *BufferStart, int BufferSize, int NumDivisions, unsigned SampleRate, int MixMode, void ( *CallBackFunc )( void ) ); 67 | int PAS_BeginBufferedRecord( char *BufferStart, int BufferSize, int NumDivisions, unsigned SampleRate, int MixMode, void ( *CallBackFunc )( void ) ); 68 | int PAS_SetPCMVolume( int volume ); 69 | int PAS_GetPCMVolume( void ); 70 | void PAS_SetFMVolume( int volume ); 71 | int PAS_GetFMVolume( void ); 72 | int PAS_GetCardInfo( int *MaxSampleBits, int *MaxChannels ); 73 | void PAS_SetCallBack( void ( *func )( void ) ); 74 | int PAS_SaveMusicVolume( void ); 75 | void PAS_RestoreMusicVolume( void ); 76 | int PAS_Init( void ); 77 | void PAS_Shutdown( void ); 78 | void PAS_UnlockMemory( void ); 79 | int PAS_LockMemory( void ); 80 | 81 | #endif 82 | -------------------------------------------------------------------------------- /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 | // *** VERSIONS RESTORATION *** 35 | #if (LIBVER_ASSREV < 19950821L) 36 | #define ASS_VERSION_STRING "1.04" 37 | #elif (LIBVER_ASSREV < 19960116L) 38 | #define ASS_VERSION_STRING "1.09" 39 | #elif (LIBVER_ASSREV < 19960510L) 40 | #define ASS_VERSION_STRING "1.1" 41 | #else 42 | #define ASS_VERSION_STRING "1.12" 43 | #endif 44 | 45 | typedef enum 46 | { 47 | // ASS_NoSound, 48 | SoundBlaster, 49 | ProAudioSpectrum, 50 | SoundMan16, 51 | Adlib, 52 | GenMidi, 53 | SoundCanvas, 54 | Awe32, 55 | WaveBlaster, 56 | SoundScape, 57 | UltraSound, 58 | SoundSource, 59 | TandySoundSource, 60 | PC, 61 | NumSoundCards 62 | } soundcardnames; 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /audiolib/SOURCE/SNDSCAPE.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: SNDSCAPE.H 22 | 23 | author: James R. Dose 24 | date: October 26, 1994 25 | 26 | Public header for SNDSCAPE.C 27 | 28 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 29 | **********************************************************************/ 30 | 31 | #ifndef __SNDSCAPE_H 32 | #define __SNDSCAPE_H 33 | 34 | extern int SOUNDSCAPE_DMAChannel; 35 | extern int SOUNDSCAPE_ErrorCode; 36 | 37 | enum SOUNDSCAPE_ERRORS 38 | { 39 | SOUNDSCAPE_Warning = -2, 40 | SOUNDSCAPE_Error = -1, 41 | SOUNDSCAPE_Ok = 0, 42 | SOUNDSCAPE_EnvNotFound, 43 | SOUNDSCAPE_InitFileNotFound, 44 | SOUNDSCAPE_MissingProductInfo, 45 | SOUNDSCAPE_MissingPortInfo, 46 | SOUNDSCAPE_MissingDMAInfo, 47 | SOUNDSCAPE_MissingIRQInfo, 48 | SOUNDSCAPE_MissingSBIRQInfo, 49 | SOUNDSCAPE_MissingSBENABLEInfo, 50 | SOUNDSCAPE_MissingWavePortInfo, 51 | SOUNDSCAPE_HardwareError, 52 | SOUNDSCAPE_NoSoundPlaying, 53 | SOUNDSCAPE_InvalidSBIrq, 54 | SOUNDSCAPE_UnableToSetIrq, 55 | SOUNDSCAPE_DmaError, 56 | SOUNDSCAPE_DPMI_Error, 57 | SOUNDSCAPE_OutOfMemory 58 | }; 59 | 60 | char *SOUNDSCAPE_ErrorString( int ErrorNumber ); 61 | void SOUNDSCAPE_SetPlaybackRate( unsigned rate ); 62 | unsigned SOUNDSCAPE_GetPlaybackRate( void ); 63 | int SOUNDSCAPE_SetMixMode( int mode ); 64 | void SOUNDSCAPE_StopPlayback( void ); 65 | int SOUNDSCAPE_GetCurrentPos( void ); 66 | int SOUNDSCAPE_BeginBufferedPlayback( char *BufferStart, int BufferSize, int NumDivisions, unsigned SampleRate, int MixMode, void ( *CallBackFunc )( void ) ); 67 | int SOUNDSCAPE_GetCardInfo( int *MaxSampleBits, int *MaxChannels ); 68 | void SOUNDSCAPE_SetCallBack( void ( *func )( void ) ); 69 | int SOUNDSCAPE_GetMIDIPort( void ); 70 | int SOUNDSCAPE_Init( void ); 71 | void SOUNDSCAPE_Shutdown( void ); 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /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.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: USER.C 22 | 23 | author: James R. Dose 24 | date: April 26, 1994 25 | 26 | Routines to parse command line options. 27 | 28 | (c) Copyright 1994 James R. Dose. All Rights Reserved. 29 | **********************************************************************/ 30 | 31 | #include 32 | #include 33 | #include "user.h" 34 | #if (LIBVER_ASSREV < 20021225L) // *** VERSIONS RESTORATION *** 35 | #include "memcheck.h" 36 | #endif 37 | 38 | #define TRUE ( 1 == 1 ) 39 | #define FALSE ( !TRUE ) 40 | 41 | extern int _argc; 42 | extern char **_argv; 43 | 44 | /*--------------------------------------------------------------------- 45 | Function: USER_CheckParameter 46 | 47 | Checks if the specified string is present in the command line. 48 | ---------------------------------------------------------------------*/ 49 | 50 | int USER_CheckParameter 51 | ( 52 | const char *parameter 53 | ) 54 | 55 | { 56 | int i; 57 | int found; 58 | char *ptr; 59 | 60 | found = FALSE; 61 | i = 1; 62 | while( i < _argc ) 63 | { 64 | ptr = _argv[ i ]; 65 | 66 | // Only check parameters preceded by - or / 67 | if ( ( *ptr == '-' ) || ( *ptr == '/' ) ) 68 | { 69 | ptr++; 70 | if ( stricmp( parameter, ptr ) == 0 ) 71 | { 72 | found = TRUE; 73 | break; 74 | } 75 | } 76 | 77 | i++; 78 | } 79 | 80 | return( found ); 81 | } 82 | 83 | 84 | /*--------------------------------------------------------------------- 85 | Function: USER_GetText 86 | 87 | Checks if the specified string is present in the command line 88 | and returns a pointer to the text following it. 89 | ---------------------------------------------------------------------*/ 90 | 91 | char *USER_GetText 92 | ( 93 | const char *parameter 94 | ) 95 | 96 | { 97 | int i; 98 | char *text; 99 | char *ptr; 100 | 101 | text = NULL; 102 | i = 1; 103 | while( i < _argc ) 104 | { 105 | ptr = _argv[ i ]; 106 | 107 | // Only check parameters preceded by - or / 108 | if ( ( *ptr == '-' ) || ( *ptr == '/' ) ) 109 | { 110 | ptr++; 111 | if ( stricmp( parameter, ptr ) == 0 ) 112 | { 113 | i++; 114 | text = _argv[ i ]; 115 | break; 116 | } 117 | } 118 | 119 | i++; 120 | } 121 | 122 | return( text ); 123 | } 124 | -------------------------------------------------------------------------------- /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/origlibs/104/AUDIO_WF.LIB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skynettx/dosraptor/4403569505c215c6cebe02cc3344e670499def1d/audiolib/origlibs/104/AUDIO_WF.LIB -------------------------------------------------------------------------------- /audiolib/origlibs/109/AUDIO_WF.LIB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skynettx/dosraptor/4403569505c215c6cebe02cc3344e670499def1d/audiolib/origlibs/109/AUDIO_WF.LIB -------------------------------------------------------------------------------- /audiolib/origlibs/11/AUDIO_WF.LIB: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skynettx/dosraptor/4403569505c215c6cebe02cc3344e670499def1d/audiolib/origlibs/11/AUDIO_WF.LIB -------------------------------------------------------------------------------- /audiolib/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/skynettx/dosraptor/4403569505c215c6cebe02cc3344e670499def1d/audiolib/readme.txt --------------------------------------------------------------------------------