home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The AGA Experience 2
/
agavol2.iso
/
software
/
utilities
/
programmers
/
misc
/
graphics
/
docs
/
function_overview
< prev
next >
Wrap
Text File
|
1996-02-04
|
6KB
|
214 lines
-------- Initialisation routines ------------------------------------------
Graphics_Init()
Should be called at the start of any program which uses the drawing
functions. It basically sets stuff up, like opening the graphics library
and loading a null view.
No parameters and no return value.
Graphics_Close()
Should be called at the end of any program which uses the drawing functions.
frees all of the resources allocated by Graphics_Init.
No parameters and no return value.
Open_Screen(width,height,depth,viewmodes,cmap)
Opens a screen with the specified parameters.
Width:- Width of the screen.
Height:- Height of the screen.
Depth:- Number of bitplanes to the screen.
ViewModes:- Viewmodes of the screen.
Cmap:- Pointer to a standard colourmap.
Returns:
The address of a Screen_Store structure.
See the file graphics_base.h
Close_Screen(screen)
Closes a previously opened screen.
Takes a Screen_Store structure as an argument
Init_Mask(x_min,y_min,x_max,y_max,screen_x,screen_y)
Initialises a mask plane structure to be linked into a screen store
structure
x_min,y_min,x_max,y_max are the extents of the clipping rectangle within the
screen.
screen_x,screen_y are the size of the screen in both dimensions
Returns a maskplane structure.
Free_Mask(maskplane)
Frees a previously allocated maskplane structure.
-------- Drawing routines -------------------------------------------------
Fill_Polygon(screen,vertex list,npoints,colour)
Draws a filled polygon on the supplied screen. It requires a maskplane
structure before it can be used otherwise it will just crash.
screen is the screen on which to draw the polygon
vertex list is a list of word size x-y pairs with the last point the same as
the first.
npoints is the number of points.
colour is the colour.
Returns no value.
Draw_Polygon(screen,vertex list,npoints,colour)
Draws an unfilled polygon. Doesn't need a maskplane structure.
Takes the same arguments as Fill_Polygon.
Draw_Line(screen,x1,y1,x2,y2,colour)
Draws a line on the supplied screen. It will be automatically clipped.
screen is the screen on which to draw.
x1,y1,x2,y2 are the end coordinates of the line.
colour is the colour.
returns no value
Write_Pixel(screen,x,y,colour)
Writes a pixel on the supplied screen. It will be automatically clipped.
screen is the screen on which to draw.
x,y are the coordinates.
colour is the colour.
Returns no value.
Screen_Clear(screen)
Clears the supplied screen.
Show(screen)
NOTE ***
This function is only available when using the C versions of the
code. on the assembler version it is implemented using a macro.
***
It shows the supplied screen.
-------- Fade Routines------------------------------------------------
Fade_To_White(screen,source colourmap)
Fades the supplied screen into totally white.
This routine corrupts the source colourmap. If you want to keep it please
copy it someplace else
screen is the source screen.
source colourmap is the colourmap you wish to fade
Fade_To_Black(screen,source colourmap)
Does the same as Fade_To_White but this time fades to black.
Also corrupts the colourmap.
Fade(screen,source,destination)
Performs a general purpose fade between two colourmaps, leaving them both
intact.
screen is the source screen.
source is the source colourmap data.
destination is the destination colourmap data.
-------- IFF Handling routines, reading and writing of bitmaps -------------
Save_IFF(filename,screen)
Saves the supplied screen as an IFF file.
filename is an address pointer to the destination filename
screen is the screen you want to save.
Load_IFF(filename,screen)
Loads an IFF into the destination screen.
filename is an address pointer to the source file.
screen is the destination screen.
-------- File handling Routines -------------------------------------------
Load_Data(filename,buffer length,destination)
Loads Data from disk into memory.
filename is an address pointer to the filename.
buffer length is the length of the destination buffer.
destination is a pointer to the destination buffer.
Save_Data(filename,buffer length,source)
Saves data from memory to a file.
filename is an address pointer to the filename.
buffer length is the length of the source buffer.
destination is a pointer to the source buffer.
-------- Text handling routines -------------------------------------------
Write_Text(screen,text,x,y,colour,length)
Writes text onto the supplied screen.
This version doesn't allow anything fancy to be done with it.
Designed mainly as a debugging tool.
screen is the destination screen.
text is a pointer to the text.
x,y are the coordinates to write.
colour is the colour of the text.
length is the length of the string.
Num_To_String(word value)
Converts the supplied word integer into a hex string.
returns the string ready to be used in Write_Text.
-------- Copper handling routines -------------------------------------
Add_Copper(screen,copper list)
Adds a copper stream to the screen.
The copper streams are best understood from the assembler macros.
CMOVE moves data into a custom register.
CWAIT is a copper wait instruction.
CEND ends the copper list.
Not sure how to use these in C. If anyone ports these to C please can I
have a copy.
-------- Input Handling Routines ------------------------------------------
GetKey()
Returns the Raw Key code of the key currently being pressed.