@DATABASE "OS_DevKit Extension" @INDEX "os_index.guide/main" @AUTHOR "Fromentin BRICE & Jens Vang Petersen" @node MAIN "OS_DevKit, graphics.library support" @toc "os_Documentation.guide/main" ___________ ___________ / /\ / /\ OS-DevKit Extension / ___ / // _______/ / Additional power for AMOS Pro V2.00+ / /\_/ / // /\_____ \/ / / // / // /\ Written by: / / // / //______ / / Fromentin BRICE / /_// / /_\_____/ / / / / // / / /__________/ //__________/ / \__________\/ \__________\/ @{b}@{u}Advanced Support Of 'graphics.library'@{uu}@{ub} @{" Blitter " link "BLIT"} @{" Copper " link "COPP"} @{" Colours " link "COLO"} @{" Drawing " link "DRAW"} @{" Fonts " link "FONT"} @{" Fast Filling " link "FFIL"} @{" RTG " link "RTGF"} @{" Sprites " link "SPRI"} @{" GFX Structures " link "STRU"} @{" Misc. " link "MISC"} @endnode @node BLIT "OS_DevKit, graphics.library-blitter support" @toc "MAIN" ___________ ___________ / /\ / /\ OS-DevKit Extension / ___ / // _______/ / Additional power for AMOS Pro V2.00+ / /\_/ / // /\_____ \/ / / // / // /\ Written by: / / // / //______ / / Fromentin BRICE / /_// / /_\_____/ / / / / // / / /__________/ //__________/ / \__________\/ \__________\/ @{b}@{u}Advanced Support Of 'graphics.library'@{uu}@{ub} @{b}@{u}Blitter@{uu}@{ub} The Blitter is the component that moves memory blocks. But, it works only in CHIP ram, so be carefull. @{u}Commands:@{uu} @{" _blt Clr " Link "_blt Clr"} @{" _blt Msk Bm To Rp " Link "_blt Msk Bm To Rp"} @{" _blt Pattern " Link "_blt Pattern"} @{" _blt Clip " Link "_blt Clip"} @{" _blt Own " Link "_blt Own"} @{" _blt Disown " Link "_blt Disown"} @{" _blt Wait " Link "_blt Wait"} @{" _scale Bm " Link "_scale Bm"} @{" _scale Div " Link "_scale Div"} @ENDNODE @NODE "_blt Clr" @toc "BLIT" _blt Clr This function erases a block of graphic memory. _blt Clr BLOC,COUNT,FLAGS BLOCK -> Pointeur of Block COUNT -> If Bit 1 of Flags is Zero: Even number of bytes Otherwise the 16 High Bits indicates the number of line and the 16 Low the number of bytes by line FLAGS -> Flags, the bit 0 forces to wait that the Blitter is finished the bit 1 sets the mode to use. @ENDNODE @NODE "_blt Msk Bm To Rp" @toc "BLIT" _blt Msk Bm To Rp Transfer a BitMap to a RastPort, with a mask if wanted. _blt Msk Bm To Rp BMAP,(X0.w,Y0.w) To RPORT,(X1.w,Y1.w),(W.w,H.w),MINTERM,MSK o A couple (X.w, Y.w) is a variable where the 16 High bits contain X and the 16 Low contain Y. BMAP -> Pointer of BitMap. X0, Y0 -> Coordinates of Top Left Corner in the BitMap. RPORT -> Pointer of RastPort. X1, Y1 -> Coordinates of Top Left Corner in the RastPort W, H -> Width and Height in pixels of Transfer MINTERM -> See notice of the AMOS - Set Bob MSK -> Pointer of Mask 2D same measurements that BitMap @ENDNODE @NODE "_blt Pattern" @toc "BLIT" _blt Pattern This function does a Blitter operation on the RastPort. _blt Pattern RPORT,MSK,X0,Y0,X1,Y0,COUNT RPORT -> Pointer of RastPort. MSK -> Pointer of Mask. X0, Y0 -> Top Left Corner. X1, Y1 -> Bottom Right Corner. COUNT -> Number of bytes by line. @ENDNODE @NODE "_blt Clip" @toc "BLIT" _blt Clip This function is a system version of - Screen Copy _blt Clip RPORT0,X0,Y0 To RPORT1,X1,Y1,W,H,MINTERM RPORT0 -> Pointer of Source RastPort. X0, Y0 -> Coordinate of Top Left Corner in RPORT0. RPORT1 -> Pointer of Target RastPort. X1, Y1 -> Coordinates of Top Left Corner in RPORT1. W, H -> Width, Height of transfer. MINTERM -> See Mode - Screen Copy. @ENDNODE @NODE "_blt Own" @toc "BLIT" _blt Own This function allocates the Blitter for your own use. That is for your own routines. Don't USE If YOU USE SYSTEM. YOU MUST 'DISOWN' AFTER USE OR YOU WILL CRASH YOUR COMPUTER. _blt Own NOTE : For the instructions of trace of the TURBO extension, it is ~~~~~~ mandatory of use this function so that the system doesn't crash. @ENDNODE @NODE "_blt Disown" @toc "BLIT" _blt Disown This function renders the use of Blitter to the system. _blt Disown @ENDNODE @NODE "_blt Wait" @toc "BLIT" _blt Wait This function waits that the Blitter has to finish its work. To use also after a _blt Own _blt Wait @ENDNODE @NODE "_scale Bm" @toc "BLIT" _scale Bm This function enlarges or shrinks a BitMap, according to the parameters of the @{"BSA structure" Link _bsa_struct}. _scale Bm BSA BSA -> Pointer of BSA structure. @ENDNODE @NODE _bsa_struct "Structure BSA" @toc "BLIT" Detail of the @{B}B@{UB}it@{B}S@{UB}cale@{B}A@{UB}rgs struture. $0030 48 Taille de la structure. $0000 0 2 bsa_SrcX $0002 2 2 bsa_SrcY $0004 4 2 bsa_SrcWidth $0006 6 2 bsa_SrcHeight $0008 8 2 bsa_XSrcFactor $000a 10 2 bsa_YSrcFactor $000c 12 2 bsa_DestX $000e 14 2 bsa_DestY $0010 16 2 bsa_DestWidth $0012 18 2 bsa_DestHeight $0014 20 2 bsa_XDestFactor $0016 22 2 bsa_YDestFactor $0018 24 4 bsa_SrcBitMap $001c 28 4 bsa_DestBitMap $0020 32 4 bsa_Flags $0024 36 2 bsa_XDDA $0026 38 2 bsa_YDDA $0028 40 4 bsa_Reserved1 $002c 44 4 bsa_Reserved2 @ENDNODE @NODE "_scale Div" @toc "BLIT" _scale Div This function sends back the width of result according to the parameters. W=_scale Div(FACT,NUM,DEN) FACT -> Factor NUM -> Numerator DEN -> Denominator @ENDNODE @node COPP "OS_DevKit, graphics.library-copper support" @toc "MAIN" ___________ ___________ / /\ / /\ OS-DevKit Extension / ___ / // _______/ / Additional power for AMOS Pro V2.00+ / /\_/ / // /\_____ \/ / / // / // /\ Written by: / / // / //______ / / Fromentin BRICE / /_// / /_\_____/ / / / / // / / /__________/ //__________/ / \__________\/ \__________\/ @{b}@{u}Advanced Support Of 'graphics.library'@{uu}@{ub} @{b}@{u}Copper@{uu}@{ub} The Copper is the component that manages the display of ViewPorts. With these functions you can manage the display to all the level. @{u}Commands:@{uu} @{" _cop Init View " Link "_cop Init View"} @{" _cop Init Vport " Link "_cop Init Vport"} @{" _cop Make Vport " Link "_cop Make Vport"} @{" _cop Mrg " Link "_cop Mrg"} @{" _cop Load View " Link "_cop Load View"} @{" _cop Scroll Vport " Link "_cop Scroll Vport"} @{" _cop Vbeam Pos " Link "_cop Vbeam Pos"} @{" _cop Wait Tof " Link "_cop Wait Tof"} @{" _cop Wait Bottom " Link "_cop Wait Bottom"} @{" _cop Control " Link "_cop Control"} @ENDNODE @NODE "_cop Init View" @toc "COPP" _cop Init View This function initializes a View structure. _cop Init View VIEW VIEW -> Pointer of View. @ENDNODE @NODE "_cop Init Vport" @toc "COPP" _cop Init Vport This function initializes a ViewPort structure. _cop Init Vport VPORT VPORT -> Pointer of ViewPort. @ENDNODE @NODE "_cop Load View" @toc "COPP" _cop Load View This function loads the Copper List of View for its display. _cop Load View VIEW VIEW -> Pointer of View. @ENDNODE @NODE "_cop Make Vport" @toc "COPP" _cop Make Vport This function generates the Copper List of ViewPort in taking into account of View which it depends. ( the ViewPort ;-> ) _cop Make Vport VIEW,VPORT VIEW -> Pointer of View. VPORT -> Pointer of ViewPort. @ENDNODE @NODE "_cop Mrg" @toc "COPP" _cop Mrg This function creates the Copper List of View for which is loaded. _cop Mrg VIEW VIEW -> Pointer of View. @ENDNODE @NODE "_cop Scroll Vport" @toc "COPP" _cop Scroll Vport This function calculates the Copper List for the new position of BitMap that you define in the its RasInfo structure. _cop Scroll Vport VPORT VPORT -> Pointer of ViewPort. @ENDNODE @NODE "_cop Vbeam Pos" @toc "COPP" _cop Vbeam Pos This function sends back the vertical position of electronic bundle. VPOS=_cop Vbeam Pos @ENDNODE @NODE "_cop Wait Tof" @toc "COPP" _cop Wait Tof It is the MultiTask Wait Vbl , in making, it waits until high of the screen after the execution of the VBL interrupts. _cop Wait Tof @ENDNODE @NODE "_cop Control" @toc "COPP" _cop Control This function controls the exit video. _cop Control CMAP,TAG CMAP -> Pointer of ColorMap. TAG -> Pointer of TAG List. VTAG_ATTACH_CM_SET Specify the ViewPort attached to the Colormap ($8000000B),(VP) VTAG_ATTACH_CM_GET Sends back the ViewPort attached to the ColorMap. ($8000001B),(PTR) VTAG_VIEWPORTEXTRA_SET Specify the ViewPort Extra attached to the ColorMap. ($80000014),(VE) VTAG_VIEWPORTEXTRA_GET Sends back ViewPort Extra attached to the ColorMap. ($80000013),(PTR) VTAG_NORMAL_DISP_SET Specify the DisplayInfo Handle in 'Normal' mode. ($80000010),(DIH) VTAG_NORMAL_DISP_GET Sends back DisplayInfo Handle in 'Normal' mode. ($8000000F),(PTR) VTAG_COERCE_DISP_SET Specify the DisplayInfo Handle in 'Coerce' mode. ($80000012),(DIH) VTAG_COERCE_DISP_GET Sends back DisplayInfo Handle in 'Coerce' mode. ($80000011),(PTR) VTAG_PF1_BASE_SET Specify the basis color for the 1st PlayField. ($8000002A),(C) (V39) VTAG_PF1_BASE_GET Sends back the basis color of 1st Playfield. ($80000026),(PTR) (V39) VTAG_PF2_BASE_SET Specify the basis color for the 2nd PlayField. ($8000002B),(C) (V39) VTAG_PF2_BASE_GET Sends back the basis color of 2nd Playfield. ($80000027),(PTR) (V39) VTAG_SPODD_BASE_SET Specifie the basis color of the odd Sprites. ($8000002D),(C) (V39) VTAG_SPODD_BASE_GET Sends back the basis color of odd Sprites ($80000029),(PTR) (V39) VTAG_SPEVEN_BASE_SET Specify the basis color of the Sprites peerage. ($8000002C),(C) (V39) VTAG_SPEVEN_BASE_GET Sends back the basis color of Sprites peerage ($80000028),(PTR) (V39) VTAG_BORDERSPRITE_SET Permits display of the Sprites in the edges (TRUE). ($8000002F),(BOOL) (V39) VTAG_BORDERSPRITE_GET Sends back if the Sprites could be posters in ($8000002E),(PTR) the edges. (V39) VTAG_SPRITERESN_SET Sets the resolution of the Sprites: (V39) ($80000031),(RES) - SPRITERESN_ECS -->> 0 - SPRITERESN_140NS -->> 1 - SPRITERESN_70NS -->> 2 - SPRITERESN_35S -->> 3 - SPRITERESN_DEFAULT -->> -1 VTAG_SPRITERESN_GET Sends back the resolution of the Sprites. ($80000032),(PTR) (V39) VTAG_PF1_TO_SPRITEPRI_SET Sets the priorities of the Sprites toward ($80000033),(PRI) 1st Playfield. (V39) VTAG_PF1_TO_SPRITEPRI_GET Sends back the priorities of the Sprites toward ($80000034),(PTR) 1st Playfield. (V39) VTAG_PF2_TO_SPRITEPRI_SET Stationary the priorities of the Sprites toward ($80000035),(PRI) 2nd Playfield. (V39) VTAG_PF2_TO_SPRITEPRI_GET Sends back the priorities of the Sprites toward ($80000036),(PTR) 2nd Playfield. (V39) /\ || These last two requires that the ColorMap is attached to a ViewPort in order to be efficient. Genlock Control ~~~~~~~~~~~~~~~ VTAG_BORDERBLANK_SET Displays the edges of the screen. ($80000005),(VAL) VTAG_BORDERBLANK_CLR Erases the edges of the screen. ($80000004),(VAL) VTAG_BORDERBLANK_GET Sends back if the edges of the screen are not displayed. ($80000017),(PTR) VTAG_BORDERNOTRANS_SET Sets the state of the edges of 'Non Transparency' ($80000007),(VAL) VTAG_BORDERNOTRANS_CLR Withdraws the state of the edges of 'Non Transparency' ($80000006),(VAL) VTAG_BORDERNOTRANS_GET Sends back if the edges are 'Non Transparency' ($80000018),(PTR) VTAG_CHROMAKEY_SET Sets the chromatic mode. ($80000001),(VAL) VTAG_CHROMAKEY_CLR Withdraws the chromatic mode. ($80000000),VAL) VTAG_CHROMAKEY_GET Sends back if the chromatic mode is active. ($80000015),(PTR) VTAG_BITPLANEKEY_SET Sets the BitPlane mode. ($80000003),(VAL) VTAG_BITPLANEKEY_CLR Withdraws the BitPlane mode. ($80000002),(VAL) VTAG_BITPLANEKEY_GET Sends back if the BitPlane mode is active. ($80000016),(PTR) VTAG_CHROMA_PEN_SET Sets the pen of ChromaKey. ($80000009),(VAL) VTAG_CHROMA_PEN_CLR Erases the pen of ChromaKey. ($80000008),(VAL) VTAG_CHROMA_PEN_GET Sends back the pen of ChromaKey. ($80000019),(PTR) VTAG_CHROMA_PLANE_SET Sets the plan of BitPlaneKey. ($8000000A),(VAL) VTAG_CHROMA_PLANE_GET Sends back the plan of BitPlaneKey. ($8000001A),(PTR) Command of Contrl ~~~~~~~~~~~~~~~~~ VTAG_IMMEDIATE Normally, _cop Control doesn't do the changes until the ($80000037),(PTR) next 'MakeVPort.' Using this TAG, so that some changes do immediately. The data of TAG is a pointer on a variable whose will be stake to 0 if all the changes took place. (V39) VTAG_FULLPALETTE_SET Permits the loading of all the colors in the ($80000038),(VAL) Copper. (V39) VTAG_FULLPALETTE_CLR Inhibits the loading of all the colors in the ($8000003A),(VAL) Copper. (V39) VTAG_FULLPALETTE_GET Sends back if the loading of all the colors in ($80000039),(PTR) the Copper is active. (V39) @ENDNODE @NODE "_cop Wait Bottom" @toc "COPP" _cop Wait Bottom This function waits until the end of ViewPort. A way of WaitVBL. _cop Wait Bottom VPORT VPORT -> Pointer of ViewPort. @ENDNODE @node COLO "OS_DevKit, graphics.library-colours support" @toc "MAIN" ___________ ___________ / /\ / /\ OS-DevKit Extension / ___ / // _______/ / Additional power for AMOS Pro V2.00+ / /\_/ / // /\_____ \/ / / // / // /\ Written by: / / // / //______ / / Fromentin BRICE / /_// / /_\_____/ / / / / // / / /__________/ //__________/ / \__________\/ \__________\/ @{b}@{u}Advanced Support Of 'graphics.library'@{uu}@{ub} @{b}@{u}Colours@{uu}@{ub} @{u}Commands (V36+):@{uu} @{" _cm Alloc " Link "_cm Alloc" } @{" _cm Free " Link "_cm Free" } @{" _rgb4 Get " Link "_rgb4 Get" } @{" _rgb4 Set " Link "_rgb4 Set" } @{" _rgb4 Load " Link "_rgb4 Load" } @{" _rgb4 Cm Set " Link "_rgb4 Cm Set"} @{u}Commands (V39+):@{uu} !!! All components are left justified. Example : R=128 will R=$80FFFFFF @{" _rgb32 Get " Link "_rgb32 Get" } @{" _rgb32 Load " Link "_rgb32 Load" } @{" _rgb32 Set " Link "_rgb32 Set" } @{" _rgb32 Cm Set " Link "_rgb32 Cm Set" } @ENDNODE @NODE "_cm Alloc" @toc "COLO" _cm Alloc This function allocates and initializes a ColorMap, then sends back its pointer. CMAP=_cm Alloc(NBC) NBC -> Number of colors. @ENDNODE @NODE "_cm Free" @toc "COLO" _cm Free This function liberates a ColorMap of the memory. _cm Free CMAP CMAP -> Pointer of ColorMap @ENDNODE @NODE "_rgb4 Get" @toc "COLO" _rgb 4 Get -Colour()- C=_rgb4 Get(CMAP,CPEN) CMAP -> Pointer of ColorMap. CPEN -> Color Index. @ENDNODE @NODE "_rgb4 Load" @toc "COLO" _rgb4 Load This function loads a list of colors in the ViewPort. _rgb4 Load(VPORT,CTABLE,NB) VPORT -> Pointer of ViewPort. CTABLE -> Pointer of Color Table. NB -> Number of colors to load. Note : The table is of the shape 0x00 Color0 ~~~~~~ 0x02 Color1 0x04 Color2 ETC ... @ENDNODE @NODE "_rgb4 Set" @toc "COLO" _rgb4 Set This function sets the color of one index of ViewPort. _rgb4 Set VPORT,CPEN,R,G,B VPORT -> Pointer of ViewPort. CPEN -> N° of index. R -> Red Value (0-15) G -> Green Valee (0-15) B -> Blue Value (0-15) @ENDNODE @NODE "_rgb4 Cm Set" @toc "COLO" _rgb4 Cm Set This function sets the color of one index of ColorMap. _rgb4 Cm Set CMAP,CPEN,R,G,B CMAP -> Pointer of ColorMap CPEN -> N° of index R -> Red Value (0-15) G -> Green Value (0-15) B -> Blue Value (0-15) @ENDNODE @NODE "_rgb32 Get" @toc "COLO" _rgb32 Get This function fills a table with the colors of one ColorMap. One has a following of the components. _rgb32 Get CMAP,FIRST,CNB,TABLE CMAP -> Pointer of ColorMap. FIRST -> First color to read. CNB -> Number of colors to read. TABLE -> Pointer of the table. @ENDNODE @NODE "_rgb32 Load" @toc "COLO" _rgb32 Load This function loads some colors in the ViewPort. _rgb32 Load VPORT,TABLE VPORT -> Pointer of ViewPort. TABLE -> Pointer of the table. The Table is like : 0x00 Number of Colors 0x02 First Color. { 0x04 Red 0x08 Green 0x0C Blue } As many as colors @ENDNODE @NODE "_rgb32 Set" @toc "COLO" _rgb32 Set This function sets a color of one ViewPort. _rgb32 Set VPORT,CPEN,R,G,B VPORT -> Pointer of ViewPort. CPEN -> Numner of index. R,G,B -> Components of the color. @ENDNODE @NODE "_rgb32 Cm Set" @toc "COLO" _rgb32 Cm Set This function sets a color of one ColorMap. _rgb32 Cm Set CMAP,CPEN,R,G,B CMAP -> Pointer of ColorMap. CPEN -> Number of Index. R,G,B -> Components of color. @ENDNODE @node MISC "OS_DevKit, graphics.library-misc support" @toc "MAIN" ___________ ___________ / /\ / /\ OS-DevKit Extension / ___ / // _______/ / Additional power for AMOS Pro V2.00+ / /\_/ / // /\_____ \/ / / // / // /\ Written by: / / // / //______ / / Fromentin BRICE / /_// / /_\_____/ / / / / // / / /__________/ //__________/ / \__________\/ \__________\/ @{b}@{u}Advanced Support Of 'graphics.library'@{uu}@{ub} @{b}@{u}Misc.@{uu}@{ub} @{u}Commands (V39+):@{uu} @{" _chip Set Rev " Link "_chip Set Rev"} @{" _calc Ivg " Link "_calc Ivg"} @{" _disp Info Find " Link "_disp info find"} @{" _disp info Get " Link "_disp info get"} @ENDNODE @NODE "_chip Set Rev" @toc "MISC" _chip Set Rev This function sets the ChipSet to emulate. AA only. It returns the old chip revision. CREV=_chip Set Rev(CREV) CREV -> Revision asked SETCHIPREV_A -->> $1 SETCHIPREV_ECS -->> $3 SETCHIPREV_AA -->> $F SETCHIPREV_BEST -->> -1 @ENDNODE @NODE "_calc Ivg" @toc "MISC" _calc Ivg This function calculates the number of dead line in one ViewPort used by the copper for the initialization of ViewPort. H=_calc Ivg(VIEW,VPORT) VIEW -> Pointer of View. VPORT -> Pointer of ViewPort. @ENDNODE @NODE "_disp Info Find" @toc "MISC" _disp Info Find This function sends back a Handle whose will permit you to know the properties of the transmitted mode. It will be necessary to pass the handle to @{"_disp Info Get" Link "_disp Info Get"} function. HANDLE=_disp Info Find(IDMODE) IDMODE -> Screen Mode Identifier. @ENDNODE @NODE "_disp Info Get" @toc "MISC" _disp Info Get This function filled a buffer with the type of requisite informations. BYTES=_disp Info get(HANDLE,BUF,SIZE,TAGID,IDMODE) HANDLE -> Pointer of a Handle. BUF -> Pointer of the target Buffer. SIZE -> Size of Buffer. TAGID -> Value of TAG: @{"DTAG_DISP" Link DisplayInfo } = $80000000 @{"DTAG_DIMS" Link DimensionInfo} = $80001000 @{"DTAG_MNTR" Link MonitorInfo } = $80002000 @{"DTAG_NAME" Link NameInfo } = $80003000 IDMODE -> Screen mode if the Handle is void. @ENDNODE @NODE DisplayInfo "Structure DisplayInfo" @toc "MISC" Detail of the DisplayInfo structure. $0038 56 Size of structure $0000 0 16 Header $0010 16 2 NotAvailable $0012 18 4 PropertyFlags $0016 22 4 Resolution $001a 26 2 PixelSpeed $001c 28 2 NumStdSprites $001e 30 2 PaletteRange $0020 32 4 SpriteResolution $0024 36 1 pad[0] $0028 40 1 RedBits $0029 41 1 GreenBits $002a 42 1 BlueBits $002b 43 1 pad2[0] $0030 48 4 reserved[0] @ENDNODE @NODE DimensionInfo "Structure DimensionInfo" @toc "MISC" Detail of the DimensionInfo structure. $0058 88 Size of structure $0000 0 16 Header $0010 16 2 MaxDepth $0012 18 2 MinRasterWidth $0014 20 2 MinRasterHeight $0016 22 2 MaxRasterWidth $0018 24 2 MaxRasterHeight $001a 26 8 Nominal $0022 34 8 MaxOScan $002a 42 8 VideoOScan $0032 50 8 TxtOScan $003a 58 8 StdOScan $0042 66 1 pad[0] $0050 80 4 reserved[0] @ENDNODE @NODE MonitorInfo "Structure MonitorInfo" @toc "MISC" Detail of the MonitorInfo structure. $0060 96 Size of structure $0000 0 16 Header $0010 16 4 Mspc $0014 20 4 ViewPosition $0018 24 4 ViewResolution $001c 28 8 ViewPositionRange $0024 36 2 TotalRows $0026 38 2 TotalColorClocks $0028 40 2 MinRow $002a 42 2 Compatibility $002c 44 1 pad[0] $004c 76 4 MouseTicks $0050 80 4 DefaultViewPosition $0054 84 4 PreferredModeID $0058 88 4 reserved[0] @ENDNODE @NODE NameInfo "Structure NameInfo" @toc "MISC" Detail of the NameInfo structure. $0038 56 Siez of structure $0000 0 16 Header $0010 16 1 Name[0] $0030 48 4 reserved[0] @ENDNODE @node FONT "OS_DevKit, graphics.library-fonts support" @toc "MAIN" ___________ ___________ / /\ / /\ OS-DevKit Extension / ___ / // _______/ / Additional power for AMOS Pro V2.00+ / /\_/ / // /\_____ \/ / / // / // /\ Written by: / / // / //______ / / Fromentin BRICE / /_// / /_\_____/ / / / / // / / /__________/ //__________/ / \__________\/ \__________\/ @{b}@{u}Advanced Support Of 'graphics.library'@{uu}@{ub} @{b}@{u}Fonts@{uu}@{ub} By the fonts, I talk about the graphics ones described in the AMOSPro manual. @{" TextFont Structure " Link _font_Struct} @{u}Commands:@{uu} @{" _font Add " Link "_font Add"} @{" _font Rem " Link "_font Rem"} @{" _font Ask " Link "_font Ask"} @{" _font Style " Link "_font Style"} @{" _font Soft Style " Link "_font Soft Style"} @{" _font Open " Link "_font Open"} @{" _font Load " Link "_font Load"} @{" _font Close " Link "_font Close"} @{" _font Set " Link "_font Set"} @ENDNODE @NODE "_font Add" @toc "FONT" _font Add This function adds a font to the system. _font Add TFONT TFONT -> Pointer of TextFont. @ENDNODE @NODE "_font Ask" @toc "FONT" _font Ask This function demands of filling the TextAttr structure with the features of the font of RastPort. _font Ask RPORT,TATTR RPORT -> Pointer of RastPort. TATTR -> Pointer of TextAttr to fill. @ENDNODE @NODE "_font Style" @toc "FONT" _font Style This function sends back the algorythm style of the font of RastPort. STYLE=_font Style(RPORT) RPORT -> Pointer of RastPort. @ENDNODE @NODE "_font Close" @toc "FONT" _font Close This function closes a font, that you don't need any more. _font Close TFONT TFONT -> Pointer of TextFont. @ENDNODE @NODE "_font Open" @toc "FONT" _font Open This function opens a font, it sends back us the TextFont pointer. This function inspects the fonts in memory only. TFONT=_font Open(TATTR) TATTR -> Pointer of TextAttr already filled. @ENDNODE @NODE "_font Rem" @toc "FONT" _font Rem This function removes the font of the system list. _font Rem TFONT TFONT -> Pointer of TextFont. @ENDNODE @NODE "_font Set" @toc "FONT" _font Set This function sets the new font to be use by the RastPort. _font Set RPORT,TFONT RPORT -> Pointer of RastPort TFONT -> Pointer of TextFont. @ENDNODE @NODE "_font Soft Style" @toc "FONT" _font Soft Style This function changes the style of the font and sends back the new style. NSTYLE=_font Soft Style RPORT,STYLE,MSK RPORT -> Pointer of RastPort. STYLE -> Style requireds. MSK -> Mask of Style. @ENDNODE @NODE "_font Load" @toc "FONT" _font Load This function loads a font since of disk if it is not in memory. In making, first it does an _font Open and if it strands then it inspects the disk. This function sends back the TextFont pointer. Of more, it uses the diskfont.library. TFONT=_font Load(TATTR) TATTR -> Pointer of TextAttr. @ENDNODE @NODE _font_struct "Structure TextFont" @toc "FONT" Detail of the TextFont structure. $0034 52 Size of structure $0000 0 20 tf_Message $0014 20 2 tf_YSize $0016 22 1 tf_Style $0017 23 1 tf_Flags $0018 24 2 tf_XSize $001a 26 2 tf_Baseline $001c 28 2 tf_BoldSmear $001e 30 2 tf_Accessors $0020 32 1 tf_LoChar $0021 33 1 tf_HiChar $0022 34 4 tf_CharData $0026 38 2 tf_Modulo $0028 40 4 tf_CharLoc $002c 44 4 tf_CharSpace $0030 48 4 tf_CharKern @ENDNODE @node FFIL "OS_DevKit, graphics.library-fastfilling support" @toc "MAIN" ___________ ___________ / /\ / /\ OS-DevKit Extension / ___ / // _______/ / Additional power for AMOS Pro V2.00+ / /\_/ / // /\_____ \/ / / // / // /\ Written by: / / // / //______ / / Fromentin BRICE / /_// / /_\_____/ / / / / // / / /__________/ //__________/ / \__________\/ \__________\/ @{b}@{u}Advanced Support Of 'graphics.library'@{uu}@{ub} @{b}@{u}Fast Filling@{uu}@{ub} Here some functions that will allow you to fill surfaces or create some filled ones. These function are very difficult but very powerfull. @{u}Commands:@{uu} @{" _area Init " Link "_area Init"} @{" _area End " Link "_area End"} @{" _area Ellipse " Link "_area Ellipse"} @{" _area Draw " Link "_area Draw"} @{" _area Move " Link "_area Move"} @{" _rp Flood " Link "_rp Flood"} @{" _rp Bar " Link "_rp Bar"} @{" _rast Alloc " Link "_rast Alloc"} @{" _rast Free " Link "_rast Free"} @{" _tmpras Init " Link "_tmpras Init"} @ENDNODE @NODE "_area Init" @toc "FFIL" _area Init This function initializes the AreaInfo structure. _area Init(AINFO,BUFFER,NBDOTS) AINFO -> Pointer of AreaInfo. BUFFER -> Pointer of Buffer. NBDOTS -> Number of Points in the buffer. Note : The buffer must have an equal size has 5 times the number of point asked. @ENDNODE @NODE "_area Ellipse" @toc "FFIL" _area Ellipse This function adds a full ellipsis in the table of the vectors. If OK<>0 then no more place in the table of the vectors OK=_area Ellipse(RPORT,XC,YC,XR,YR) RPORT -> Pointer of RastPort. XC,YC -> Ellipse Center. XR,YR -> Ellipse Ray. @ENDNODE @NODE "_area Draw" @toc "FFIL" _area Draw This function adds a line in the table of the vectors. If OK<> 0 then no more place in the table of the vectors OK=_area Draw(RPORT,X,Y) RPORT -> Pointer of RastPort X,Y -> Coordinates of the ending point of the line. @ENDNODE @NODE "_area Move" @toc "FFIL" _area Move This function displaces the cursor in the table of vectors. If OK<>0 then no more place in the table of the vectors OK=_area Move(RPORT,X,Y) RPORT -> Pointer of RastPort. X,Y -> New coordinates of the graphical cursor. @ENDNODE @NODE "_area End" @toc "FFIL" _area End This function does all the filling operations of the table of vectors. if OK<>0 then a mistake is produced. OK=_area End(RPORT) RPORT -> Pointer of RastPort. @ENDNODE @NODE "_rp Flood" @toc "FFIL" _rp Flood See -Paint- _rp Flood RPORT,MODE,X,Y RPORT -> Pointer of RastPort. MODE,X,Y-> -Paint- @ENDNODE @NODE "_rp Bar" @toc "FFIL" _rp Bar See -Bar- _rp Bar RPORT,X1,Y1,X2,Y2 RPORT -> Pointer of RastPort. X1,Y1,X2,Y2 -> -Bar- @ENDNODE @NODE "_rast Alloc" @toc "FFIL" _rast Alloc This function allocates a raster (binary plane). R=_rast Alloc(W,H) W -> Width in pixels. H -> Height in lines. @ENDNODE @NODE "_rast Free" @toc "FFIL" _rast Free This function liberates a raster of the memory. _rast Free R,W,H R -> Pointer of Raster. W -> Width in pixels. H -> Height in lines. @ENDNODE @NODE "_tmpras Init" @toc "FFIL" _tmpras Init This function [initializes the TmpRas structure. _tmpras Init TMPRAS,BUF,SIZE TMPRAS -> Pointer of TmpRas. BUF -> Pointer of a Buffer (CHIP or RASTER). SIZE -> Length in bytes of the buffer. @ENDNODE @node RTGF "OS_DevKit, graphics.library-RTG support" @toc "MAIN" ___________ ___________ / /\ / /\ OS-DevKit Extension / ___ / // _______/ / Additional power for AMOS Pro V2.00+ / /\_/ / // /\_____ \/ / / // / // /\ Written by: / / // / //______ / / Fromentin BRICE / /_// / /_\_____/ / / / / // / / /__________/ //__________/ / \__________\/ \__________\/ @{b}@{u}Advanced Support Of 'graphics.library'@{uu}@{ub} @{b}@{u}Retargetable Graphics@{uu}@{ub} The RTG graphic functions came with the OS 3.0. By RTG, one hears 'retargetable graphics'. Like each knows, the OS is very attached to its ChipSet, one calls this tendency 'Hardware Dependant', i.e, that the OS could not function without its Chip. Well, for all the low level graphical section , the constructors of graphic cards must invent some more or minus reliable systems in order to rerout the OS toward the card. It is thus that EGS & CyberGFX, for mentions them, were born. If these functions exist, it is simply in order to prepare the programmers for a RTG system: OS 4.0. Their goals are to prevent you of having access to some structures no evolutionary whose could not support the chunky mode for example or other again. @{u}RastPort Commands (V39+):@{uu} @{" _rp Wr Msk " Link "_rp Wr Msk"} @{" _rp O Pen " Link "_rp O Pen"} @{" _rp Bf Scroll " Link "_rp Bf Scroll"} @{" _rp What Attrs " Link "_rp What Attrs"} @{" _rp Set Attrs " Link "_rp Set Attrs"} @{u}BitMap Commands (V39+):@{uu} @{" _bm Alloc " Link "_bm Alloc"} @{" _bm Free " Link "_bm Free"} @{" _bm What Attrb " Link "_bm What Attrb"} @{u}Pens Commands (V39+):@{uu} @{" _pen Find " Link "_pen Find"} @{" _pen Obtain Best " Link "_pen Obtain Best"} @{" _pen Obtain " Link "_pen Obtain"} @{" _pen Release " Link "_pen Release"} @{" _pen Set Max " Link "_pen Set Max"} @{u}ViewModes Commands (V39+):@{uu} @{" _mode Best Id " Link "_mode Best Id"} @{" _mode Coerce " Link "_mode Coerce"} @{" _vp Get Mode " Link "_vp Get Mode"} @ENDNODE @NODE "_rp Wr Msk" @toc "RTGF" _rp Wr Msk This function fixes the writing mask of the RastPort bitplanes. To use insted of _rp Set Wr Msk if you require V39. _rp Wr Msk RPORT,MSK RPORT -> Pointer of RastPort. MSK -> 32 bits Mask. @ENDNODE @NODE "_rp O Pen" @toc "RTGF" _rp O Pen This function sets the outline pen. Instead of _rp Set O Pen, for V39. _rp O Pen RPORT,OPEN RPORT -> Pointer of RastPort. OPEN -> Pen Number @ENDNODE @NODE "_rp Bf Scroll" @toc "RTGF" _rp Bf Scroll This function is equivalent to the _rp Scroll but it fills the sectors that not be concerned in the zone by rectangles. _rp Bf Scroll RPORT,DX,DY,X0,Y0 To X1,Y1 RPORT -> Pointer of RastPort. DX,DY -> Shift Value -Def Scroll- X0,Y0 -> Top Left Corner. X1,Y1 -> Bottom Right Corner. @ENDNODE @NODE "_rp What Attrs" @toc "RTGF" _rp What Attrs This function filled the variables transmitted like parameters of the TAGs by the required values by the TAGs. _rp What Attrs RPORT,TAG RPORT -> Pointer of RastPort. TAG -> Pointer of TAG List. RPTAG_Font Pointer of a font whose will be used for the text. ($80000000),(FONT) RPTAG_SoftStyle Specify the style of the font. ($????????),(STYLE) RPTAG_APen Specify the foreground pen for the RastPort. (APen) ($80000002),(PEN) RPTAG_BPen Specify the background pen for the RastPort. (Bpen) ($80000003),(PEN) RPTAG_DrMd Specify the draw mode for the RastPort. (DrMd) ($80000004),(MD) RPTAG_OutLinePen Specify the outline pen for the RastPort. (OPen) ($80000005),(PEN) RPTAG_WriteMask Specify the writing mask for the RastPort. (WrMsk) ($80000006),(MSK) RPTAG_MaxPen Specify the max pen number in the RastPort. ($80000007),(MAX) @ENDNODE @NODE "_rp Set Attrs" @toc "RTGF" _rp Set Attrs This function sets the attributes, requisite by the TAGs, of RastPort. _rp Set Attrs RPORT,TAG RPORT -> Pointer of RastPort. TAG -> Pointer of TAG List. RPTAG_Font Pointer of a font whose will be used for the text. ($80000000),(FONT) RPTAG_SoftStyle Specify the style of the font. ($????????),(STYLE) RPTAG_APen Specify the foreground pen for the RastPort. (APen) ($80000002),(PEN) RPTAG_BPen Specify the background pen for the RastPort. (Bpen) ($80000003),(PEN) RPTAG_DrMd Specify the draw mode for the RastPort. (DrMd) ($80000004),(MD) RPTAG_OutLinePen Specify the outline pen for the RastPort. (OPen) ($80000005),(PEN) RPTAG_WriteMask Specify the writing mask for the RastPort. (WrMsk) ($80000006),(MSK) RPTAG_MaxPen Specify the max pen number in the RastPort. ($80000007),(MAX) @ENDNODE @NODE "_bm Alloc" @toc "RTGF" _bm Alloc This function allocates a BitMap structure and its binary planes, ut initializes the structure and sends back its pointer. BMAP=_bm Alloc(W,H,DEPTH,FLAGS,FRIEND) W,H -> Width & Height of BitMap. DEPTH -> Depth of BitMap. FLAGS -> Type of BitMap : BMF_CLEAR -->> 1 BMF_DISPLAYABLE -->> 2 BMF_INTERLEAVED -->> 4 FRIEND -> Put to 0, otherwise see RKM @ENDNODE @NODE "_bm Free" @toc "RTGF" _bm Free This function liberates a BitMap allocated by _bm Alloc of the memory. _bm Free BMAP BMAP -> Pointer of BitMap. @ENDNODE @NODE "_bm What Attrb" @toc "RTGF" _bm What Attrb This function sends back the value of the asked attribute of BitMap. ATTR=_bm What Attrb(BMAP,ATTRNB) BMAP -> Pointer of BitMap. ATTRNB -> Attribute Number. BMA_HEIGHT -->> $0 BMA_DEPTH -->> $4 BMA_WIDTH -->> $8 BMA_FLAGS -->> $C @ENDNODE @NODE "_pen Find" @toc "RTGF" _pen Find This function looks for a pen according to its components of color. C=_pen Find(CMAP,R,G,B,MAXPEN) CMAP -> Pointer of ColorMap. R,G,B -> Components. MAXPEN -> Max pen number for the search. @ENDNODE @NODE "_pen Obtain Best" @toc "RTGF" _pen Obtain Best This function searchs a penc of near color otherwise it allocates an of it, it sends back the number granted or -1 in case of mistake. C=_pen Obtain Best(CMAP,R,G,B,TAG) CMAP -> Pointer of ColorMap. R,G,B -> Components TAG -> Pointer of TAG List. OBP_Precision Specify the precision for the research. ($84000000),(VAL) MUST BE : - PRECISION_GUI -->> $20 - PRECISION_ICON -->> $10 - PRECISION_IMAGE-->> $00 - PRECISION_EXACT-->> -1 Default to PRECISION_IMAGE. OBP_FailIfBad Specify if you want that _pen Obtain Best can , ($84000001),(BOOL) strand (TRUE) if there is not of color in the given sufferance, to the place of returning the nearrest color. With OBP_FailIfBad = FALSE, _pen Obtain Best will strand only if the ViewPort doesn't contain sharable colors. Default to FALSE. @ENDNODE @NODE "_pen Obtain" @toc "RTGF" _pen Obtain This function searchs a pen of near but free color. C=_pen Obtain(CMAP,NB,R,G,B,FLAGS) CMAP -> Pointer of ColorMap. NB -> Pen Number or -1, if indifferent. R,G,B -> Components of the color. FLAGS -> Type of pen : PEN_EXCLUSIVE -->> 1 PEN_NO_SETCOLOR -->> 2 @ENDNODE @NODE "_pen Release" @toc "RTGF" _pen Release This function liberates a pen previously obtained by _pen Obtain (Best) so that everyone could have there access to it. _pen Release CMAP,NB CMAP -> Pointer of ColorMap. NB -> Pen Number. @ENDNODE @NODE "_pen Set Max" @toc "RTGF" _pen Set Max This function defines the maximal number of pens of RastPort. _pen Set Max RPORT,MAXPEN RPORT -> Pointer of RastPort. MAXPEN -> Max number of pens. @ENDNODE @NODE "_mode Best Id" @toc "RTGF" _mode Best Id This function searchs the best mode among those available according to your desires transmitted by the list of TAGs. BMODE=_mode Best id(TAGLIST) TAGLIST -> Pointer of TAG List. BIDTAG_DIPFMustHave Flags, the mode must have : (Default to 0) ($80000001),(FLAGS) DIPF_IS_LACE = $1 DIPF_IS_DUALPF = $2 DIPF_IS_PF2PRI = $4 DIPF_IS_HAM = $8 DIPF_IS_ECS = $10 DIPF_IS_AA = $10000 DIPF_IS_PAL = $20 DIPF_IS_SPRITES = $40 DIPF_IS_GENLOCK = $80 DIPF_IS_WB = $100 DIPF_IS_DRAGGABLE = $200 DIPF_IS_PANELLED = $400 DIPF_IS_BEAMSYNC = $800 DIPF_IS_EXTRAHALFBRITE = $1000 DIPF_IS_SPRITES_ATT = $2000 DIPF_IS_SPRITES_CHNG_RES = $4000 DIPF_IS_SPRITES_BORDER = $8000 DIPF_IS_SCANDBL = $20000 DIPF_IS_SPRITES_CHNG_BASE = $40000 DIPF_IS_SPRITES_CHNG_PRI = $80000 DIPF_IS_DBUFFER = $100000 DIPF_IS_PROGBEAM = $200000 DIPF_IS_FOREIGN = $80000000 BIDTAG_DIPFMustNotHave Flags, the mode doesn't must have. ($80000002),(FLAGS) BIDTAG_ViewPort Specify a ViewPort for whom a mode is wishes. ($80000003),(VPORT) Default to 0. BIDTAG_NominalWidth Define the aspect of mode. ($80000004),(W) Default: If BIDTAG_SourceID-> the aspect of this mode BIDTAG_NominalHeight Or BIDTAG_ViewPort-> Width& Height ($80000005),(H) Or 640* 200 BIDTAG_DesiredWidth Uses for distinguishes two modes whose possess ($80000006),(W) the same aspect. Default as over. BIDTAG_DesiredHeight ($80000007),(H) BIDTAG_Depth Minimal depth that the mode must support. ($80000008),(D) Default: If BIDTAG_ViewPort-> Depth Otherwise 1 BIDTAG_MonitorID Monitor that the mode must use. Default to no. ($80000009),(ID) BIDTAG_SourceID Uses this mode instead of the one of BIDTAG_ViewPort. ($8000000A),(ID) BIDTAG_RedBits Specify the number of nuances by components. ($8000000B),(VAL) One specifies a strength of 2. The returned mode BIDTAG_BlueBits therefore support such a palette. ($8000000C),(VAL) BIDTAG_GreenBits ($8000000D),(VAL) @ENDNODE @NODE "_mode Coerce" @toc "RTGF" _mode Coerce This function determines the best mode in the Monitor in order to compel the ViewPort to the given restrictions by the Flags. If failure, sends back -1, otherwise it sends back the chosen mode. ID=_mode Coerce(VPORT,MNTRID,FLAGS) VPORT -> Pointer of ViewPort. MNTRID -> Monitor Identifier. FLAGS -> Flags PRESERVE_COLORS = $1 AVOID_FLICKER = $2 @ENDNODE @NODE "_vp Get Mode" @toc "RTGF" _vp get mode This function sends back the mode of Viewport, if failure, sends back -1. ID=_vp Get Mode (VPORT) VPORT -> Pointer of ViewPort. @ENDNODE @node SPRI "OS_DevKit, graphics.library-Sprite support" @toc "MAIN" ___________ ___________ / /\ / /\ OS-DevKit Extension / ___ / // _______/ / Additional power for AMOS Pro V2.00+ / /\_/ / // /\_____ \/ / / // / // /\ Written by: / / // / //______ / / Fromentin BRICE / /_// / /_\_____/ / / / / // / / /__________/ //__________/ / \__________\/ \__________\/ @{b}@{u}Advanced Support Of 'graphics.library'@{uu}@{ub} @{b}@{u}Sprites@{uu}@{ub} Here the functions whose manage the HardWare sprites. Attention, these last possesse new possibilities starting from V39. @{u}Commands (V36+):@{uu} @{" _spr Get " Link "_spr Get"} @{" _spr Free " Link "_spr Free"} @{" _spr Move " Link "_spr Move"} @{" _spr Change " Link "_spr Change"} @{" _spr Set Height " Link "_spr Set Height"} @{" _spr Set Nb " Link "_spr Set Nb"} @{" _spr Set Pos " Link "_spr Set Pos"} @{u}Commands (V39+):@{uu} @{" _spr A Data Alloc " Link "_spr A Data Alloc"} @{" _spr A Data Free " Link "_spr A Data Free"} @{" _spr A Change " Link "_spr A Change"} @{" _spr A Get " Link "_spr A Get"} @ENDNODE @NODE "_spr Change" @toc "SPRI" _spr Change This function changes the sprite datas to display in the ViewPort. _spr Change VPORT,SPR,SPRDATA VPORT -> Pointer of ViewPort. SPR -> Pointer of SimpleSprite SPRDATA -> Pointer of SpriteData @ENDNODE @NODE "_spr Free" @toc "SPRI" _spr Free This function liberates a prevously allocated sprite. _spr Free SPRNB SPRNB -> Sprite Number returned by @{"_spr Get" Link "_spr Get"}. @ENDNODE @NODE "_spr Get" @toc "SPRI" _spr Get This function allocates a sprite and sends back its number. NB=_spr Get(SPR,SPRNB) SPR -> Pointer of SimpleSprite. SPRNB -> Sprite Number (0-7, or -1 if indifferent) @ENDNODE @NODE "_spr Move" @toc "SPRI" _spr Move This function displaces a sprite in a ViewPort. _spr Move VPORT,SPR,X,Y VPORT -> Pointer of ViewPort. X,Y -> Coordinates in the ViewPort. @ENDNODE @NODE "_spr Set Height" @toc "SPRI" _spr Set Height This function sets the height of one sprite. _spr Set Height SPR,H SPR -> Pointer of SimpleSprite H -> Height in Lines. @ENDNODE @NODE "_spr Set Nb" @toc "SPRI" _spr Set Nb This function sets the number of hardware sprite used. _spr Set Nb SPR,NB SPR -> Pointer of SimpleSprite NB -> Hardware Sprite Number. @ENDNODE @NODE "_spr Set Pos" @toc "SPRI" _spr Set Pos This function sets the position of one sprite. _spr Set Pos SPR,X,Y SPR -> Pointer of SimpleSprite. X,Y -> Coordinates of Sprite. @ENDNODE @NODE "_spr A Data Alloc" @toc "SPRI" _spr A Data Alloc This function allocates an ExtSprite structure and filled it with the BitMap according to the list of TAG. It sends back the ExtSprite pointer. SPRP=_spr A Data Alloc(BMAP,TAG) BMAP -> Pointer of BitMap. TAG -> Pointer of TAG list. SPRITEA_Width Specify the width of sprite in pixels. If it is more ($81000000),(W) than the HardWare could support, then the function will strand. If the BitMap passes is smaller, then the remainder will be replete by some transparent pixels. Default to 16. SPRITEA_XReplication Specify the carrier of conversion of the datas of BitMap. ($81000002),(REP) The valid values are: 0 - Execute a simple copy. 1 - Multiplies the width by 2. 2 - Multiplies the width by 4. -1 - Divides the width by 2. -2 - Divides the width by 4. This TAG is useful in order to convert some datas from one resolution to an other. Default has 0. SPRITEA_YReplication Ditto to SPRITEA_XReplication but for the height. ($81000004),(REP) SPRITEA_OutputHeight Specifie the height of Sprite. Default to the ($81000006),(H) height of BitMap. This last must be bigger or equal than the asked height. SPRITEA_Attached Specify if you want used these datas for a attached ($81000008),(BOOL) Sprite, this will cause to taking the 3rd and 4th BitPlanes of specified BitMap. @ENDNODE @NODE "_spr A Data Free" @toc "SPRI" _spr A Data Free This function liberates the memory of one ExtSprite. _spr A Data Free SPRP SPRP -> Pointer of ExtSprite. @ENDNODE @NODE "_spr A Change" @toc "SPRI" _spr A Change This function changes the picture of sprite to display. If a mistake occurred, OK= 0. OK=_spr A Change(VPORT,OLDSPRA,NEWSPRA,TAG) VPORT -> Pointer to ViewPort. OLDSPRA -> Pointer to ExtSprite to change. NEWSPRA -> Pointer to ExtSprite to display. TAG -> Pointer to TAG List (Not available now) @ENDNODE @NODE "_spr A Get" @toc "SPRI" _spr A Get This function allocates a hardware sprite and sends back its number, to be liberate with @{"_spr Free" Link "_spr Free"}. SPRNB=_spr A Get(SPRA,TAG) SPRA -> Pointer of ExtSprite. TAG -> Pointer of TAGList. GSTAG_SPRITE_NUM Specify the sprite number you want. ($82000020),(NB) GSTAG_ATTACHED Specify if you wish to obtain a 16 c. sprite, ($82000022),(SPR) The data of TAG dawned on an ExtSprite structure. You must liberate the two sprites. GSTAG_ATTACHED doesn't work under V39, for it, must cling the sprite 2 to an other _spr Has Get. @ENDNODE @node STRU "OS_DevKit, graphics.library-Structures support" @toc "MAIN" ___________ ___________ / /\ / /\ OS-DevKit Extension / ___ / // _______/ / Additional power for AMOS Pro V2.00+ / /\_/ / // /\_____ \/ / / // / // /\ Written by: / / // / //______ / / Fromentin BRICE / /_// / /_\_____/ / / / / // / / /__________/ //__________/ / \__________\/ \__________\/ @{b}@{u}Advanced Support Of 'graphics.library'@{uu}@{ub} @{b}@{u}GFX Structures@{uu}@{ub} Here therefore, some graphic structures who will help you to use the capacities of system for all the graphic operations. @{u}Bitmap-Structure:@{uu} This structure contains all the datas regarding the binary plans. Using these functions when Pointer of BitMap. MODULOS-> Modulo of the plans. HEIGHT -> Number of line of BitMap. DEPTH -> Number of binary plans of BitMap. FLAGS -> Flags of BitMap. @ENDNODE @NODE "_bm Set Plane" @toc "STRU" _bm Set Plane This function sets the pointer of one binary plan. _bm Set Plane BMAP,NBPLANE,PTRPLANE BMAP -> Pointer of BitMap. NBPLANE -> BitPlane Number (FROM 0). PTRPLANE-> Pointer of BitPlane. @ENDNODE @NODE "_bm What Modulo" @toc "STRU" _bm What Modulo This function sends back the modulo of BitMap. The modulo is the length in bytes between the start of two following lines. MODULOS=_bm What Modulo(BMAP) BMAP -> Pointer of BitMap. @ENDNODE @NODE "_bm What Height" @toc "STRU" _bm What Height This function sends back the number of lines of BitMap. H=_bm What Height(BMAP) BMAP -> Pointer of BitMap. @ENDNODE @NODE "_bm What Flags" @toc "STRU" _bm What Flags This function sends back the flags of BitMap FLAGS=_bm What Flags(BMAP) BMAP -> Pointer of BitMap. @ENDNODE @NODE "_bm What Depth" @toc "STRU" _bm What Depth This function sends back the number of binary plans of BitMap. DEPTH=_bm What Depth(BMAP) BMAP -> Pointer of BitMap. @ENDNODE @NODE "_bm What Plane" @toc "STRU" _bm What Plane This function sends back the pointer of asked BitPlane. PTRPLANE=_bm What Plane(BMAP,N°) BMAP -> Pointer of BitMap. N° -> Asked Plane Number (FROM 0) @ENDNODE @NODE "_rp Set Layer" @toc "STRU" _rp Set Layer This function fixes the Layer structure of RastPort. _rp Set Layer RPORT,LAYER RPORT -> Pointer of RastPort. LAYER -> Pointeur of Layer. @ENDNODE @NODE "_rp Set Bmap" @toc "STRU" _rp Set Bmap This function fixes the BitMap structure of RastPort _rp Set Bmap RPORT,BMAP RPORT -> Pointer of RastPort. BMAP -> Pointer of BitMap. @ENDNODE @NODE "_rp Set Tmpras" @toc "STRU" _rp Set Tmpras This function fixes the TmpRas structure of RastPort. _rp Set Tmpras RPORT,TMPRAS RPORT -> Pointer of RastPort. TMPRAS -> Pointer of TmpRas. @ENDNODE @NODE "_rp Set Area Info" @toc "STRU" _rp Set Area Info This function fixes the AreaInfo structure of RastPort. _rp Set Area Info RPORT,AI RPORT -> Pointer of RastPort. AI -> Pointer of AreaInfo. @ENDNODE @NODE "_rp Set O Pen" @toc "STRU" _rp Set O Pen This function sets the outline pen for the filling operations in the RastPort. _rp Set O Pen RPORT,OPEN RPORT -> Pointer of RastPort. OPEN -> Pen Number. @ENDNODE @NODE "_rp Set Line" @toc "STRU" _rp Set Line This function fixes the write mask for lines drawinf of RastPort. See -Set Line-. _rp Set Line RPORT,MSK RPORT -> Pointer of RastPort. MSK -> 16 bits Mask. @ENDNODE @NODE "_rp Set Wr Msk" @toc "STRU" _rp Set Wr Msk This function sets the binary planes assigned by the trace. _rp Set Wr Msk RPORT,MSK RPORT -> Pointer of RastPort. MSK -> 8 bits Mask ex : %1 plane 0 assigned only. @ENDNODE @NODE "_rp What Layer" @toc "STRU" _rp What Layer This function sends back the pointer of Layer of RastPort. _rp What Layer(RPORT) RPORT -> Pointer of RastPort. @ENDNODE @NODE "_rp What Bmap" @toc "STRU" _rp What Bmap This function sends back the pointer of BitMap of Rastport. BMAP=_rp What Bmap(RPORT) RPORT -> Pointer of RastPort. @ENDNODE @NODE "_rp What Tmpras" @toc "STRU" _rp What Tmpras This function sends back the pointer of TmpRas of RastPort. TMPRAS=_rp What Tmpras(RPORT) RPORT -> Pointer of RastPort. @ENDNODE @NODE "_rp What Area Info" @toc "STRU" _rp What Area Info This function sends back the pointer of Area Info of RatPort. AREAINFO=_rp What Area Info(RPORT) RPORT -> Pointer of RastPort. @ENDNODE @NODE "_rp What Text Base" @toc "STRU" _rp What Text Base This function sends back the line of basis of the font of RastPort. TXTBASE=_rp What Text Base(RPORT) RPORT -> Pointer of RastPort. @ENDNODE @NODE "_rp What Xgr" @toc "STRU" _rp What Xgr This function sends back the abscissa of graphic cursor. X=_rp What Xgr(RPORT) RPORT -> Pointer of RastPort. @ENDNODE @NODE "_rp What Ygr" @toc "STRU" _rp What Ygr This function sends back the ordinate of graphic cursor. Y=_rp What Ygr(RPORT) RPORT -> Pointer of RastPort. @ENDNODE @NODE "_tr Set" @toc "STRU" _tr Set This function initializes the TmpRas structure. _tr Set TMPRAS,RASTER,SIZE TMPRAS -> Pointer of TmpRas. RASTER -> Pointer of Raster. SIZE -> Length in bytes of the Raster. @ENDNODE @NODE "_tr What Raster" @toc "STRU" _tr What Raster This function sends back the pointer of Raster of TmpRas. RASTER=_tr What Raster(TMPRAS) TMPRAS -> Pointer of TmpRas. @ENDNODE @NODE "_tr What Size" @toc "STRU" _tr What Size This function sends back the size of Raster of TmpRas. SIZE=_tr What Size(TMPRAS) TMPRAS -> Pointer of TmpRas. @ENDNODE @NODE "_view Set" @toc "STRU" _view Set This function initializes the View structure. _view Set VIEW,VPORT,X,Y,MODES VIEW -> Pointer of View. VPORT -> Pointer of ViewPort. X -> Abscissa of View. Y -> Ordinate of View. MODES -> Modes of View. @ENDNODE @NODE "_view What Vport" @toc "STRU" _view What Vport This function sends back the pointer of the first ViewPort of View. VPORT=_view What Vport(VIEW) VIEW -> Pointer of View. @ENDNODE @NODE "_view What X" @toc "STRU" _view What X This function sends back the abscissa of View. X=_view What X(VIEW) VIEW -> Pointer of View. @ENDNODE @NODE "_view What Y" @toc "STRU" _view What Y This function sends back the ordinate of View. Y=_view What Y(VIEW) VIEW -> Pointer of View. @ENDNODE @NODE "_view What Modes" @toc "STRU" _view What Modes This function sends back the modes of View. MODES=_view What Modes(VIEW) @ENDNODE @NODE "_vp Set Next" @toc "STRU" _vp Set Next This function sets the next ViewPort. _vp Set Next VPORT0,VPORT1 VPORT0 -> Pointer of ViewPort. VPORT1 -> Pointer of ViewPort. @ENDNODE @NODE "_vp Set Body" @toc "STRU" _vp Set Body This function sets the datas of body of ViewPort. _vp Set Body VPORT,X,Y,W,H,MODES,SPRPRI VPORT -> Pointer of ViewPort. X -> Abscissa of ViewPort. Y -> Ordinate of ViewPort. W -> Width of ViewPort. H -> Height of ViewPort. MODES -> Modes of ViewPort. SPRPRI -> Priorites of the Sprites in the ViewPort. @ENDNODE @NODE "_vp Set Cmap" @toc "STRU" _vp Set Cmap This function sets the ColorMap of ViewPort. _vp Set Cmap VPORT,CMAP VPORT -> Pointer of ViewPort. CMAP -> Pointer of ColorMap. @ENDNODE @NODE "_vp Set Ras Info" @toc "STRU" _vp Set Ras Info This function sets the RasInfo of ViewPort. _vp Set Ras Info VPORT,RASINFO VPORT -> Pointer of ViewPort. RASINFO -> Pointer of RasInfo. @ENDNODE @NODE "_vp What Next" @toc "STRU" _vp What Next This function sends back the pointer of next ViewPort. VPORT0=_vp What Next(VPORT) VPORT -> Pointer of ViewPort. @ENDNODE @NODE "_vp What Cmap" @toc "STRU" _vp What Cmap This function sends back the pointer of ColorMap of ViewPort. CMAP=_vp What Cmap(VPORT) VPORT -> Pointer of ViewPort. @ENDNODE @NODE "_vp What Ras Info" @toc "STRU" _vp What Ras Info This function sends back the pointer of RasInfo of ViewPort. RASINFO=_vp What Ras Info(VPORT) VPORT -> Pointer of ViewPort. @ENDNODE @NODE "_vp What Width" @toc "STRU" _vp What Width This function sends back the width of ViewPort. W=_vp What Width(VPORT) VPORT -> Pointer of ViewPort. @ENDNODE @NODE "_vp What Height" @toc "STRU" _vp What Height This function sends back the height of ViewPort. H=_vp What Height(VPORT) VPORT -> Pointer of ViewPort. @ENDNODE @NODE "_vp What X" @toc "STRU" _vp What X This function sends back the abscissa of ViewPort. X=_vp What X(VPORT) VPORT -> Pointer of ViewPort. @ENDNODE @NODE "_vp What Y" @toc "STRU" _vp What Y This function sends back the ordinate of ViewPort. Y=_vp What Y(VPORT) VPORT -> Pointer of ViewPort. @ENDNODE @NODE "_vp What Modes" @toc "STRU" _vp What Modes This function sends back the modes of ViewPort. W=_vp What Modes(VPORT) VPORT -> Pointer of ViewPort. @ENDNODE @NODE "_vp What Spr Pri" @toc "STRU" _vp What Spr Pri This function sends back the priority of the sprites in the ViewPort. W=_vp What Spr Pri(VPORT) VPORT -> Pointer of ViewPort. @ENDNODE @NODE "_ri Set" @toc "STRU" _ri Set This function initializes the RasInfo structure. _ri Set RASINFO,BMAP,X,Y,NEXT RASINFO -> Pointer of RasInfo. BMAP -> Pointer of BitMap. X -> X Offset (Scroll) Y -> Y Offset (Scroll) NEXT -> Pointer of Next RasInfo. @ENDNODE @NODE "_ri What Next" @toc "STRU" _ri What Next This function sends back the pointer of the Next RasInfo. RASINFO0=_ri What Next(RASINFO) RASINFO -> Pointer of RasInfo. @ENDNODE @NODE "_ri What Bmap" @toc "STRU" _ri What Bmap This function sends back the pointer of BitMap of RasInfo. BMAP=_ri What Bmap(RASINFO) RASINFO -> Pointer of RasInfo. @ENDNODE @NODE "_ri What X" @toc "STRU" _ri What X This function sends back the X offset of RasInfo. X=_ri What X(RASINFO) RASINFO -> Pointer of RasInfo. @ENDNODE @NODE "_ri What Y" @toc "STRU" _ri What Y This function sends back the Y offset of RasInfo. Y=_ri What Y(RASINFO) RASINFO -> Pointer of RasInfo. @ENDNODE @NODE "_ta Set" @toc "STRU" _ta Set This function initializes the TextAttr structure. _ta Set TATTR,NAME,H,STYLEE,FLAGS TATTR -> Pointer of TextAttr. NAME -> Pointer of name string of the font. H -> Height of the font. STYLE -> Style of the font. FLAGS -> Flags of the font. @ENDNODE @NODE "_ta What Name" @toc "STRU" _ta What Name This function sends back the pointer of the name of TextAttr PTXT=_ta What Name(TATTR) TATTR -> Pointer of TextAttr. @ENDNODE @NODE "_ta What Height" @toc "STRU" _ta What Height This function sends back the height of TextAttr. H=_ta What Height(TATTR) TATTR -> Pointer of TextAttr. @ENDNODE @NODE "_ta What Style" @toc "STRU" _ta What Style This function sends back the style of TextAttr. STYLE=_ta What Style(TATTR) TATTR -> Pointer of TextAttr. @ENDNODE @NODE "_ta What Flags" @toc "STRU" _ta What Flags This function sends back the flags of TextAttr. FLAGS=_ta What Flags(TATTR) TATTR -> Pointer of TextAttr. @ENDNODE @NODE _bm_struct "Détail Structure BitMap" @toc "STRU" Detail of the BitMap structure: $0028 40 Size of structure $0000 0 2 BytesPerRow (Modulo) $0002 2 2 Rows (Height) $0004 4 1 Flags (Flags) $0005 5 1 Depth (Depth) $0006 6 2 pad $0008 8 4 Planes[0] (Planes) @ENDNODE @NODE _rp_struct "Detail Structure RastPort" @toc "STRU" Detail of the RastPort structure: $0064 100 Size of structure $0000 0 4 Layer (Layer) $0004 4 4 BitMap (Bmap) $0008 8 4 AreaPtrn $000c 12 4 TmpRas (Tmpras) $0010 16 4 AreaInfo (Area Info) $0014 20 4 GelsInfo $0018 24 1 Mask (Wr Msk) $0019 25 1 FgPen (A Pen) $001a 26 1 BgPen (B Pen) $001b 27 1 AOlPen (O Pen) $001c 28 1 DrawMode (Dr Md) $001d 29 1 AreaPtSz $001e 30 1 linpatcnt $001f 31 1 dummy $0020 32 2 Flags $0022 34 2 LinePtrn $0024 36 2 cp_x (Xgr) $0026 38 2 cp_y (Ygr) $0028 40 1 minterms[0] $0030 48 2 PenWidth $0032 50 2 PenHeight $0034 52 4 Font $0038 56 1 AlgoStyle $0039 57 1 TxFlags $003a 58 2 TxHeight $003c 60 2 TxWidth $003e 62 2 TxBaseline (Text Base) $0040 64 2 TxSpacing $0042 66 4 RP_User $0046 70 4 longreserved[0] $004e 78 2 wordreserved[0] $005c 92 1 reserved[0] @ENDNODE @NODE _tr_struct "Detail Structure TmpRas" @toc "STRU" Detail of the TmpRas structure: $0008 8 Size of structure $0000 0 4 RasPtr (Raster) $0004 4 4 Size (Size) @ENDNODE @NODE _view_struct "Detail Structure View" @toc "STRU" Detail of the View structure: $0012 18 Size of structure $0000 0 4 ViewPort (Vport) $0004 4 4 LOFCprList $0008 8 4 SHFCprList $000c 12 2 DyOffset (X) $000e 14 2 DxOffset (Y) $0010 16 2 Modes (Modes) @ENDNODE @NODE _vp_struct "Detail Structure ViewPort" @toc "STRU" Detail of the ViewPort structure: $0028 40 Size of structure $0000 0 4 Next (Next) $0004 4 4 ColorMap (Cmap) $0008 8 4 DspIns $000c 12 4 SprIns $0010 16 4 ClrIns $0014 20 4 UCopIns $0018 24 2 DWidth (Width) $001a 26 2 DHeight (Height) $001c 28 2 DxOffset (X) $001e 30 2 DyOffset (Y) $0020 32 2 Modes (Modes) $0022 34 1 SpritePriorities (Spr Pri) $0023 35 1 ExtendedModes $0024 36 4 RasInfo (Ras Info) @ENDNODE @NODE _ri_struct "Detail Structure RasInfo" @toc "STRU" Detail of the RasInfo structure: $000c 12 Size of structure $0000 0 4 Next (Next) $0004 4 4 BitMap (Bmap) $0008 8 2 RxOffset (X) $000a 10 2 RyOffset (Y) @ENDNODE @NODE _ta_struct "Detail Structure" @toc "STRU" Detail of the TextAttr structure: $0008 8 Size of structure $0000 0 4 ta_Name $0004 4 2 ta_YSize $0006 6 1 ta_Style $0007 7 1 ta_Flags @ENDNODE @node DRAW "OS_DevKit, graphics.library-Drawing support" @toc "MAIN" ___________ ___________ / /\ / /\ OS-DevKit Extension / ___ / // _______/ / Additional power for AMOS Pro V2.00+ / /\_/ / // /\_____ \/ / / // / // /\ Written by: / / // / //______ / / Fromentin BRICE / /_// / /_\_____/ / / / / // / / /__________/ //__________/ / \__________\/ \__________\/ @{b}@{u}Advanced Support Of 'graphics.library'@{uu}@{ub} @{b}@{u}Drawing@{uu}@{ub} Here some necessary functions to make tracing operation in the RastPorts. When it is possible, I just mention the AMOS similar function. @{u}Commands:@{uu} @{" _rp A pen " Link "_rp A pen"} @{" _rp B Pen " Link "_rp B Pen"} @{" _rp Dr Md " Link "_rp Dr Md"} @{" _rp Rast " Link "_rp Rast"} @{" _rp Clr Eol " Link "_rp Clr Eol"} @{" _rp Clr Scr " Link "_rp Clr Scr"} @{" _rp Move " Link "_rp Move"} @{" _rp Draw " Link "_rp Draw"} @{" _rp Poly Draw " Link "_rp Poly Draw"} @{" _rp Ellipse " Link "_rp Ellipse"} @{" _rp Point " Link "_rp Point"} @{" _rp Plot " Link "_rp Plot"} @{" _rp Scroll " Link "_rp Scroll"} @{" _rp Text " Link "_rp Text"} @{" _rp Len Text " Link "_rp Len Text"} @ENDNODE @NODE "_rp Move" @toc "DRAW" _rp Move See -Gr Locate- _rp Move RPORT,X,Y RPORT -> Pointer of RastPort. X,Y -> -Gr Locate- @ENDNODE @NODE "_rp A pen" @toc "DRAW" _rp A Pen See -Ink N1,N2,N3- _rp A Pen RPORT,APEN RPORT -> Pointer of RastPort. APEN -> Like N1 @ENDNODE @NODE "_rp B Pen" @toc "DRAW" _rp B pen See -Ink N1,N2,N3- _rp B Pen RPORT,BPEN RPORT -> Pointer of RastPort. BPEN -> Like N2 @ENDNODE @NODE "_rp Dr Md" @toc "DRAW" _rp Dr Md See -Gr Writing- _rp Dr Md RPORT,DRMD RPORT -> Pointer of RastPort. DRMD -> -Gr Writing- @ENDNODE @NODE "_rp Rast" @toc "DRAW" _rp Rast See -Cls C- _rp Rast RPORT,PEN RPORT -> Pointer of RastPort. PEN -> -Cls C- @ENDNODE @NODE "_rp Clr Eol" @toc "DRAW" _rp Clr Eol This function clears the line starting from the position of gfx cursor. _rp Clr Eol RPORT RPORT -> Pointer of RastPort. @ENDNODE @NODE "_rp Clr Scr" @toc "DRAW" _rp Clr Scr This function clears the RastPort starting from the position of gfx cursor. _rp Clr Scr RPORT RPORT -> Pointer of RastPort. @ENDNODE @NODE "_rp Draw" @toc "DRAW" _rp Draw See -Draw To- _rp Draw RPORT,X,Y RPORT -> Pointer of RastPort. X,Y -> -Draw To- @ENDNODE @NODE "_rp Poly Draw" @toc "DRAW" _rp Poly Draw This function draws a following of line starting from a Dots structure, starting from the present position of graphic cursor. _rp Poly Draw RPORT,NB,DOTS RPORT -> Pointer of RastPort. NB -> Number of dots. DOTS -> Pointer of DOTS structure. @ENDNODE @NODE "_rp Ellipse" @toc "DRAW" _rp Ellipse See -Ellipse- _rp Ellipse RPORT,XC,YC,XR,YR RPORT -> Pointer of RastPort. XC,YC,XR,YR -> -Ellipse- @ENDNODE @NODE "_rp Point" @toc "DRAW" _rp Point See -Point- C=_rp Point(RPORT,X,Y) RPORT -> Pointer of RastPort. X,Y -> -Point- @ENDNODE @NODE "_rp Plot" @toc "DRAW" _rp Plot See -Plot- _rp Plot RPORT,X,Y RPORT -> Pointer of RastPort. X,Y -> -Plot- @ENDNODE @NODE "_rp Scroll" @toc "DRAW" _rp Scroll See -Def Scroll- & -Scroll- _rp Scroll RPORT,DX,DY,X0,Y0 To X1,Y1 RPORT -> Pointer of RastPort. DX,DY -> Shift Value -Def Scroll- X0,Y0 -> Top Left Corner. X1,Y1 -> Bottom Right Corner. @ENDNODE @NODE "_rp Text" @toc "DRAW" _rp Text See -Text-, the coordinates are the actual ones. _rp Text RPORT,TXT$ RPORT -> Pointer of RastPort. TXT$ -> Text to draw. @ENDNODE @NODE "_rp Len Text" @toc "DRAW" _rp Len Text See -Text Length- W=_rp Len Text(RPORT,TXT$) RPORT -> Pointer of RastPort. TXT$ -> -Text Length- @ENDNODE