comparison src/libmlk-adventure/adventure/assets.h @ 320:8f9937403749

misc: improve loading of data
author David Demelier <markand@malikania.fr>
date Fri, 01 Oct 2021 20:30:00 +0200
parents libmlk-adventure/adventure/assets.h@d01e83210ca2
children
comparison
equal deleted inserted replaced
319:b843eef4cc35 320:8f9937403749
1 /*
2 * assets.h -- global atlas for every resources
3 *
4 * Copyright (c) 2020-2021 David Demelier <markand@malikania.fr>
5 *
6 * Permission to use, copy, modify, and/or distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18
19 #ifndef MOLKO_ADVENTURE_ASSETS_H
20 #define MOLKO_ADVENTURE_ASSETS_H
21
22 #include <core/core.h>
23 #include <core/sound.h>
24 #include <core/sprite.h>
25
26 enum assets_sprite {
27 /* UI elements. */
28 ASSETS_SPRITE_UI_CURSOR,
29
30 /* Actions. */
31 ASSETS_SPRITE_CHEST,
32
33 /* Characters enemies. */
34 ASSETS_SPRITE_CHARACTER_BLACK_CAT,
35
36 /* Team assets. */
37 ASSETS_SPRITE_CHARACTER_NETH,
38 ASSETS_SPRITE_CHARACTER_NETH_SWORD,
39 ASSETS_SPRITE_FACES,
40
41 /* Animations. */
42 ASSETS_SPRITE_EXPLOSION,
43
44 ASSETS_SPRITE_NUM
45 };
46
47 enum assets_sound {
48 /* Items. */
49 ASSETS_SOUND_ITEM_POTION,
50
51 ASSETS_SOUND_NUM
52 };
53
54 CORE_BEGIN_DECLS
55
56 extern struct sprite assets_sprites[ASSETS_SPRITE_NUM];
57 extern struct sound assets_sounds[ASSETS_SOUND_NUM];
58
59 void
60 assets_init(void);
61
62 void
63 assets_finish(void);
64
65 CORE_END_DECLS
66
67 #endif /* !MOLKO_ADVENTURE_ASSETS_H */