poke/peekfloat structure

Blitz3D Forums/Blitz3D Programming/poke/peekfloat structure

flounder22001(Posted 2005) [#1]
i'm remaking banks in c++ and i have everything done but peek and pokefloat

someone on cw linked me to a page that talks about writing floating point numbers but i'm still having trouble understanding.

does anyone know the computations behind peek and pokefloat or can link me to somewhere that talks about it?


Clarks(Posted 2005) [#2]
dont know if this will help but take a look

//store a float
BBDECL void BBCALL dllMemStoreFloat(byte* data,int offset,float val) {
byte* buff = data + offset;
memcpy(buff,&val,4);
}

//load a float
BBDECL float BBCALL dllMemLoadFloat(byte* data,int offset) {
byte* buff = data + offset;
float val ;//= 0;
memcpy(&val,buff,4);
return val;
}


flounder22001(Posted 2005) [#3]
wow i thought it would be more compicated...

thanks a lot!!!! thats just what i was looking for.