A89: Re: TICGG Help with mats


[Prev][Next][Index][Thread]

A89: Re: TICGG Help with mats



Hi!

> attached is a small piece of code, could you tell me it errors 
> out, I also attached the error log.

You obviously used one-dimensional arrays where 2-dimensional
arrays need to be used. You tried to initialize one-dimensional
array with two-dimensional initializers...

In the attachment is the corrected code.

More suggestions:

1) put "static" before all array definitions in your code to make
the code smaller and more efficient.

2) Your figure looks ugly when XORed in given background. Try to
use A_NORMAL instead of A_XOR, and use saved background to erase
a sprite, e.g. use

LCD_restore(bg);
Y-=5;
DrawIcon(X,Y,picon,A_XOR);

instead of

DrawIcon(X,Y,picon,A_XOR);
Y-=5;
DrawIcon(X,Y,picon,A_XOR);

This is only a suggestion; I have not tried it.

Cheers,

Zeljko

demo7.c (C program)


Follow-Ups: