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

Function File_Close

src/file.c:689–701  ·  view source on GitHub ↗

* Close an opened file. * * @param index The index given by File_Open() of the file. */

Source from the content-addressed store, hash-verified

687 * @param index The index given by File_Open() of the file.
688 */
689void File_Close(uint8 index)
690{
691 if (index >= FILE_MAX) return;
692 if (s_file[index].fp == NULL) return;
693
694 if (s_file[index].pakInfo != NULL) {
695 s_file[index].fp = NULL; /* do not close PAK file */
696 return;
697 }
698
699 fclose(s_file[index].fp);
700 s_file[index].fp = NULL;
701}
702
703/**
704 * Read bytes from a file into a buffer.

Callers 15

GameOptions_LoadFunction · 0.85
GameOptions_SaveFunction · 0.85
WSA_GotoNextFrameFunction · 0.85
WSA_LoadFileFunction · 0.85
Sprites_LoadCPSFileFunction · 0.85
Sprites_LoadImageFunction · 0.85
File_Exists_ExFunction · 0.85
File_ReadFunction · 0.85
File_WriteFunction · 0.85
File_SeekFunction · 0.85
File_Create_PersonalFunction · 0.85
File_ReadBlockFile_ExFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected