MCPcopy Create free account
hub / github.com/OpenDUNE/OpenDUNE / Sprites_LoadImage

Function Sprites_LoadImage

src/sprites.c:344–357  ·  view source on GitHub ↗

* Loads an image. * * @param filename The name of the file to load. * @param memory1 The index of a memory block where to store loaded data. * @param memory2 The index of a memory block where to store loaded data. * @param palette Where to store the palette, if any. * @return The size of the loaded image. */

Source from the content-addressed store, hash-verified

342 * @return The size of the loaded image.
343 */
344uint16 Sprites_LoadImage(const char *filename, Screen screenID, uint8 *palette)
345{
346#if 0
347 uint8 index;
348 uint32 header;
349
350 index = File_Open(filename, FILE_MODE_READ);
351 if (index == FILE_INVALID) return 0;
352
353 File_Read(index, &header, 4);
354 File_Close(index);
355#endif
356 return Sprites_LoadCPSFile(filename, screenID, palette) / 8000;
357}
358
359void Sprites_SetMouseSprite(uint16 hotSpotX, uint16 hotSpotY, const uint8 *sprite)
360{

Callers 9

GameLoop_GameCreditsFunction · 0.85
Gameloop_LogosFunction · 0.85
GUI_PickHouseFunction · 0.85
GUI_FactoryWindow_InitFunction · 0.85
GUI_StrategicMap_ShowFunction · 0.85
GUI_Mentat_DisplayFunction · 0.85

Calls 3

File_ReadFunction · 0.85
File_CloseFunction · 0.85
Sprites_LoadCPSFileFunction · 0.85

Tested by

no test coverage detected