1. Help me!
- Posted by Eduardo Uemura Okada <cool at ART.COM.BR> Jul 04, 1997
- 763 views
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? Eduardo Uemura Okada e-mail: cool at art.com.br
2. Re: Help me!
- Posted by Daniel Berstein <architek at GEOCITIES.COM> Jul 04, 1997
- 803 views
Eduardo Uemura Okada wrote: > 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? You can't :( You must save the image as a rectangular region... BUT draw the backgroud (what you want to be transparent) in a color not used in any other part of your image... then when you wan't to display the sprite, just don't "pixel()" the ones that have the transparent color... I'm not going to give any code, cause that's not my speciality, there are several good (and/or excelent) files on RDS homepage that helps you achieve this. -- Regards, Daniel Berstein architek at geocities.com http://www.geocities.com/SiliconValley/Heights/9316
3. Re: Help me!
- Posted by Ralf Nieuwenhuijsen <nieuwen at POP.XS4ALL.NL> Jul 04, 1997
- 736 views
> 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