files.c
// Work in progress fread replacement for void*
Work in progress fread replacement for void
Work in progress fread replacement for void
void Read(void* buf_to, lui32 size, void* buf_data, lui32* buf_data_addr) {
	void* buf_data_offs = &((lui8*)buf_data)[*buf_data_addr];
	memcpy_s(buf_to, size, buf_data_offs, size);
	*buf_data_addr += size;
}
void Read ( void * buf_to , lui32 size , void * buf_data , lui32 * buf_data_addr ) { void * buf_data_offs = & ( ( lui8 * ) buf_data ) [ * buf_data_addr ] ; memcpy_s ( buf_to , size , buf_data_offs , size ) ; * buf_data_addr += size ; }
Work in progress fread replacement for void
Work in progress fread replacement for void
// V1 //	for (lui32 i = 0u; i < size; ++i) { //		((lui8*)buf_to)[i] = ((lui8*)buf_from)[*addr + i]; //	} // V2 //lui32 bigs = size / 8u; //void* buf_data_offs = &((lui8*)buf_data)[*buf_data_addr]; //for (lui32 i = 0u; i < bigs; ++i) { //	((lui64*)buf_to)[i] = ((lui64*)buf_data_offs)[i]; //} //for (lui32 i = bigs * 8; i < size; ++i) { //	((lui8*)buf_to)[i] = ((lui8*)buf_data_offs)[i]; //}