Example #1
0
//
// EV_UDMFEternitySpecialForStaticInit
//
// Always looks up a special in the UDMFEternity gamemode's static init list, 
// regardless of the map format or gamemode in use. Returns 0 if no such 
// special exists.
//
int EV_UDMFEternitySpecialForStaticInit(int staticFn)
{
   ev_static_t *binding;

   // init the hash if it hasn't been done yet
   EV_initUDMFEternityStaticHash();

   if((binding = UDMFEternityStaticHash.objectForKey(staticFn)))
      return binding->actionNumber;
   else
      return EV_HexenSpecialForStaticInit(staticFn);
}
Example #2
0
//
// EV_SpecialForStaticInit
//
// Pass in the symbolic static function name you want the line special for; it
// will return the line special number currently bound to that function for the
// currently active map type. If zero is returned, that static function has no
// binding for the current map.
//
int EV_SpecialForStaticInit(int staticFn)
{
   switch(LevelInfo.mapFormat)
   {
   case LEVEL_FORMAT_HEXEN:
      return EV_HexenSpecialForStaticInit(staticFn);
   case LEVEL_FORMAT_PSX:
      return EV_PSXSpecialForStaticInit(staticFn);
   default:
      switch(LevelInfo.levelType)
      {
      case LI_TYPE_DOOM: 
      default:
         return EV_DOOMSpecialForStaticInit(staticFn);
      case LI_TYPE_HERETIC:
      case LI_TYPE_HEXEN:   // matches ZDoom's default behavior
         return EV_HereticSpecialForStaticInit(staticFn);
      case LI_TYPE_STRIFE:
         return EV_StrifeSpecialForStaticInit(staticFn);
      }
   }      
}