Move commented random function to proper file

This commit is contained in:
Ryan Dwyer 2019-12-07 13:39:17 +10:00
parent a98b2304b1
commit 3c5ac052e9
2 changed files with 11 additions and 12 deletions

View File

@ -559,14 +559,3 @@ glabel func00012d48
/* 12db8: 00000000 */ sll $zero,$zero,0x0
/* 12dbc: 00000000 */ sll $zero,$zero,0x0
);
// func00012dc0
// Commented because compiler won't bitshift a u64
//u8 random(void)
//{
// rand_seed = ((rand_seed << 63) >> 31 | (rand_seed << 31) >> 32) ^
// (rand_seed << 44) >> 32;
// rand_seed = rand_seed >> 20 & 0xfff ^ rand_seed;
//
// return rand_seed;
//}

View File

@ -5,6 +5,7 @@
#include "library/library_2fa00.h"
#include "library/library_4a5e0.h"
#include "library/library_4e530.h"
#include "setup/setup_000000.h"
const u32 var70053ff0[] = {0x00000000};
const char var70053ff4[] = "-d";
@ -36,6 +37,15 @@ glabel random
/* 12e04: 0002103f */ dsra32 $v0,$v0,0x0
);
// Commented because ld isn't happy with bitshifting a u64.
//u32 random(void)
//{
// rand_seed = ((rand_seed << 63) >> 31 | (rand_seed << 31) >> 32) ^ (rand_seed << 44) >> 32;
// rand_seed = rand_seed >> 20 & 0xfff ^ rand_seed;
//
// return rand_seed;
//}
GLOBAL_ASM(
glabel func00012e08
/* 12e08: 64840001 */ daddiu $a0,$a0,0x1
@ -281,4 +291,4 @@ glabel func000130d4
/* 13124: 03e00008 */ jr $ra
/* 13128: 00000000 */ sll $zero,$zero,0x0
/* 1312c: 00000000 */ sll $zero,$zero,0x0
);
);