Hi Jerome,

Thanks for sending the file. A couple of quick questions on it, since it is similar to what I tried and I keep getting a Red X for the icon, no matter what I try.

1) what 'C68' programming environment are you using. This is a bit different from what I am using (the original pointer stuff that came with C68) but similar.

2) what header files did you use (in case there is a dependency that I am missing)

3) do you have to include any special library or assembly file to include the icons?

It just feels that I am missing a pointer between C68 and the new stuff. I am guessing that persistent the red X icon indicates that the system call could not find the one that I want.

Once again, thanks for the help!

Cheers,
jim



On Sep 19, 2004, at 11:49 PM, Jérôme_Grimbert wrote:

For the one(s ?) interested, here is some extract of a working C file with system sprite (not tested with top release of SMSQ/E but with at least a modern one for the Q40).


short zozo[]={0,10,11,9,8};

// I use four system sprites
...

// I use some macro to fill in the structure
   LISsk(0,0,&sp4_coeur,lit_quit,K_CANCEL,5)
   LISsk(4,0,&zozo[4],lit_move,K_MOVE,5)
   LISsk(3,0,&zozo[3],lit_size,K_SIZE,5)
   LISsk(1,0,&zozo[1],lit_sleep,K_SLEEP,5)
   LISsk(2,0,&zozo[2],lit_wake,K_WAKE,5)

// sp4_coeur is a classical sprite provided here to help any comparaison

And now, the smart part: the macro (previously defined, of course):

#define BASE 180
#define LISsk(x,y,t,n,k,z) \
   loose_list[n].xsize= BASE/z-4;\
   loose_list[n].ysize=10;\
   loose_list[n].xorg=x*BASE/z+2;\
   loose_list[n].yorg=y*12+1;\
   loose_list[n].xjst=0;\
   loose_list[n].yjst=0;\
   loose_list[n].type=TYP_SPRITE;\
   loose_list[n].skey=k;\
   loose_list[n].pobj=t;\
   loose_list[n].pact=&action;\
   loose_list[n].item=n;


And voilà! Hope this could help!



_______________________________________________
QL-Users Mailing List
http://www.quanta.org.uk/mailing.htm


_______________________________________________ QL-Users Mailing List http://www.quanta.org.uk/mailing.htm

Reply via email to