Annotation of src/sndmod.h, revision 1.1.1.1

1.1       root        1: //
                      2: //    SNDMOD HEADER AND DEF'S
                      3: //
                      4: 
                      5: #define     S_THUNDER1             0                      
                      6: #define     S_THUNDER2             1 
                      7: #define     S_THUNDER3             2 
                      8: #define     S_WINDLOOP1            3 
                      9: #define     S_WAVELOOP1            4 
                     10: #define     S_LAVALOOP1            5 
                     11: #define     S_FIRELOOP1            6 
                     12: #define     S_STONELOOP1           7 
                     13: #define     S_BATSLOOP             8 
                     14: #define     S_PLRWEAPON0           9 
                     15: #define     S_PLRWEAPON1           10 
                     16: #define     S_PLRWEAPON2           11 
                     17: #define     S_PLRWEAPON3           12 
                     18: #define     S_PLRWEAPON4           13 
                     19: #define     S_KSNARL1              14 
                     20: #define     S_KSNARL2              15 
                     21: #define     S_KSNARL3              16 
                     22: #define     S_KSNARL4              17 
                     23: #define     S_KPAIN1               18 
                     24: #define     S_KPAIN2               19 
                     25: #define     S_KDIE1                20 
                     26: #define     S_KDIE2                21 
                     27: #define     S_DEMON1               22 
                     28: #define     S_DEMON2               23 
                     29: #define     S_DEMON3               24 
                     30: #define     S_DEMON4               25 
                     31: #define     S_DEMON5               26 
                     32: #define     S_DEMONDIE1            27 
                     33: #define     S_DEMONDIE2            28 
                     34: #define     S_MSNARL1              29 
                     35: #define     S_MSNARL2              30 
                     36: #define     S_MSNARL3              31 
                     37: #define     S_MSNARL4              32 
                     38: #define     S_MPAIN1               33 
                     39: #define     S_MDEATH1              34 
                     40: #define     S_RIP1                 35 
                     41: #define     S_RIP2                 36 
                     42: #define     S_RIP3                 37 
                     43: #define     S_SKELHIT1             38 
                     44: #define     S_SKELHIT2             39 
                     45: #define     S_SKELETONDIE          40 
                     46: #define     S_SKELSEE              41   
                     47: #define     S_GUARDIAN1            42  
                     48: #define     S_GUARDIAN2            43 
                     49: #define     S_GUARDIANPAIN1        44 
                     50: #define     S_GUARDIANPAIN2        45 
                     51: #define     S_GUARDIANDIE          46 
                     52: #define     S_WISP                 47 
                     53: #define     S_WISP2                48 
                     54: #define     S_SPLASH1              49 
                     55: #define     S_SPLASH2              50 
                     56: #define     S_SPLASH3              51 
                     57: #define     S_SPLASH4              52 
                     58: #define     S_SPLASH5              53 
                     59: #define     S_WILLOWDIE            54 
                     60: #define     S_JUDY1                55 
                     61: #define     S_JUDYDIE              56 
                     62: #define     S_CHAIN1               57               
                     63: #define     S_FLAME1               58 
                     64: #define     S_CLUNK                59
                     65: #define     S_DEMONTHROW           60
                     66: #define     S_DOOR1                61
                     67: #define     S_DOOR2                62
                     68: #define     S_DOOR3                63 
                     69: #define     S_CREAKDOOR1           64 
                     70: #define     S_CREAKDOOR2           65 
                     71: #define     S_CREAKDOOR3           66 
                     72: #define     S_STING1               67 
                     73: #define     S_STING2               68 
                     74: #define     S_POTION1              69 
                     75: #define     S_GENTHROW             70 
                     76: #define     S_GENSWING             71 
                     77: #define     S_ARROWHIT             72 
                     78: #define     S_WALLHIT1             73 
                     79: #define     S_GONG                 74 
                     80: #define     S_SPELL1               75 
                     81: #define     S_FREEZE               76 
                     82: #define     S_FREEZEDIE            77 
                     83: #define     S_TRAP1                78 
                     84: #define     S_TRAP2                79 
                     85: #define     S_RATS1                80 
                     86: #define     S_RATS2                81 
                     87: #define     S_WINDLOOP2            82 
                     88: #define     S_BREATH1              83 
                     89: #define     S_BREATH2              84 
                     90: #define     S_PUSH1                85   
                     91: #define     S_PUSH2                86      
                     92: #define     S_PLRPAIN1             87             
                     93: #define     S_PLRPAIN2             88 
                     94: #define     S_GORE1                89 
                     95: #define     S_GORE2                90 
                     96: #define     S_GORE1A               91 
                     97: #define     S_GORE1B               92 
                     98: #define     S_DEADSTEP             93 
                     99: #define     S_HEARTBEAT            94 
                    100: #define     S_SOFTCHAINWALK        95 
                    101: #define     S_SOFTCREAKWALK        96  
                    102: #define     S_LOUDCHAINWALK        97  
                    103: #define     S_SCARYDUDE            98  
                    104: #define     S_WATERY               99  
                    105: #define     S_GLASSBREAK1          100 
                    106: #define     S_GLASSBREAK2          101 
                    107: #define     S_GLASSBREAK3          102
                    108: #define     S_TREASURE1            103 
                    109: #define     S_SWORD1               104 
                    110: #define     S_SWORD2               105 
                    111: #define     S_SWORDCLINK1          106 
                    112: #define     S_SWORDCLINK2          107 
                    113: #define     S_SWORDCLINK3          108 
                    114: #define     S_SWORDCLINK4          109 
                    115: #define     S_SOCK1                110 
                    116: #define     S_SOCK2                111 
                    117: #define     S_SOCK3                112 
                    118: #define     S_SOCK4                113 
                    119: #define     S_KOBOLDHIT            114 
                    120: #define     S_FIREBALL             115 
                    121: #define     S_PULLCHAIN1           116 
                    122: #define     S_PICKUPAXE            117 
                    123: #define     S_EXPLODE              118 
                    124: #define     S_BARRELBREAK          119 
                    125: #define     S_WARP                 120 
                    126: #define     S_PICKUPFLAG           121 
                    127: #define     S_DROPFLAG             122 
                    128: #define     S_LAUGH                123 
                    129: #define     S_DRINK                124 
                    130: #define     S_PAGE                 125 
                    131: #define     S_BOTTLES              126 
                    132: #define     S_CRACKING             127 
                    133: #define     S_PLRDIE1              128
                    134: #define     S_AGM_ATTACK           129     
                    135: #define     S_AGM_PAIN1            130
                    136: #define     S_AGM_PAIN2            131
                    137: #define     S_AGM_PAIN3            132
                    138: #define     S_AGM_DIE1             133
                    139: #define     S_AGM_DIE2             134
                    140: #define     S_AGM_DIE3             135
                    141: #define     S_GRONDEATHA           136
                    142: #define     S_GRONDEATHB           137
                    143: #define     S_GRONDEATHC           138  
                    144: #define     S_HGM_DIE1             139  
                    145: #define     S_HGM_DIE2             140  
                    146: #define     S_HGM_DIE3             141  
                    147: #define     S_GRONPAINA            142
                    148: #define     S_HGM_PAIN1            143  
                    149: #define     S_HGM_PAIN2            144  
                    150: #define     S_FIRESWING            145
                    151: #define     S_FIREWEAPONLOOP       146
                    152: #define     S_ENERGYWEAPONLOOP     147
                    153: #define     S_ENERGYSWING          148
                    154: #define     S_BIGGLASSBREAK1       149
                    155: #define     S_BIGGLASSBREAK2       150
                    156: #define     S_BIGGLASSBREAK3       151
                    157: #define     S_IMPGROWL1            152
                    158: #define     S_IMPGROWL2            153
                    159: #define     S_IMPGROWL3            154
                    160: #define     S_IMPDIE1              155
                    161: #define     S_IMPDIE2              156
                    162: #define     S_SWINGDOOR            157
                    163: #define     S_NUKESPELL            158
                    164: #define     S_DOORSPELL            159
                    165: #define     S_FIRESPELL            160
                    166: #define     S_GENERALMAGIC1        161
                    167: #define     S_GENERALMAGIC2        162
                    168: #define     S_GENERALMAGIC3        163
                    169: #define     S_GENERALMAGIC4        164
                    170: #define     S_HAWKSOUND            165
                    171: #define     S_OWL SOUND            166
                    172: #define     S_STEPSSOUND           167
                    173: 
                    174: 
                    175: 
                    176: 
                    177: 
                    178:                                     
                    179:                                    
                    180:                                     
                    181: #define  _OFF              0        
                    182: #define  _ON               1
                    183: #define  _STANDARD_MUSIC   1
                    184: #define  _DIG_MIDI_MUSIC   2
                    185: #define  _LOOP_MUSIC       3   
                    186: 
                    187: #define  MAX_AUX_TIMERS       4
                    188: #define  MAX_ACTIVE_SAMPLES   10
                    189: #define  MAX_ACTIVE_SONGS     4
                    190: //num of array elements in ambsoundarray[]
                    191: #define MAX_AMB_SOUNDS       6
                    192: #define  MAX_ACTIVE_FXLOOPS   4
                    193: 
                    194: #define  MAX_SND_LOOPS        8
                    195: 
                    196: #define  DIG_MIDI 2
                    197: #define  MIDI     1
                    198: #define  DIGI     0
                    199: 
                    200: #define  MENUSONG   0
                    201: #define  DEATHSONG   1
                    202: 
                    203: #define BASE_SONG   0
                    204: #define EMB_SONG        1
                    205: #define SPICE_SONG  2
                    206: 
                    207: #define  WINDSNDBIT        1
                    208: #define  WAVESNDBIT        2
                    209: #define  WATERSNDBIT       4
                    210: #define  LAVASNDBIT        8
                    211: #define  GRATESNDBIT       16
                    212: #define  CARTSNDBIT        32
                    213: #define  FIRE1SNDBIT       64
                    214: #define  FIRE2SNDBIT       128
                    215: 
                    216: typedef struct 
                    217: {
                    218:        int      playing;
                    219:        unsigned SOSHandle;
                    220:        unsigned number;         
                    221:        long     priority;
                    222:        long     x,y;
                    223: } SampleType;
                    224: 
                    225: 
                    226: struct ambsounds {
                    227:        int soundnum;       //the actual sound number S_x
                    228:        int hsound;     //the handle returned by hmi
                    229: };
                    230: 
                    231: #ifdef SND_CALLER
                    232: 
                    233:        //int lavasnd=-1,
                    234:        //     batsnd=-1,
                    235:        //     cartsnd=-1;
                    236: 
                    237:                
                    238: 
                    239:        VOID _far _loadds timerevent(VOID);
                    240: 
                    241:        //Callback functions
                    242:        VOID _far cdecl sosDIGISampleCallback(  WORD, WORD, WORD  );
                    243:        VOID _far sosMIDISongCallback( WORD );
                    244:    VOID _far cdecl _loadds sosMIDITriggerCallback(  WORD, BYTE, BYTE );
                    245: 
                    246:        //
                    247:        //defs for hmi Setup
                    248:        //
                    249:        // profile structure
                    250:        typedef  struct   _tagINIInstance
                    251:                        {
                    252: 
                    253:                                WORD  wFlags;           // misc. flags
                    254:                                BYTE  szName[ 128 ];    // name of .ini file
                    255: 
                    256:                                PSTR  pData;            // pointer to .ini file in memory
                    257:                                WORD  wSize;            // size, in bytes, of file
                    258:                                WORD  wMaxSize;         // maximum size in bytes of the .ini
                    259: 
                    260:                                PSTR  pCurrent;         // current location in file
                    261:                                WORD  wCurrent;         // current location in file
                    262: 
                    263:                                PSTR  pSection;         // pointer to section start
                    264: 
                    265:                                PSTR  pItemPtr;         // pointer to the start of line w/item 
                    266:                                PSTR  pItem;            // pointer to last item
                    267:                                PSTR  pList;            // pointer to last item location, for list
                    268:                                                                                                // management.
                    269:                                PSTR  pListPtr;         // pointer for raw string list
                    270: 
                    271:                        } _INI_INSTANCE;
                    272: 
                    273:        // equates
                    274:        #define  _INI_SECTION_START   '['
                    275:        #define  _INI_SECTION_END     ']'
                    276:        #define  _INI_EQUATE          '='
                    277:        #define  _INI_SPACE           ' '
                    278:        #define  _INI_TAB             0x9
                    279:        #define  _INI_STRING_START    '"'
                    280:        #define  _INI_STRING_END      '"'
                    281:        #define  _INI_EOL             0x0d
                    282:        #define  _INI_CR              0x0d
                    283:        #define  _INI_LF              0x0a
                    284:        #define  _INI_HEX_INDICATOR   'x'
                    285:        #define  _INI_LIST_SEPERATOR  ','
                    286:        
                    287:        // amount of bytes to allocate in addition to file size so that the
                    288:        // .ini file may be modified by the application.
                    289:        #define  _INI_EXTRA_MEMORY    1024
                    290: 
                    291:        // various flags for .ini structure
                    292:        #define  _INI_MODIFIED        0x8000
                    293: 
                    294: 
                    295:        // function prototypes
                    296:        BOOL  cdecl hmiINIOpen              ( _INI_INSTANCE * sInstance, PSTR szName );
                    297:        BOOL  cdecl hmiINIClose             ( _INI_INSTANCE * sInstance );
                    298:        BOOL  cdecl hmiINILocateSection     ( _INI_INSTANCE * sInstance, PSTR szName );
                    299:        BOOL  cdecl hmiINILocateItem        ( _INI_INSTANCE * sInstance, PSTR szItem );
                    300:        BOOL  cdecl hmiINIGetDecimal        ( _INI_INSTANCE * sInstance, WORD * wValue );
                    301:        BOOL  cdecl hmiINIGetItemDecimal    ( _INI_INSTANCE * sInstance, PSTR szItem, WORD * wValue );
                    302: 
                    303:        BOOL  cdecl sosEZGetConfig( PSTR );
                    304:        
                    305:        WORD  wMIDIDeviceID,wDIGIDeviceID;
                    306: 
                    307: 
                    308:        //
                    309:        //          DIGI SPECIFIC
                    310:        //
                    311:     #define  _SOS_DMA_BUFFERSIZE     0x1000
                    312:        #define  _SOS_SAMPLE_RATE        11025
                    313:        #define  _SOS_FILL_TIMER_RATE    100
                    314: 
                    315:        #define  _SAMPLE0                 0x1000
                    316:        #define  _SAMPLE1                 0x1001
                    317:        #define  _SAMPLE2                 0x1002
                    318:        #define  _SAMPLE3                 0x1003
                    319:        #define  _SAMPLE4                 0x1004
                    320:        #define  _SAMPLE5                 0x1005
                    321:        #define  _SAMPLE6                 0x1006
                    322:        #define  _SAMPLE7                 0x1007
                    323:        #define  _SAMPLE8                 0x1008
                    324:        #define  _SAMPLE9                 0x1009
                    325:        #define  _SAMPLE10                0x100a
                    326:        #define  _SAMPLE11                0x100b
                    327:        #define _LSAMPLE1                   0x100c
                    328:        #define _LSAMPLE2                   0x100d
                    329: 
                    330:        UINT  PanArray[] = {
                    331:                //REAR to HARD LEFT (angle = 0->512)   
                    332:        0x8000,0x7000,0x6000,0x5000,0x4000,0x3000,0x2000,0x1000,0x0000,
                    333:                //HARD LEFT to CENTER (angle = 513-1024)
                    334:        0x1000,0x20f0,0x2000,0x3000,0x4000,0x5000,0x6000,0x7000,0x8000, 
                    335:                //CENTER to HARD RIGHT (angle = 1025-1536)
                    336:        0x70f0,0x8000,0x9000,0xa000,0xb000,0xc000,0xd000,0xe000,0xf000,   
                    337:                //HARD RIGHT to REAR (angle = 1537-2047)
                    338:        0xffff,0xf000,0xe000,0xd000,0xc000,0xb000,0xa000,0x9000,0x8000
                    339:        };
                    340: 
                    341:        volatile    SampleType  SampleRay[MAX_ACTIVE_SAMPLES];
                    342:        BYTE        ActiveSampleBits = 0x00;
                    343: 
                    344:        volatile    SampleType  FXLoopRay[MAX_ACTIVE_FXLOOPS];
                    345: 
                    346:        _SOS_CAPABILITIES sSOSDeviceCaps;
                    347:        _SOS_HARDWARE     sDIGIHardware;
                    348:        _SOS_INIT_DRIVER  sSOSInitDriver = {
                    349:                _SOS_DMA_BUFFERSIZE,
                    350:                _NULL,
                    351:                _TRUE,
                    352:                _SOS_SAMPLE_RATE,
                    353:                19,
                    354:                0L,
                    355:                _NULL,
                    356:                _NULL,
                    357:                _NULL,
                    358:                _SOS_NORMAL_TIMER
                    359:                };
                    360: 
                    361:        _SOS_INIT_DRIVER  sSOSInitDriver1 = {
                    362:                _SOS_DMA_BUFFERSIZE,
                    363:                _NULL,
                    364:                _TRUE,
                    365:                _SOS_SAMPLE_RATE,
                    366:                19,
                    367:                0L,
                    368:                _NULL,
                    369:                _NULL,
                    370:                _NULL,
                    371:                _SOS_NORMAL_TIMER
                    372:                };
                    373: 
                    374: 
                    375:        _SOS_START_SAMPLE sSOSSampleData[12] = {
                    376: 
                    377:                {  _NULL, 0L, 0, _CENTER_CHANNEL, 0x7fff,
                    378:                        _SAMPLE0, sosDIGISampleCallback, 0, _VOLUME | _PANNING | _LOOPING, 
                    379:                        0L, 0L, 0L, 0L, 0, 0, 0, 0x8000, 0, 0, 0, 0, 
                    380:                        0L, 0, 0, 0L, 0L, 0L },
                    381: 
                    382:                {  _NULL, 0L, 0, _CENTER_CHANNEL, 0x7fff,
                    383:                        _SAMPLE1, sosDIGISampleCallback, 0, _VOLUME | _PANNING | _LOOPING, 
                    384:                        0L, 0L, 0L, 0L, 0, 0, 0, 0x8000, 0, 0, 0, 0, 
                    385:                        0L, 0, 0, 0L, 0L, 0L },
                    386: 
                    387:                {  _NULL, 0L, 0, _CENTER_CHANNEL, 0x7fff,
                    388:                        _SAMPLE2, sosDIGISampleCallback, 0, _VOLUME | _PANNING | _LOOPING, 
                    389:                        0L, 0L, 0L, 0L, 0, 0, 0, 0x8000, 0, 0, 0, 0, 
                    390:                        0L, 0, 0, 0L, 0L, 0L },
                    391: 
                    392:                {  _NULL, 0L, 0, _CENTER_CHANNEL, 0x7fff,
                    393:                        _SAMPLE3, sosDIGISampleCallback, 0, _VOLUME | _PANNING | _LOOPING, 
                    394:                        0L, 0L, 0L, 0L, 0, 0, 0, 0x8000, 0, 0, 0, 0, 
                    395:                        0L, 0, 0, 0L, 0L, 0L },
                    396: 
                    397:                {  _NULL, 0L, 0, _CENTER_CHANNEL, 0x7fff,
                    398:                        _SAMPLE4, sosDIGISampleCallback, 0, _VOLUME | _PANNING | _LOOPING, 
                    399:                        0L, 0L, 0L, 0L, 0, 0, 0, 0x8000, 0, 0, 0, 0, 
                    400:                        0L, 0, 0, 0L, 0L, 0L },
                    401: 
                    402:                {  _NULL, 0L, 0, _CENTER_CHANNEL, 0x7fff,
                    403:                        _SAMPLE5, sosDIGISampleCallback, 0, _VOLUME | _PANNING | _LOOPING, 
                    404:                        0L, 0L, 0L, 0L, 0, 0, 0, 0x8000, 0, 0, 0, 0, 
                    405:                        0L, 0, 0, 0L, 0L, 0L },
                    406:                
                    407:                {  _NULL, 0L, 0, _CENTER_CHANNEL, 0x7fff,
                    408:                        _SAMPLE6, sosDIGISampleCallback, 0, _VOLUME | _PANNING | _LOOPING, 
                    409:                        0L, 0L, 0L, 0L, 0, 0, 0, 0x8000, 0, 0, 0, 0, 
                    410:                        0L, 0, 0, 0L, 0L, 0L },
                    411: 
                    412:                {  _NULL, 0L, 0, _CENTER_CHANNEL, 0x7fff,
                    413:                        _SAMPLE7, sosDIGISampleCallback, 0, _VOLUME | _PANNING | _LOOPING, 
                    414:                        0L, 0L, 0L, 0L, 0, 0, 0, 0x8000, 0, 0, 0, 0, 
                    415:                        0L, 0, 0, 0L, 0L, 0L },
                    416: 
                    417:                {  _NULL, 0L, 0, _CENTER_CHANNEL, 0x7fff,
                    418:                        _SAMPLE8, sosDIGISampleCallback, 0, _VOLUME | _PANNING | _LOOPING, 
                    419:                        0L, 0L, 0L, 0L, 0, 0, 0, 0x8000, 0, 0, 0, 0, 
                    420:                        0L, 0, 0, 0L, 0L, 0L },
                    421: 
                    422:                {  _NULL, 0L, 0, _CENTER_CHANNEL, 0x7fff,
                    423:                        _SAMPLE9, sosDIGISampleCallback, 0, _VOLUME | _PANNING | _LOOPING, 
                    424:                        0L, 0L, 0L, 0L, 0, 0, 0, 0x8000, 0, 0, 0, 0, 
                    425:                        0L, 0, 0, 0L, 0L, 0L },
                    426:                
                    427:                {  _NULL, 0L, 0, _CENTER_CHANNEL, 0x7fff,
                    428:                        _SAMPLE10, sosDIGISampleCallback, 0, _VOLUME | _PANNING | _LOOPING, 
                    429:                        0L, 0L, 0L, 0L, 0, 0, 0, 0x8000, 0, 0, 0, 0, 
                    430:                        0L, 0, 0, 0L, 0L, 0L },
                    431: 
                    432:                {  _NULL, 0L, 0, _CENTER_CHANNEL, 0x7fff,
                    433:                        _SAMPLE11, sosDIGISampleCallback, 0, _VOLUME | _PANNING | _LOOPING, 
                    434:                        0L, 0L, 0L, 0L, 0, 0, 0, 0x8000, 0, 0, 0, 0, 
                    435:                        0L, 0, 0, 0L, 0L, 0L },
                    436: 
                    437:        };
                    438: 
                    439: //array for loop and pending loop MUSIC
                    440:        _SOS_START_SAMPLE LoopSampleData[2] =
                    441:                {  
                    442:                        {_NULL, 0L, -1, _CENTER_CHANNEL, 0x7fff,
                    443:                        _LSAMPLE1, sosDIGISampleCallback, 0, _LOOPING | _VOLUME, 
                    444:                        0L, 0L, 0L, 0L, 0, 0, 0, 0x8000, 0, 0, 0, 0, 
                    445:                        0L, 0, 0, 0L, 0L, 0L},
                    446: 
                    447:                        {_NULL, 0L, -1, _CENTER_CHANNEL, 0x7fff,
                    448:                        _LSAMPLE2, sosDIGISampleCallback, 0, _LOOPING | _VOLUME, 
                    449:                        0L, 0L, 0L, 0L, 0, 0, 0, 0x8000, 0, 0, 0, 0, 
                    450:                        0L, 0, 0, 0L, 0L, 0L},
                    451:                };
                    452: 
                    453: 
                    454:        WORD     LoopHandles[2];
                    455:        WORD     LoopPending=0,LoopIndex=0,looptoggle=0,loopmusepauseflag=0;
                    456:        WORD     Metronome;
                    457: 
                    458:        DWORD    *DigiList;
                    459:        DWORD    *LoopList;
                    460:        DWORD    *SongList;
                    461:        DWORD    SeekIndex;
                    462: 
                    463:        //
                    464:        //    MIDI SPECIFIC
                    465:        //
                    466:        _SOS_MIDI_HARDWARE         sMIDIHardware;
                    467:        _SOS_MIDI_INIT_DRIVER      sSOSMIDIInitDriver;
                    468:        _SOS_MIDI_DIGI_INIT_DRIVER sSOSMIDIDIGIInitDriver;
                    469: 
                    470: //midimusic vars
                    471:        WORD        Metronome;
                    472:        WORD        SongPending,BranchPending;
                    473: 
                    474:        WORD     hSOSSongHandles[MAX_ACTIVE_SONGS];
                    475:        BYTE     ActiveSongBits = 0x00;
                    476: 
                    477:        BYTE     *m_bnkptr,*d_bnkptr,*digi_bnkptr;
                    478:        BYTE _huge *lpMIDISong;
                    479: 
                    480:        _SOS_MIDI_INIT_SONG        sSOSInitSongs[MAX_ACTIVE_SONGS];
                    481: 
                    482:        _SOS_MIDI_TRACK_DEVICE   sSOSTrackMap[MAX_ACTIVE_SONGS] = { 
                    483:                {
                    484:                _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, 
                    485:                _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, 
                    486:                _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, 
                    487:                _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK
                    488:                }, 
                    489:                {
                    490:                _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, 
                    491:                _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, 
                    492:                _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, 
                    493:                _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK
                    494:                }, 
                    495:                {
                    496:                _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, 
                    497:                _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, 
                    498:                _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, 
                    499:                _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK
                    500:                }, 
                    501:                {
                    502:                _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, 
                    503:                _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, 
                    504:                _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, 
                    505:                _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK, _MIDI_MAP_TRACK
                    506:                } 
                    507:        };
                    508: 
                    509: 
                    510:        //
                    511:        //    MISC/COMMON STUFF
                    512:        //
                    513:        WORD     hSOSDriverHandles[3];
                    514:        WORD     hSOSDriverHandles1;
                    515:        
                    516:        WORD     SD_Started=0;
                    517:        BOOL     Midi_Loaded,Digi_Loaded,DigMidi_Loaded;
                    518:        WORD     wError,wIndex;
                    519: 
                    520:        WORD     hSoundFile  =  -1;       // Handle for Sound F/X file
                    521:        WORD     hLoopFile   =  -1;       // Handle for Loop file
                    522:        WORD     hSongFile   =  -1;
                    523:        WORD     hMiscHandle =  -1;
                    524: 
                    525: 
                    526:        
                    527:        //
                    528:        //    TIMER STUFF
                    529:        //
                    530:        WORD     hTimerT_ClockHandle;    // Handle for the game timer (TotalClock)
                    531:        WORD     hTimerDig_FillHandle;   // Handle for the sSOSInitDriver.lpFillHandler 
                    532:        WORD     hTimerRec_FillHandle;   // Handle for the sSOSInitDriver.lpFillHandler 
                    533: 
                    534:        WORD     AuxTimerList[MAX_AUX_TIMERS];
                    535:        BYTE     ActiveTimerBits = 0x00;
                    536: 
                    537:        WORD     LoopSndsPlaying=0;
                    538:        
                    539: 
                    540:        struct ambsounds ambsoundarray[] = {
                    541:                0,0,
                    542:                S_WINDLOOP1,-1, 
                    543:                S_WINDLOOP2,-1,
                    544:                S_WAVELOOP1,-1, 
                    545:                S_LAVALOOP1,-1, 
                    546:                S_WATERY,-1, 
                    547:                S_STONELOOP1,-1,
                    548:                S_BATSLOOP,-1
                    549:        };  
                    550: 
                    551:                
                    552: 
                    553: 
                    554:        //
                    555:        //          GLOBAL VARIABLES
                    556:        //
                    557:        WORD     SoundMode,wDIGIVol;
                    558:        WORD     MusicMode,wMIDIVol;
                    559:        WORD     use_rec_driver,voicecom_enabled;
                    560: 
                    561: 
                    562:        //
                    563:        //          EXTERN STUFF
                    564:        //
                    565:        extern keytimerstuff();
                    566:        extern volatile long totalclock;
                    567:        extern long posx[],posy[];
                    568: 
                    569:        //JSA temp int to show vol and pan
                    570:        int gVol,gPan;
                    571: 
                    572: #else
                    573: 
                    574: 
                    575: extern int  Metronome,SongPending,BranchPending;
                    576: extern int  hSOSSongHandles[];
                    577: 
                    578: 
                    579: extern int  SoundMode,wDIGIVol,MusicMode,wMIDIVol,use_dig_midi,
                    580:                                LoopPending,LoopIndex,looptoggle,LoopSndsPlaying,
                    581:                                gPan,gVol;
                    582: 
                    583: extern SampleType SampleRay[],FXLoopRay[];
                    584: 
                    585: extern struct ambsounds ambsoundarray[];
                    586: extern int lavasnd,batsnd,cartsnd;
                    587: 
                    588: 
                    589: #endif
                    590: 
                    591: 
                    592: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.