about summary refs log tree commit diff stats
path: root/data/maps/the_hinterlands/rooms
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2025-08-29 10:48:19 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2025-08-29 10:48:19 -0400
commitf97b4ff4821f2945f22198dcbd5c627a64b4be50 (patch)
treefe50f3299164be7ff70d2cc8ed8f14fb7a38b4d4 /data/maps/the_hinterlands/rooms
parent51c4886f15e7e10cdee2d5b2f92510c700f0c537 (diff)
downloadlingo2-archipelago-f97b4ff4821f2945f22198dcbd5c627a64b4be50.tar.gz
lingo2-archipelago-f97b4ff4821f2945f22198dcbd5c627a64b4be50.tar.bz2
lingo2-archipelago-f97b4ff4821f2945f22198dcbd5c627a64b4be50.zip
[Data] Fix castle stairs (again)
Diffstat (limited to 'data/maps/the_hinterlands/rooms')
0 files changed, 0 insertions, 0 deletions
pan> ^
52b0177 ^


a291348 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
                

                   
                                                                                                

                                
                  

 
                                         
                                       


                                                                               
 
#include "pch.h"
#include "Random.h"

uint32_t Random::s_seed = static_cast<int>(time(nullptr)); // Seed from the time in milliseconds

void Random::SetSeed(int seed) {
    s_seed = seed;
}

// Returns a random integer in [min, max]
int Random::RandInt(int min, int max) {
    s_seed = (214013 * s_seed + 2531011); // Implicit unsigned integer overflow
    int32_t maskedSeed = ((s_seed >> 16) & 0x7fff); // Only use bits 16-30
    return (maskedSeed % (max - min + 1)) + min;
}