Re: BGTE 2 and Bitmaps

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

> I'm assuming said offered suggestion was in some kind of machine code. I
> had, at one time, reduced the display of an object with "see through"
> pixels to about two or three lines. I forget where that code is, but if
> anybody's interested I'll try to post it somewhere on the internet.

No, it's written entirely in Euphoria. I despise Assembler ;)....and it is
only a few lines of code. Quite simple really.

-- load index screen image
bitmap_data = read_bitmap("indexscr.bmp")
index_image = bitmap_data[2]

-- load index screen mask
--(white surrounding a black shadow of the index screen image)
bitmap_data = read_bitmap("indexneg.bmp")
index_neg = bitmap_data[2]

-- save area of screen image screen is going to overlay
lower_right = {upper_left[1] + 404,upper_left[2] + 318}
saved_screen = save_image(upper_left, lower_right)

-- AND saved background with index screen mask
-- OR   result from AND to index_image
work_image = and_bits(saved_screen,index_neg)
index_image = or_bits(work_image,index_image)

-- display resulting AND/OR'ed image.
display_image(upper_left,index_image)

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

Search



Quick Links

User menu

Not signed in.

Misc Menu