Page 2 of 2

Re: questions

PostPosted: Sat Jan 22, 2011 9:06 pm
by Fojam
sorry to bug you again but when i put the code you gave me in a create actor event for the levelpreview window:
Code: Select all
void DrawBmp(double Size)
{
    int i,j;
    for(i=0;i<BGImgW;i++)
    {
        for(j=0;j<BGImgH;j++)
        {
            setpen(BG_BMP[i][j][2],BG_BMP[i][j][1],BG_BMP[i][j][0],0,Size);
            putpixel(i*Size,j*Size);
        }
    }
}


I get:

Code: Select all
Error line 2: Illegal function definition in ex82626242918
Error line 13: Expected ;

Re: questions

PostPosted: Sat Jan 22, 2011 9:41 pm
by Game A Gogo
the functions goes in the global script, so you can later use them like any other functions in GE

So DrawBmp and ImpBmp goes in global script, while in create actor you'd use:
Code: Select all
ImpBmp("Level1Icon.bmp");
DrawBmp(1);

Re: questions

PostPosted: Sat Jan 22, 2011 11:13 pm
by Fojam
still not working
im using a collision script on the ticker actor to make it work, but it still isnt working?
do you think you could fix it and upload it?

Re: questions

PostPosted: Sun Jan 23, 2011 12:14 am
by Game A Gogo
you can only draw a bitmap in a canvas with this code.
therefore, you need to store your nothing seleted image.
Here is the updated version, I also modified other things in order for it to work properly, like disable collision on BG actors, since ticker now checks if it's not colliding with anything to display Nothing Selected.

It seems also you can't load from directories as well, unfortunatly.. this may be a huge inconvenience for you S:

Re: questions

PostPosted: Sun Jan 23, 2011 12:18 am
by Fojam
its fine i can live with not loading from directories

thanks!

Re: questions

PostPosted: Sun Jan 23, 2011 12:38 am
by Game A Gogo
Also, strangely, 102x102 doesn't work, but 100x100 works. I guess it only works for multiple of 4, which is strange since I made it to work ortherwise with fseek and modulus 4
and it's also normal it lags a bit (a second for me) for loading a bitmap, 1024x1024 can take 30 seconds to load.

Re: questions

PostPosted: Sun Jan 23, 2011 12:43 am
by Fojam
i noticed. if it really becomes an issue i can just make smaller icons

Re: questions

PostPosted: Sun Jan 23, 2011 12:44 am
by Game A Gogo
and use my Size function in DrawBmp :)