12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- #include <stdlib.h>
- #include "eurodefs.h"
- #include "euro_fxd.h"
- #include "euro.equ"
- #include "euro_sym.h"
- #include "euro_def.h"
- #include "euro_var.h"
- //********************************************************************************************************************************
- //ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
- //º º
- //º Random number method 1 -> originates from Mike Hart, slightly modified º
- //º º
- //ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
-
- short GetRnd1()
- {
- long rnd = EUROseed1;
- if ( rnd == 0 )
- rnd = 0x024272;
- if ( rnd > 2147483648 )
- {
- rnd+= rnd;
- rnd^= 0x01d872b45;
- }
-
- else
- rnd+= rnd;
- EUROseed1 = rnd+7;
- return( (short)EUROseed1 );
- }
- //********************************************************************************************************************************
- //ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
- //º º
- //º Watcom Random number º
- //º º
- //ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
-
- unsigned short GetRnd2()
- {
- return((short)rand());
- }
- //********************************************************************************************************************************
- //ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
- //º º
- //º Random number method 3 -> originates from Zool GameGear Z80 º
- //º º
- //ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
-
- unsigned short GetRnd3()
- {
- short t2 = EUROseed3*32;
- short t3 = (EUROseed3*16)-EUROseed3;
- t3 = ((((( t3-t2 ) *8 )+EUROseed3)*4)+EUROseed3)+0x01d872b45;
- EUROseed3 = t3;
- return(t3);
- }
- //********************************************************************************************************************************
|