SOSCOMP.H 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. unsigned long dwSampleIndex;
  44. long dwPredicted;
  45. long dwDifference;
  46. short wCodeBuf;
  47. short wCode;
  48. short wStep;
  49. short wIndex;
  50. unsigned long dwSampleIndex2; //added BP for channel 2
  51. long dwPredicted2; //added BP for channel 2
  52. long dwDifference2; //added BP for channel 2
  53. short wCodeBuf2; //added BP for channel 2
  54. short wCode2; //added BP for channel 2
  55. short wStep2; //added BP for channel 2
  56. short wIndex2; //added BP for channel 2
  57. short wBitSize;
  58. short wChannels; //added BP for # of channels
  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. extern "C" {
  70. void sosCODECInitStream(_SOS_COMPRESS_INFO *);
  71. unsigned long sosCODECCompressData(_SOS_COMPRESS_INFO *, unsigned long);
  72. unsigned long sosCODECDecompressData(_SOS_COMPRESS_INFO *, unsigned long);
  73. }
  74. #endif
  75.