#include <stddef.h>
#include <jagdefs.h>
#include <op.h>
#include <memalign.h>
#include <display.h>
Data Structures | |
struct | animation_chunk |
struct | sprite |
Defines | |
#define | DISPLAY_DFLT_MAX_SPRITE 256 |
Functions | |
sprite * | new_sprite (int width, int height, int x, int y, depth d, phrase *data) |
void | set_sprite (sprite *s, int width, int height, int x, int y, depth d, phrase *data) |
mblock * | new_display (unsigned int max_nb_sprites) |
void | attach_sprite_to_display_at_layer (sprite *s, display *d, int layer) |
void | detach_sprite_from_display (sprite *s) |
void | change_sprite_layer (sprite *s, display *d, int layer) |
void | sort_display_layer (display *d, int layer, int(*compare)(sprite *s1, sprite *s2)) |
void | display_iter_layer (display *d, int layer, void(*f)(sprite *s)) |
void | display_iter_all_layers (display *d, void(*f)(sprite *s)) |
|
Default maximal number of sprites in display. |
|
|
|
Remove a sprite from its display.
|
|
Iterate the given function on every sprite of the display from layer 0 to layer 15.
|
|
Iterate the given function on every sprite of the given layer.
|
|
Creates a new display that can contain at most max_nb_sprites sprite. The mblock returned has its _mblock::addr pointing to the allocated display.
|
|
Create a new sprite which is not scaled, not animated, visible and transparent.
|
|
Initialisation of a sprite. This can be useful if you want to extend the "class" sprite. It initialises the sprite as function new_sprite.
|
|
Sort the given layer of the given display according to the given compare function. The compare function returns a negative (or null) integer if the first sprite is "lesser than or equal to" the second sprite. The given layer is sorted increasingly. This means that the "least" sprite is displayed first in the layer and the "greatest" one is displayed last. The sorting algorithm uses O(1) space and O(n log(n)) comparisons (merge sort). It is a stable sort. Since the sort is made by the 68k while the GPU possibly reads the display, it is safer to make a call to wait_display_refresh before sorting a layer of the current active display.
|