home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / Peter's Final Project / src / sys.stuff.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-10  |  2.1 KB  |  81 lines  |  [TEXT/KAHL]

  1. /*
  2.  *  Peter's Final Project -- A texture mapping demonstration
  3.  *  © 1995, Peter Mattis
  4.  *
  5.  *  E-mail:
  6.  *  petm@soda.csua.berkeley.edu
  7.  *
  8.  *  Snail-mail:
  9.  *   Peter Mattis
  10.  *   557 Fort Laramie Dr.
  11.  *   Sunnyvale, CA 94087
  12.  *
  13.  *  Avaible from:
  14.  *  http://www.csua.berkeley.edu/~petm/final.html
  15.  *
  16.  *  This program is free software; you can redistribute it and/or modify
  17.  *  it under the terms of the GNU General Public License as published by
  18.  *  the Free Software Foundation; either version 2 of the License, or
  19.  *  (at your option) any later version.
  20.  *
  21.  *  This program is distributed in the hope that it will be useful,
  22.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  23.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  24.  *  GNU General Public License for more details.
  25.  *
  26.  *  You should have received a copy of the GNU General Public License
  27.  *  along with this program; if not, write to the Free Software
  28.  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  29.  */
  30.  
  31. #ifndef __SYS_STUFF_H__
  32. #define __SYS_STUFF_H__
  33.  
  34. #include <stdlib.h>
  35. #include "sys.types.h"
  36.  
  37. #define ALLOC(x)     (malloc(x))
  38. #define FREE(x)      (free(x))
  39.  
  40. #ifndef NULL
  41. #define NULL 0L
  42. #endif
  43.  
  44. typedef void (*EVENT_HANDLER) (long, long);
  45.  
  46. void do_set_window_size (short);
  47. void do_set_depth (short);
  48. void do_set_mode (short);
  49. void do_set_event_handler (EVENT_HANDLER);
  50.  
  51. void do_sys_init (void);
  52. void do_sys_exit (void);
  53. void do_sys_event (void);
  54. void *do_sys_read_graphic_file (char *, long *, long *);
  55.  
  56. void do_update_screen (void);
  57. void do_clear_frame_buffer (void);
  58.  
  59. void do_set_color (long);
  60.  
  61. void *get_frame_buffer_address (void);
  62. long get_frame_buffer_width (void);
  63. long get_frame_buffer_height (void);
  64. long get_frame_buffer_depth (void);
  65. long get_frame_buffer_pixel (void);
  66.  
  67. #define NULL_EVENT            1
  68. #define KEY_PRESS_EVENT       2
  69. #define KEY_RELEASE_EVENT     3
  70. #define BUTTON_PRESS_EVENT    4
  71. #define BUTTON_RELEASE_EVENT  5
  72.  
  73. #define ESC_KEY   0xFF1B
  74. #define TAB_KEY   0xFF09
  75. #define LEFT_KEY  0xFF51
  76. #define RIGHT_KEY 0xFF53
  77. #define UP_KEY    0xFF52
  78. #define DOWN_KEY  0xFF54
  79.  
  80. #endif /* __SYS_STUFF_H__ */
  81.