CnC_Remastered_Collection

Command and Conquer: Red Alert
Log | Files | Refs | README | LICENSE

SOSFNCT.H (9574B)


      1 //
      2 // Copyright 2020 Electronic Arts Inc.
      3 //
      4 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free 
      5 // software: you can redistribute it and/or modify it under the terms of 
      6 // the GNU General Public License as published by the Free Software Foundation, 
      7 // either version 3 of the License, or (at your option) any later version.
      8 
      9 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed 
     10 // in the hope that it will be useful, but with permitted additional restrictions 
     11 // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT 
     12 // distributed with this program. You should have received a copy of the 
     13 // GNU General Public License along with permitted additional restrictions 
     14 // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
     15 
     16 /****************************************************************************
     17 
     18    File              : sosfnct.h
     19 
     20    Programmer(s)     : Don Fowler, Nick Skrepetos
     21    Date              :
     22 
     23    Purpose           : Include Files For Zortech C++ Compiler
     24 
     25    Last Updated      :
     26 
     27 ****************************************************************************
     28                Copyright(c) 1993,1994 Human Machine Interfaces
     29                             All Rights Reserved
     30 ****************************************************************************/
     31 
     32 #ifndef  _SOS_FUNCTIONS
     33 #define  _SOS_FUNCTIONS
     34 
     35 #pragma pack(4)
     36 
     37 WORD sosDIGILockMemory          (  VOID  );
     38 WORD sosDIGIUnLockMemory        (  VOID  );
     39 WORD sosDIGIInitSystem           (  LPSTR, WORD  );
     40 WORD sosDIGIUnInitSystem         (  VOID  );
     41 WORD sosDIGIInitDriver           (  WORD, _SOS_HARDWARE far *,
     42                                     _SOS_INIT_DRIVER far *, WORD far *   );
     43 WORD sosDIGIUnInitDriver         (  WORD, BOOL, BOOL  );
     44 WORD sosDIGILoadDriver          (  WORD, WORD, LPSTR far *, LPSTR far *, PSTR, PSTR, WORD * );
     45 WORD sosDIGIUnLoadDriver         (  WORD  );
     46 WORD sosDIGIGetDeviceCaps        (  WORD, LPSOSDEVICECAPS  );
     47 
     48 #ifdef PHARLAP
     49 LPSTR sosDIGIAllocateBuffer      (  WORD , WORD *, WORD * );
     50 #else
     51 LPSTR sosDIGIAllocateBuffer      (  WORD , WORD *, WORD * );
     52 #endif
     53 
     54 WORD sosDIGIStopSample           (  WORD, WORD  );
     55 WORD sosDIGISamplesPlaying       (  WORD  );
     56 BOOL sosDIGISampleDone           (  WORD, WORD  );
     57 BOOL sosDIGISampleFilling        (  WORD, WORD  );
     58 WORD sosDIGIStartSample          (  WORD, _SOS_START_SAMPLE far *  );
     59 WORD sosDIGIContinueSample       (  WORD, WORD, _SOS_START_SAMPLE far * );
     60 
     61 
     62 WORD  sosDIGIDetectInit          (  LPSTR  );
     63 WORD  sosDIGIDetectUnInit        (  VOID  );
     64 WORD  sosDIGIDetectFindHardware  (  WORD, _SOS_CAPABILITIES far *, WORD far * );
     65 WORD  sosDIGIDetectFindFirst     (  _SOS_CAPABILITIES far *, WORD far *  );
     66 WORD  sosDIGIDetectFindNext      (  _SOS_CAPABILITIES far *, WORD far *  );
     67 WORD  sosDIGIDetectGetSettings   (  _SOS_HARDWARE far *  );
     68 WORD  sosDIGIDetectGetCaps       (  WORD, _SOS_CAPABILITIES far *  );
     69 WORD  sosDIGIDetectVerifySettings(  _SOS_HARDWARE far *  );
     70 PSTR  sosGetErrorString          (  WORD  );
     71 
     72 WORD  sosDIGILoadTimer           (  WORD , LPSTR far *, LPSTR far *, PSTR, PSTR, WORD * );
     73 WORD  sosDIGIUnLoadTimer         (  WORD  );
     74 
     75 WORD  sosTIMERRegisterEvent      ( WORD wCallRate, VOID ( far * lpTimerEvent )( VOID ), WORD far *lpTimerHandle );
     76 WORD  sosTIMERInitSystem               (  WORD, WORD  );
     77 WORD  sosTIMERUnInitSystem             (  WORD  );
     78 WORD  sosTIMERSetRate                  (  WORD  );
     79 WORD  sosTIMERRemoveEvent              (  WORD );
     80 WORD  sosTIMERAlterEventRate           (  WORD, WORD  );
     81 WORD  sosTIMERGetEventRate             (  WORD  );
     82 VOID far sosTIMEROldHandler            (  VOID  );
     83 VOID far sosTIMERHandler               (  VOID  );
     84 
     85 // functions in soscntl.c
     86 WORD  sosDIGISetSampleVolume     ( WORD, WORD, WORD );
     87 WORD  sosDIGIGetSampleVolume     ( WORD, WORD );
     88 WORD  sosDIGISetChannel          ( WORD, WORD, WORD );
     89 WORD  sosDIGIGetChannel          ( WORD, WORD );
     90 WORD  sosDIGIGetBytesProcessed   ( WORD, WORD );
     91 WORD  sosDIGIGetLoopCount        ( WORD, WORD );
     92 WORD  sosDIGISetPanLocation      ( WORD, WORD, WORD );
     93 WORD  sosDIGIGetPanLocation      ( WORD, WORD );
     94 DWORD sosDIGISetPitch            ( WORD, WORD, DWORD );
     95 DWORD sosDIGIGetPitch            ( WORD, WORD );
     96 WORD  sosDIGIGetDMAPosition      ( WORD );
     97 WORD  sosDIGISetPanSpeed         ( WORD, WORD, WORD );
     98 WORD  sosDIGIGetPanSpeed         ( WORD, WORD );
     99 WORD  sosDIGIGetSampleID         ( WORD, WORD );
    100 WORD  sosDIGIGetSampleHandle     ( WORD, WORD );
    101 WORD  sosDIGISetMasterVolume     ( WORD, WORD );
    102 #ifdef PHARLAP
    103 VOID  sosFreeVDSPage          ( unsigned short, unsigned short, DWORD );
    104 WORD  sosAllocVDSPage         ( unsigned short *, unsigned short *, DWORD * );
    105 #else
    106 WORD  sosAllocVDSPage            ( LPSTR *, WORD *, WORD * );
    107 VOID  sosFreeVDSPage             ( WORD, WORD, LONG );
    108 #endif
    109 
    110 #ifdef __cplusplus
    111 extern "C" {
    112 #endif
    113 
    114 #ifdef PHARLAP
    115 extern   int   __cdecl sosRealFree          ( int );
    116 extern   BOOL  __cdecl  _sos_read( WORD, LPSTR, WORD, WORD * );
    117 extern   int   __cdecl sosRealAlloc( int, int *, int * );
    118 extern   void  __cdecl sosDRVFarMemCopy( LPSTR, LPSTR, WORD );
    119 extern   int   __cdecl sosGetCS( VOID );
    120 extern   int   __cdecl sosGetES( VOID );
    121 #else
    122 extern   int   __cdecl sosRealAlloc         ( int, int *, int * );
    123 extern   int   __cdecl sosRealFree          ( int );
    124 #endif
    125 
    126 // sos driver functions
    127 extern   WORD  __cdecl sosDRVLockMemory     ( DWORD, DWORD );
    128 extern   WORD  __cdecl sosDRVUnLockMemory   ( DWORD, DWORD );
    129 extern   void  __cdecl sosDRVGetCapsInfo    ( LPSTR, LPSTR, _SOS_CAPABILITIES far * );
    130 extern   void  __cdecl sosDetDRVGetCapsInfo ( LPSTR, LPSTR, _SOS_CAPABILITIES far * );
    131 extern   void  __cdecl sosDRVGetCapsPtr     ( LPSTR, LPSTR, _SOS_CAPABILITIES far * );
    132 extern   void  __cdecl sosDRVInit           ( LPSTR, LPSTR, int, int, int, int, int, int );
    133 extern   void  __cdecl sosDRVStart          ( LPSTR, LPSTR, int, int );
    134 extern   void  __cdecl sosDRVSetRate        ( LPSTR, LPSTR, int );
    135 extern   void  __cdecl sosDRVSetAction      ( LPSTR, LPSTR );
    136 extern   void  __cdecl sosDRVStop           ( LPSTR, LPSTR );
    137 extern   void  __cdecl sosDRVUnInit         ( LPSTR, LPSTR );
    138 extern   void  __cdecl sosDRVGetFillInfo    ( LPSTR, LPSTR, LPSTR, int, int, int, _SOS_FILL_INFO * );
    139 extern   void  __cdecl sosFillSampleStructs ( PSTR, LPSTR );
    140 extern   WORD  __cdecl sosDetDRVExist       ( LPSTR, LPSTR );
    141 extern   WORD  __cdecl sosDetDRVGetSettings ( LPSTR, LPSTR );
    142 extern   WORD  __cdecl sosDetDRVVerifySettings( LPSTR, WORD, WORD, WORD, LPSTR );
    143 extern   WORD  __cdecl sosDIGIInitForWindows( WORD );
    144 extern   WORD  __cdecl sosDIGIUnInitForWindows( WORD );
    145 extern   LPSTR __cdecl sosAllocateFarMem      ( WORD, PSTR, WORD * );
    146 extern   LPSTR __cdecl sosCreateAliasCS       ( LPSTR );
    147 extern   VOID  __cdecl sosFreeSelector        ( LPSTR, DWORD );
    148 extern   LPSTR __cdecl sosMAKEDOSPtr          ( PSTR );
    149 extern   VOID  __cdecl sosDetDRVSetEnvString  ( DWORD, PSTR );
    150 extern   PSTR  __cdecl sosDetDRVGetEnvString  ( DWORD );
    151 extern   VOID  __cdecl sosDetDRVEnvStringInit ( LPSTR, LPSTR );
    152 extern   VOID  __cdecl sosDRVSetupCallFunctions( LPSTR, LPSTR, LPSTR, LPSTR );
    153 extern   WORD  __cdecl sosDRVGetFreeMemory     ( VOID );
    154 extern   WORD  __cdecl sosDRVAllocVDSStruct    ( WORD, WORD *, WORD * );
    155 extern   WORD  __cdecl sosDRVFreeVDSStruct     ( WORD, WORD );
    156 extern   WORD  __cdecl sosDRVIsWindowsActive   ( VOID );
    157 extern   WORD  __cdecl sosDRVVDSGetBuffer    ( WORD );
    158 extern   WORD  __cdecl sosDRVVDSFreeBuffer   ( WORD );
    159 extern   WORD  __cdecl getDS( VOID );
    160 extern   WORD  __cdecl sosDRVMakeDMASelector   ( WORD );
    161 extern   WORD  __cdecl sosDRVFreeDMASelector   ( WORD );
    162 
    163 
    164 extern   void  __cdecl sosTIMERDRVInit( int wRate, void ( far * )( void ) );
    165 extern   void  __cdecl sosTIMERDRVUnInit( void );
    166 extern   void  __cdecl sosTIMERDRVHandler( void );
    167 extern   void  __cdecl sosTIMERDRVFHandler( void );
    168 extern   void  __cdecl sosTIMERDRVEnable( void );
    169 extern   void  __cdecl sosTIMERDRVDisable( void );
    170 extern   void  __cdecl sosTIMERDRVCallOld( void );
    171 extern   void  __cdecl sosTIMERDRVSetRate( WORD );
    172 extern   void  __cdecl sosDIGITimer_Start( void );
    173 extern   void  __cdecl sosDIGITimer_End( void );
    174 extern   void  __cdecl sosDIGIDrv_Start( void );
    175 extern   void  __cdecl sosDIGIDrv_End( void );
    176 #ifdef __cplusplus
    177 }
    178 #endif
    179 
    180 // external functions for handling system initialization and
    181 // uninitialization
    182 WORD  sosEXDIGInitDriver               (  WORD, WORD, WORD, LPSTR,
    183                                           _SOS_HARDWARE far *, WORD *  );
    184 WORD  sosEXDIGIUnInitDriver            (  VOID  );
    185 
    186 WORD  sosEXDETFindDriver               (  WORD, LPSTR, _SOS_HARDWARE far *,
    187                                           _SOS_CAPABILITIES far *  );
    188 
    189 // memory locking prototypes
    190 VOID  sosDIGICaps_Start( VOID );
    191 VOID  sosDIGICaps_End( VOID );
    192 VOID  sosDIGIErr_Start( VOID );
    193 VOID  sosDIGIErr_End( VOID );
    194 VOID  sosDIGITmr_Start( VOID );
    195 VOID  sosDIGITmr_End( VOID );
    196 VOID  sosDIGIStart_Start( VOID );
    197 VOID  sosDIGIStart_End( VOID );
    198 VOID  sosDIGIPlyng_Start( VOID );
    199 VOID  sosDIGIPlyng_End( VOID );
    200 VOID  sosDIGIRate_Start( VOID );
    201 VOID  sosDIGIRate_End( VOID );
    202 VOID  sosDIGIDone_Start( VOID );
    203 VOID  sosDIGIDone_End( VOID );
    204 VOID  sosDIGIDetec_Start( VOID );
    205 VOID  sosDIGIDetec_End( VOID );
    206 VOID  sosDIGIInit_Start( VOID );
    207 VOID  sosDIGIInit_End( VOID );
    208 VOID  sosDIGILoad_Start( VOID );
    209 VOID  sosDIGILoad_End( VOID );
    210 VOID  sosDIGICntl_Start( VOID );
    211 VOID  sosDIGICntl_End( VOID );
    212 
    213 #pragma pack()
    214 
    215 #endif
    216