1 // 2 // Copyright(C) 1993-1996 Id Software, Inc. 3 // Copyright(C) 1993-2008 Raven Software 4 // Copyright(C) 2005-2014 Simon Howard 5 // 6 // This program is free software; you can redistribute it and/or 7 // modify it under the terms of the GNU General Public License 8 // as published by the Free Software Foundation; either version 2 9 // of the License, or (at your option) any later version. 10 // 11 // This program is distributed in the hope that it will be useful, 12 // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 // GNU General Public License for more details. 15 // 16 17 #ifndef HEXEN_M_RANDOM_H 18 #define HEXEN_M_RANDOM_H 19 20 // Most damage defined using HITDICE 21 #define HITDICE(a) ((1+(P_Random()&7))*a) 22 23 int M_Random(void); 24 // returns a number from 0 to 255 25 int P_Random(void); 26 // as M_Random, but used only by the play simulation 27 28 void M_ClearRandom(void); 29 // fix randoms for demos 30 31 extern int rndindex; 32 33 // Defined version of P_Random() - P_Random() 34 int P_SubRandom (void); 35 36 #endif // HEXEN_M_RANDOM_H 37 38