m_fixed.h
上传用户:xuyinpeng
上传日期:2021-05-12
资源大小:455k
文件大小:1k
源码类别:

射击游戏

开发平台:

Visual C++

  1. // Emacs style mode select   -*- C++ -*- 
  2. //-----------------------------------------------------------------------------
  3. //
  4. // $Id:$
  5. //
  6. // Copyright (C) 1993-1996 by id Software, Inc.
  7. //
  8. // This source is available for distribution and/or modification
  9. // only under the terms of the DOOM Source Code License as
  10. // published by id Software. All rights reserved.
  11. //
  12. // The source is distributed in the hope that it will be useful,
  13. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. // FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
  15. // for more details.
  16. //
  17. // DESCRIPTION:
  18. // Fixed point arithemtics, implementation.
  19. //
  20. //-----------------------------------------------------------------------------
  21. #ifndef __M_FIXED__
  22. #define __M_FIXED__
  23. #ifdef __GNUG__
  24. #pragma interface
  25. #endif
  26. //
  27. // Fixed point, 32bit as 16.16.
  28. //
  29. #define FRACBITS 16
  30. #define FRACUNIT (1<<FRACBITS)
  31. typedef int fixed_t;
  32. fixed_t FixedMul (fixed_t a, fixed_t b);
  33. fixed_t FixedDiv (fixed_t a, fixed_t b);
  34. fixed_t FixedDiv2 (fixed_t a, fixed_t b);
  35. #endif
  36. //-----------------------------------------------------------------------------
  37. //
  38. // $Log:$
  39. //
  40. //-----------------------------------------------------------------------------