UNIV.cpp 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671
  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. //*****************************************************************************
  19. //
  20. // UNIV.CPP
  21. //
  22. // History:
  23. // 01/26/95 BH Started work on the animation loading functions
  24. //
  25. //*****************************************************************************
  26. //
  27. // This file contains functions that are used to set up a particular world,
  28. // stage and section of the game. It includes functions that load data
  29. // generated by the linker into memory where they can be used during a
  30. // particular level of the game.
  31. //
  32. //*****************************************************************************
  33. #include <stdio.h>
  34. #include <windows.h>
  35. #include <fstream.h>
  36. #include <assert.h>
  37. #include "univ.h"
  38. #include "rifflib.h"
  39. //*****************************************************************************
  40. //
  41. // Default Constructor
  42. //
  43. //*****************************************************************************
  44. CUniverse::CUniverse()
  45. {
  46. // m_strFileGame = "h:\\zootopia\\code\\library\\zoo.gme";
  47. // m_strFileAnim = "h:\\zootopia\\code\\library\\zoo.anm";
  48. // m_strFileBack = "h:\\zootopia\\code\\library\\zoo.bg";
  49. // m_strFileAPal = "h:\\zootopia\\code\\library\\zoo.apl";
  50. // m_strFileBPal = "h:\\zootopia\\code\\library\\zoo.bpl";
  51. m_pSection = NULL;
  52. m_pAnimData = NULL;
  53. m_pBackData = NULL;
  54. m_pBackgroundPal = NULL;
  55. m_pSpritePal = NULL;
  56. m_pAttrMap = NULL;
  57. m_pAttrCont = NULL;
  58. m_pEventData = NULL;
  59. m_pImageData = NULL;
  60. sprintf(m_strDataPath, "c:\\w\\rspix\\yellow\\sprtest\\");
  61. }
  62. //*****************************************************************************
  63. //
  64. // Default Destructor
  65. //
  66. //*****************************************************************************
  67. CUniverse::~CUniverse()
  68. {
  69. if (m_pSection != NULL)
  70. delete m_pSection;
  71. // free(m_pvImageChunks);
  72. }
  73. //*****************************************************************************
  74. //
  75. // SetSection
  76. //
  77. // Description:
  78. // This function opens the game info file and reads a SECTION structure
  79. // from the file into memory and sets the member m_pSection to point to
  80. // this structure. Other modules can then call member functions such
  81. // as GetSpritePal or GetAnimBuildData to get information from the
  82. // current Section structure.
  83. //
  84. // Input:
  85. // sWorld = Current world number which contains desired section to load
  86. // sStage = Current section within world containing desired section to load
  87. // sSection = Section number to load
  88. //
  89. // Uses:
  90. // Uses the filename members to open the files and then assigns correct
  91. // values to the pointer members
  92. //
  93. // Output:
  94. // none
  95. //
  96. // Return:
  97. // 0 if all files were opened and read successfully
  98. // ERROR code if there was a problem opening file
  99. //
  100. //*****************************************************************************
  101. #if 0
  102. short CUniverse::SetSection(
  103. short sWorld, // World to load
  104. short sStage, // Stage to load
  105. short sSection) // Section to load
  106. {
  107. FILE* fp;
  108. short sNumEntries;
  109. long lOffset;
  110. // open the game information file
  111. if (!(fp = fopen(m_strFileGame, "rb")))
  112. return UNIVERSE_CANT_OPEN_FILE;
  113. //-----------------------------------------------------------------------------
  114. // universe
  115. // dw n
  116. // da world0
  117. // da worldn
  118. //-----------------------------------------------------------------------------
  119. // Get number of worlds and check validity of user's selection
  120. fread(&sNumEntries, sizeof(short), 1, fp);
  121. if (sNumEntries > sWorld || sWorld < 0)
  122. return UNIVERSE_INVALID_WORLD;
  123. // Get offset to world block (list of stage pointers)
  124. int i;
  125. for (i = 0; i <= sWorld; i++)
  126. fread(&lOffset, sizeof(void*), 1, fp); // get offset for world
  127. // Go to list of stage pointers
  128. if (fseek(fp, lOffset, SEEK_SET) != 0)
  129. return UNIVERSE_OFFSET_ERROR;
  130. //------------------------------------------------------------------------------
  131. // world0
  132. // dw n
  133. // da stage0
  134. // da stage1
  135. // da stagen
  136. //------------------------------------------------------------------------------
  137. // Get number of stages in this world and check validity of user's selection
  138. fread(&sNumEntries, sizeof(short), 1, fp);
  139. if (sNumEntries > sStage || sStage < 0)
  140. return UNIVERSE_INVALID_STAGE;
  141. // Get offset to stage block (list of section pointers)
  142. for (i = 0; i <= sStage; i++)
  143. fread(&lOffset, sizeof(void*), 1, fp);
  144. // Go to list of section pointers
  145. if (fseek(fp, lOffset, SEEK_SET) != 0)
  146. return UNIVERSE_OFFSET_ERROR;
  147. //------------------------------------------------------------------------------
  148. // stage0
  149. // dw n
  150. // da stage0section0
  151. // da stage0section1
  152. // da stage0sectionn
  153. //------------------------------------------------------------------------------
  154. // Get number of sections in stage and check validity of user's selection
  155. fread(&sNumEntries, sizeof(short), 1, fp);
  156. if (sNumEntries > sSection || sSection < 0)
  157. return UNIVERSE_INVALID_SECTION;
  158. // Get offset to section structures (data)
  159. for (i = 0; i <= sSection;i++)
  160. fread(&lOffset, sizeof(void*), 1, fp);
  161. // Go to desired section structure
  162. if (fseek(fp, lOffset, SEEK_SET) != 0)
  163. return UNIVERSE_OFFSET_ERROR;
  164. //------------------------------------------------------------------------------
  165. // allocate memory for the section structure and read the data from the file
  166. //------------------------------------------------------------------------------
  167. // don't need structure, just get file names and put into filename members
  168. // m_pSection = new SECTION;
  169. // fread(m_pSection, sizeof(SECTION), 1, fp);
  170. fread(m_strFileAPal, sizeof(char), UNIVERSE_MAX_FILENAME, fp);
  171. fread(m_strFileAnim, sizeof(char), UNIVERSE_MAX_FILENAME, fp);
  172. fread(m_strFileBPal, sizeof(char), UNIVERSE_MAX_FILENAME, fp);
  173. fread(m_strFileBack, sizeof(char), UNIVERSE_MAX_FILENAME, fp);
  174. fread(m_strFileAttr, sizeof(char), UNIVERSE_MAX_FILENAME, fp);
  175. fread(m_strFileEvent, sizeof(char), UNIVERSE_MAX_FILENAME, fp);
  176. fread(m_strFileImage, sizeof(char), UNIVERSE_MAX_FILENAME, fp);
  177. LoadAnimData();
  178. LoadBackgroundData();
  179. m_pSpritePal = LoadPalette(m_strFileAPal);
  180. m_pBackgroundPal = LoadPalette(m_strFileBPal);
  181. LoadAttributeData();
  182. LoadEventData();
  183. fclose(fp);
  184. return 0;
  185. }
  186. #endif
  187. //*****************************************************************************
  188. //
  189. // New file format
  190. //
  191. //*****************************************************************************
  192. short CUniverse::SetSection(
  193. short sWorld, // World to load
  194. short sStage, // Stage to load
  195. short sSection) // Section to load
  196. {
  197. fstream fsGameInfo("zoo.gme", ios::in, filebuf::sh_read);
  198. if (!fsGameInfo.is_open())
  199. return UNIVERSE_CANT_OPEN_FILE;
  200. char strLine[UNIVERSE_MAXLINE]; // buffer for reading
  201. char strLevelName[UNIVERSE_MAXLINE];
  202. sprintf(strLevelName, "level%.2x%.2x%.2x", sWorld, sStage, sSection);
  203. // fsGameInfo.getline(strLine, UNIVERSE_MAXLINE, '\n');
  204. do
  205. {
  206. fsGameInfo.getline(strLine, UNIVERSE_MAXLINE, '\n');
  207. }
  208. while (stricmp(strLine, strLevelName) != 0 && !fsGameInfo.eof());
  209. if (fsGameInfo.eof())
  210. return UNIVERSE_INVALID_LEVEL;
  211. fsGameInfo.eatwhite();
  212. fsGameInfo.getline(m_strFileAnim, UNIVERSE_MAXLINE);
  213. fsGameInfo.eatwhite();
  214. fsGameInfo.getline(m_strFileAPal, UNIVERSE_MAXLINE);
  215. fsGameInfo.eatwhite();
  216. fsGameInfo.getline(m_strFileImage, UNIVERSE_MAXLINE);
  217. fsGameInfo.eatwhite();
  218. fsGameInfo.getline(m_strFileZone, UNIVERSE_MAXLINE);
  219. fsGameInfo.eatwhite();
  220. fsGameInfo.getline(m_strFileBack, UNIVERSE_MAXLINE);
  221. fsGameInfo.eatwhite();
  222. fsGameInfo.getline(m_strFileBPal, UNIVERSE_MAXLINE);
  223. fsGameInfo.eatwhite();
  224. fsGameInfo.getline(m_strFileAttr, UNIVERSE_MAXLINE);
  225. fsGameInfo.eatwhite();
  226. fsGameInfo.getline(m_strFileEvent, UNIVERSE_MAXLINE);
  227. short sReturnValue;
  228. if (sReturnValue = LoadAnimData())
  229. return sReturnValue;
  230. // LoadBackgroundData();
  231. // m_pSpritePal = LoadPalette(m_strFileAPal);
  232. // m_pBackgroundPal = LoadPalette(m_strFileBPal);
  233. // LoadAttributeData();
  234. // LoadEventData();
  235. return 0;
  236. }
  237. //*****************************************************************************
  238. //
  239. // LoadAnimData
  240. //
  241. // Description:
  242. // Private function to load the animation data file into memory for a
  243. // section selected by SetSection(). All of the data from the animation
  244. // file for this section will be loaded into memory. The offsets that
  245. // are stored in the data file will be converted into pointers.
  246. //
  247. // Input:
  248. // none
  249. //
  250. // Uses:
  251. // m_strFileAnim to get the animation build data filename
  252. // m_pAnimData gets set to the ANIM structure in memory
  253. //
  254. // Output:
  255. // none
  256. //
  257. // Return:
  258. // 0 if the file was loaded correctly
  259. // ERROR code if it was not loaded correctly
  260. //
  261. //*****************************************************************************
  262. short CUniverse::LoadAnimData()
  263. {
  264. char strPathName[UNIVERSE_MAX_PATHNAME];
  265. CRiff AnimFile;
  266. sprintf(strPathName, "%s%s", m_strDataPath, m_strFileAnim);
  267. if (AnimFile.Open(strPathName, READ))
  268. return UNIVERSE_CANT_OPEN_FILE;
  269. CRiff ImageFile;
  270. sprintf(strPathName, "%s%s", m_strDataPath, m_strFileImage);
  271. if (ImageFile.Open(strPathName, READ))
  272. return UNIVERSE_CANT_OPEN_FILE;
  273. CHUNK* pChunkHeader = (CHUNK*) malloc(sizeof(CHUNK));
  274. AnimFile.ReadHeader(pChunkHeader);
  275. if (pChunkHeader->dwType != CRiff::StringToCode("ANST"))
  276. {
  277. free(pChunkHeader);
  278. return UNIVERSE_WRONG_FILETYPE;
  279. }
  280. ANIMSET* pAnimSet = (ANIMSET*) malloc(sizeof(ANIMSET) +
  281. (pChunkHeader->dwSub - 1) * sizeof(ANIM*));
  282. pAnimSet->lNumAnims = pChunkHeader->dwSub;
  283. AnimFile.DescendChunk();
  284. long lAnim;
  285. short sFrame;
  286. for (lAnim = 0; lAnim < pAnimSet->lNumAnims; lAnim++)
  287. {
  288. AnimFile.ReadHeader(pChunkHeader);
  289. pAnimSet->apAnims[lAnim] = (ANIM*) malloc(pChunkHeader->dwSize);
  290. AnimFile.ReadData((void*) pAnimSet->apAnims[lAnim]);
  291. for (sFrame = 0; sFrame < pAnimSet->apAnims[lAnim]->sNumFrames; sFrame++)
  292. {
  293. ImageFile.SetCurrentChunk((long) pAnimSet->apAnims[lAnim]->aFrames[sFrame].pImage);
  294. ImageFile.ReadHeader(pChunkHeader);
  295. pAnimSet->apAnims[lAnim]->aFrames[sFrame].pImage =
  296. (IMAGE*) malloc(pChunkHeader->dwSize);
  297. ImageFile.ReadData((void*) pAnimSet->apAnims[lAnim]->aFrames[sFrame].pImage);
  298. //ZoneFile.SetCurrentChunk(pAnimSet->apAnims[lAnim]->aFrames[sFrame].pZoneSet);
  299. //ZoneFile.ReadHeader(pChunkHeader);
  300. //pAnimSet->apAnims[lAnim]->aFrames[sFrame].pZoneSet =
  301. // (ZONESET*) malloc(pChunkHeader->dwSize);
  302. //ZoneFile.ReadData((void*) pAnimSet->apAnims[lAnim]->aFrames[sFrame].pZoneSet);
  303. }
  304. }
  305. free(pChunkHeader);
  306. return 0;
  307. }
  308. ///////////////////////////////////////////////////////////////////////////////
  309. // alternate version
  310. ///////////////////////////////////////////////////////////////////////////////
  311. #if 0
  312. short CUniverse::LoadAnimData()
  313. {
  314. char strPathName[UNIVERSE_MAX_PATHNAME];
  315. CRiff AnimFile;
  316. sprintf(strPathName, "%s%s", m_strDataPath, m_strFileAnim);
  317. if (AnimFile.Open(strPathName, READ)
  318. return UNIVERSE_CANT_OPEN_FILE;
  319. CRiff ImageFile;
  320. sprintf(strPathName, "%s%s", m_strDataPath, m_strFileImage);
  321. if (ImageFile.Open(strPathName, READ)
  322. return UNIVERSE_CANT_OPEN_FILE;
  323. CHUNK* pChunkHeader = (CHUNK*) malloc(sizeof(CHUNK));
  324. // Read in all of the pictures
  325. ImageFile.ReadHeader(pChunkHeader);
  326. m_pvImageChunks = malloc(sizeof(pChunkHeader->dwSize));
  327. ImageFile.ReadData(m_pvImageChunks);
  328. AnimFile.ReadHeader(pChunkHeader);
  329. if (pChunkHeader->dwType != CRiff::StringToCode("ANST"))
  330. {
  331. free(pChunkHeader);
  332. return UNIVERSE_WRONG_FILETYPE;
  333. }
  334. ANIMSET* pAnimSet = (ANIMSET*) malloc(sizeof(ANIMSET) +
  335. (pChunkHeader->dwSub - 1) * sizeof(ANIM*));
  336. pAnimSet->lNumAnims = pChunkHeader->dwSub;
  337. AnimFile.DescendChunk();
  338. long lAnim;
  339. short sFrames;
  340. for (lAnim = 0; lAnim < pAnimSet->lNumAnims; lAnim++)
  341. {
  342. AnimFile.ReadHeader(pChunkHeader);
  343. pAnimSet->apAnims[lAnim] = (ANIM*) malloc(pChunkHeader->dwSize);
  344. AnimFile.ReadData((void*) pAnimSet->apAnims[lAnim]);
  345. for (sFrames = 0; sFrames < pAnimSet->apAnims[lAnim]->sNumFrames; sFrames++)
  346. {
  347. pAnimSet->apAnims[lAnim]->aFrames[sFrame].pImage += m_pvImageChunks;
  348. //pAnimSet->apAnims[lAnim]->aFrames[sFrame].pZoneSet += m_pvZoneChunks;
  349. }
  350. }
  351. free (pChunkHeader);
  352. return 0;
  353. }
  354. #endif
  355. //*****************************************************************************
  356. //
  357. // SetAnimOffsets
  358. //
  359. // Description:
  360. // This function is called by LoadAnimData to resolve the pointers of
  361. // a particular animation. This function use the ANIM info to traverse
  362. // the array of FRAME structures that follow. Within the FRAME structure
  363. // there are two fields that need to be changed from offsets within the
  364. // data file, to actual memory pointers. The base pointer for the image
  365. // data will be added to the pImage field, and the base pointer for the
  366. // animation data will be added to the pZoneSet field.
  367. //
  368. // Input:
  369. // ANIM* pAnimation = a pointer to an ANIM structure to be updated
  370. //
  371. // Uses:
  372. // m_pAnimData pointer as the base pointer to which the pZoneSet offset
  373. // will be added
  374. // m_pImageData pointer as teh base poniter to which the pImage offset
  375. // will be added
  376. //
  377. // Output:
  378. // none
  379. //
  380. // Return:
  381. // none
  382. //
  383. // Note:
  384. // In the file, offset values of 0 indicate that the pointer should
  385. // be NULL. For example if a particular frame does not use an Image
  386. // then the offset for the pImage field will be 0 and the pointer
  387. // pImage should remain 0 (NULL).
  388. //
  389. //*****************************************************************************
  390. void CUniverse::SetAnimOffsets(
  391. ANIM* pAnimation) // Pointer to ANIM structure
  392. {
  393. short s;
  394. for (s = 0; s < pAnimation->sNumFrames; s++)
  395. {
  396. if (pAnimation->aFrames[s].pImage)
  397. // pAnimation->aFrames[s].pImage += (BYTE*) m_pImageData;
  398. pAnimation->aFrames[s].pImage = (IMAGE*)
  399. ((BYTE*) pAnimation->aFrames[s].pImage +
  400. (DWORD) m_pImageData - (DWORD) 4
  401. );
  402. if (pAnimation->aFrames[s].pZoneSet)
  403. {
  404. // pAnimation->aFrames[s].pZoneSet += (BYTE*) m_pAnimData;
  405. pAnimation->aFrames[s].pZoneSet = (ZONESET*)
  406. ((BYTE*) pAnimation->aFrames[s].pZoneSet +
  407. (DWORD) m_pAnimData - (DWORD) 4
  408. );
  409. SetZonesetOffsets(pAnimation->aFrames[s].pZoneSet);
  410. }
  411. }
  412. }
  413. //*****************************************************************************
  414. //
  415. // SetZonesetOffsets
  416. //
  417. // Description:
  418. //
  419. //*****************************************************************************
  420. void CUniverse::SetZonesetOffsets(
  421. ZONESET* pZoneset) // Pointer to ZONESET structure
  422. {
  423. short s;
  424. for (s = 0; s < MAX_ZONETYPES; s++)
  425. {
  426. if (pZoneset->apZoneLists[s])
  427. // pZoneset->apZoneLists[s] += (ZONELIST*) m_pAnimData;
  428. pZoneset->apZoneLists[s] = (ZONELIST*)
  429. ((BYTE*) pZoneset->apZoneLists[s] +
  430. (DWORD) m_pAnimData - (DWORD) 4
  431. );
  432. }
  433. }
  434. //*****************************************************************************
  435. //
  436. // LoadBackgroundData
  437. //
  438. // Description:
  439. // Private function called by SetSection to load the background data file
  440. // for the section selected by SetSection(). All of the data from the
  441. // file corresponding to the current section will be loaded into memory
  442. // and the member pointer m_pBackData will be set.
  443. //
  444. // Input:
  445. // none
  446. //
  447. // Uses:
  448. // m_strFileBack to get the background build data filename
  449. // m_pBackData gets set to the BG structure in memory
  450. //
  451. // Output:
  452. // none
  453. //
  454. // Return:
  455. // 0 if the file was loaded correctly
  456. // ERROR code if it was not loaded correctly
  457. //
  458. //*****************************************************************************
  459. short CUniverse::LoadBackgroundData()
  460. {
  461. return 0;
  462. }
  463. //*****************************************************************************
  464. //
  465. // LoadAttributeData
  466. //
  467. // Description:
  468. // Private function called by SetSection to load the attribute data file
  469. // for this particular section. The member pointer m_pAttributeData will
  470. // be set to the ATTRIB structure in memory.
  471. //
  472. // Input:
  473. // none
  474. //
  475. // Uses:
  476. // m_strFileAttr to get the attribute data filename
  477. // m_pAttributeMap gets set to the attribute map array
  478. // m_pAttributeCont gets set to the array of attribute contours
  479. //
  480. // Output:
  481. // none
  482. //
  483. // Return:
  484. // 0 if the file was loaded correctly
  485. // ERROR code if the file was not loaded correctly
  486. //
  487. //*****************************************************************************
  488. short CUniverse::LoadAttributeData()
  489. {
  490. FILE* fpAttrData;
  491. fpAttrData = fopen(m_strFileAttr, "rb");
  492. short sLength;
  493. // ifstream ifsAttrData(m_strFileAttrib, ios::in, filebuf::sh_read);
  494. fread(&m_sMapWidth, sizeof(short), 1, fpAttrData); //get width
  495. fread(&sLength, sizeof(short), 1, fpAttrData); //get height
  496. sLength *= m_sMapWidth; //data = width*height
  497. // ifsAttrData >> sLength;
  498. m_pAttrMap = new WORD[sLength];
  499. // ifsAttrData.read();
  500. fread(m_pAttrMap, sizeof(WORD), sLength, fpAttrData);
  501. fread(&sLength, sizeof(WORD), 1, fpAttrData);
  502. m_pAttrCont = (CONTOUR*) new WORD[sLength];
  503. fread(m_pAttrCont, sizeof(WORD), sLength, fpAttrData);
  504. // ifsAttrData >> sLength;
  505. // m_pAttrCont = new short[sLength];
  506. // ifsAttrData.read();
  507. return 0;
  508. }
  509. //*****************************************************************************
  510. //
  511. // LoadEventData
  512. //
  513. // Description:
  514. // Private function called by SetSection to load the event data file
  515. // for this particular section. The member pointer m_pEventData will
  516. // be set to the EVENT structure in memory.
  517. //
  518. // Input:
  519. // none
  520. //
  521. // Uses:
  522. // m_strFileEvent to get the event data filename
  523. // m_pEventData gets set to the EVENT structure
  524. //
  525. // Output:
  526. // none
  527. //
  528. // Return:
  529. // 0 if the file was loaded correctly
  530. // ERROR code if the file was not loaded correctly
  531. //
  532. //*****************************************************************************
  533. short CUniverse::LoadEventData()
  534. {
  535. return 0;
  536. }
  537. //*****************************************************************************
  538. //
  539. // LoadPalette
  540. //
  541. // Description:
  542. // Private function called by SetSection to load the palette for either
  543. // the animation set or the backgrounds. The function returns a pointer
  544. // to the palette structure.
  545. //
  546. // Input:
  547. // strFileName = the filename of a palette file to be loaded
  548. //
  549. // Uses:
  550. // none
  551. //
  552. // Output:
  553. // none
  554. //
  555. // Return:
  556. // PALETTE* (pointer to palette structure)
  557. // NULL if there was an error in reading the file
  558. //
  559. //*****************************************************************************
  560. PALETTE* CUniverse::LoadPalette(
  561. LPSTR lpstrFilePalette) // Palette file to be loaded
  562. {
  563. return NULL;
  564. }
  565. //*****************************************************************************
  566. // EOF
  567. //*****************************************************************************