mirror of
https://github.com/zeldaret/st
synced 2026-08-20 14:14:49 -04:00
Misc stuff 4 (#59)
* playrget progress and match treasuremanager remaining functions * some docs * fix build issues * random docs * match func_ov094_02172290 * random docs * actor cleanup * match freestanding item funcs * mType -> mpProfile * decompile random functions * docs and start of wip chest stuff * random docs * more random docs * match func_ov036_0211d0a8 * match func_ov036_0211d2dc & func_ov036_0211d570 * match func_ov110_02184a40 * random doc * document letter/stamps system * match func_ov001_020bb9f8 * fix build issues * decompile tres * start decomp chest base * fix regressions * name TRES * name UnkStruct_ov024_020d86b0 * name stamp types and update save struct stuff * name things and document BMG IDs
This commit is contained in:
@@ -40,7 +40,7 @@ struct Random {
|
||||
return (((this->GetRandomValue() >> 32) * (max - min)) >> 32) + min;
|
||||
}
|
||||
|
||||
u32 ConditionalNext32(u32 value) {
|
||||
u16 ConditionalNext16(u32 value) {
|
||||
this->UpdateRandomValue();
|
||||
|
||||
u64 result = this->GetRandomValue() >> 32;
|
||||
@@ -52,6 +52,18 @@ struct Random {
|
||||
return result;
|
||||
}
|
||||
|
||||
u32 ConditionalNext32(u32 value) {
|
||||
this->UpdateRandomValue();
|
||||
|
||||
u32 result = this->GetRandomValue() >> 32;
|
||||
|
||||
if (value != 0) {
|
||||
return ((u64) result * value) >> 32;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void Init();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user