Re: Help me!

new topic     » goto parent     » topic index » view thread      » older message » newer message

> Again, anyone can help me?
> I can create sprites (or shapes) with BMP and GIF files, but they are saved
> like a rectangle, how can I use the "pure" image in it contents?

        Well, you need to save it as a rectuangular.
        But if you want to display it purely get GFXNEW3.Zip from the ftp.
        THen you just go to the video mode of your choice and do this:

----------------------------- Beginning of code -------------
here you change to the wanted video mode

        include gfx.e
        include image.e

        sequence temp_s
        temp_s = read_bitmap ("mybmp.bmp")

        sequence my_sprite
        my_sprite = MakeCS (      temp_s[2], {{{1}, CS_ANIM_TYPE_FREEZE}}),
{0}, {Monitor[VS_TYPE], Monitor[VS_SIZE][X], Monitor[VS_SIZE][Y]}   )

------------- end of code -----------------

        Now if you want to set the position do:
        Monitor = SetView (Monitor, {{100,100},{1000,1000}})
        Now the position is set to 100 by 100. Forget the last two, just
keep em high.
        If you want to draw your sprite do this:
        DrawCS(Monitor, my_sprite)
        There are also other ways to set the position of your sprite, but
this one will do fine. (Althrough it is not its original purpose)

Ralf Nieuwenhuijsen
nieuwen at xs4all.nl

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu