home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 26 / amigaformatcd26.iso / -screenplay- / otherstuff / adoom_src / i_system.h < prev    next >
C/C++ Source or Header  |  1998-03-09  |  2KB  |  105 lines

  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. //    System specific interface stuff.
  19. //
  20. //-----------------------------------------------------------------------------
  21.  
  22.  
  23. #ifndef __I_SYSTEM__
  24. #define __I_SYSTEM__
  25.  
  26. #include <stdlib.h>
  27.  
  28. #include "d_ticcmd.h"
  29. #include "d_event.h"
  30.  
  31. #ifdef __GNUG__
  32. #pragma interface
  33. #endif
  34.  
  35.  
  36. #define MAXARGVS        100
  37.  
  38. // Called by DoomMain.
  39. void I_Init (void);
  40.  
  41. // Called by startup code
  42. // to get the ammount of memory to malloc
  43. // for the zone management.
  44. byte*    I_ZoneBase (int *size);
  45.  
  46.  
  47. // Called by D_DoomLoop,
  48. // returns current time in tics.
  49. int I_GetTime (void);
  50.  
  51.  
  52. //
  53. // Called by D_DoomLoop,
  54. // called before processing any tics in a frame
  55. // (just after displaying a frame).
  56. // Time consuming syncronous operations
  57. // are performed here (joystick reading).
  58. // Can call D_PostEvent.
  59. //
  60. void I_StartFrame (void);
  61.  
  62.  
  63. //
  64. // Called by D_DoomLoop,
  65. // called before processing each tic in a frame.
  66. // Quick syncronous operations are performed here.
  67. // Can call D_PostEvent.
  68. void I_StartTic (void);
  69.  
  70. // Asynchronous interrupt functions should maintain private queues
  71. // that are read by the synchronous functions
  72. // to be converted into events.
  73.  
  74. // Either returns a null ticcmd,
  75. // or calls a loadable driver to build it.
  76. // This ticcmd will then be modified by the gameloop
  77. // for normal input.
  78. ticcmd_t* I_BaseTiccmd (void);
  79.  
  80.  
  81. // Called by M_Responder when quit is selected.
  82. // Clean exit, displays sell blurb.
  83. void I_Quit (void);
  84.  
  85.  
  86. // Allocates from low memory under dos,
  87. // just mallocs under unix
  88. byte* I_AllocLow (int length);
  89.  
  90. void I_Tactile (int on, int off, int total);
  91.  
  92. void *I_malloc (size_t size);
  93.  
  94. void *I_calloc (size_t nelt, size_t esize);
  95.  
  96. void I_Error (char *error, ...);
  97.  
  98.  
  99. #endif
  100. //-----------------------------------------------------------------------------
  101. //
  102. // $Log:$
  103. //
  104. //-----------------------------------------------------------------------------
  105.