MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / cf_WriteInt

Function cf_WriteInt

cfile/cfile.cpp:793–796  ·  view source on GitHub ↗

The following functions write numeric vales to a CFILE. All values are stored to the file in Intel (little-endian) format. All these throw an exception if there's an error on write. Write an integer (32 bits) Throws an exception of type (cfile_error *) if the OS returns an error on write

Source from the content-addressed store, hash-verified

791// Write an integer (32 bits)
792// Throws an exception of type (cfile_error *) if the OS returns an error on write
793void cf_WriteInt(CFILE *cfp, int32_t i) {
794 int t = INTEL_INT(i);
795 cf_WriteBytes((uint8_t *)&t, sizeof(t), cfp);
796}
797
798// Write a int16_t (16 bits)
799// Throws an exception of type (cfile_error *) if the OS returns an error on write

Callers 15

mng_WriteShipPageFunction · 0.85
mng_WriteNewShipPageFunction · 0.85
mng_WriteSoundPageFunction · 0.85
mng_WriteNewSoundPageFunction · 0.85
mng_EraseLockerFunction · 0.85
StartManagePageFunction · 0.85
EndManagePageFunction · 0.85
mng_ReplacePageFunction · 0.85
mng_DeletePageFunction · 0.85
mng_WritePhysicsChunkFunction · 0.85
mng_WriteLightingChunkFunction · 0.85
mng_WriteGenericPageFunction · 0.85

Calls 1

cf_WriteBytesFunction · 0.85

Tested by

no test coverage detected