MiniQuake2

src/miniquake2/qcommon/byteio.ml

Provides miniquake2 qcommon byteio facilities for this project.

Package
miniquake2.qcommon.byteio
Reachable
Yes

Declarations

bigLong

function bigLong(value)

Return the big long value.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

bigShort

function bigShort(value)

Return the big short value.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

copyInto

function copyInto(destination, destinationOffset, source, sourceOffset, count)

Populate the copy destination.

ParameterTypeDefaultDescription
destinationdynamic—destination value consumed by this operation.
destinationOffsetdynamic—destinationOffset value consumed by this operation.
sourcedynamic—source value consumed by this operation.
sourceOffsetdynamic—sourceOffset value consumed by this operation.
countdynamic—Number of items or units to process.

View source

f32

inline function f32(data, offset)

Return the f 32 value.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
offsetdynamic—Zero-based offset at which processing starts.

View source

float32Bits

function float32Bits(value)

Encode IEEE-754 binary32 using round-to-nearest-even. Negative zero is normalized to positive zero because MiniLang has no signbit primitive.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

float32FromBits

function float32FromBits(bits)

Return the float 32 from bits.

ParameterTypeDefaultDescription
bitsdynamic—bits value consumed by this operation.

View source

fractionBits23

function fractionBits23(fraction)

Emit 23 fraction bits from a value in [0, 1), returning [bits, tail].

ParameterTypeDefaultDescription
fractiondynamic—fraction value consumed by this operation.

View source

i16

inline function i16(data, offset)

Return the i 16 value.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
offsetdynamic—Zero-based offset at which processing starts.

View source

i32

function i32(data, offset)

Return the i 32 value.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
offsetdynamic—Zero-based offset at which processing starts.

View source

i8

inline function i8(data, offset)

Return the i 8 value.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
offsetdynamic—Zero-based offset at which processing starts.

View source

littleLong

inline function littleLong(value)

Return the little long value.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

littleShort

inline function littleShort(value)

The supported MiniQuake2 release platform is little-endian Windows x64.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

longSwap

function longSwap(value)

Swap long.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

powerOfTwo

function powerOfTwo(exponent)

Return the power of two value.

ParameterTypeDefaultDescription
exponentdynamic—exponent value consumed by this operation.

View source

putF32

inline function putF32(data, offset, value)

Write f 32.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
offsetdynamic—Zero-based offset at which processing starts.
valuedynamic—Value consumed or transformed by the operation.

View source

putI16

inline function putI16(data, offset, value)

Write i 16.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
offsetdynamic—Zero-based offset at which processing starts.
valuedynamic—Value consumed or transformed by the operation.

View source

putI32

inline function putI32(data, offset, value)

Write i 32.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
offsetdynamic—Zero-based offset at which processing starts.
valuedynamic—Value consumed or transformed by the operation.

View source

putI8

inline function putI8(data, offset, value)

Write i 8.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
offsetdynamic—Zero-based offset at which processing starts.
valuedynamic—Value consumed or transformed by the operation.

View source

putU16

inline function putU16(data, offset, value)

Write u 16.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
offsetdynamic—Zero-based offset at which processing starts.
valuedynamic—Value consumed or transformed by the operation.

View source

putU32

function putU32(data, offset, value)

Write u 32.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
offsetdynamic—Zero-based offset at which processing starts.
valuedynamic—Value consumed or transformed by the operation.

View source

putU8

inline function putU8(data, offset, value)

Write u 8.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
offsetdynamic—Zero-based offset at which processing starts.
valuedynamic—Value consumed or transformed by the operation.

View source

requireRange

function requireRange(data, offset, count)

Require range.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
offsetdynamic—Zero-based offset at which processing starts.
countdynamic—Number of items or units to process.

View source

shortSwap

function shortSwap(value)

Swap short.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

shouldRoundUp

function shouldRoundUp(remainder, leastBit)

Round a binary fractional tail to nearest, ties to even.

ParameterTypeDefaultDescription
remainderdynamic—remainder value consumed by this operation.
leastBitdynamic—leastBit value consumed by this operation.

View source

truncInt

function truncInt(value)

Convert an integer or finite MiniLang float to a C-style truncating int. Constructing the result bit by bit avoids a native float-to-int helper.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

u16

inline function u16(data, offset)

Return the u 16 value.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
offsetdynamic—Zero-based offset at which processing starts.

View source

u32

function u32(data, offset)

Return the u 32 value.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
offsetdynamic—Zero-based offset at which processing starts.

View source

u8

inline function u8(data, offset)

Return the u 8 value.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
offsetdynamic—Zero-based offset at which processing starts.

View source