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

[EO 2.0 / 2.3]Draw something on screen


Wortel Angels
 Share

Recommended Posts

**Client Side**

**modDirectDraw7**

under

```

Public DDS_Bars As DirectDrawSurface7

```
add

```

Public DDS_Menu As DirectDrawSurface7

```
Then under

```

Public DDSD_Bars As DDSURFACEDESC2

```
add

```

Public DDSD_Menu As DDSURFACEDESC2

```
Now in **Sub DestroyDirectDraw**

under

```

Set DDS_Target = Nothing

ZeroMemory ByVal VarPtr(DDSD_Target), LenB(DDSD_Target)

```
add

```

Set DDS_Menu = Nothing

ZeroMemory ByVal VarPtr(DDSD_Menu), LenB(DDSD_Menu)

```
Now add at **modDirectDraw7**

```

Public Sub DrawMenu()

Dim Rec As RECT, X as Long, Y as Long

If DDS_Menu Is Nothing Then

Call InitDDSurf("Menu", DDSD_Menu, DDS_Menu)

End If

With Rec

.Top = 0

.Bottom = DDSD_Menu.lHeight

.Left = 0

.Right = DDSD_Menu.lWidth

End With

X = 8 * 32

Y = 11 * 32

Engine_BltFast X, Y, DDS_Menu, Rec, DDBLTFAST_SRCCOLORKEY

End Sub

```
Now search

```

' render the actual sprite

Call BltSprite(Sprite, x, Y, rec)

```
and add under that

```

Call DrawMenu

```
[Download that](http://www.file-upload.net/download-6931044/Menu.bmp.html) <- Made by [DaxterXX](http://www.touchofdeathforums.com/community/index.php?/user/76741-daxterxx/) (please do not use it its just as Example)

Now put it in data/graphics

You can set the position of the menu at the X and Y stuff at DrawMenu (Or how youll call yours)

Now should it be drawed at the Left lower corner

Bugs:

The Image is Jumping to the next Tile if you walk on Scrolling maps.

Anyone know how to fix that ?
Link to comment
Share on other sites

  • 1 year later...
![](http://www.minerwars.com/ForumUploads/20101115002739_181_necropost.png)

srsly, read the topic's post date before you make a post. in all reality though, this is not a system, it's a tutorial on how to do something, ofc you can have screenshots but i would think it's really unnecessary.
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...