mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-13 03:20:44 +00:00
RandomWord should be unsigned
This commit is contained in:
parent
a0dac5e035
commit
0a4129ff56
2 changed files with 3 additions and 2 deletions
|
@ -54,7 +54,7 @@ char RandomByte()
|
||||||
return randByte;
|
return randByte;
|
||||||
}
|
}
|
||||||
|
|
||||||
short RandomWord()
|
uint16_t RandomWord()
|
||||||
{
|
{
|
||||||
short randWord = RandomByte() << 8;
|
short randWord = RandomByte() << 8;
|
||||||
randWord |= RandomByte();
|
randWord |= RandomByte();
|
||||||
|
|
|
@ -18,13 +18,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
#ifndef __random_h__
|
#ifndef __random_h__
|
||||||
#define __random_h__
|
#define __random_h__
|
||||||
|
#include "compat.h"
|
||||||
|
|
||||||
BEGIN_PS_NS
|
BEGIN_PS_NS
|
||||||
|
|
||||||
void InitRandom();
|
void InitRandom();
|
||||||
int RandomBit();
|
int RandomBit();
|
||||||
char RandomByte();
|
char RandomByte();
|
||||||
short RandomWord();
|
uint16_t RandomWord();
|
||||||
int RandomLong();
|
int RandomLong();
|
||||||
int RandomSize(int nSize);
|
int RandomSize(int nSize);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue