home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #6 / amigaacscoverdisc1998-061998.iso / games / descent / source / bios / mono.h < prev    next >
C/C++ Source or Header  |  1998-06-08  |  4KB  |  118 lines

  1. /*
  2. THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
  3. SOFTWARE CORPORATION ("PARALLAX").  PARALLAX, IN DISTRIBUTING THE CODE TO
  4. END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
  5. ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
  6. IN USING, DISPLAYING,  AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
  7. SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
  8. FREE PURPOSES.  IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
  9. CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES.  THE END-USER UNDERSTANDS
  10. AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.  
  11. COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
  12. */
  13. /*
  14.  * $Source: f:/miner/source/bios/rcs/mono.h $
  15.  * $Revision: 1.6 $
  16.  * $Author: matt $
  17.  * $Date: 1994/12/03 17:07:37 $
  18.  *
  19.  * Header for monochrome/mprintf functions
  20.  *
  21.  * $Log: mono.h $
  22.  * Revision 1.6  1994/12/03  17:07:37  matt
  23.  * Made mono code turn off with either NDEBUG or NMONO
  24.  * 
  25.  * Revision 1.5  1994/11/27  23:07:28  matt
  26.  * Made changes needed to be able to compile out monochrome debugging code
  27.  * 
  28.  * Revision 1.4  1993/12/07  12:33:28  john
  29.  * *** empty log message ***
  30.  * 
  31.  * Revision 1.3  1993/09/14  20:54:50  matt
  32.  * Made minit() check for mono card, return -1 if present, 0 if not
  33.  * 
  34.  * Revision 1.2  1993/07/22  13:05:40  john
  35.  * added macros to print variables
  36.  * 
  37.  * Revision 1.1  1993/07/10  13:10:40  matt
  38.  * Initial revision
  39.  * 
  40.  *
  41.  */
  42.  
  43. #ifndef _MONO_H
  44. #define _MONO_H
  45.  
  46. #if !(defined(NDEBUG) || defined(NMONO))        //normal, functioning versions
  47.  
  48. //==========================================================================
  49. // Open and close the mono screen.  close(0) clears it.
  50. extern int minit();    //returns true if mono card, else false
  51.  
  52. // Use n = 0 to clear the entire screen, any other number just closes the
  53. // specific window.
  54. extern void mclose(int n);
  55.  
  56. //==========================================================================
  57. // Opens a scrollable window on the monochrome screen.
  58. extern void mopen( int n, int row, int col, int width, int height, char * title );
  59.  
  60. //==========================================================================
  61. // Displays a integer variable and what it is equal to on window n.
  62. // ie.. if john=5,  then mDumpInt(1,john); would print "john=5" to window 1.
  63. #define mDumpD(window, int_var) mprintf( window, #int_var"=%d\n", int_var)
  64. // Does the same thing only prints out in 8 hexidecimal places
  65. #define mDumpX(window, int_var) mprintf( window, #int_var"=%08X\n", int_var)
  66.  
  67. //==========================================================================
  68. // Clears a window
  69. extern void mclear( int n );
  70.  
  71. //==========================================================================
  72. // Prints a formatted string on window n
  73. extern void _mprintf( int n, char * format, ... );
  74.  
  75. #define mprintf(args) _mprintf args
  76.  
  77. //==========================================================================
  78. // Prints a formatted string on window n at row, col.
  79. extern void _mprintf_at( int n, int row, int col, char * format, ... );
  80.  
  81. #define mprintf_at(args) _mprintf_at args
  82.  
  83. //==========================================================================
  84. // Puts a char in window n at current cursor position
  85. extern void mputc( int n, char c );
  86.  
  87. //==========================================================================
  88. // Puts a char in window n at specified location
  89. extern void mputc_at( int n, int row, int col, char c );
  90.  
  91. //==========================================================================
  92. // Moves the cursor... doesn't work.
  93. extern void msetcursor( int row, int col );
  94.  
  95. //==========================================================================
  96. // Refreshes a window
  97. void mrefresh(short n);
  98.  
  99. #else            //null versions for when debugging turned off
  100.  
  101. #define minit()
  102. #define mclose(n)
  103. #define mopen( n, row, col, width, height, title )
  104. #define mDumpD(window, int_var) 
  105. #define mDumpX(window, int_var) 
  106. #define mclear( n )
  107. #define mprintf(args) 
  108. #define mprintf_at(args)
  109. #define mputc( n, c )
  110. #define mputc_at( n, row, col, c )
  111. #define msetcursor( row, col )
  112. #define mrefresh(n)
  113.  
  114. #endif
  115. #endif
  116.  
  117.  
  118.