home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / mag_discs / 16 / modules / Drawfile / Hdr / DrawFile
Text File  |  1995-01-18  |  13KB  |  354 lines

  1. ;Assembler header file for DrawFile
  2. ;written by DefMod (Oct 26 1994) on Wed Jan 18 13:38:22 1995
  3. ;Copyright © Acorn Computers Ltd, 1994
  4.  
  5.         [       :LNOT: :DEF: Get_Types
  6.         GBLS    Get_Types
  7.         ]
  8.         [       :LNOT: :DEF: Types_Hdr
  9. Get_Types                       SETS    "GET OS:Hdr.Types"
  10.         |
  11. Get_Types                       SETS    ""
  12.         ]
  13.         $Get_Types
  14.  
  15.         [       :LNOT: :DEF: Get_OS
  16.         GBLS    Get_OS
  17.         ]
  18.         [       :LNOT: :DEF: OS_Hdr
  19. Get_OS                          SETS    "GET OS:Hdr.OS"
  20.         |
  21. Get_OS                          SETS    ""
  22.         ]
  23.         $Get_OS
  24.  
  25.         [       :LNOT: :DEF: Get_OSSpriteOp
  26.         GBLS    Get_OSSpriteOp
  27.         ]
  28.         [       :LNOT: :DEF: OSSpriteOp_Hdr
  29. Get_OSSpriteOp                  SETS    "GET OS:Hdr.OSSpriteOp"
  30.         |
  31. Get_OSSpriteOp                  SETS    ""
  32.         ]
  33.         $Get_OSSpriteOp
  34.  
  35.         [       :LNOT: :DEF: Get_Draw
  36.         GBLS    Get_Draw
  37.         ]
  38.         [       :LNOT: :DEF: Draw_Hdr
  39. Get_Draw                        SETS    "GET OS:Hdr.Draw"
  40.         |
  41. Get_Draw                        SETS    ""
  42.         ]
  43.         $Get_Draw
  44.  
  45.         [       :LNOT: :DEF: Get_Font
  46.         GBLS    Get_Font
  47.         ]
  48.         [       :LNOT: :DEF: Font_Hdr
  49. Get_Font                        SETS    "GET OS:Hdr.Font"
  50.         |
  51. Get_Font                        SETS    ""
  52.         ]
  53.         $Get_Font
  54.  
  55.         [       :LNOT: :DEF: Get_Wimp
  56.         GBLS    Get_Wimp
  57.         ]
  58.         [       :LNOT: :DEF: Wimp_Hdr
  59. Get_Wimp                        SETS    "GET OS:Hdr.Wimp"
  60.         |
  61. Get_Wimp                        SETS    ""
  62.         ]
  63.         $Get_Wimp
  64.  
  65.         [       :LNOT: :DEF: DrawFile_Hdr
  66.         GBLS    DrawFile_Hdr
  67.  
  68. ;Symbols for constants
  69. Error_DrawFileNotDraw           *       &20C00
  70. Error_DrawFileVersion           *       &20C01
  71. Error_DrawFileFontTab           *       &20C02
  72. Error_DrawFileBadFontNo         *       &20C03
  73. Error_DrawFileBadMode           *       &20C04
  74. Error_DrawFileBadFile           *       &20C05
  75. Error_DrawFileBadGroup          *       &20C06
  76. Error_DrawFileBadTag            *       &20C07
  77. Error_DrawFileSyntax            *       &20C08
  78. Error_DrawFileFontNo            *       &20C09
  79. Error_DrawFileAreaVer           *       &20C0A
  80. Error_DrawFileNoAreaVer         *       &20C0B
  81. DrawFile_TypeFontTable          *       0
  82. DrawFile_TypeText               *       1
  83. DrawFile_TypePath               *       2
  84. DrawFile_TypeSprite             *       5
  85. DrawFile_TypeGroup              *       6
  86. DrawFile_TypeTagged             *       7
  87. DrawFile_TypeTextArea           *       9
  88. DrawFile_TypeTextColumn         *       10
  89. DrawFile_TypeOptions            *       11
  90. DrawFile_TypeTrfmText           *       12
  91. DrawFile_TypeTrfmSprite         *       13
  92. DrawFile_PathMitred             *       &0
  93. DrawFile_PathRound              *       &1
  94. DrawFile_PathBevelled           *       &2
  95. DrawFile_PathButt               *       &0
  96. DrawFile_PathSquare             *       &2
  97. DrawFile_PathTriangle           *       &3
  98. DrawFile_PathJoinShift          *       0
  99. DrawFile_PathJoin               *       &3
  100. DrawFile_PathEndShift           *       2
  101. DrawFile_PathEnd                *       &C
  102. DrawFile_PathStartShift         *       4
  103. DrawFile_PathStart              *       &30
  104. DrawFile_PathWindingEvenOdd     *       &40
  105. DrawFile_PathDashed             *       &80
  106. DrawFile_PathCapWidthShift      *       16
  107. DrawFile_PathCapWidth           *       &FF0000
  108. DrawFile_PathCapLengthShift     *       24
  109. DrawFile_PathCapLength          *       &FF000000
  110. DrawFile_TextKern               *       &1
  111. DrawFile_TextRightToLeft        *       &2
  112. DrawFile_TextUnderline          *       &4
  113. DrawFile_RenderBBoxes           *       &1
  114. DrawFile_RenderSuppress         *       &2
  115. DrawFile_RenderGivenFlatness    *       &4
  116. DrawFile_NoDownload             *       &1
  117.  
  118. ;Symbols for structure offsets and sizes
  119.                                 ^       0
  120. DrawFile_FontDef_font_index     #       Byte
  121. DrawFile_FontDef_font_name      #       Char
  122. DrawFile_FontDef                *       @
  123.  
  124.                                 ^       0
  125. DrawFile_TextStyle_font_index   #       Byte
  126. DrawFile_TextStyle_reserved     #       3*Byte
  127. DrawFile_TextStyle              *       @
  128.  
  129.                                 ^       0
  130. DrawFile_PathStyle_flags        #       Byte
  131. DrawFile_PathStyle_reserved     #       Byte
  132. DrawFile_PathStyle_cap_width    #       Byte
  133. DrawFile_PathStyle_cap_length   #       Byte
  134. DrawFile_PathStyle              *       @
  135.  
  136.                                 ^       0
  137. DrawFile_FontTable_font_def     #       DrawFile_FontDef
  138. DrawFile_FontTable              *       @
  139.  
  140.                                 ^       0
  141. DrawFile_Text_bbox              #       OS_Box
  142. DrawFile_Text_fill              #       OS_Colour
  143. DrawFile_Text_bg_hint           #       OS_Colour
  144. DrawFile_Text_style             #       DrawFile_TextStyle
  145. DrawFile_Text_xsize             #       Int
  146. DrawFile_Text_ysize             #       Int
  147. DrawFile_Text_base              #       OS_Coord
  148. DrawFile_Text_text              #       Char
  149. DrawFile_Text                   *       @
  150.  
  151.                                 ^       0
  152. DrawFile_Path_bbox              #       OS_Box
  153. DrawFile_Path_fill              #       OS_Colour
  154. DrawFile_Path_outline           #       OS_Colour
  155. DrawFile_Path_width             #       Int
  156. DrawFile_Path_style             #       DrawFile_PathStyle
  157. DrawFile_Path_path              #       Draw_Path
  158. DrawFile_Path                   *       @
  159.  
  160.                                 ^       0
  161. DrawFile_PathWithPattern_bbox   #       OS_Box
  162. DrawFile_PathWithPattern_fill   #       OS_Colour
  163. DrawFile_PathWithPattern_outline #       OS_Colour
  164. DrawFile_PathWithPattern_width  #       Int
  165. DrawFile_PathWithPattern_style  #       DrawFile_PathStyle
  166. DrawFile_PathWithPattern_pattern #       Draw_DashPattern
  167. DrawFile_PathWithPattern_path   #       Draw_Path
  168. DrawFile_PathWithPattern        *       @
  169.  
  170.                                 ^       0
  171. DrawFile_Sprite_bbox            #       OS_Box
  172. DrawFile_Sprite_header          #       OSSpriteOp_Header
  173. DrawFile_Sprite_data            #       Byte
  174. DrawFile_Sprite                 *       @
  175.  
  176.                                 ^       0
  177. DrawFile_Group_bbox             #       OS_Box
  178. DrawFile_Group_name             #       12*Char
  179. DrawFile_Group_objects          #       Int
  180. DrawFile_Group                  *       @
  181.  
  182.                                 ^       0
  183. DrawFile_Tagged_bbox            #       OS_Box
  184. DrawFile_Tagged_tag             #       Int
  185. DrawFile_Tagged_object          #       Int
  186. DrawFile_Tagged                 *       @
  187.  
  188.                                 ^       0
  189. DrawFile_TextColumn_box         #       OS_Box
  190. DrawFile_TextColumn             *       @
  191.  
  192.                                 ^       0
  193. DrawFile_TextColumnList_columns_type #       Int
  194. DrawFile_TextColumnList_columns_size #       Int
  195. DrawFile_TextColumnList_columns_data #       DrawFile_TextColumn
  196. DrawFile_TextColumnList         *       @
  197.  
  198.                                 ^       0
  199. DrawFile_AreaText_type          #       Int
  200. DrawFile_AreaText_reserved      #       2*Int
  201. DrawFile_AreaText_fill          #       OS_Colour
  202. DrawFile_AreaText_bg_hint       #       OS_Colour
  203. DrawFile_AreaText_text          #       Char
  204. DrawFile_AreaText               *       @
  205.  
  206.                                 ^       0
  207. DrawFile_TextArea_bbox          #       OS_Box
  208. DrawFile_TextArea_header        #       DrawFile_TextColumnList
  209. DrawFile_TextArea_area_text     #       DrawFile_AreaText
  210. DrawFile_TextArea               *       @
  211.  
  212.                                 ^       0
  213. DrawFile_Options_bbox           #       OS_Box
  214. DrawFile_Options_paper_size     #       Int
  215. DrawFile_Options_paper_options  #       Bits
  216. DrawFile_Options_grid_spacing   #       Float
  217. DrawFile_Options_grid_division  #       Int
  218. DrawFile_Options_isometric      #       Bool
  219. DrawFile_Options_auto_adjust    #       Bool
  220. DrawFile_Options_show           #       Bool
  221. DrawFile_Options_lock           #       Bool
  222. DrawFile_Options_cm             #       Bool
  223. DrawFile_Options_zoom_mul       #       Int
  224. DrawFile_Options_zoom_div       #       Int
  225. DrawFile_Options_zoom_lock      #       Bool
  226. DrawFile_Options_toolbox        #       Bool
  227. DrawFile_Options_entry_mode     #       Bits
  228. DrawFile_Options_undo_size      #       Int
  229. DrawFile_Options                *       @
  230.  
  231.                                 ^       0
  232. DrawFile_TrfmText_bbox          #       OS_Box
  233. DrawFile_TrfmText_trfm          #       OS_Trfm
  234. DrawFile_TrfmText_flags         #       Bits
  235. DrawFile_TrfmText_fill          #       OS_Colour
  236. DrawFile_TrfmText_bg_hint       #       OS_Colour
  237. DrawFile_TrfmText_style         #       DrawFile_TextStyle
  238. DrawFile_TrfmText_xsize         #       Int
  239. DrawFile_TrfmText_ysize         #       Int
  240. DrawFile_TrfmText_base          #       OS_Coord
  241. DrawFile_TrfmText_text          #       Char
  242. DrawFile_TrfmText               *       @
  243.  
  244.                                 ^       0
  245. DrawFile_TrfmSprite_bbox        #       OS_Box
  246. DrawFile_TrfmSprite_trfm        #       OS_Trfm
  247. DrawFile_TrfmSprite_header      #       OSSpriteOp_Header
  248. DrawFile_TrfmSprite_data        #       Byte
  249. DrawFile_TrfmSprite             *       @
  250.  
  251.                                 ^       0
  252. DrawFile_Object_type            #       Int
  253. DrawFile_Object_size            #       Int
  254. DrawFile_Object_data            *       @
  255. DrawFile_Object_data_font_table #       DrawFile_FontTable
  256.                                 ^       DrawFile_Object_data
  257. DrawFile_Object_data_text       #       DrawFile_Text
  258.                                 ^       DrawFile_Object_data
  259. DrawFile_Object_data_path       #       DrawFile_Path
  260.                                 ^       DrawFile_Object_data
  261. DrawFile_Object_data_path_with_pattern #       DrawFile_PathWithPattern
  262.                                 ^       DrawFile_Object_data
  263. DrawFile_Object_data_sprite     #       DrawFile_Sprite
  264.                                 ^       DrawFile_Object_data
  265. DrawFile_Object_data_group      #       DrawFile_Group
  266.                                 ^       DrawFile_Object_data
  267. DrawFile_Object_data_tagged     #       DrawFile_Tagged
  268.                                 ^       DrawFile_Object_data
  269. DrawFile_Object_data_text_column #       DrawFile_TextColumn
  270.                                 ^       DrawFile_Object_data
  271. DrawFile_Object_data_text_area  #       DrawFile_TextArea
  272.                                 ^       DrawFile_Object_data
  273. DrawFile_Object_data_options    #       DrawFile_Options
  274.                                 ^       DrawFile_Object_data
  275. DrawFile_Object_data_trfm_text  #       DrawFile_TrfmText
  276.                                 ^       DrawFile_Object_data
  277. DrawFile_Object_data_trfm_sprite #       DrawFile_TrfmSprite
  278. DrawFile_Object                 *       @
  279.  
  280.                                 ^       0
  281. DrawFile_Diagram_tag            #       4*Char
  282. DrawFile_Diagram_major_version  #       Int
  283. DrawFile_Diagram_minor_version  #       Int
  284. DrawFile_Diagram_source         #       12*Char
  285. DrawFile_Diagram_bbox           #       OS_Box
  286. DrawFile_Diagram_objects        #       DrawFile_Object
  287. DrawFile_Diagram                *       @
  288.  
  289.                                 ^       0
  290. DrawFile_RenderState_object     #       Ptr
  291. DrawFile_RenderState_diagram    #       Ptr
  292. DrawFile_RenderState_font_table #       Ptr
  293. DrawFile_RenderState_flags      #       Bits
  294. DrawFile_RenderState_trfm       #       Ptr
  295. DrawFile_RenderState_clip       #       Ptr
  296. DrawFile_RenderState_flatness   #       Int
  297. DrawFile_RenderState_error      #       Ptr
  298. DrawFile_RenderState            *       @
  299.  
  300.                                 ^       0
  301. DrawFile_DeclareFontsState_object #       Ptr
  302. DrawFile_DeclareFontsState_diagram #       Ptr
  303. DrawFile_DeclareFontsState_font_table #       Ptr
  304. DrawFile_DeclareFontsState_flags #       Bits
  305. DrawFile_DeclareFontsState_error #       Ptr
  306. DrawFile_DeclareFontsState      *       @
  307.  
  308.  
  309. ;Symbols for SWI's and SWI reason codes
  310. XDrawFile_Render                *       &65540
  311. DrawFile_Render                 *       &45540
  312.    ;Entry
  313.    ;  R0 = flags (Bits)
  314.    ;  R1 -> diagram (DrawFile_Diagram)
  315.    ;  R2 = size (Int)
  316.    ;  R3 -> trfm (OS_Trfm)
  317.    ;  R4 -> clip (OS_Box)
  318.    ;  R5 = flatness (Int)
  319.  
  320. XDrawFile_BBox                  *       &65541
  321. DrawFile_BBox                   *       &45541
  322.    ;Entry
  323.    ;  R0 = flags (Bits)
  324.    ;  R1 -> diagram (DrawFile_Diagram)
  325.    ;  R2 = size (Int)
  326.    ;  R3 -> trfm (OS_Trfm)
  327.    ;  R4 = bbox (pointer to OS_Box)
  328.  
  329. XDrawFile_DeclareFonts          *       &65542
  330. DrawFile_DeclareFonts           *       &45542
  331.    ;Entry
  332.    ;  R0 = flags (Bits)
  333.    ;  R1 -> diagram (DrawFile_Diagram)
  334.    ;  R2 = size (Int)
  335.  
  336. Service_DrawObjectRender        *       &45540
  337.    ;Entry
  338.    ;  R0 = type (Int)
  339.    ;  R1 = &45540
  340.    ;  R2 -> state (DrawFile_RenderState)
  341.    ;Exit
  342.    ;  R1 = unclaimed (Bool)
  343.  
  344. Service_DrawObjectDeclareFonts  *       &45541
  345.    ;Entry
  346.    ;  R0 = type (Int)
  347.    ;  R1 = &45541
  348.    ;  R2 -> state (DrawFile_DeclareFontsState)
  349.    ;Exit
  350.    ;  R1 = unclaimed (Bool)
  351.  
  352.         ]
  353.         END
  354.