Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/serialization/IDeserializer.cpp
Show First 20 Lines • Show All 129 Lines • ▼ Show 20 Lines | |||||
void IDeserializer::NumberI32_Unbounded(const char* name, int32_t& out) | void IDeserializer::NumberI32_Unbounded(const char* name, int32_t& out) | ||||
{ | { | ||||
int32_t value; | int32_t value; | ||||
Get(name, (u8*)&value, sizeof(int32_t)); | Get(name, (u8*)&value, sizeof(int32_t)); | ||||
out = (i32)to_le32((u32)value); | out = (i32)to_le32((u32)value); | ||||
} | } | ||||
void IDeserializer::NumberU64_Unbounded(const char* name, uint64_t& out) | |||||
{ | |||||
uint64_t value; | |||||
Get(name, (u8*)&value, sizeof(uint64_t)); | |||||
out = to_le32(value); | |||||
} | |||||
void IDeserializer::NumberFloat_Unbounded(const char* name, float& out) | void IDeserializer::NumberFloat_Unbounded(const char* name, float& out) | ||||
{ | { | ||||
Get(name, (u8*)&out, sizeof(float)); | Get(name, (u8*)&out, sizeof(float)); | ||||
} | } | ||||
void IDeserializer::NumberDouble_Unbounded(const char* name, double& out) | void IDeserializer::NumberDouble_Unbounded(const char* name, double& out) | ||||
{ | { | ||||
Get(name, (u8*)&out, sizeof(double)); | Get(name, (u8*)&out, sizeof(double)); | ||||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator