FreeCalypso > hg > fc-tourmaline
comparison src/cs/services/buzm/buzm_struct_i.h @ 297:8dfdf88d632f
BUZM SWE initial implementation
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 29 Mar 2022 03:45:41 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
296:a927f030a4e0 | 297:8dfdf88d632f |
---|---|
1 /* | |
2 * This header file holds the internal structure definition | |
3 * for BUZM SWE. | |
4 */ | |
5 | |
6 #ifndef __BUZM_STRUCT_I | |
7 #define __BUZM_STRUCT_I | |
8 | |
9 #include "rv/rv_general.h" | |
10 #include "rvf/rvf_api.h" | |
11 #include "ffs/ffs_api.h" | |
12 | |
13 #define MELODY_CHUNK_SIZE 64 /* entries, not bytes */ | |
14 | |
15 struct melody_entry { | |
16 UINT8 pwt_note; | |
17 UINT8 note_volume; | |
18 UINT16 duration; | |
19 }; | |
20 | |
21 struct buzm_env { | |
22 /* RiViera boilerplate */ | |
23 T_RVF_ADDR_ID addr_id; | |
24 T_RVF_MB_ID prim_id; | |
25 /* global flag */ | |
26 BOOL melody_running; | |
27 /* all following vars are valid only during melody play */ | |
28 T_FFS_FD ffs_fd; | |
29 UINT8 play_volume; | |
30 BOOL loop_mode; | |
31 struct melody_entry chunk_buf[MELODY_CHUNK_SIZE]; | |
32 UINT8 chunk_play_ptr; | |
33 UINT8 chunk_end_ptr; | |
34 BOOL melody_end_flag; | |
35 }; | |
36 | |
37 #endif /* include guard */ |