Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/components/CCmpAIManager.cpp
Show First 20 Lines • Show All 386 Lines • ▼ Show 20 Lines | void DumpImage(const std::wstring& name, const std::vector<u32>& data, u32 w, u32 h, u32 max) | ||||
Tex t; | Tex t; | ||||
if (t.wrap(w, h, bpp, flags, buf, hdr_size) < 0) | if (t.wrap(w, h, bpp, flags, buf, hdr_size) < 0) | ||||
return; | return; | ||||
u8* img = buf.get() + hdr_size; | u8* img = buf.get() + hdr_size; | ||||
for (size_t i = 0; i < data.size(); ++i) | for (size_t i = 0; i < data.size(); ++i) | ||||
img[i] = (u8)((data[i] * 255) / max); | img[i] = (u8)((data[i] * 255) / max); | ||||
tex_write(&t, filename); | tex_write(&t, filename, 100); | ||||
} | } | ||||
void SetRNGSeed(u32 seed) | void SetRNGSeed(u32 seed) | ||||
{ | { | ||||
m_RNG.seed(seed); | m_RNG.seed(seed); | ||||
} | } | ||||
bool TryLoadSharedComponent() | bool TryLoadSharedComponent() | ||||
▲ Show 20 Lines • Show All 717 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator