Last change
on this file since 481 was
481,
checked in by Sam Hocevar, 12 years ago
|
Fuck the history, I'm renaming all .hpp files to .h for my own sanity.
|
-
Property svn:keywords set to
Id
|
File size:
634 bytes
|
Rev | Line | |
---|
[56] | 1 | /* |
---|
| 2 | * Abuse - dark 2D side-scrolling platform game |
---|
| 3 | * Copyright (c) 1995 Crack dot Com |
---|
| 4 | * |
---|
| 5 | * This software was released into the Public Domain. As with most public |
---|
| 6 | * domain software, no warranty is made or implied by Crack dot Com or |
---|
| 7 | * Jonathan Clark. |
---|
| 8 | */ |
---|
| 9 | |
---|
[2] | 10 | #ifndef __JRAND_HPP_ |
---|
| 11 | #define __JRAND_HPP_ |
---|
| 12 | |
---|
| 13 | #define RAND_TABLE_SIZE 1024 |
---|
[124] | 14 | extern unsigned short rtable[RAND_TABLE_SIZE]; // can be used directly when |
---|
[2] | 15 | extern unsigned short rand_on; // speed is of essence |
---|
| 16 | |
---|
| 17 | void jrand_init(); |
---|
| 18 | inline unsigned short jrand() { return rtable[(rand_on++)&(RAND_TABLE_SIZE-1)]; } |
---|
| 19 | #define jrandom(x) (jrand()%(x)) |
---|
| 20 | |
---|
| 21 | #endif |
---|
| 22 | |
---|
Note: See
TracBrowser
for help on using the repository browser.