2
0

SOSCOMP.H 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. ** Command & Conquer Red Alert(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** 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, see <http://www.gnu.org/licenses/>.
  17. */
  18. /****************************************************************************
  19. *
  20. * File : soscomp.h
  21. * Date Created : 6/1/94
  22. * Description :
  23. *
  24. * Programmer(s) : Nick Skrepetos
  25. * Last Modification : 10/1/94 - 11:37:9 AM
  26. * Additional Notes : Modified by Denzil E. Long, Jr.
  27. *
  28. *****************************************************************************
  29. * Copyright (c) 1994, HMI, Inc. All Rights Reserved *
  30. ****************************************************************************/
  31. #ifndef _SOS_COMPRESS
  32. #define _SOS_COMPRESS
  33. /* compression types */
  34. enum {
  35. _ADPCM_TYPE_1,
  36. };
  37. /* define compression structure */
  38. typedef struct _tagCOMPRESS_INFO {
  39. char *lpSource;
  40. char *lpDest;
  41. unsigned long dwCompSize;
  42. unsigned long dwUnCompSize;
  43. short wBitSize;
  44. short wChannels;
  45. unsigned long dwSampleIndex;
  46. long dwPredicted;
  47. long dwDifference;
  48. short wCodeBuf;
  49. short wCode;
  50. short wStep;
  51. short wIndex;
  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. } _SOS_COMPRESS_INFO;
  60. /* compressed file type header */
  61. typedef struct _tagCOMPRESS_HEADER {
  62. unsigned long dwType; // type of compression
  63. unsigned long dwCompressedSize; // compressed file size
  64. unsigned long dwUnCompressedSize; // uncompressed file size
  65. unsigned long dwSourceBitSize; // original bit size
  66. char szName[16]; // file type, for error checking
  67. } _SOS_COMPRESS_HEADER;
  68. /* Prototypes */
  69. #ifdef __cplusplus
  70. extern "C" {
  71. #endif
  72. void cdecl sosCODECInitStream(_SOS_COMPRESS_INFO *);
  73. unsigned long cdecl sosCODECCompressData(_SOS_COMPRESS_INFO *,unsigned long);
  74. unsigned long cdecl sosCODECDecompressData(_SOS_COMPRESS_INFO *,unsigned long);
  75. #ifdef __cplusplus
  76. }
  77. #endif
  78. #endif