Uranus Gnupiter Elk-Scheme Home Mars Tools Stuff

News

easyPRAY
easyATT

Scripts
maxiCAOS

Vim
XEmacs

LibC16
libC16 docs
C16 Tools
C16 Plug-in for the GIMP

libCreatures

gtkScriptorium

Goodies

Licenses

Support

Links to other sites

SourceForge Logo
Valid HTML4!
Valid CSS!
** NOTE **:

This document is currently not complete. Please stick to the documentation, which comes with the distribution, while I have a look on improving help generation. Sorry for the inconvience.

Table of contents:

Constructors:

c16_sprite_new
c16_sprite_new_with_data
c16_sprite_new_from_file

Destructors:

c16_sprite_free
c16_sprite_free_wo_data

Access functions:

flags

c16_sprite_get_flags
c16_sprite_set_flags

Count:

c16_sprite_get_count
c16_sprite_set_count

Sprite Headers:

c16_sprite_get_headers
c16_sprite_set_headers
c16_sprite_get_header_nth
c16_sprite_set_header_nth

Images:

c16_sprite_get_images
c16_sprite_set_images
c16_sprite_get_image_nth
c16_sprite_set_image_nth

File access:

c16_sprite_write_to_file

NAME

c16_sprite_new - Constructor.

SYNOPSIS

#include <c16/sprite.h>C16Sprite_p c16_sprite_new(void);

DESCRIPTION

Creates a new instance of C16-Sprite class. Every member is set to 0 resp. NULL.

RETURNS

NULL on failure or pointer to object otherwise.

Back to top.

NAME

c16_sprite_new_with_data - Constructor.

SYNOPSIS

#include <c16/sprite.h>C16Sprite_p c16_sprite_new_with_data
(
  C16SpriteTypeFlags,
  guint16,
  C16SpriteHeader_p *,
  C16Image_p *
);

PARAMETERS

C16SpriteTypeFlags
Flags specifying Bitmap type.

Possible values for a

C16SpriteTypeFlags
are as follows:
  • C16_TYPE_555_FLAGS - Flags set in file when of 555 Bitmap type.
  • C16_TYPE_565_FLAGS - Flags set in file when of 565 Bitmap type.
guint16
Number of images.
C16SpriteHeader_p *
Array containing the headers.
C16Image_p *
Array containing the images.

DESCRIPTION

Creates a new instance of C16-Sprite class with the given arguments set. Allocated memory should not be freed! c16_sprite_free takes this part.

RETURNS

NULL on failure or pointer to object otherwise.

WARNING

The arrays of the images resp. Headers must have at least as many elements as the number of images in the sprite.

Back to top.

NAME

c16_sprite_new_from_file - Constructor.

SYNOPSIS

#include <c16/sprite.h>C16Sprite_p c16_sprite_new_from_file(guchar *);

PARAMETERS

guchar *
Filename of input file.

DESCRIPTION

Creates a new instance of C16-Sprites class with images and headers read from given .c16 file.

RETURNS

NULL on failure or pointer to object otherwise.

Back to top.

NAME

c16_sprite_free - Destructor.

SYNOPSIS

#include <c16/sprite.h>void c16_sprite_free(C16Sprite_p);

PARAMETERS

C16Sprite_p
Pointer to object, which is to be destroyed.

DESCRIPTION

Frees the given instance of C16-Sprite class with every data in it, ie. The headers, images, etc. Will also be freed with call to c16_image_free resp. C16_header_free.

Back to top.

NAME

c16_sprite_free_wo_data - Destructor.

SYNOPSIS

#include <c16/sprite.h>void c16_sprite_free_wo_data(C16Sprite_p);

PARAMETERS

C16Sprite_p
Pointer to object, which is to be destroyed.

DESCRIPTION

Frees the given instance of C16-Sprite class without the data in it, ie. The structure itself is freed, but contained pointers, like the header or image arrays, remain valid.

Back to top.

NAME

c16_sprite_get_flags - Access function.

SYNOPSIS

#include <c16/sprite.h>guint32 c16_sprite_get_flags(C16Sprite_p);

PARAMETERS

C16Sprite_p
Pointer to object, whose flags you want to get.

DESCRIPTION

Get the flags of given C16 object.

Back to top.

NAME

c16_sprite_set_flags - Access function.

SYNOPSIS

#include <c16/sprite.h>void c16_sprite_set_flags
(
  C16Sprite_p,
  C16SpriteTypeFlags
);

PARAMETERS

C16Sprite_p
Pointer to object, whose flags you want to set.
C16SpriteTypeFlags
Bitmap flags to set.

Possible values for a

C16SpriteTypeFlags
are as follows:
  • C16_TYPE_555_FLAGS - Flags set in file when of 555 Bitmap type.
  • C16_TYPE_565_FLAGS - Flags set in file when of 565 Bitmap type.

DESCRIPTION

