Zzbrandon Posted October 20, 2012 Author Share Posted October 20, 2012 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 LongDim Amount As LongDim rec As RECT, rec_pos As RECT, srcRect As D3DRECT, destRect As D3DRECTDim colour As LongDim tmpItem As Long, amountModifier As Long' If debug mode, handle error then exit outIf Options.Debug = 1 Then On Error GoTo errorhandlerIf 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#, 0Direct3D_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#, 0Direct3D_Device.BeginScene```So what should I do? any help? Link to comment Share on other sites More sharing options...
or3o Posted October 20, 2012 Share Posted October 20, 2012 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 More sharing options...
Zzbrandon Posted October 20, 2012 Author Share Posted October 20, 2012 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 More sharing options...
Murdoc Posted October 20, 2012 Share Posted October 20, 2012 > 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 More sharing options...
Zzbrandon Posted October 20, 2012 Author Share Posted October 20, 2012 So how hard is it drawing the inventory? Is it possible for it to draw the inventory.hpg in the data files to it? Link to comment Share on other sites More sharing options...
Zzbrandon Posted October 20, 2012 Author Share Posted October 20, 2012 > 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 More sharing options...
or3o Posted October 20, 2012 Share Posted October 20, 2012 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 More sharing options...
Zzbrandon Posted October 20, 2012 Author Share Posted October 20, 2012 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 ? Link to comment Share on other sites More sharing options...
Murdoc Posted October 20, 2012 Share Posted October 20, 2012 > 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 More sharing options...
Zzbrandon Posted October 21, 2012 Author Share Posted October 21, 2012 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 More sharing options...
or3o Posted October 21, 2012 Share Posted October 21, 2012 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 More sharing options...
Zzbrandon Posted October 21, 2012 Author Share Posted October 21, 2012 Ok I will try Cs:De again Link to comment Share on other sites More sharing options...
Zzbrandon Posted October 21, 2012 Author Share Posted October 21, 2012 ```Dim top As Long, left As LongDim 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 More sharing options...
Ertzel Posted October 21, 2012 Share Posted October 21, 2012 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 More sharing options...
Zzbrandon Posted October 21, 2012 Author Share Posted October 21, 2012 Is their anyway to make it render the image instead of a RGBA? Link to comment Share on other sites More sharing options...
or3o Posted October 21, 2012 Share Posted October 21, 2012 I bet someone will do this for probibly a few dollars. Also when you do figure this out your gonna notice a slight drop in fps. Link to comment Share on other sites More sharing options...
Zzbrandon Posted October 21, 2012 Author Share Posted October 21, 2012 Ok a few dollars um how about my soul is that better this is getting annoying ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png)Someone has to know this stuff Link to comment Share on other sites More sharing options...
or3o Posted October 21, 2012 Share Posted October 21, 2012 ask Growlith1223 lol i know for a fact he has done it Link to comment Share on other sites More sharing options...
Zzbrandon Posted October 21, 2012 Author Share Posted October 21, 2012 Alright if he knows this I declare him Master of DrawInventory of Touchofdeathforums. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now