I use AddIntServer() and things work for me. I do my animated overlay sprite, music playback routine and some other stuff with it.
IDCMP_INTUITICKS appeared to work at first (but if window looses focus...).. oh well, it looked crappy anyway.
I don't know what i'm doing wrong with AddIntServer() but i get an instant guru like with AddTOF(), in fact, it causes the dreaded disk validation as well. I found that if I copy the EXE to RAM before running most of the time I don't have to do disk validation. But 40 or so crashes later.
I have a feeling that the issue is with the declaration of "VBlankServerFunction". The Interrupt struct says it should be void and not long , but every single example i see in google search.... i tried it as void and i get the same crash.
I'm also not understanding vBlankInterrupt.is_data is used for. Is it like DOS where when you have an interrupt you have no clue where your data segment points? That can't be right.
static struct Interrupt vBlankInterrupt =
{
{
NULL,
NULL,
NT_INTERRUPT,
0,
"NATETRIX"
},
NULL,
NULL
};
vBlankInterrupt.is_Code = (APTR) VBlankServerFunction;
AddIntServer(INTB_VERTB, &vBlankInterrupt);
static LONG __saveds VBlankServerFunction(VOID)
{
/* do absolutely NOTHING
POINT2D point2D;
point2D.x = spriteToolbarPosition.x + screen->LeftEdge;
point2D.y = spriteToolbarPosition.y + screen->TopEdge;
MoveSprite(&screen->ViewPort, &spriteToolBarLeft, point2D.x, point2D.y);
MoveSprite(&screen->ViewPort, &spriteToolBarRight, point2D.x + 16, point2D.y);
*/
return 0;
}
thanks...