summaryrefslogtreecommitdiff
path: root/apps/plugins/xrick/data/sprites.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/xrick/data/sprites.h')
-rw-r--r--apps/plugins/xrick/data/sprites.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/apps/plugins/xrick/data/sprites.h b/apps/plugins/xrick/data/sprites.h
new file mode 100644
index 0000000000..124ad4bc85
--- /dev/null
+++ b/apps/plugins/xrick/data/sprites.h
@@ -0,0 +1,70 @@
1/*
2 * xrick/data/sprites.h
3 *
4 * Copyright (C) 1998-2002 BigOrno (bigorno@bigorno.net).
5 * Copyright (C) 2008-2014 Pierluigi Vicinanza.
6 * All rights reserved.
7 *
8 * The use and distribution terms for this software are contained in the file
9 * named README, which can be found in the root of this distribution. By
10 * using this software in any fashion, you are agreeing to be bound by the
11 * terms of this license.
12 *
13 * You must not remove this notice, or any other, from this software.
14 */
15
16/*
17 * NOTES -- PC version
18 *
19 * A sprite consists in 4 columns and 21 rows of (U16 mask, U16 pict),
20 * each pair representing 8 pixels (cga encoding, two bits per pixels).
21 * Sprites are stored in 'sprites.bin' and are loaded by spr_init. Memory
22 * is freed by spr_shutdown.
23 *
24 * There are four sprites planes. Plane 0 is the raw content of 'sprites.bin',
25 * and planes 1, 2 and 3 contain copies of plane 0 with all sprites shifted
26 * 2, 4 and 6 pixels to the right.
27 */
28
29#ifndef _SPRITES_H_
30#define _SPRITES_H_
31
32#include "xrick/config.h"
33
34#include "xrick/system/basic_types.h"
35
36#include <stddef.h> /* size_t */
37
38#ifdef GFXPC
39
40typedef struct {
41 U16 mask;
42 U16 pict;
43} spriteX_t;
44
45enum {
46 SPRITES_NBR_ROWS = 21,
47 SPRITES_NBR_COLS = 4
48};
49typedef spriteX_t sprite_t[SPRITES_NBR_COLS][SPRITES_NBR_ROWS]; /* one sprite */
50
51#endif /* GFXPC */
52
53
54#ifdef GFXST
55
56enum {
57 SPRITES_NBR_ROWS = 21,
58 SPRITES_NBR_COLS = 4,
59 SPRITES_NBR_DATA = SPRITES_NBR_ROWS * SPRITES_NBR_COLS
60};
61typedef U32 sprite_t[SPRITES_NBR_DATA];
62
63#endif /* GFXST */
64
65extern size_t sprites_nbr_sprites;
66extern sprite_t *sprites_data;
67
68#endif /* ndef _SPRITES_H_ */
69
70/* eof */