Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

RwMem
[Streaming]


Functions

void *  RwMemLittleEndian32 (void *mem, RwUInt32 size)
void *  RwMemLittleEndian16 (void *mem, RwUInt32 size)
void *  RwMemNative32 (void *mem, RwUInt32 size)
void *  RwMemNative16 (void *mem, RwUInt32 size)
void *  RwMemRealToFloat32 (void *mem, RwUInt32 size)
void *  RwMemFloat32ToReal (void *mem, RwUInt32 size)

Detailed Description

Memory

RwMem Overview

Requirements

Overview

A set of utility functions intended to ease cross-platform compatibility of RenderWare data structures.

These functions include conversions from RenderWare's intrinsic types - RwInt32, RwInt16, RwReal, etc. - into platform-neutral forms.


Function Documentation

void* RwMemFloat32ToReal void *    mem,
RwUInt32    size
 

RwMemFloat32ToReal is used to convert an array of 32-bit floats to an array of reals. This allows portability between machines that represent floating point numbers in different ways.

Parameters:
mem  Pointer to the memory to convert
size  Amount of memory to prepare (should be a multiple of 4 bytes).
Returns:
Returns the address of the value if its format has been converted successfully, or NULL on failure.
See also:
RwMemRealToFloat32 , RwMemLittleEndian32 , RwMemNative32 , RwStreamRead , RwStreamReadInt32 , RwStreamReadReal , RwStreamWrite , RwStreamWriteInt32 , RwStreamWriteReal
void* RwMemLittleEndian16 void *    mem,
RwUInt32    size
 

RwMemLittleEndian16 converts a specified chunk of memory to a little endian format suitable for writing out to a binary file. The binary format specifies little endian as a standard to permit compatibility across different endian-ness machines.

Parameters:
mem  Pointer to the memory to convert
size  Amount of memory to prepare (multiple of 2 bytes).
Returns:
Returns the address of the value if its format has been converted successfully, or NULL on failure.
See also:
RwMemNative16 , RwMemFloat32ToReal , RwMemRealToFloat32 , RwStreamReadInt16 , RwStreamWriteInt16 , RwStreamWriteReal , RwStreamReadReal , RwStreamWrite , RwStreamRead
void* RwMemLittleEndian32 void *    mem,
RwUInt32    size
 

RwMemLittleEndian32 converts a specified chunk of memory to a little endian format suitable for writing out to a binary file. The binary format specifies little endian as a standard to permit compatibility across different endian-ness machines.

Parameters:
mem  Pointer to the memory to convert
size  Amount of memory to prepare (multiple of 4 bytes).
Returns:
Returns the address of the value if its format has been converted successfully, or NULL on failure.
See also:
RwMemNative32 , RwMemFloat32ToReal , RwMemRealToFloat32 , RwStreamReadInt32 , RwStreamWriteInt32 , RwStreamWriteReal , RwStreamReadReal , RwStreamWrite , RwStreamRead
void* RwMemNative16 void *    mem,
RwUInt32    size
 

RwMemNative16 is used to convert the specified chunk of memory from a little endian format to native format after reading the chunk from a binary file. The binary format specifies little endian as a standard to permit compatibility across different endian- ness machines.

Parameters:
mem  A pointer to the memory.
size  An RwUInt32 value equal to the size in bytes of the memory (multiple of 2).
Returns:
Returns the address of the value it its format has been converted successfully, or NULL if there is an error.
See also:
RwMemLittleEndian16 , RwMemFloat32ToReal , RwMemRealToFloat32 , RwStreamReadInt16 , RwStreamWriteInt16 , RwStreamWriteReal , RwStreamReadReal , RwStreamWrite , RwStreamRead
void* RwMemNative32 void *    mem,
RwUInt32    size
 

RwMemNative32 is used to convert the specified chunk of memory from a little endian format to native format after reading the chunk from a binary file. The binary format specifies little endian as a standard to permit compatibility across different endian- ness machines.

Parameters:
mem  A pointer to the memory.
size  An RwUInt32 value equal to the size in bytes of the memory (multiple of 4).
Returns:
pointer to the converted memory (converted in situ) if successful or NULL if there is an error.
See also:
RwMemLittleEndian32 , RwMemFloat32ToReal , RwMemRealToFloat32 , RwStreamReadInt32 , RwStreamWriteInt32 , RwStreamWriteReal , RwStreamReadReal , RwStreamWrite , RwStreamRead
void* RwMemRealToFloat32 void *    mem,
RwUInt32    size
 

RwMemRealToFloat32 converts an array of reals to an array of 32 bit floats. This allows portability between machines which represent floating point numbers in different ways.

Parameters:
mem  A pointer to an array of 32-bit floats.
size  An RwUInt32 value equal to the size in bytes of the array of floats (should be a multiple of 4).
Returns:
Returns the address of the value it its format has been converted successfully, or NULL if there is an error.
See also:
RwMemFloat32ToReal , RwMemLittleEndian32 , RwMemNative32 , RwStreamReadInt32 , RwStreamWriteInt32 , RwStreamWriteReal , RwStreamReadReal , RwStreamWrite , RwStreamRead

Criterion Software © 1993-2003 Criterion Software Limited. All rights reserved. Built Tue Apr 22 12:46:14 2003. Send Feedback
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)