home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 March / Gamestar_82_2006-03_dvd.iso / DVDStar / Editace / quake4_sdkv10.exe / source / framework / declTable.h < prev    next >
C/C++ Source or Header  |  2005-11-14  |  2KB  |  59 lines

  1. // Copyright (C) 2004 Id Software, Inc.
  2. //
  3.  
  4. #ifndef __DECLTABLE_H__
  5. #define __DECLTABLE_H__
  6.  
  7. /*
  8. ===============================================================================
  9.  
  10.     tables are used to map a floating point input value to a floating point
  11.     output value, with optional wrap / clamp and interpolation
  12.  
  13. ===============================================================================
  14. */
  15.  
  16. // RAVEN BEGIN
  17. // jsinger: allow support for serialization/deserialization of binary decls
  18. #ifdef RV_BINARYDECLS
  19. class idDeclTable : public idDecl, public Serializable<'DTAB'> {
  20. public:
  21. // jsinger: allow exporting of this decl type in a preparsed form
  22.     virtual void            Write( SerialOutputStream &stream) const;
  23.     virtual void            AddReferences() const;
  24.                             idDeclTable( SerialInputStream &stream);
  25. #else
  26. class idDeclTable : public idDecl {
  27. #endif
  28. public:
  29.                             idDeclTable();
  30.     virtual size_t            Size( void ) const;
  31.     virtual const char *    DefaultDefinition( void ) const;
  32.     virtual bool            Parse( const char *text, const int textLength, bool noCaching );
  33.     virtual void            FreeData( void );
  34.  
  35. // RAVEN BEGIN
  36. // jscott: for BSE
  37.             float            GetMaxValue( void ) const { return( maxValue ); }
  38.             float            GetMinValue( void ) const { return( minValue ); }
  39. // bdube: made virtual so it can be accessed in game
  40.     virtual float            TableLookup( float index ) const;
  41. // jscott: to prevent a recursive crash
  42.     virtual    bool            RebuildTextSource( void ) { return( false ); }
  43. // scork: for detailed error-reporting
  44.     virtual    bool            Validate( const char *psText, int iTextLength, idStr &strReportTo ) const;
  45. // RAVEN END
  46.  
  47. private:
  48.     bool                    clamp;
  49.     bool                    snap;
  50. // RAVEN BEGIN
  51. // jscott: for BSE
  52.     float                    minValue;
  53.     float                    maxValue;
  54. // RAVEN END
  55.     idList<float>            values;
  56. };
  57.  
  58. #endif /* !__DECLTABLE_H__ */
  59.