[EO 2.0 / 2.3]Draw something on screen

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 <- Made by 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 ?

screenshots?

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.

Oh my. nevermind. (slightly embarrassed)

Log in to reply