Post by monstersgoboom on Mar 18, 2020 21:41:40 GMT
possibly out of date docs.
HuC_doc.htm has this example, but it doesn't compile with latest HuC.
I'm trying to do something similar for animations.
This is my test, which also fails.
I get these errors.
;error:
; {24,main_idle,bank(main_idle),IDLE},
; ^
;****** non-constant initializer ******
;error:
; {24,main_idle,bank(main_idle),IDLE},
; ^
;****** undefined global ******
anyone know if this changed. or anything that replaces this ?
cheers
HuC_doc.htm has this example, but it doesn't compile with latest HuC.
I'm trying to do something similar for animations.
#incbin(level1, "level1.fmp") /* 256x256 */
#incbin(level2, "level2.fmp") /* 256x256 */
#incbin(level3, "level3.fmp") /* 256x256 */
#incbin(level4, "level4.fmp") /* 256x256 */
const int big_map[] = {
/* width & height of all the maps
* put together
*/
512, 512,
/* the following lines declare all
* the small maps, one line per map :
*
* the two first values are the top/left
* coordinates of the small map inside
* the big map, the two followings values
* are bottom/right coordinates (inclusive),
* and the two last values are the map
* address in ROM
*/
0, 0, 255, 255, bank(level1), level1,
256, 0, 511, 255, bank(level2), level2,
0, 256, 255, 511, bank(level3), level3,
256, 256, 511, 511, bank(level4), level4,
/* -1 closes the table */
-1
};
This is my test, which also fails.
typedef struct
{
int frame_count;
int data;
int bank;
char onfinish_state;
} Animation_t;
enum anims {
IDLE,
SLIDE,
RUN,
ATTACK,
} state;
const Animation_t anims[32]=
{
{24,main_idle,bank(main_idle),IDLE},
};
I get these errors.
;error:
; {24,main_idle,bank(main_idle),IDLE},
; ^
;****** non-constant initializer ******
;error:
; {24,main_idle,bank(main_idle),IDLE},
; ^
;****** undefined global ******
anyone know if this changed. or anything that replaces this ?
cheers