Code: Select all
int ijk=0;
str teststuff[10] = {"BOSSA1","BOSSB1","BOSSC1","BOSSD1","BOSSE1","BOSSF1","BOSSG1","BOSSH1","BOSSI0","BOSSJ0"};
script 901 (void) // dummy to test hud message fixed size
{
sethudsize(640,400,1);
setfont(teststuff[ijk]);
hudmessage(s:"A";HUDMSG_PLAIN, 901, CR_UNTRANSLATED, 320.0, 200.0, 0);
sethudsize(0,0,0);
setfont("confont");
print(s:"graphic #",d:ijk,s:"='",s:teststuff[ijk]);
ijk=ijk+1; if (ijk>9) ijk=0; // loop 0-9
}
Now, what happens is that the graphic tends to dance around the screen on the x-axis, especially at first, as though it were doing some sort of relative offset from the previous time. Sometimes I don't even see it onscreen, but that's usually after it moved over to the edge, and I figure it's just being clipped by the screen dimensions. Interestingly

There's no error, though I did manage to get it to crash when I had a roughly 200x150 graphic and a sethudsize(320,200,0). It said it was an integer overflow that time. I have a slight suspicion that it's a similar thing this time, because with a center position of 320, I think I recall that's stored internally as 320<<16, which would overflow. I'm surprised that it seems to change since I'm always using the same location value, but once something overflows, no telling what else gets borked.
Randy, if I'm actually blowing my stack
