GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
RG(3) FreeBSD Library Functions Manual RG(3)

RGAgar feature-based pixel graphics

#include <agar/core.h>
#include <agar/gui.h>
#include <agar/map/rg.h>

The Agar-RG library implements a feature-based pixel graphic format. The central class of the library is RG_Tileset, which acts as a container for graphics resources:

Tiles
Graphic surfaces (static or possibly animated) generated from a set of instructions (or ‘features’). See RG_Tile(3).
Textures
References to tiles with additional information related to texturing. See RG_Texture(3).
Pixmaps
Transparent graphic surfaces used internally. Pixmaps can be shared by multiple tiles. See RG_Pixmap(3).
Sketches
Vector drawings used internally. See RG_Sketch(3).

RG provides tiles and textures with unique integer IDs such that items can be added or removed on the fly without invalidating existing external references. To take advantage of this feature, code should reference tiles using the tiletbl member of the RG structure.

AG_Object(3) -> RG_Tileset

RG_Tileset *
(void *parent, const char *name, Uint flags);

The () function allocates and initializes a new RG object and attaches it to parent if not NULL. There are currently no flags defined.

RG_Tile *
RGTILE(RG_Tileset *tileset, Uint32 tileID);


int
(RG_Tileset *tileset, Uint32 tileID, RG_Tile **rTile);


RG_Tile *
(RG_Tileset *tileset, const char *name);


RG_Sketch *
(RG_Tileset *tileset, const char *name);


RG_Pixmap *
(RG_Tileset *tileset, const char *name);


RG_Tile *
(RG_Tileset *tileset, const char *tileset_name, const char *name);


RG_Pixmap *
(RG_Tileset *tileset, const char *tileset_name, const char *name);

The () macro returns a tile by name.

() searches for a tile by name. If one is found, it is returned into rTile.

(), RG_TilesetFindSketch() and RG_TilesetFindPixmap() search for the given resource using the user-provided name string, returning a pointer to the element on success and NULL on failure. The () variants use the VFS path name for the RG object itself.

RG_Feature(3), RG_Pixmap(3), RG_Sketch(3), RG_Texture(3), RG_Tile(3), RG_Tileview(3)

The RG library first appeared in Agar 1.3.0.

December 21, 2022 Agar 1.7

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.