home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / GRAPHICS / MISC / STK100.ZIP / SPREDSRC.COM / SPREDIO.H < prev    next >
Encoding:
C/C++ Source or Header  |  1990-10-20  |  2.7 KB  |  66 lines

  1. /**********************************************************************
  2. * spredio.h
  3. * Routines for screen painting and message generation
  4. **********************************************************************
  5.                     This file is part of
  6.  
  7.          STK -- The sprite toolkit -- version 1.0
  8.  
  9.               Copyright (C) Jari Karjala 1990
  10.  
  11. The sprite toolkit (STK) is a FreeWare toolkit for creating high
  12. resolution sprite graphics with PCompatible hardware. This toolkit 
  13. is provided as is without any warranty or such thing. See the file
  14. COPYING for further information.
  15.  
  16. **********************************************************************
  17. **********************************************************************/
  18.  
  19. /**********************************************************************
  20. * Messages returned from get_msg
  21. **********************************************************************/
  22. typedef enum _msg {
  23.     MSG_NONE,
  24.     MSG_CLEAR, MSG_COPY_TO_MASK, MSG_COPY_TO_SHAPE, 
  25.     MSG_SAVE, MSG_LOAD, MSG_QUIT, MSG_EXIT, MSG_NEXT, MSG_PREV,
  26.     MSG_INVERT, MSG_HFLIP, MSG_VFLIP, MSG_OVERLAY, MSG_VMIRROR, MSG_HMIRROR,
  27.     MSG_ROTATE, MSG_ROTATE90, MSG_FATTER, MSG_THINNER,
  28.     MSG_ACTIVATE_MASK, MSG_ACTIVATE_SHAPE,
  29.     MSG_BTN1_CLICK, MSG_BTN2_CLICK, MSG_BTN3_CLICK
  30. } MSG;
  31.  
  32. #define DOT_FOREGROUND 1
  33. #define DOT_BACKGROUND 0
  34. #define DOT_OVERLAY    0x100
  35.  
  36. /**********************************************************************
  37. * Print the message, clear old message
  38. **********************************************************************/
  39. void message(char *s,...);
  40.  
  41. /**********************************************************************
  42. * Draw a point into i:th map (shape/mask) of sprite.
  43. **********************************************************************/
  44. void draw_point(SPRED_DATA *sdp, int x, int y, int i);
  45.  
  46. /**********************************************************************
  47. * Draw the ind:th map (shape/mask) of the given sprite (bigmap too, 
  48. * if active)
  49. **********************************************************************/
  50. void draw_map(SPRED_DATA *sdp, int ind);
  51.  
  52. /**********************************************************************
  53. * Draw the screen layout and sprite maps.
  54. * Must be called before any other draw function.
  55. **********************************************************************/
  56. void draw_screen(SPRED_DATA *sdp);
  57.  
  58. /**********************************************************************
  59. * Checks for user interaction.
  60. * Return: The event message, and the *x & *y contain the click point
  61. *          in big map coordinates (ie 0..sdp->w-1 and 0..sdp->h-1).
  62. **********************************************************************/
  63. MSG get_msg(SPRED_DATA *sdp, int *xp, int *yp);
  64.