home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / oslib / h / osspriteop < prev    next >
Encoding:
Text File  |  1994-09-22  |  47.2 KB  |  1,531 lines

  1. #ifndef osspriteop_H
  2. #define osspriteop_H
  3.  
  4. /* C header file for OSSpriteOp
  5.  * written by DefMod (Sep 16 1994) on Thu Sep 22 16:38:18 1994
  6.  * Copyright © Acorn Computers Ltd, 1994
  7.  */
  8.  
  9. /*************************************************************************
  10.  * This source file was written by Acorn Computers Limited. It is part   *
  11.  * of the OSLib library for writing applications for RISC OS. It may be  *
  12.  * used freely in the creation of programs for RISC OS.                  *
  13.  *************************************************************************/
  14.  
  15. #ifndef types_H
  16.    #include "types.h"
  17. #endif
  18.  
  19. #ifndef os_H
  20.    #include "os.h"
  21. #endif
  22.  
  23. /**********************************
  24.  * SWI names and SWI reason codes *
  25.  **********************************/
  26. #undef  OS_SpriteOp
  27. #define OS_SpriteOp                             0x2E
  28. #undef  XOS_SpriteOp
  29. #define XOS_SpriteOp                            0x2002E
  30. #undef  OSSpriteOp_ScreenSave
  31. #define OSSpriteOp_ScreenSave                   0x2
  32. #undef  OSSpriteOp_ScreenLoad
  33. #define OSSpriteOp_ScreenLoad                   0x3
  34. #undef  OSSpriteOp_ReadAreaCB
  35. #define OSSpriteOp_ReadAreaCB                   0x8
  36. #undef  OSSpriteOp_ClearSprites
  37. #define OSSpriteOp_ClearSprites                 0x9
  38. #undef  OSSpriteOp_LoadSpriteFile
  39. #define OSSpriteOp_LoadSpriteFile               0xA
  40. #undef  OSSpriteOp_MergeSpriteFile
  41. #define OSSpriteOp_MergeSpriteFile              0xB
  42. #undef  OSSpriteOp_SaveSpriteFile
  43. #define OSSpriteOp_SaveSpriteFile               0xC
  44. #undef  OSSpriteOp_ReturnName
  45. #define OSSpriteOp_ReturnName                   0xD
  46. #undef  OSSpriteOp_GetSprite
  47. #define OSSpriteOp_GetSprite                    0xE
  48. #undef  OSSpriteOp_CreateSprite
  49. #define OSSpriteOp_CreateSprite                 0xF
  50. #undef  OSSpriteOp_GetSpriteUserCoords
  51. #define OSSpriteOp_GetSpriteUserCoords          0x10
  52. #undef  OSSpriteOp_SelectSprite
  53. #define OSSpriteOp_SelectSprite                 0x18
  54. #undef  OSSpriteOp_DeleteSprite
  55. #define OSSpriteOp_DeleteSprite                 0x19
  56. #undef  OSSpriteOp_RenameSprite
  57. #define OSSpriteOp_RenameSprite                 0x1A
  58. #undef  OSSpriteOp_CopySprite
  59. #define OSSpriteOp_CopySprite                   0x1B
  60. #undef  OSSpriteOp_PutSprite
  61. #define OSSpriteOp_PutSprite                    0x1C
  62. #undef  OSSpriteOp_CreateMask
  63. #define OSSpriteOp_CreateMask                   0x1D
  64. #undef  OSSpriteOp_RemoveMask
  65. #define OSSpriteOp_RemoveMask                   0x1E
  66. #undef  OSSpriteOp_InsertRow
  67. #define OSSpriteOp_InsertRow                    0x1F
  68. #undef  OSSpriteOp_DeleteRow
  69. #define OSSpriteOp_DeleteRow                    0x20
  70. #undef  OSSpriteOp_FlipAboutXAxis
  71. #define OSSpriteOp_FlipAboutXAxis               0x21
  72. #undef  OSSpriteOp_PutSpriteUserCoords
  73. #define OSSpriteOp_PutSpriteUserCoords          0x22
  74. #undef  OSSpriteOp_AppendSprite
  75. #define OSSpriteOp_AppendSprite                 0x23
  76. #undef  OSSpriteOp_SetPointerShape
  77. #define OSSpriteOp_SetPointerShape              0x24
  78. #undef  OSSpriteOp_ReadPaletteSize
  79. #define OSSpriteOp_ReadPaletteSize              0x25
  80. #undef  OSSpriteOp_RemovePalette
  81. #define OSSpriteOp_RemovePalette                0x25
  82. #undef  OSSpriteOp_CreatePalette
  83. #define OSSpriteOp_CreatePalette                0x25
  84. #undef  OSSpriteOp_CreateTruePalette
  85. #define OSSpriteOp_CreateTruePalette            0x25
  86. #undef  OSSpriteOp_ReadSpriteSize
  87. #define OSSpriteOp_ReadSpriteSize               0x28
  88. #undef  OSSpriteOp_ReadPixelColour
  89. #define OSSpriteOp_ReadPixelColour              0x29
  90. #undef  OSSpriteOp_WritePixelColour
  91. #define OSSpriteOp_WritePixelColour             0x2A
  92. #undef  OSSpriteOp_ReadPixelMask
  93. #define OSSpriteOp_ReadPixelMask                0x2B
  94. #undef  OSSpriteOp_WritePixelMask
  95. #define OSSpriteOp_WritePixelMask               0x2C
  96. #undef  OSSpriteOp_InsertColumn
  97. #define OSSpriteOp_InsertColumn                 0x2D
  98. #undef  OSSpriteOp_DeleteColumn
  99. #define OSSpriteOp_DeleteColumn                 0x2E
  100. #undef  OSSpriteOp_FlipAboutYAxis
  101. #define OSSpriteOp_FlipAboutYAxis               0x2F
  102. #undef  OSSpriteOp_PlotMask
  103. #define OSSpriteOp_PlotMask                     0x30
  104. #undef  OSSpriteOp_PlotMaskUserCoords
  105. #define OSSpriteOp_PlotMaskUserCoords           0x31
  106. #undef  OSSpriteOp_PlotMaskScaled
  107. #define OSSpriteOp_PlotMaskScaled               0x32
  108. #undef  OSSpriteOp_PaintCharScaled
  109. #define OSSpriteOp_PaintCharScaled              0x33
  110. #undef  OSSpriteOp_PutSpriteScaled
  111. #define OSSpriteOp_PutSpriteScaled              0x34
  112. #undef  OSSpriteOp_PutSpriteGreyScaled
  113. #define OSSpriteOp_PutSpriteGreyScaled          0x35
  114. #undef  OSSpriteOp_RemoveLeftHandWastage
  115. #define OSSpriteOp_RemoveLeftHandWastage        0x36
  116. #undef  OSSpriteOp_PlotMaskTrfm
  117. #define OSSpriteOp_PlotMaskTrfm                 0x37
  118. #undef  OSSpriteOp_PutSpriteTrfm
  119. #define OSSpriteOp_PutSpriteTrfm                0x38
  120. #undef  OSSpriteOp_InsertDeleteRows
  121. #define OSSpriteOp_InsertDeleteRows             0x39
  122. #undef  OSSpriteOp_InsertDeleteColumns
  123. #define OSSpriteOp_InsertDeleteColumns          0x3A
  124. #undef  OSSpriteOp_SwitchOutputToSprite
  125. #define OSSpriteOp_SwitchOutputToSprite         0x3C
  126. #undef  OSSpriteOp_SwitchOutputToMask
  127. #define OSSpriteOp_SwitchOutputToMask           0x3D
  128. #undef  OSSpriteOp_ReadSaveAreaSize
  129. #define OSSpriteOp_ReadSaveAreaSize             0x3E
  130. #undef  OSSpriteOp_UnswitchOutput
  131. #define OSSpriteOp_UnswitchOutput               0x2E
  132. #undef  XOSSpriteOp_UnswitchOutput
  133. #define XOSSpriteOp_UnswitchOutput              0x2002E
  134. #undef  SpriteV
  135. #define SpriteV                                 0x1F
  136. #undef  Service_SwitchingOutputToSprite
  137. #define Service_SwitchingOutputToSprite         0x72
  138.  
  139. /************************************
  140.  * Structure and union declarations *
  141.  ************************************/
  142. typedef struct osspriteop_trans_tab             osspriteop_trans_tab;
  143. typedef struct osspriteop_area                  osspriteop_area;
  144. typedef struct osspriteop_header                osspriteop_header;
  145. typedef struct osspriteop_id_                   *osspriteop_id;
  146. typedef struct osspriteop_save_area             osspriteop_save_area;
  147.  
  148. /********************
  149.  * Type definitions *
  150.  ********************/
  151. struct osspriteop_trans_tab
  152.    {  byte c [UNKNOWN];
  153.    };
  154.  
  155. #define osspriteop_TRANS_TAB(N) \
  156.    struct \
  157.       {  byte c [N]; \
  158.       }
  159.  
  160. #define osspriteop_SIZEOF_TRANS_TAB(N) \
  161.    ((N)*sizeof ((osspriteop_trans_tab *) NULL)->c)
  162.  
  163. struct osspriteop_area
  164.    {  int size;
  165.       int sprite_count;
  166.       int first;
  167.       int used;
  168.    };
  169.  
  170. struct osspriteop_header
  171.    {  int size;
  172.       char name [12];
  173.       int width;
  174.       int height;
  175.       int left_bit;
  176.       int right_bit;
  177.       int image;
  178.       int mask;
  179.       os_mode mode;
  180.    };
  181.  
  182. struct osspriteop_save_area
  183.    {  int a [UNKNOWN];
  184.    };
  185.  
  186. #define osspriteop_SAVE_AREA(N) \
  187.    struct \
  188.       {  int a [N]; \
  189.       }
  190.  
  191. #define osspriteop_SIZEOF_SAVE_AREA(N) \
  192.    ((N)*sizeof ((osspriteop_save_area *) NULL)->a)
  193.  
  194. /************************
  195.  * Constant definitions *
  196.  ************************/
  197. #define osspriteop_NAME_LIMIT                   12
  198. #define osspriteop_SYSTEM_AREA                  0x0u
  199. #define osspriteop_USER_AREA                    0x100u
  200. #define osspriteop_NAME                         0x100u
  201. #define osspriteop_PTR                          0x200u
  202. #define osspriteop_TRFM_COORDS                  0x0u
  203. #define osspriteop_GIVEN_RECTANGLE              0x1u
  204. #define osspriteop_GIVEN_COORDS                 0x1u
  205. #define osspriteop_GIVEN_RECT                   0x2u
  206. #define osspriteop_POINTER_SHAPE                0xFu
  207. #define osspriteop_POINTER_SHAPE_SHIFT          0
  208. #define osspriteop_POINTER_IGNORE_SHAPE_DATA    0x10u
  209. #define osspriteop_POINTER_IGNORE_PALETTE       0x20u
  210. #define osspriteop_POINTER_IGNORE_SHAPE         0x40u
  211. #define osspriteop_UNSPECIFIED                  ((osspriteop_area *) 256)
  212. #define error_SPRITE_OP_NO_WORK_SPACE           0x80u
  213. #define error_SPRITE_OP_NO_ROOM                 0x82u
  214. #define error_SPRITE_OP_DOESNT_EXIST            0x86u
  215. #define error_SPRITE_OP_NO_SPRITES              0x83u
  216. #define error_SPRITE_OP_NOT_GRAPHICS            0x81u
  217. #define error_SPRITE_OP_NOT_ENOUGH_ROOM         0x85u
  218. #define error_SPRITE_OP_BAD_SPRITE_FILE         0x86u
  219. #define error_SPRITE_OP_NO_ROOM_TO_MERGE        0x87u
  220. #define error_SPRITE_OP_INVALID_SECOND_PTR      0x88u
  221. #define error_SPRITE_OP_INVALID_ROW_OR_COL      0x89u
  222. #define error_SPRITE_OP_INVALID_HEIGHT          0x8Au
  223. #define error_SPRITE_OP_INVALID_WIDTH           0x8Bu
  224. #define error_SPRITE_OP_NO_ROOM_TO_INSERT       0x8Cu
  225. #define error_SPRITE_OP_SPRITE_ALREADY_EXISTS   0x8Du
  226. #define error_SPRITE_OP_INVALID_SPRITE_MODE     0x8Eu
  227. #define error_SPRITE_OP_BAD_REASON_CODE         0x8Fu
  228. #define error_SPRITE_OP_CANT_DO_SYSTEM          0x90u
  229. #define error_SPRITE_OP_BAD_TRANSLATION         0x91u
  230. #define error_SPRITE_OP_BAD_GREY_SCALE          0x92u
  231. #define error_SPRITE_OP_BAD_POINTER_SHAPE       0x93u
  232. #define error_SPRITE_OP_BAD_APPEND              0x94u
  233. #define error_SPRITE_OP_CANT_IN_TELETEXT        0x95u
  234. #define error_SPRITE_OP_INVALID_SAVE_AREA       0x96u
  235. #define error_SPRITE_OP_SPRITE_IS_CURRENT_DEST  0x97u
  236. #define error_SPRITE_OP_BAD_FLAGS               0x98u
  237. #define error_SPRITE_OP_BAD_COORD_BLOCK         0x99u
  238. #define error_SPRITE_OP_BAD_SOURCE_RECTANGLE    0x9Au
  239. #define error_SPRITE_OP_BAD_TRANSFORMATION      0x9Bu
  240. #define error_SPRITE_OP_BAD_DEPTH               0x9Cu
  241. #define error_SPRITE_OP_BAD_SWITCH_DEPTH        0x9Du
  242.  
  243. /*************************
  244.  * Function declarations *
  245.  *************************/
  246.  
  247. #ifdef __cplusplus
  248.    extern "C" {
  249. #endif
  250.  
  251. /*************************************************************
  252.  * NOTE: The following functions provide direct access to    *
  253.  *       the SWI's noted in the function description.        *
  254.  *       Please read the relevant PRM section for more       *
  255.  *       information on their input/output parameters.       *
  256.  *************************************************************/
  257.  
  258. /* ------------------------------------------------------------------------
  259.  * Function:      osspriteop_screen_save()
  260.  *
  261.  * Description:   Screen saves
  262.  *
  263.  * Input:         file_name - value of R2 on entry
  264.  *                save_palette - value of R3 on entry
  265.  *
  266.  * Other notes:   Calls SWI 0x2E with R0 = 0x2.
  267.  */
  268.  
  269. extern os_error *xosspriteop_screen_save (char *file_name,
  270.       bool save_palette);
  271. extern void osspriteop_screen_save (char *file_name,
  272.       bool save_palette);
  273.  
  274. /* ------------------------------------------------------------------------
  275.  * Function:      osspriteop_screen_load()
  276.  *
  277.  * Description:   Screen loads
  278.  *
  279.  * Input:         file_name - value of R2 on entry
  280.  *
  281.  * Other notes:   Calls SWI 0x2E with R0 = 0x3.
  282.  */
  283.  
  284. extern os_error *xosspriteop_screen_load (char *file_name);
  285. extern void osspriteop_screen_load (char *file_name);
  286.  
  287. /* ------------------------------------------------------------------------
  288.  * Function:      osspriteop_read_area_cb()
  289.  *
  290.  * Description:   Reads area control block
  291.  *
  292.  * Input:         flags - value of R0 on entry
  293.  *                area - value of R1 on entry
  294.  *
  295.  * Output:        size - value of R2 on exit
  296.  *                count - value of R3 on exit
  297.  *                first - value of R4 on exit
  298.  *                used - value of R5 on exit
  299.  *
  300.  * Other notes:   Calls SWI 0x2E with R0 |= 0x8.
  301.  */
  302.  
  303. extern os_error *xosspriteop_read_area_cb (bits flags,
  304.       osspriteop_area *area,
  305.       int *size,
  306.       int *count,
  307.       int *first,
  308.       int *used);
  309. extern void osspriteop_read_area_cb (bits flags,
  310.       osspriteop_area *area,
  311.       int *size,
  312.       int *count,
  313.       int *first,
  314.       int *used);
  315.  
  316. /* ------------------------------------------------------------------------
  317.  * Function:      osspriteop_clear_sprites()
  318.  *
  319.  * Description:   Initialises sprite area
  320.  *
  321.  * Input:         flags - value of R0 on entry
  322.  *                area - value of R1 on entry
  323.  *
  324.  * Other notes:   Calls SWI 0x2E with R0 |= 0x9.
  325.  */
  326.  
  327. extern os_error *xosspriteop_clear_sprites (bits flags,
  328.       osspriteop_area *area);
  329. extern void osspriteop_clear_sprites (bits flags,
  330.       osspriteop_area *area);
  331.  
  332. /* ------------------------------------------------------------------------
  333.  * Function:      osspriteop_load_sprite_file()
  334.  *
  335.  * Description:   Loads sprite file
  336.  *
  337.  * Input:         flags - value of R0 on entry
  338.  *                area - value of R1 on entry
  339.  *                file_name - value of R2 on entry
  340.  *
  341.  * Other notes:   Calls SWI 0x2E with R0 |= 0xA.
  342.  */
  343.  
  344. extern os_error *xosspriteop_load_sprite_file (bits flags,
  345.       osspriteop_area *area,
  346.       char *file_name);
  347. extern void osspriteop_load_sprite_file (bits flags,
  348.       osspriteop_area *area,
  349.       char *file_name);
  350.  
  351. /* ------------------------------------------------------------------------
  352.  * Function:      osspriteop_merge_sprite_file()
  353.  *
  354.  * Description:   Merges sprite file
  355.  *
  356.  * Input:         flags - value of R0 on entry
  357.  *                area - value of R1 on entry
  358.  *                file_name - value of R2 on entry
  359.  *
  360.  * Other notes:   Calls SWI 0x2E with R0 |= 0xB.
  361.  */
  362.  
  363. extern os_error *xosspriteop_merge_sprite_file (bits flags,
  364.       osspriteop_area *area,
  365.       char *file_name);
  366. extern void osspriteop_merge_sprite_file (bits flags,
  367.       osspriteop_area *area,
  368.       char *file_name);
  369.  
  370. /* ------------------------------------------------------------------------
  371.  * Function:      osspriteop_save_sprite_file()
  372.  *
  373.  * Description:   Saves sprite file
  374.  *
  375.  * Input:         flags - value of R0 on entry
  376.  *                area - value of R1 on entry
  377.  *                file_name - value of R2 on entry
  378.  *
  379.  * Other notes:   Calls SWI 0x2E with R0 |= 0xC.
  380.  */
  381.  
  382. extern os_error *xosspriteop_save_sprite_file (bits flags,
  383.       osspriteop_area *area,
  384.       char *file_name);
  385. extern void osspriteop_save_sprite_file (bits flags,
  386.       osspriteop_area *area,
  387.       char *file_name);
  388.  
  389. /* ------------------------------------------------------------------------
  390.  * Function:      osspriteop_return_name()
  391.  *
  392.  * Description:   Returns sprite name
  393.  *
  394.  * Input:         flags - value of R0 on entry
  395.  *                area - value of R1 on entry
  396.  *                buffer - value of R2 on entry
  397.  *                size - value of R3 on entry
  398.  *                sprite_no - value of R4 on entry
  399.  *
  400.  * Output:        used - value of R3 on exit
  401.  *
  402.  * Other notes:   Calls SWI 0x2E with R0 |= 0xD.
  403.  */
  404.  
  405. extern os_error *xosspriteop_return_name (bits flags,
  406.       osspriteop_area *area,
  407.       char *buffer,
  408.       int size,
  409.       int sprite_no,
  410.       int *used);
  411. extern void osspriteop_return_name (bits flags,
  412.       osspriteop_area *area,
  413.       char *buffer,
  414.       int size,
  415.       int sprite_no,
  416.       int *used);
  417.  
  418. /* ------------------------------------------------------------------------
  419.  * Function:      osspriteop_get_sprite()
  420.  *
  421.  * Description:   Gets sprite
  422.  *
  423.  * Input:         flags - value of R0 on entry
  424.  *                area - value of R1 on entry
  425.  *                sprite_name - value of R2 on entry
  426.  *                get_palette - value of R3 on entry
  427.  *
  428.  * Output:        header - value of R2 on exit (X version only)
  429.  *
  430.  * Returns:       R2 (non-X version only)
  431.  *
  432.  * Other notes:   Calls SWI 0x2E with R0 |= 0xE.
  433.  */
  434.  
  435. extern os_error *xosspriteop_get_sprite (bits flags,
  436.       osspriteop_area *area,
  437.       char *sprite_name,
  438.       bool get_palette,
  439.       osspriteop_header **header);
  440. extern osspriteop_header *osspriteop_get_sprite (bits flags,
  441.       osspriteop_area *area,
  442.       char *sprite_name,
  443.       bool get_palette);
  444.  
  445. /* ------------------------------------------------------------------------
  446.  * Function:      osspriteop_create_sprite()
  447.  *
  448.  * Description:   Creates sprite
  449.  *
  450.  * Input:         flags - value of R0 on entry
  451.  *                area - value of R1 on entry
  452.  *                sprite_name - value of R2 on entry
  453.  *                create_palette - value of R3 on entry
  454.  *                width - value of R4 on entry
  455.  *                height - value of R5 on entry
  456.  *                mode - value of R6 on entry
  457.  *
  458.  * Other notes:   Calls SWI 0x2E with R0 |= 0xF.
  459.  */
  460.  
  461. extern os_error *xosspriteop_create_sprite (bits flags,
  462.       osspriteop_area *area,
  463.       char *sprite_name,
  464.       bool create_palette,
  465.       int width,
  466.       int height,
  467.       os_mode mode);
  468. extern void osspriteop_create_sprite (bits flags,
  469.       osspriteop_area *area,
  470.       char *sprite_name,
  471.       bool create_palette,
  472.       int width,
  473.       int height,
  474.       os_mode mode);
  475.  
  476. /* ------------------------------------------------------------------------
  477.  * Function:      osspriteop_get_sprite_user_coords()
  478.  *
  479.  * Description:   Gets sprite from user coordinates
  480.  *
  481.  * Input:         flags - value of R0 on entry
  482.  *                area - value of R1 on entry
  483.  *                sprite_name - value of R2 on entry
  484.  *                get_palette - value of R3 on entry
  485.  *                x0 - value of R4 on entry
  486.  *                y0 - value of R5 on entry
  487.  *                x1 - value of R6 on entry
  488.  *                y1 - value of R7 on entry
  489.  *
  490.  * Other notes:   Calls SWI 0x2E with R0 |= 0x10.
  491.  */
  492.  
  493. extern os_error *xosspriteop_get_sprite_user_coords (bits flags,
  494.       osspriteop_area *area,
  495.       char *sprite_name,
  496.       bool get_palette,
  497.       int x0,
  498.       int y0,
  499.       int x1,
  500.       int y1);
  501. extern void osspriteop_get_sprite_user_coords (bits flags,
  502.       osspriteop_area *area,
  503.       char *sprite_name,
  504.       bool get_palette,
  505.       int x0,
  506.       int y0,
  507.       int x1,
  508.       int y1);
  509.  
  510. /* ------------------------------------------------------------------------
  511.  * Function:      osspriteop_select_sprite()
  512.  *
  513.  * Description:   Selects sprite
  514.  *
  515.  * Input:         flags - value of R0 on entry
  516.  *                area - value of R1 on entry
  517.  *                id - value of R2 on entry
  518.  *
  519.  * Output:        header - value of R2 on exit (X version only)
  520.  *
  521.  * Returns:       R2 (non-X version only)
  522.  *
  523.  * Other notes:   Calls SWI 0x2E with R0 |= 0x18.
  524.  */
  525.  
  526. extern os_error *xosspriteop_select_sprite (bits flags,
  527.       osspriteop_area *area,
  528.       osspriteop_id id,
  529.       osspriteop_header **header);
  530. extern osspriteop_header *osspriteop_select_sprite (bits flags,
  531.       osspriteop_area *area,
  532.       osspriteop_id id);
  533.  
  534. /* ------------------------------------------------------------------------
  535.  * Function:      osspriteop_delete_sprite()
  536.  *
  537.  * Description:   Deletes sprite
  538.  *
  539.  * Input:         flags - value of R0 on entry
  540.  *                area - value of R1 on entry
  541.  *                id - value of R2 on entry
  542.  *
  543.  * Other notes:   Calls SWI 0x2E with R0 |= 0x19.
  544.  */
  545.  
  546. extern os_error *xosspriteop_delete_sprite (bits flags,
  547.       osspriteop_area *area,
  548.       osspriteop_id id);
  549. extern void osspriteop_delete_sprite (bits flags,
  550.       osspriteop_area *area,
  551.       osspriteop_id id);
  552.  
  553. /* ------------------------------------------------------------------------
  554.  * Function:      osspriteop_rename_sprite()
  555.  *
  556.  * Description:   Renames sprite
  557.  *
  558.  * Input:         flags - value of R0 on entry
  559.  *                area - value of R1 on entry
  560.  *                id - value of R2 on entry
  561.  *                sprite_name - value of R3 on entry
  562.  *
  563.  * Other notes:   Calls SWI 0x2E with R0 |= 0x1A.
  564.  */
  565.  
  566. extern os_error *xosspriteop_rename_sprite (bits flags,
  567.       osspriteop_area *area,
  568.       osspriteop_id id,
  569.       char *sprite_name);
  570. extern void osspriteop_rename_sprite (bits flags,
  571.       osspriteop_area *area,
  572.       osspriteop_id id,
  573.       char *sprite_name);
  574.  
  575. /* ------------------------------------------------------------------------
  576.  * Function:      osspriteop_copy_sprite()
  577.  *
  578.  * Description:   Copies sprite
  579.  *
  580.  * Input:         flags - value of R0 on entry
  581.  *                area - value of R1 on entry
  582.  *                id - value of R2 on entry
  583.  *                sprite_name - value of R3 on entry
  584.  *
  585.  * Other notes:   Calls SWI 0x2E with R0 |= 0x1B.
  586.  */
  587.  
  588. extern os_error *xosspriteop_copy_sprite (bits flags,
  589.       osspriteop_area *area,
  590.       osspriteop_id id,
  591.       char *sprite_name);
  592. extern void osspriteop_copy_sprite (bits flags,
  593.       osspriteop_area *area,
  594.       osspriteop_id id,
  595.       char *sprite_name);
  596.  
  597. /* ------------------------------------------------------------------------
  598.  * Function:      osspriteop_put_sprite()
  599.  *
  600.  * Description:   Puts sprite
  601.  *
  602.  * Input:         flags - value of R0 on entry
  603.  *                area - value of R1 on entry
  604.  *                id - value of R2 on entry
  605.  *                action - value of R5 on entry
  606.  *
  607.  * Other notes:   Calls SWI 0x2E with R0 |= 0x1C.
  608.  */
  609.  
  610. extern os_error *xosspriteop_put_sprite (bits flags,
  611.       osspriteop_area *area,
  612.       osspriteop_id id,
  613.       os_action action);
  614. extern void osspriteop_put_sprite (bits flags,
  615.       osspriteop_area *area,
  616.       osspriteop_id id,
  617.       os_action action);
  618.  
  619. /* ------------------------------------------------------------------------
  620.  * Function:      osspriteop_create_mask()
  621.  *
  622.  * Description:   Creates mask
  623.  *
  624.  * Input:         flags - value of R0 on entry
  625.  *                area - value of R1 on entry
  626.  *                id - value of R2 on entry
  627.  *
  628.  * Other notes:   Calls SWI 0x2E with R0 |= 0x1D.
  629.  */
  630.  
  631. extern os_error *xosspriteop_create_mask (bits flags,
  632.       osspriteop_area *area,
  633.       osspriteop_id id);
  634. extern void osspriteop_create_mask (bits flags,
  635.       osspriteop_area *area,
  636.       osspriteop_id id);
  637.  
  638. /* ------------------------------------------------------------------------
  639.  * Function:      osspriteop_remove_mask()
  640.  *
  641.  * Description:   Removes mask
  642.  *
  643.  * Input:         flags - value of R0 on entry
  644.  *                area - value of R1 on entry
  645.  *                id - value of R2 on entry
  646.  *
  647.  * Other notes:   Calls SWI 0x2E with R0 |= 0x1E.
  648.  */
  649.  
  650. extern os_error *xosspriteop_remove_mask (bits flags,
  651.       osspriteop_area *area,
  652.       osspriteop_id id);
  653. extern void osspriteop_remove_mask (bits flags,
  654.       osspriteop_area *area,
  655.       osspriteop_id id);
  656.  
  657. /* ------------------------------------------------------------------------
  658.  * Function:      osspriteop_insert_row()
  659.  *
  660.  * Description:   Inserts row
  661.  *
  662.  * Input:         flags - value of R0 on entry
  663.  *                area - value of R1 on entry
  664.  *                id - value of R2 on entry
  665.  *                row - value of R3 on entry
  666.  *
  667.  * Other notes:   Calls SWI 0x2E with R0 |= 0x1F.
  668.  */
  669.  
  670. extern os_error *xosspriteop_insert_row (bits flags,
  671.       osspriteop_area *area,
  672.       osspriteop_id id,
  673.       int row);
  674. extern void osspriteop_insert_row (bits flags,
  675.       osspriteop_area *area,
  676.       osspriteop_id id,
  677.       int row);
  678.  
  679. /* ------------------------------------------------------------------------
  680.  * Function:      osspriteop_delete_row()
  681.  *
  682.  * Description:   Deletes row
  683.  *
  684.  * Input:         flags - value of R0 on entry
  685.  *                area - value of R1 on entry
  686.  *                id - value of R2 on entry
  687.  *                row - value of R3 on entry
  688.  *
  689.  * Other notes:   Calls SWI 0x2E with R0 |= 0x20.
  690.  */
  691.  
  692. extern os_error *xosspriteop_delete_row (bits flags,
  693.       osspriteop_area *area,
  694.       osspriteop_id id,
  695.       int row);
  696. extern void osspriteop_delete_row (bits flags,
  697.       osspriteop_area *area,
  698.       osspriteop_id id,
  699.       int row);
  700.  
  701. /* ------------------------------------------------------------------------
  702.  * Function:      osspriteop_flip_about_xaxis()
  703.  *
  704.  * Description:   Flips about x axis
  705.  *
  706.  * Input:         flags - value of R0 on entry
  707.  *                area - value of R1 on entry
  708.  *                id - value of R2 on entry
  709.  *
  710.  * Other notes:   Calls SWI 0x2E with R0 |= 0x21.
  711.  */
  712.  
  713. extern os_error *xosspriteop_flip_about_xaxis (bits flags,
  714.       osspriteop_area *area,
  715.       osspriteop_id id);
  716. extern void osspriteop_flip_about_xaxis (bits flags,
  717.       osspriteop_area *area,
  718.       osspriteop_id id);
  719.  
  720. /* ------------------------------------------------------------------------
  721.  * Function:      osspriteop_put_sprite_user_coords()
  722.  *
  723.  * Description:   Puts sprite at user coordinates
  724.  *
  725.  * Input:         flags - value of R0 on entry
  726.  *                area - value of R1 on entry
  727.  *                id - value of R2 on entry
  728.  *                x - value of R3 on entry
  729.  *                y - value of R4 on entry
  730.  *                action - value of R5 on entry
  731.  *
  732.  * Other notes:   Calls SWI 0x2E with R0 |= 0x22.
  733.  */
  734.  
  735. extern os_error *xosspriteop_put_sprite_user_coords (bits flags,
  736.       osspriteop_area *area,
  737.       osspriteop_id id,
  738.       int x,
  739.       int y,
  740.       os_action action);
  741. extern void osspriteop_put_sprite_user_coords (bits flags,
  742.       osspriteop_area *area,
  743.       osspriteop_id id,
  744.       int x,
  745.       int y,
  746.       os_action action);
  747.  
  748. /* ------------------------------------------------------------------------
  749.  * Function:      osspriteop_append_sprite()
  750.  *
  751.  * Description:   Appends sprite
  752.  *
  753.  * Input:         flags - value of R0 on entry
  754.  *                area - value of R1 on entry
  755.  *                id0 - value of R2 on entry
  756.  *                id1 - value of R3 on entry
  757.  *                append_vertically - value of R4 on entry
  758.  *
  759.  * Other notes:   Calls SWI 0x2E with R0 |= 0x23.
  760.  */
  761.  
  762. extern os_error *xosspriteop_append_sprite (bits flags,
  763.       osspriteop_area *area,
  764.       osspriteop_id id0,
  765.       osspriteop_id id1,
  766.       bool append_vertically);
  767. extern void osspriteop_append_sprite (bits flags,
  768.       osspriteop_area *area,
  769.       osspriteop_id id0,
  770.       osspriteop_id id1,
  771.       bool append_vertically);
  772.  
  773. /* ------------------------------------------------------------------------
  774.  * Function:      osspriteop_set_pointer_shape()
  775.  *
  776.  * Description:   Sets pointer shape
  777.  *
  778.  * Input:         flags - value of R0 on entry
  779.  *                area - value of R1 on entry
  780.  *                id - value of R2 on entry
  781.  *                pointer_flags - value of R3 on entry
  782.  *                xactive - value of R4 on entry
  783.  *                yactive - value of R5 on entry
  784.  *                factors - value of R6 on entry
  785.  *                trans_tab - value of R7 on entry
  786.  *
  787.  * Other notes:   Calls SWI 0x2E with R0 |= 0x24.
  788.  */
  789.  
  790. extern os_error *xosspriteop_set_pointer_shape (bits flags,
  791.       osspriteop_area *area,
  792.       osspriteop_id id,
  793.       bits pointer_flags,
  794.       int xactive,
  795.       int yactive,
  796.       os_factors *factors,
  797.       osspriteop_trans_tab *trans_tab);
  798. extern void osspriteop_set_pointer_shape (bits flags,
  799.       osspriteop_area *area,
  800.       osspriteop_id id,
  801.       bits pointer_flags,
  802.       int xactive,
  803.       int yactive,
  804.       os_factors *factors,
  805.       osspriteop_trans_tab *trans_tab);
  806.  
  807. /* ------------------------------------------------------------------------
  808.  * Function:      osspriteop_read_palette_size()
  809.  *
  810.  * Description:   Reads palette size
  811.  *
  812.  * Input:         flags - value of R0 on entry
  813.  *                area - value of R1 on entry
  814.  *                id - value of R2 on entry
  815.  *
  816.  * Output:        size - value of R3 on exit
  817.  *                palette - value of R4 on exit
  818.  *                mode - value of R5 on exit
  819.  *
  820.  * Other notes:   Calls SWI 0x2E with R0 |= 0x25, R3 = 0xFFFFFFFF.
  821.  */
  822.  
  823. extern os_error *xosspriteop_read_palette_size (bits flags,
  824.       osspriteop_area *area,
  825.       osspriteop_id id,
  826.       int *size,
  827.       os_sprite_palette **palette,
  828.       os_mode *mode);
  829. extern void osspriteop_read_palette_size (bits flags,
  830.       osspriteop_area *area,
  831.       osspriteop_id id,
  832.       int *size,
  833.       os_sprite_palette **palette,
  834.       os_mode *mode);
  835.  
  836. /* ------------------------------------------------------------------------
  837.  * Function:      osspriteop_remove_palette()
  838.  *
  839.  * Description:   Removes palette
  840.  *
  841.  * Input:         flags - value of R0 on entry
  842.  *                area - value of R1 on entry
  843.  *                id - value of R2 on entry
  844.  *
  845.  * Other notes:   Calls SWI 0x2E with R0 |= 0x25, R3 = 0x0.
  846.  */
  847.  
  848. extern os_error *xosspriteop_remove_palette (bits flags,
  849.       osspriteop_area *area,
  850.       osspriteop_id id);
  851. extern void osspriteop_remove_palette (bits flags,
  852.       osspriteop_area *area,
  853.       osspriteop_id id);
  854.  
  855. /* ------------------------------------------------------------------------
  856.  * Function:      osspriteop_create_palette()
  857.  *
  858.  * Description:   Creates palette
  859.  *
  860.  * Input:         flags - value of R0 on entry
  861.  *                area - value of R1 on entry
  862.  *                id - value of R2 on entry
  863.  *
  864.  * Other notes:   Calls SWI 0x2E with R0 |= 0x25, R3 = 0x1.
  865.  */
  866.  
  867. extern os_error *xosspriteop_create_palette (bits flags,
  868.       osspriteop_area *area,
  869.       osspriteop_id id);
  870. extern void osspriteop_create_palette (bits flags,
  871.       osspriteop_area *area,
  872.       osspriteop_id id);
  873.  
  874. /* ------------------------------------------------------------------------
  875.  * Function:      osspriteop_create_true_palette()
  876.  *
  877.  * Description:   Creates palette with true colours
  878.  *
  879.  * Input:         flags - value of R0 on entry
  880.  *                area - value of R1 on entry
  881.  *                id - value of R2 on entry
  882.  *
  883.  * Other notes:   Calls SWI 0x2E with R0 |= 0x25, R3 = 0x80000000.
  884.  */
  885.  
  886. extern os_error *xosspriteop_create_true_palette (bits flags,
  887.       osspriteop_area *area,
  888.       osspriteop_id id);
  889. extern void osspriteop_create_true_palette (bits flags,
  890.       osspriteop_area *area,
  891.       osspriteop_id id);
  892.  
  893. /* ------------------------------------------------------------------------
  894.  * Function:      osspriteop_read_sprite_size()
  895.  *
  896.  * Description:   Reads sprite information
  897.  *
  898.  * Input:         flags - value of R0 on entry
  899.  *                area - value of R1 on entry
  900.  *                id - value of R2 on entry
  901.  *
  902.  * Output:        width - value of R3 on exit
  903.  *                height - value of R4 on exit
  904.  *                mask - value of R5 on exit
  905.  *                mode - value of R6 on exit
  906.  *
  907.  * Other notes:   Calls SWI 0x2E with R0 |= 0x28.
  908.  */
  909.  
  910. extern os_error *xosspriteop_read_sprite_size (bits flags,
  911.       osspriteop_area *area,
  912.       osspriteop_id id,
  913.       int *width,
  914.       int *height,
  915.       bool *mask,
  916.       os_mode *mode);
  917. extern void osspriteop_read_sprite_size (bits flags,
  918.       osspriteop_area *area,
  919.       osspriteop_id id,
  920.       int *width,
  921.       int *height,
  922.       bool *mask,
  923.       os_mode *mode);
  924.  
  925. /* ------------------------------------------------------------------------
  926.  * Function:      osspriteop_read_pixel_colour()
  927.  *
  928.  * Description:   Reads pixel colour
  929.  *
  930.  * Input:         flags - value of R0 on entry
  931.  *                area - value of R1 on entry
  932.  *                id - value of R2 on entry
  933.  *                x - value of R3 on entry
  934.  *                y - value of R4 on entry
  935.  *
  936.  * Output:        gcol - value of R5 on exit
  937.  *                tint - value of R6 on exit
  938.  *
  939.  * Other notes:   Calls SWI 0x2E with R0 |= 0x29.
  940.  */
  941.  
  942. extern os_error *xosspriteop_read_pixel_colour (bits flags,
  943.       osspriteop_area *area,
  944.       osspriteop_id id,
  945.       int x,
  946.       int y,
  947.       os_gcol *gcol,
  948.       os_tint *tint);
  949. extern void osspriteop_read_pixel_colour (bits flags,
  950.       osspriteop_area *area,
  951.       osspriteop_id id,
  952.       int x,
  953.       int y,
  954.       os_gcol *gcol,
  955.       os_tint *tint);
  956.  
  957. /* ------------------------------------------------------------------------
  958.  * Function:      osspriteop_write_pixel_colour()
  959.  *
  960.  * Description:   Writes pixel colour
  961.  *
  962.  * Input:         flags - value of R0 on entry
  963.  *                area - value of R1 on entry
  964.  *                id - value of R2 on entry
  965.  *                x - value of R3 on entry
  966.  *                y - value of R4 on entry
  967.  *                gcol - value of R5 on entry
  968.  *                tint - value of R6 on entry
  969.  *
  970.  * Other notes:   Calls SWI 0x2E with R0 |= 0x2A.
  971.  */
  972.  
  973. extern os_error *xosspriteop_write_pixel_colour (bits flags,
  974.       osspriteop_area *area,
  975.       osspriteop_id id,
  976.       int x,
  977.       int y,
  978.       os_gcol gcol,
  979.       os_tint tint);
  980. extern void osspriteop_write_pixel_colour (bits flags,
  981.       osspriteop_area *area,
  982.       osspriteop_id id,
  983.       int x,
  984.       int y,
  985.       os_gcol gcol,
  986.       os_tint tint);
  987.  
  988. /* ------------------------------------------------------------------------
  989.  * Function:      osspriteop_read_pixel_mask()
  990.  *
  991.  * Description:   Reads pixel mask
  992.  *
  993.  * Input:         flags - value of R0 on entry
  994.  *                area - value of R1 on entry
  995.  *                id - value of R2 on entry
  996.  *                x - value of R3 on entry
  997.  *                y - value of R4 on entry
  998.  *
  999.  * Output:        solid - value of R5 on exit (X version only)
  1000.  *
  1001.  * Returns:       R5 (non-X version only)
  1002.  *
  1003.  * Other notes:   Calls SWI 0x2E with R0 |= 0x2B.
  1004.  */
  1005.  
  1006. extern os_error *xosspriteop_read_pixel_mask (bits flags,
  1007.       osspriteop_area *area,
  1008.       osspriteop_id id,
  1009.       int x,
  1010.       int y,
  1011.       bool *solid);
  1012. extern bool osspriteop_read_pixel_mask (bits flags,
  1013.       osspriteop_area *area,
  1014.       osspriteop_id id,
  1015.       int x,
  1016.       int y);
  1017.  
  1018. /* ------------------------------------------------------------------------
  1019.  * Function:      osspriteop_write_pixel_mask()
  1020.  *
  1021.  * Description:   Writes pixel mask
  1022.  *
  1023.  * Input:         flags - value of R0 on entry
  1024.  *                area - value of R1 on entry
  1025.  *                id - value of R2 on entry
  1026.  *                x - value of R3 on entry
  1027.  *                y - value of R4 on entry
  1028.  *                solid - value of R5 on entry
  1029.  *
  1030.  * Other notes:   Calls SWI 0x2E with R0 |= 0x2C.
  1031.  */
  1032.  
  1033. extern os_error *xosspriteop_write_pixel_mask (bits flags,
  1034.       osspriteop_area *area,
  1035.       osspriteop_id id,
  1036.       int x,
  1037.       int y,
  1038.       bool solid);
  1039. extern void osspriteop_write_pixel_mask (bits flags,
  1040.       osspriteop_area *area,
  1041.       osspriteop_id id,
  1042.       int x,
  1043.       int y,
  1044.       bool solid);
  1045.  
  1046. /* ------------------------------------------------------------------------
  1047.  * Function:      osspriteop_insert_column()
  1048.  *
  1049.  * Description:   Inserts column
  1050.  *
  1051.  * Input:         flags - value of R0 on entry
  1052.  *                area - value of R1 on entry
  1053.  *                id - value of R2 on entry
  1054.  *                column - value of R3 on entry
  1055.  *
  1056.  * Other notes:   Calls SWI 0x2E with R0 |= 0x2D.
  1057.  */
  1058.  
  1059. extern os_error *xosspriteop_insert_column (bits flags,
  1060.       osspriteop_area *area,
  1061.       osspriteop_id id,
  1062.       int column);
  1063. extern void osspriteop_insert_column (bits flags,
  1064.       osspriteop_area *area,
  1065.       osspriteop_id id,
  1066.       int column);
  1067.  
  1068. /* ------------------------------------------------------------------------
  1069.  * Function:      osspriteop_delete_column()
  1070.  *
  1071.  * Description:   Deletes column
  1072.  *
  1073.  * Input:         flags - value of R0 on entry
  1074.  *                area - value of R1 on entry
  1075.  *                id - value of R2 on entry
  1076.  *                column - value of R3 on entry
  1077.  *
  1078.  * Other notes:   Calls SWI 0x2E with R0 |= 0x2E.
  1079.  */
  1080.  
  1081. extern os_error *xosspriteop_delete_column (bits flags,
  1082.       osspriteop_area *area,
  1083.       osspriteop_id id,
  1084.       int column);
  1085. extern void osspriteop_delete_column (bits flags,
  1086.       osspriteop_area *area,
  1087.       osspriteop_id id,
  1088.       int column);
  1089.  
  1090. /* ------------------------------------------------------------------------
  1091.  * Function:      osspriteop_flip_about_yaxis()
  1092.  *
  1093.  * Description:   Flips about y axis
  1094.  *
  1095.  * Input:         flags - value of R0 on entry
  1096.  *                area - value of R1 on entry
  1097.  *                id - value of R2 on entry
  1098.  *
  1099.  * Other notes:   Calls SWI 0x2E with R0 |= 0x2F.
  1100.  */
  1101.  
  1102. extern os_error *xosspriteop_flip_about_yaxis (bits flags,
  1103.       osspriteop_area *area,
  1104.       osspriteop_id id);
  1105. extern void osspriteop_flip_about_yaxis (bits flags,
  1106.       osspriteop_area *area,
  1107.       osspriteop_id id);
  1108.  
  1109. /* ------------------------------------------------------------------------
  1110.  * Function:      osspriteop_plot_mask()
  1111.  *
  1112.  * Description:   Plots sprite mask
  1113.  *
  1114.  * Input:         flags - value of R0 on entry
  1115.  *                area - value of R1 on entry
  1116.  *                id - value of R2 on entry
  1117.  *
  1118.  * Other notes:   Calls SWI 0x2E with R0 |= 0x30.
  1119.  */
  1120.  
  1121. extern os_error *xosspriteop_plot_mask (bits flags,
  1122.       osspriteop_area *area,
  1123.       osspriteop_id id);
  1124. extern void osspriteop_plot_mask (bits flags,
  1125.       osspriteop_area *area,
  1126.       osspriteop_id id);
  1127.  
  1128. /* ------------------------------------------------------------------------
  1129.  * Function:      osspriteop_plot_mask_user_coords()
  1130.  *
  1131.  * Description:   Plots sprite mask at user coordinates
  1132.  *
  1133.  * Input:         flags - value of R0 on entry
  1134.  *                area - value of R1 on entry
  1135.  *                id - value of R2 on entry
  1136.  *                x - value of R3 on entry
  1137.  *                y - value of R4 on entry
  1138.  *
  1139.  * Other notes:   Calls SWI 0x2E with R0 |= 0x31.
  1140.  */
  1141.  
  1142. extern os_error *xosspriteop_plot_mask_user_coords (bits flags,
  1143.       osspriteop_area *area,
  1144.       osspriteop_id id,
  1145.       int x,
  1146.       int y);
  1147. extern void osspriteop_plot_mask_user_coords (bits flags,
  1148.       osspriteop_area *area,
  1149.       osspriteop_id id,
  1150.       int x,
  1151.       int y);
  1152.  
  1153. /* ------------------------------------------------------------------------
  1154.  * Function:      osspriteop_plot_mask_scaled()
  1155.  *
  1156.  * Description:   Plots mask scaled
  1157.  *
  1158.  * Input:         flags - value of R0 on entry
  1159.  *                area - value of R1 on entry
  1160.  *                id - value of R2 on entry
  1161.  *                x - value of R3 on entry
  1162.  *                y - value of R4 on entry
  1163.  *                factors - value of R5 on entry
  1164.  *
  1165.  * Other notes:   Calls SWI 0x2E with R0 |= 0x32.
  1166.  */
  1167.  
  1168. extern os_error *xosspriteop_plot_mask_scaled (bits flags,
  1169.       osspriteop_area *area,
  1170.       osspriteop_id id,
  1171.       int x,
  1172.       int y,
  1173.       os_factors *factors);
  1174. extern void osspriteop_plot_mask_scaled (bits flags,
  1175.       osspriteop_area *area,
  1176.       osspriteop_id id,
  1177.       int x,
  1178.       int y,
  1179.       os_factors *factors);
  1180.  
  1181. /* ------------------------------------------------------------------------
  1182.  * Function:      osspriteop_paint_char_scaled()
  1183.  *
  1184.  * Description:   Paints character scaled
  1185.  *
  1186.  * Input:         c - value of R1 on entry
  1187.  *                x - value of R3 on entry
  1188.  *                y - value of R4 on entry
  1189.  *                factors - value of R6 on entry
  1190.  *
  1191.  * Other notes:   Calls SWI 0x2E with R0 = 0x33.
  1192.  */
  1193.  
  1194. extern os_error *xosspriteop_paint_char_scaled (char c,
  1195.       int x,
  1196.       int y,
  1197.       os_factors *factors);
  1198. extern void osspriteop_paint_char_scaled (char c,
  1199.       int x,
  1200.       int y,
  1201.       os_factors *factors);
  1202.  
  1203. /* ------------------------------------------------------------------------
  1204.  * Function:      osspriteop_put_sprite_scaled()
  1205.  *
  1206.  * Description:   Puts sprite scaled
  1207.  *
  1208.  * Input:         flags - value of R0 on entry
  1209.  *                area - value of R1 on entry
  1210.  *                id - value of R2 on entry
  1211.  *                x - value of R3 on entry
  1212.  *                y - value of R4 on entry
  1213.  *                action - value of R5 on entry
  1214.  *                factors - value of R6 on entry
  1215.  *                trans_tab - value of R7 on entry
  1216.  *
  1217.  * Other notes:   Calls SWI 0x2E with R0 |= 0x34.
  1218.  */
  1219.  
  1220. extern os_error *xosspriteop_put_sprite_scaled (bits flags,
  1221.       osspriteop_area *area,
  1222.       osspriteop_id id,
  1223.       int x,
  1224.       int y,
  1225.       os_action action,
  1226.       os_factors *factors,
  1227.       osspriteop_trans_tab *trans_tab);
  1228. extern void osspriteop_put_sprite_scaled (bits flags,
  1229.       osspriteop_area *area,
  1230.       osspriteop_id id,
  1231.       int x,
  1232.       int y,
  1233.       os_action action,
  1234.       os_factors *factors,
  1235.       osspriteop_trans_tab *trans_tab);
  1236.  
  1237. /* ------------------------------------------------------------------------
  1238.  * Function:      osspriteop_put_sprite_grey_scaled()
  1239.  *
  1240.  * Description:   Puts sprite scaled and anti-aliased
  1241.  *
  1242.  * Input:         flags - value of R0 on entry
  1243.  *                area - value of R1 on entry
  1244.  *                id - value of R2 on entry
  1245.  *                x - value of R3 on entry
  1246.  *                y - value of R4 on entry
  1247.  *                factors - value of R6 on entry
  1248.  *                trans_tab - value of R7 on entry
  1249.  *
  1250.  * Other notes:   Calls SWI 0x2E with R0 |= 0x35, R5 = 0x0.
  1251.  */
  1252.  
  1253. extern os_error *xosspriteop_put_sprite_grey_scaled (bits flags,
  1254.       osspriteop_area *area,
  1255.       osspriteop_id id,
  1256.       int x,
  1257.       int y,
  1258.       os_factors *factors,
  1259.       osspriteop_trans_tab *trans_tab);
  1260. extern void osspriteop_put_sprite_grey_scaled (bits flags,
  1261.       osspriteop_area *area,
  1262.       osspriteop_id id,
  1263.       int x,
  1264.       int y,
  1265.       os_factors *factors,
  1266.       osspriteop_trans_tab *trans_tab);
  1267.  
  1268. /* ------------------------------------------------------------------------
  1269.  * Function:      osspriteop_remove_left_hand_wastage()
  1270.  *
  1271.  * Description:   Removes left hand wastage
  1272.  *
  1273.  * Input:         flags - value of R0 on entry
  1274.  *                area - value of R1 on entry
  1275.  *                id - value of R2 on entry
  1276.  *
  1277.  * Other notes:   Calls SWI 0x2E with R0 |= 0x36.
  1278.  */
  1279.  
  1280. extern os_error *xosspriteop_remove_left_hand_wastage (bits flags,
  1281.       osspriteop_area *area,
  1282.       osspriteop_id id);
  1283. extern void osspriteop_remove_left_hand_wastage (bits flags,
  1284.       osspriteop_area *area,
  1285.       osspriteop_id id);
  1286.  
  1287. /* ------------------------------------------------------------------------
  1288.  * Function:      osspriteop_plot_mask_trfm()
  1289.  *
  1290.  * Description:   Plots sprite mask transformed
  1291.  *
  1292.  * Input:         flags - value of R0 on entry
  1293.  *                area - value of R1 on entry
  1294.  *                id - value of R2 on entry
  1295.  *                plot_flags - value of R3 on entry
  1296.  *                source_rect - value of R4 on entry
  1297.  *                trfm - value of R6 on entry
  1298.  *
  1299.  * Other notes:   Calls SWI 0x2E with R0 |= 0x37.
  1300.  */
  1301.  
  1302. extern os_error *xosspriteop_plot_mask_trfm (bits flags,
  1303.       osspriteop_area *area,
  1304.       osspriteop_id id,
  1305.       bits plot_flags,
  1306.       os_box *source_rect,
  1307.       os_trfm *trfm);
  1308. extern void osspriteop_plot_mask_trfm (bits flags,
  1309.       osspriteop_area *area,
  1310.       osspriteop_id id,
  1311.       bits plot_flags,
  1312.       os_box *source_rect,
  1313.       os_trfm *trfm);
  1314.  
  1315. /* ------------------------------------------------------------------------
  1316.  * Function:      osspriteop_put_sprite_trfm()
  1317.  *
  1318.  * Description:   Puts sprite transformed
  1319.  *
  1320.  * Input:         flags - value of R0 on entry
  1321.  *                area - value of R1 on entry
  1322.  *                id - value of R2 on entry
  1323.  *                plot_flags - value of R3 on entry
  1324.  *                source_rect - value of R4 on entry
  1325.  *                action - value of R5 on entry
  1326.  *                trfm - value of R6 on entry
  1327.  *                trans_tab - value of R7 on entry
  1328.  *
  1329.  * Other notes:   Calls SWI 0x2E with R0 |= 0x38.
  1330.  */
  1331.  
  1332. extern os_error *xosspriteop_put_sprite_trfm (bits flags,
  1333.       osspriteop_area *area,
  1334.       osspriteop_id id,
  1335.       bits plot_flags,
  1336.       os_box *source_rect,
  1337.       os_action action,
  1338.       os_trfm *trfm,
  1339.       osspriteop_trans_tab *trans_tab);
  1340. extern void osspriteop_put_sprite_trfm (bits flags,
  1341.       osspriteop_area *area,
  1342.       osspriteop_id id,
  1343.       bits plot_flags,
  1344.       os_box *source_rect,
  1345.       os_action action,
  1346.       os_trfm *trfm,
  1347.       osspriteop_trans_tab *trans_tab);
  1348.  
  1349. /* ------------------------------------------------------------------------
  1350.  * Function:      osspriteop_insert_delete_rows()
  1351.  *
  1352.  * Description:   Inserts/deletes rows from a sprite
  1353.  *
  1354.  * Input:         flags - value of R0 on entry
  1355.  *                area - value of R1 on entry
  1356.  *                id - value of R2 on entry
  1357.  *                row_no - value of R3 on entry
  1358.  *                row_count - value of R4 on entry
  1359.  *
  1360.  * Other notes:   Calls SWI 0x2E with R0 |= 0x39.
  1361.  */
  1362.  
  1363. extern os_error *xosspriteop_insert_delete_rows (bits flags,
  1364.       osspriteop_area *area,
  1365.       osspriteop_id id,
  1366.       int row_no,
  1367.       int row_count);
  1368. extern void osspriteop_insert_delete_rows (bits flags,
  1369.       osspriteop_area *area,
  1370.       osspriteop_id id,
  1371.       int row_no,
  1372.       int row_count);
  1373.  
  1374. /* ------------------------------------------------------------------------
  1375.  * Function:      osspriteop_insert_delete_columns()
  1376.  *
  1377.  * Description:   Inserts/deletes columns from a sprite
  1378.  *
  1379.  * Input:         flags - value of R0 on entry
  1380.  *                area - value of R1 on entry
  1381.  *                id - value of R2 on entry
  1382.  *                column_no - value of R3 on entry
  1383.  *                column_count - value of R4 on entry
  1384.  *
  1385.  * Other notes:   Calls SWI 0x2E with R0 |= 0x3A.
  1386.  */
  1387.  
  1388. extern os_error *xosspriteop_insert_delete_columns (bits flags,
  1389.       osspriteop_area *area,
  1390.       osspriteop_id id,
  1391.       int column_no,
  1392.       int column_count);
  1393. extern void osspriteop_insert_delete_columns (bits flags,
  1394.       osspriteop_area *area,
  1395.       osspriteop_id id,
  1396.       int column_no,
  1397.       int column_count);
  1398.  
  1399. /* ------------------------------------------------------------------------
  1400.  * Function:      osspriteop_switch_output_to_sprite()
  1401.  *
  1402.  * Description:   Switches output to sprite
  1403.  *
  1404.  * Input:         flags - value of R0 on entry
  1405.  *                area - value of R1 on entry
  1406.  *                id - value of R2 on entry
  1407.  *                save_area - value of R3 on entry
  1408.  *
  1409.  * Output:        context0 - value of R0 on exit
  1410.  *                context1 - value of R1 on exit
  1411.  *                context2 - value of R2 on exit
  1412.  *                context3 - value of R3 on exit
  1413.  *
  1414.  * Other notes:   Calls SWI 0x2E with R0 |= 0x3C.
  1415.  */
  1416.  
  1417. extern os_error *xosspriteop_switch_output_to_sprite (bits flags,
  1418.       osspriteop_area *area,
  1419.       osspriteop_id id,
  1420.       osspriteop_save_area *save_area,
  1421.       int *context0,
  1422.       int *context1,
  1423.       int *context2,
  1424.       int *context3);
  1425. extern void osspriteop_switch_output_to_sprite (bits flags,
  1426.       osspriteop_area *area,
  1427.       osspriteop_id id,
  1428.       osspriteop_save_area *save_area,
  1429.       int *context0,
  1430.       int *context1,
  1431.       int *context2,
  1432.       int *context3);
  1433.  
  1434. /* ------------------------------------------------------------------------
  1435.  * Function:      osspriteop_switch_output_to_mask()
  1436.  *
  1437.  * Description:   Switches output to mask
  1438.  *
  1439.  * Input:         flags - value of R0 on entry
  1440.  *                area - value of R1 on entry
  1441.  *                id - value of R2 on entry
  1442.  *                save_area - value of R3 on entry
  1443.  *
  1444.  * Output:        context0 - value of R0 on exit
  1445.  *                context1 - value of R1 on exit
  1446.  *                context2 - value of R2 on exit
  1447.  *                context3 - value of R3 on exit
  1448.  *
  1449.  * Other notes:   Calls SWI 0x2E with R0 |= 0x3D.
  1450.  */
  1451.  
  1452. extern os_error *xosspriteop_switch_output_to_mask (bits flags,
  1453.       osspriteop_area *area,
  1454.       osspriteop_id id,
  1455.       osspriteop_save_area *save_area,
  1456.       int *context0,
  1457.       int *context1,
  1458.       int *context2,
  1459.       int *context3);
  1460. extern void osspriteop_switch_output_to_mask (bits flags,
  1461.       osspriteop_area *area,
  1462.       osspriteop_id id,
  1463.       osspriteop_save_area *save_area,
  1464.       int *context0,
  1465.       int *context1,
  1466.       int *context2,
  1467.       int *context3);
  1468.  
  1469. /* ------------------------------------------------------------------------
  1470.  * Function:      osspriteop_read_save_area_size()
  1471.  *
  1472.  * Description:   Reads save area size
  1473.  *
  1474.  * Input:         flags - value of R0 on entry
  1475.  *                area - value of R1 on entry
  1476.  *                id - value of R2 on entry
  1477.  *
  1478.  * Output:        size - value of R3 on exit (X version only)
  1479.  *
  1480.  * Returns:       R3 (non-X version only)
  1481.  *
  1482.  * Other notes:   Calls SWI 0x2E with R0 |= 0x3E.
  1483.  */
  1484.  
  1485. extern os_error *xosspriteop_read_save_area_size (bits flags,
  1486.       osspriteop_area *area,
  1487.       osspriteop_id id,
  1488.       int *size);
  1489. extern int osspriteop_read_save_area_size (bits flags,
  1490.       osspriteop_area *area,
  1491.       osspriteop_id id);
  1492.  
  1493. /* ------------------------------------------------------------------------
  1494.  * Function:      osspriteop_unswitch_output()
  1495.  *
  1496.  * Description:   Switches output back to previous destination
  1497.  *
  1498.  * Input:         context0 - value of R0 on entry
  1499.  *                context1 - value of R1 on entry
  1500.  *                context2 - value of R2 on entry
  1501.  *                context3 - value of R3 on entry
  1502.  *
  1503.  * Other notes:   Calls SWI 0x2E.
  1504.  */
  1505.  
  1506. extern os_error *xosspriteop_unswitch_output (int context0,
  1507.       int context1,
  1508.       int context2,
  1509.       int context3);
  1510. extern void osspriteop_unswitch_output (int context0,
  1511.       int context1,
  1512.       int context2,
  1513.       int context3);
  1514.  
  1515. /* ------------------------------------------------------------------------
  1516.  * Function:      service_switching_output_to_sprite()
  1517.  *
  1518.  * Description:   Output switched to sprite, mask or screen
  1519.  *
  1520.  * Other notes:   Calls SWI 0x30 with R1 = 0x72.
  1521.  */
  1522.  
  1523. extern os_error *xservice_switching_output_to_sprite (void);
  1524. extern void service_switching_output_to_sprite (void);
  1525.  
  1526. #ifdef __cplusplus
  1527.    }
  1528. #endif
  1529.  
  1530. #endif
  1531.