Odamex
Setting the Standard in Multiplayer Doom
common/m_random.h
Go to the documentation of this file.
00001 // Emacs style mode select   -*- C++ -*- 
00002 //-----------------------------------------------------------------------------
00003 //
00004 // $Id: m_random.h 1928 2010-09-17 04:39:55Z hypereye $
00005 //
00006 // Copyright (C) 1993-1996 by id Software, Inc.
00007 // Copyright (C) 2006-2010 by The Odamex Team.
00008 //
00009 // This program is free software; you can redistribute it and/or
00010 // modify it under the terms of the GNU General Public License
00011 // as published by the Free Software Foundation; either version 2
00012 // of the License, or (at your option) any later version.
00013 //
00014 // This program is distributed in the hope that it will be useful,
00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 // GNU General Public License for more details.
00018 //
00019 // DESCRIPTION:
00020 //      Random number LUT.
00021 //    
00022 //-----------------------------------------------------------------------------
00023 
00024 
00025 #ifndef __M_RANDOM__
00026 #define __M_RANDOM__
00027 
00028 #include "actor.h"
00029 
00030 
00031 typedef enum {
00032         pr_misc,                                        // 0
00033         pr_all_in_one,                          // 1
00034         pr_dmspawn,                                     // 2
00035         pr_checkmissilerange,           // 3
00036         pr_trywalk,                                     // 4
00037         pr_newchasedir,                         // 5
00038         pr_look,                                        // 6
00039         pr_chase,                                       // 7
00040         pr_facetarget,                          // 8
00041         pr_posattack,                           // 9
00042         pr_sposattack,                          // 10
00043         pr_cposattack,                          // 11
00044         pr_cposrefire,                          // 12
00045         pr_spidrefire,                          // 13
00046         pr_troopattack,                         // 14
00047         pr_sargattack,                          // 15
00048         pr_headattack,                          // 16
00049         pr_bruisattack,                         // 17
00050         pr_tracer,                                      // 18
00051         pr_skelfist,                            // 19
00052         pr_scream,                                      // 20
00053         pr_brainscream,                         // 21
00054         pr_brainexplode,                        // 22
00055         pr_spawnfly,                            // 23
00056         pr_killmobj,                            // 24
00057         pr_damagemobj,                          // 25
00058         pr_checkthing,                          // 26
00059         pr_changesector,                        // 27
00060         pr_explodemissile,                      // 28
00061         pr_mobjthinker,                         // 29
00062         pr_spawnmobj,                           // 30
00063         pr_spawnmapthing,                       // 31
00064         pr_spawnpuff,                           // 32
00065         pr_spawnblood,                          // 33
00066         pr_checkmissilespawn,           // 34
00067         pr_spawnmissile,                        // 35
00068         pr_punch,                                       // 36
00069         pr_saw,                                         // 37
00070         pr_fireplasma,                          // 38
00071         pr_gunshot,                                     // 39
00072         pr_fireshotgun2,                        // 40
00073         pr_bfgspray,                            // 41
00074         pr_checksight,                          // 42
00075         pr_playerinspecialsector,       // 43
00076         pr_fireflicker,                         // 44
00077         pr_lightflash,                          // 45
00078         pr_spawnlightflash,                     // 46
00079         pr_spawnstrobeflash,            // 47
00080         pr_doplat,                                      // 48
00081         pr_throwgib,                            // 49
00082         pr_vel4dmg,                                     // 50
00083         pr_gengib,                                      // 51
00084         pr_acs,                                         // 52
00085         pr_animatepictures,                     // 53
00086         pr_obituary,                            // 54
00087         pr_quake,                                       // 55
00088         pr_playerscream,                        // 56
00089         pr_playerpain,                          // 57
00090         pr_bounce,                                      // 58
00091         pr_opendoor,                            // 59
00092         pr_botmove,                                     // 60
00093         pr_botdofire,                           // 61
00094         pr_botspawn,                            // 62
00095         pr_botrespawn,                          // 63
00096         pr_bottrywalk,                          // 64
00097         pr_botnewchasedir,                      // 65
00098         pr_botspawnmobj,                        // 66
00099         pr_botopendoor,                         // 67
00100         pr_botchecksight,                       // 68
00101         // Start new entries -- add new entries below
00102 
00103         // End of new entries
00104         NUMPRCLASS                                                      // MUST be last item in list
00105 } pr_class_t;
00106 
00107 
00108 // The random number generator.
00109 int M_Random();
00110 int P_Random();
00111 
00112 // As P_Random, but used by the play simulation, one per actor
00113 int P_Random(AActor *actor);
00114 
00115 
00116 // Optimization safe random difference functions -- Hyper_Eye 04/11/2010
00117 int P_RandomDiff ();
00118 int P_RandomDiff (AActor *actor);
00119 
00120 
00121 // Fix randoms for demos.
00122 void M_ClearRandom(void);
00123 
00124 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends