-
Notifications
You must be signed in to change notification settings - Fork 0
/
score.h
42 lines (34 loc) · 882 Bytes
/
score.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef __SCORE_H__
#define __SCORE_H__
#define SCORE_WIGGLE_AMPLITUDE JO_FIXED_1
#define SCORE_WIGGLE_AMPLITUDE_DECAY 15000
#define SCORE_TEXT_LEN 8
/* Score data */
typedef struct
{
/* Score value */
int Value;
/* Score text wiggle amplitude */
jo_fixed ScoreWiggleAmplitude[SCORE_TEXT_LEN];
} Score;
/** @brief Initialize score data
* @param score Score to initialize
*/
void ScoreInitialize(Score *score);
/** @brief Set score value
* @param score Score data
* @param newValue New score value
*/
void ScoreSetValue(Score *score, int newValue);
/** @brief Add score value
* @param score Score data
* @param value Value to be added to score
* @return New set value
*/
int ScoreAddValue(Score *score, int value);
/** @brief Draw score text
* @param score Score data
* @param loc Location
*/
void ScoreDraw(Score *score, int loc);
#endif