Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO] change top pixel transparency to set color


Mikekan13
 Share

Recommended Posts

I am trying to add an option to switch between the top pixel being the transparent color and pure green. I tried this but it simply wont blt the image. How can I do this?

```
Public Sub Engine_BltFast(ByVal dx As Long, ByVal dy As Long, ByRef ddS As DirectDrawSurface7, srcRECT As RECT, trans As CONST_DDBLTFASTFLAGS, Optional greenTrans As Boolean)
    If greenTrans = True Then
        trans = RGB(0, 255, 0)
    End If

```
Link to comment
Share on other sites

@'Aydan':

> why would you even want this feature?
>
> it takes 3 seconds to make a tileset or w.e to be compatible and having the ability to choose any colour background makes life easier…

Not the time it takes to do it. It looks like crude having a whole black row. Why not just fix the problem at the source rather than wasting the time to do it?
Link to comment
Share on other sites

Find

```
Call SetMaskColorFromPixel(Surf, 0, 0)
```
Comment it out. At the top of that sub add

```
Dim TmpColorKey As DDCOLORKEY
```
Above the commented out SetMaskColorFromPixel, add this:

```
' set mask colour
TmpColorKey.Low = &HFF00FF
TmpColorKey.High = TmpColorKey.Low
Call Surf.SetColorKey(DDCKEY_SRCBLT, TmpColorKey)

```
'&HFF00FF' is bright magenta. Change it to w/e you want.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...