SOSCOMP.H 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed
  9. // in the hope that it will be useful, but with permitted additional restrictions
  10. // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
  11. // distributed with this program. You should have received a copy of the
  12. // GNU General Public License along with permitted additional restrictions
  13. // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
  14. /****************************************************************************
  15. *
  16. * File : soscomp.h
  17. * Date Created : 6/1/94
  18. * Description :
  19. *
  20. * Programmer(s) : Nick Skrepetos
  21. * Last Modification : 10/1/94 - 11:37:9 AM
  22. * Additional Notes : Modified by Denzil E. Long, Jr.
  23. *
  24. *****************************************************************************
  25. * Copyright (c) 1994, HMI, Inc. All Rights Reserved *
  26. ****************************************************************************/
  27. #ifndef _SOS_COMPRESS
  28. #define _SOS_COMPRESS
  29. /* compression types */
  30. enum {
  31. _ADPCM_TYPE_1,
  32. };
  33. /* define compression structure */
  34. typedef struct _tagCOMPRESS_INFO {
  35. char *lpSource;
  36. char *lpDest;
  37. unsigned long dwCompSize;
  38. unsigned long dwUnCompSize;
  39. unsigned long dwSampleIndex;
  40. long dwPredicted;
  41. long dwDifference;
  42. short wCodeBuf;
  43. short wCode;
  44. short wStep;
  45. short wIndex;
  46. unsigned long dwSampleIndex2; //added BP for channel 2
  47. long dwPredicted2; //added BP for channel 2
  48. long dwDifference2; //added BP for channel 2
  49. short wCodeBuf2; //added BP for channel 2
  50. short wCode2; //added BP for channel 2
  51. short wStep2; //added BP for channel 2
  52. short wIndex2; //added BP for channel 2
  53. short wBitSize;
  54. short wChannels; //added BP for # of channels
  55. } _SOS_COMPRESS_INFO;
  56. /* compressed file type header */
  57. typedef struct _tagCOMPRESS_HEADER {
  58. unsigned long dwType; // type of compression
  59. unsigned long dwCompressedSize; // compressed file size
  60. unsigned long dwUnCompressedSize; // uncompressed file size
  61. unsigned long dwSourceBitSize; // original bit size
  62. char szName[16]; // file type, for error checking
  63. } _SOS_COMPRESS_HEADER;
  64. /* Prototypes */
  65. extern "C" {
  66. void __cdecl sosCODECInitStream(_SOS_COMPRESS_INFO *);
  67. unsigned long __cdecl sosCODECCompressData(_SOS_COMPRESS_INFO *, unsigned long);
  68. unsigned long __cdecl sosCODECDecompressData(_SOS_COMPRESS_INFO *, unsigned long);
  69. unsigned long __cdecl General_sosCODECDecompressData(_SOS_COMPRESS_INFO *, unsigned long);
  70. }
  71. #endif