1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-07-06 17:47:45 +00:00
astra/launcher/src/crtrand.cpp
Joshua Goins ea262ddfb7
Support Steam service accounts (#32)
This adds support for Steam service accounts, finally. Requires an updated steamwrap, and we're missing the infrastructure to launch it at the moment too.
2025-05-04 16:57:29 -04:00

15 lines
330 B
C++

// SPDX-FileCopyrightText: 2025 Joshua Goins <josh@redstrate.com>
// SPDX-License-Identifier: GPL-3.0-or-later
#include "crtrand.h"
CrtRand::CrtRand(const uint32_t seed)
{
this->seed = seed;
}
uint32_t CrtRand::next()
{
this->seed = 0x343FD * this->seed + 0x269EC3;
return ((this->seed >> 16) & 0xFFFF) & 0x7FFF;
}