1 | /********************************************************************************************** |
2 | * |
3 | * raylib - Advance Game template |
4 | * |
5 | * Screens Functions Declarations (Init, Update, Draw, Unload) |
6 | * |
7 | * Copyright (c) 2014 Ramon Santamaria (@raysan5) |
8 | * |
9 | * This software is provided "as-is", without any express or implied warranty. In no event |
10 | * will the authors be held liable for any damages arising from the use of this software. |
11 | * |
12 | * Permission is granted to anyone to use this software for any purpose, including commercial |
13 | * applications, and to alter it and redistribute it freely, subject to the following restrictions: |
14 | * |
15 | * 1. The origin of this software must not be misrepresented; you must not claim that you |
16 | * wrote the original software. If you use this software in a product, an acknowledgment |
17 | * in the product documentation would be appreciated but is not required. |
18 | * |
19 | * 2. Altered source versions must be plainly marked as such, and must not be misrepresented |
20 | * as being the original software. |
21 | * |
22 | * 3. This notice may not be removed or altered from any source distribution. |
23 | * |
24 | **********************************************************************************************/ |
25 | |
26 | #ifndef MONSTER_H |
27 | #define MONSTER_H |
28 | |
29 | #define MONSTER_ANIM_FRAMES 7 |
30 | #define MONSTER_ANIM_SEQ 2 |
31 | |
32 | //---------------------------------------------------------------------------------- |
33 | // Types and Structures Definition |
34 | //--------------------------------------------------------------------------------- |
35 | typedef struct Monster { |
36 | Vector2 position; |
37 | Texture2D texture; |
38 | Rectangle bounds; |
39 | Rectangle frameRec; |
40 | Color color; |
41 | int framesCounter; |
42 | int currentFrame; |
43 | int currentSeq; |
44 | int numFrames; |
45 | bool active; |
46 | bool selected; |
47 | bool spooky; |
48 | } Monster; |
49 | |
50 | //---------------------------------------------------------------------------------- |
51 | // Global Variables Definition |
52 | //---------------------------------------------------------------------------------- |
53 | |
54 | |
55 | |
56 | #ifdef __cplusplus |
57 | extern "C" { // Prevents name mangling of functions |
58 | #endif |
59 | |
60 | //---------------------------------------------------------------------------------- |
61 | // Monster Functions Declaration |
62 | //---------------------------------------------------------------------------------- |
63 | |
64 | void UpdateMonster(Monster *monster); |
65 | void DrawMonster(Monster monster, int scroll); |
66 | void UnloadMonster(Monster monster); |
67 | |
68 | |
69 | #ifdef __cplusplus |
70 | } |
71 | #endif |
72 | |
73 | #endif // SCREENS_H |