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

DrawInventory :{


Zzbrandon
 Share

Recommended Posts

Ok so in Dragon Eclipse the inventory background is black. So i went to inventory.jpg and changed to an image. I start up the game it still black so I think a code in modgraphics is rendering a black layer over it. So I searched and found it

```

Sub DrawInventory()

Dim i As Long, X As Long, Y As Long, itemnum As Long, itempic As Long

Dim Amount As Long

Dim rec As RECT, rec_pos As RECT, srcRect As D3DRECT, destRect As D3DRECT

Dim colour As Long

Dim tmpItem As Long, amountModifier As Long

' If debug mode, handle error then exit out

If Options.Debug = 1 Then On Error GoTo errorhandler

If Not InGame Then Exit Sub

' reset gold label

'frmMain.lblGold.Caption = "0g"

Direct3D_Device.Clear 0, ByVal 0, D3DCLEAR_TARGET, D3DColorRGBA(0, 0, 0, 0), 1#, 0

Direct3D_Device.BeginScene

```

Is their anyway to make it stop drawing over my image without having a unrecoverable DX8 error I tried to delete these lines but it made the Dx8 unrecoverable error

```

Direct3D_Device.Clear 0, ByVal 0, D3DCLEAR_TARGET, D3DColorRGBA(0, 0, 0, 0), 1#, 0

Direct3D_Device.BeginScene

```

So what should I do? any help?
Link to comment
Share on other sites

the background is drawn blak because its a picscreen i believe, to make it semi transparent you would need to draw the inventory to your picscreen. i seriously suggest downloading a version of eclipse that already has this implenmenting and just going thru it to see how it works.
Link to comment
Share on other sites

Yes but I put the picscreen to a image but black is drawn over it im thinking from DrawInventory How would I make it so when It Draw inventory it transparent so showing the picInventory. Isnt [background=rgb(248, 248, 248)]the last 0 transparency so if I changed to 1 it would make it transparent because RGBA the A stands for Alpha[/background]

[background=rgb(248, 248, 248)]D3DColorRGBA(0, 0, 0, 0) [/background]
Link to comment
Share on other sites

> Yes but I put the picscreen to a image but black is drawn over it im thinking from DrawInventory How would I make it so when It Draw inventory it transparent so showing the picInventory. Isnt [background=rgb(248, 248, 248)]the last 0 transparency so if I changed to 1 it would make it transparent because RGBA the A stands for Alpha[/background]
>
> [background=rgb(248, 248, 248)]D3DColorRGBA(0, 0, 0, 0) [/background]

oreo gave you the correct answer. by "drawing" the inventory to picscreen, he doesn't mean to simply give the picscreen a picture. he means you need to render the inventory differently through code so that the black becomes transparent and you can see the background image. its not as simple as just changing an rgb value.
Link to comment
Share on other sites

> oreo gave you the correct answer. by "drawing" the inventory to picscreen, he doesn't mean to simply give the picscreen a picture. he means you need to render the inventory differently through code so that the black becomes transparent and you can see the background image. its not as simple as just changing an rgb value.

Well any idea's how I would make the black become transparent?
Link to comment
Share on other sites

Dude already explained it to you. Its not a matter of ideas, you have to change the way your inventory is renderd. its not about changing setting some alpha channel or something. the best i can say is either pay someone to do it for you or **Download CsDe or EA and look at how they do it.**
Link to comment
Share on other sites

> Dangit paying someone for that im gonna have a look hope it can work with Dragon Eclipse ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png)
>
> Where is Cs:De ?

Yes it would work in Dragon Eclipse.. Cs:De is in "Robin's History Bundle".
Link to comment
Share on other sites

Cs:De doesnt help but would this script work?

```

Dim thePic As StdPicture

Set thePic = LoadPicture("C:\Images\Screenshots\image1002.jpg")

With thePic

.Render destDC Or 0&, 0&, 0&, ScaleX(.Width, vbHimetric, vbPixels), ScaleY(.Height, vbHimetric, vbPixels), _

0&, .Height, .Width, -.Height, ByVal 0&

End With

```
Link to comment
Share on other sites

CSDE has the feature you want already! First its not a script its a code snippet and no im sorry man but it wont. I seriously cannot believe im saying this but you might as well download Eclipse advanced and use that for your engine….
Link to comment
Share on other sites

```

Dim top As Long, left As Long

Dim Width As Long, height As Long

' render the window

Width = 195

height = 250

'EngineRenderRectangle Tex_GUI(5), GUIWindow(GUI_SPELLS).x, GUIWindow(GUI_SPELLS).y, 0, 0, width, height, width, height, width, height

RenderTexture Tex_GUI(5), GUIWindow(GUI_SPELLS).x, GUIWindow(GUI_SPELLS).y, 0, 0, Width, height, Width, height

```

That the rendering code but It keep highlighting Tex_GUI(5) I dont have that in Dragon Eclipse how would I add?
Link to comment
Share on other sites

You have to setup the texture and had the texture file to your code.

When you rip code out of one engine and put it into another, you can't always assume just that one piece of code is the whole thing. You have to look now at how Text_GUI is stored and add all of the code that is to do with it to your source now.
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...