MemFileFest.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. ////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2016 RWS Inc, All Rights Reserved
  4. //
  5. // This program is free software; you can redistribute it and/or modify
  6. // it under the terms of version 2 of the GNU General Public License as published by
  7. // the Free Software Foundation
  8. //
  9. // This program is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU General Public License along
  15. // with this program; if not, write to the Free Software Foundation, Inc.,
  16. // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  17. //
  18. // MemFileFest.h
  19. // Project: Nostril (aka Postal)
  20. //
  21. // History:
  22. // 09/12/97 JMI Started.
  23. //
  24. //////////////////////////////////////////////////////////////////////////////
  25. //
  26. // Manages a group of memory resources that represent disk files. Currently
  27. // used for .RLM files to limit the usefulness of crippleware demos.
  28. //
  29. //////////////////////////////////////////////////////////////////////////////
  30. #include "RSPiX.h"
  31. #include "CompileOptions.h"
  32. //////////////////////////////////////////////////////////////////////////////
  33. // Typedefs.
  34. //////////////////////////////////////////////////////////////////////////////
  35. typedef struct
  36. {
  37. char* pszResName; // Resource filename.
  38. U8* pau8Res; // Resource data.
  39. long lResSize; // Amount of resource data in bytes.
  40. } FATEntry;
  41. //////////////////////////////////////////////////////////////////////////////
  42. // Protos.
  43. //////////////////////////////////////////////////////////////////////////////
  44. #if defined(ENABLE_PLAY_SPECIFIC_REALMS_ONLY)
  45. //////////////////////////////////////////////////////////////////////////////
  46. // Given a filename, open an RFile to the corresponding resource data.
  47. //////////////////////////////////////////////////////////////////////////////
  48. extern short GetMemFileResource( // Returns 0 on successful open.
  49. const char* pszResName, // In: Res filename.
  50. RFile::Endian endian, // In: Endian nature for RFile.
  51. RFile* pfile); // In: File to open with.
  52. #endif // ENABLE_PLAY_SPECIFIC_REALMS_ONLY
  53. //////////////////////////////////////////////////////////////////////////////
  54. // EOF
  55. //////////////////////////////////////////////////////////////////////////////