Mirage Source http://www.miragesource.net/forums/ |
|
Simple BitBlt Question http://www.miragesource.net/forums/viewtopic.php?f=201&t=697 |
Page 1 of 1 |
Author: | halla [ Sat Oct 28, 2006 4:02 am ] |
Post subject: | Simple BitBlt Question |
Ok im working on the Item Editor part of my program I have it all working except showing the image of the item. I know how to blt a picbox but thats it. So I just want to know all the code I need to have it blt the item image. I have the form from in the game so names are the same. I tried doing it the same way but it doesnt work. Plus I added DirectX mod but looks like a lot of stuff I dont need for this. Could someone just post the code I need for it to open the items.bmp file and display the image of the item number selected. THanks a lot. |
Author: | Robin [ Sat Oct 28, 2006 11:39 am ] |
Post subject: | |
picItem.picture = loadpicture(picture path) picItem.top = (item * 32) * -1 ? -Kite- |
Author: | Misunderstood [ Sat Oct 28, 2006 1:48 pm ] |
Post subject: | |
That code is already in mirage. Its used to blt the item picture and the npc picture etc. Just look at that. |
Author: | halla [ Sat Oct 28, 2006 6:25 pm ] |
Post subject: | |
Misunderstood wrote: That code is already in mirage. Its used to blt the item picture and the npc picture etc. Just look at that.
I did I took the code from mirage... the directx mod... everything that I can see that I need... and it runs fine but it doesnt show any picture its just black. |
Author: | Misunderstood [ Sat Oct 28, 2006 7:01 pm ] |
Post subject: | |
The code I'm referring to doesn't even involve anything that is in the directx mod. I'm talking about what is used to blt the item picture and npc picture in their editors. |
Author: | halla [ Sat Oct 28, 2006 7:10 pm ] |
Post subject: | |
BitBlt? I have that too if you mean that. Also I just want the code it would take to do that... so while adding it I can learn also. I can blt to a picbox like I did in my snake game... but I just have the images there and then it blts them if needed. Its not getting something from a file or whatever. |
Author: | Misunderstood [ Sat Oct 28, 2006 7:27 pm ] |
Post subject: | |
What do you have for bltblt exactly? |
Author: | halla [ Sat Oct 28, 2006 8:39 pm ] |
Post subject: | |
Public Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long Private Sub tmrPic_Timer() BitBlt picPic.hDC, 0, 0, 32, 32, picItems.hDC, 0, 0, vbSrcCopy End Sub I just have 0's instead of the scrollbar value just to test getting it to show anything. |
Author: | Misunderstood [ Sat Oct 28, 2006 9:31 pm ] |
Post subject: | |
Well then you don't have all code from MS. Look at how MS actually gets the gfx in picItems...its called around when the form loads.... Now the way ms does it isn't ideal, or even a decent way, imo, but it works. |
Author: | halla [ Sat Oct 28, 2006 9:51 pm ] |
Post subject: | |
I figured it out. I looked up a bitblt tutorial. I think the problem was that it wasnt loading the the image right. I got that working on the form load and setting it. Then I had the other part right pretty much. A lot easier now I understand it. Thanks for trying to help though. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |