SOSCOMP.H (3070B)
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 : soscomp.h 19 * Date Created : 6/1/94 20 * Description : 21 * 22 * Programmer(s) : Nick Skrepetos 23 * Last Modification : 10/1/94 - 11:37:9 AM 24 * Additional Notes : Modified by Denzil E. Long, Jr. 25 * 26 ***************************************************************************** 27 * Copyright (c) 1994, HMI, Inc. All Rights Reserved * 28 ****************************************************************************/ 29 30 #ifndef _SOS_COMPRESS 31 #define _SOS_COMPRESS 32 33 /* compression types */ 34 enum { 35 _ADPCM_TYPE_1, 36 }; 37 38 /* define compression structure */ 39 typedef struct _tagCOMPRESS_INFO { 40 char *lpSource; 41 char *lpDest; 42 unsigned long dwCompSize; 43 unsigned long dwUnCompSize; 44 unsigned long dwSampleIndex; 45 long dwPredicted; 46 long dwDifference; 47 short wCodeBuf; 48 short wCode; 49 short wStep; 50 short wIndex; 51 52 unsigned long dwSampleIndex2; //added BP for channel 2 53 long dwPredicted2; //added BP for channel 2 54 long dwDifference2; //added BP for channel 2 55 short wCodeBuf2; //added BP for channel 2 56 short wCode2; //added BP for channel 2 57 short wStep2; //added BP for channel 2 58 short wIndex2; //added BP for channel 2 59 short wBitSize; 60 short wChannels; //added BP for # of channels 61 } _SOS_COMPRESS_INFO; 62 63 /* compressed file type header */ 64 typedef struct _tagCOMPRESS_HEADER { 65 unsigned long dwType; // type of compression 66 unsigned long dwCompressedSize; // compressed file size 67 unsigned long dwUnCompressedSize; // uncompressed file size 68 unsigned long dwSourceBitSize; // original bit size 69 char szName[16]; // file type, for error checking 70 } _SOS_COMPRESS_HEADER; 71 72 /* Prototypes */ 73 extern "C" { 74 void __cdecl sosCODECInitStream(_SOS_COMPRESS_INFO *); 75 unsigned long __cdecl sosCODECCompressData(_SOS_COMPRESS_INFO *, unsigned long); 76 unsigned long __cdecl sosCODECDecompressData(_SOS_COMPRESS_INFO *, unsigned long); 77 unsigned long __cdecl General_sosCODECDecompressData(_SOS_COMPRESS_INFO *, unsigned long); 78 } 79 80 #endif