VOGONS


First post, by krum110487

User metadata
Rank Newbie
Rank
Newbie

Hello, I am in a position where I need to overlay an image (png, bmp, gif, etc...) over the dosbox screen.

I would need it to be semi transparent and the image could be interchangeable.

I would like to be able to change the image via command line.

the reason for this is that I have some games which use a transparent film to add color to the game. (normally it would be taped on your screen)

I am willing to code this myself, although I am VERY new to any type of directx/opengl/etc... but if this sounds simple enough for someone out there to do, I would be VERY appreciative.

requirements:
-command line
---overlay "relative_image_path.png"
---overlayalpha .5
---overlaypos center/topleft
---overlayaspect normal/fillscreen

any help is appreciated!

thank you for your time.

Reply 1 of 3, by Malvineous

User metadata
Rank Oldbie
Rank
Oldbie

Wouldn't it be easier to just load the image in an image viewer, and set the window opacity accordingly? If you set the window as always-on-top then it will sit above DOSBox and give you the tint you need.

To change the image just open a few windows and move them around as appropriate.

Reply 2 of 3, by krum110487

User metadata
Rank Newbie
Rank
Newbie

Well, I tried making a program to display on top of the window, but it is very inconsistent with different machines, it works fine on my machine, and doesn't work right at all on others, flickers on some, this is mostly because dosbox is redrawing (as it should).

my method is to load the Image, set the alpha levels to whatever is passed in, and set the parent to the hwnd starting with DOSbox.

this does as needed, although as I said, It has some quirks, I also tried making a directX proxy to inject the image on top of dosbox, but I couldn't get it to work...or even a working sample online for me to go off of (I found lots of em, none worked correctly)

if you could find an image viewer that would work on top of any game for dosbox in full screen, then I would LOVE to know 😀

thanks.

Reply 3 of 3, by leileilol

User metadata
Rank l33t++
Rank
l33t++

This kind of thing could be coded for the opengl output as it's not a pixel strict output mode like the others

i'd like this feature for Wing Commander IV because my monitor is too big to have that Blair/Tolwyn cutout decoration to fit anymore.

apsosig.png
long live PCem