Set the flags member of the given C16 object to the given value.

Back to top.

NAME

c16_sprite_get_count - Access function.

SYNOPSIS

#include <c16/sprite.h>guint16 c16_sprite_get_count(C16Sprite_p);

PARAMETERS

C16Sprite_p
Pointer to object, whose count you want to get.

DESCRIPTION

Get the image count of given C16-object.

Back to top.

NAME

c16_sprite_set_count - Access function.

SYNOPSIS

#include <c16/sprite.h>void c16_sprite_set_count
(
  C16Sprite_p,
  guint16
);

PARAMETERS

C16Sprite_p
Pointer to object, whose count you want to set.
guint16
Count to set.

DESCRIPTION

Set the image count of given C16 object to the given value.

WARNING

This count is often used to determine the length of the header or image arrays.

Back to top.

NAME

c16_sprite_get_headers - Access function.

SYNOPSIS

#include <c16/sprite.h>C16SpriteHeader_p *c16_sprite_get_headers(C16Sprite_p);

PARAMETERS

C16Sprite_p
Pointer to object, whose headers you want to get.

DESCRIPTION

Get the array containing the header objects of given C16 sprite.

Back to top.

NAME

c16_sprite_set_headers - Access function.

SYNOPSIS

#include <c16/sprite.h>void c16_sprite_set_headers
(
  C16Sprite_p,
  C16SpriteHeader_p *
);

PARAMETERS

C16Sprite_p
Pointer to object, whose headers you want to set.
C16SpriteHeader_p *
Array containing the header objects.

DESCRIPTION

Set the header array of given C16 object.

WARNING

Do not free this array yourself. C16_sprite_free will do this for you.

Back to top.

NAME

c16_sprite_get_header_nth - Access function.

SYNOPSIS

#include <c16/sprite.h>C16SpriteHeader_p c16_sprite_get_header_nth
(
  C16Sprite_p,
  guint16
);

PARAMETERS

C16Sprite_p
Pointer to object, whose header you want to get.
guint16
Index of header in the array. Note: starts with zero.

DESCRIPTION

Get a particular header from the header array of a given sprite object.

Back to top.

NAME

c16_sprite_set_header_nth - Access function.

SYNOPSIS

#include <c16/sprite.h>void c16_sprite_set_header_nth
(
  C16Sprite_p,
  guint16,
  C16SpriteHeader_p
);

PARAMETERS

C16Sprite_p
Pointer to object, whose header you want to set.
guint16
Index of header in the array. Note: Starts with zero.
C16SpriteHeader_p
Pointer to header object to insert.

DESCRIPTION

Set a particular header in the header array of a given sprite object.

Back to top.

NAME

c16_sprite_get_images - Access function.

SYNOPSIS

#include <c16/sprite.h>C16Image_p *c16_sprite_get_images(C16Sprite_p);

PARAMETERS

C16Sprite_p
Pointer to object, whose images you want to get.

DESCRIPTION

Get a get the array of images from a given sprite object.

Back to top.

NAME

c16_sprite_set_images - Access function.

SYNOPSIS

#include <c16/sprite.h>void c16_sprite_set_images
(
  C16Sprite_p,
  C16Image_p *
);

PARAMETERS

C16Sprite_p
Pointer to object, whose images you want to set.
C16Image_p *
Array containing the image objects.

DESCRIPTION

Set the image array of a given sprite object.

WARNING

Do not free the array yourself! c16_sprite_free will do this for you.

Back to top.

NAME

c16_sprite_get_image_nth - Access function.

SYNOPSIS

#include <c16/sprite.h>C16Image_p c16_sprite_get_image_nth
(
  C16Sprite_p,
  guint16
);

PARAMETERS

C16Sprite_p
Pointer to object, whose image you want to get.
guint16
Index of image in the array. Note: Starts with zero.

DESCRIPTION

Get a particular image from the image array of a given sprite object.

Back to top.

NAME

c16_sprite_set_image_nth - Access function.

SYNOPSIS

#include <c16/sprite.h>void c16_sprite_set_image_nth
(
  C16Sprite_p,
  guint16,
  C16Image_p
);

PARAMETERS

C16Sprite_p
Pointer to object, whose image you want to set.
guint16
Index of image in the array. Note: Starts with zero.
C16Image_p
Image object to insert.

DESCRIPTION

Set a particular image in the image array of a given sprite object.

Back to top.

NAME

c16_sprite_write_to_file - Save function.

SYNOPSIS

#include <c16/sprite.h>gboolean c16_sprite_write_to_file
(
  C16Sprite_p,
  gchar *
);

PARAMETERS

C16Sprite_p
Pointer to object, which should be written to disc.
gchar *
Name of output file.

DESCRIPTION

Write the given C16 object as file to disc.

RETURNS

TRUE on success, FALSE on failure.

Back to top.

Problems? Questions? Suggestions? --> Mail me!