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

Function WSA_GetFrameOffset_FromDisk

src/wsa.c:105–113  ·  view source on GitHub ↗

* Get the offset in the file which stores the animation data for a given * frame. * @param fileno The fileno of an opened WSA. * @param frame The frame of animation. * @return The offset for the animation from the beginning of the file. */

Source from the content-addressed store, hash-verified

103 * @return The offset for the animation from the beginning of the file.
104 */
105static uint32 WSA_GetFrameOffset_FromDisk(uint8 fileno, uint16 frame)
106{
107 uint32 offset;
108
109 File_Seek(fileno, frame * 4 + 10, 0);
110 offset = File_Read_LE32(fileno);
111
112 return offset;
113}
114
115/**
116 * Go to the next frame in the animation.

Callers 2

WSA_GotoNextFrameFunction · 0.85
WSA_LoadFileFunction · 0.85

Calls 2

File_SeekFunction · 0.85
File_Read_LE32Function · 0.85

Tested by

no test coverage detected