Growlith1223 Posted April 21, 2012 Author Share Posted April 21, 2012 hi there! This is my 5th tutorial i think and this is a tutorial on how to Blt something to the game screen or known as, picScreen!first. make your declarations or whatever it's called.I will be making an HUD :3so i would put.```' Render the HUDPublic DDS_HUD As DirectDrawSuface7Public DDSD_HUD As DDSURFACEDESC2```These are the DirectDraw surfaces. They're what represent the graphic on your screen. - Encyclopedia DramaticaNext, make a file check in the InitSurfaces```If FileExist(App.Path & "\data files\graphics\gui\main\hud.bmp", True) Then Call InitDDSurf("gui\main\HUD", DDSD_HUD, DDS_HUD)```This will check if the file exist, and if it does, then it loads that file.then, make a new Public Subhere's mine.```Public Sub BltHUD()Dim x As Long, y As Long, rec As DxVBLib.RECT'Rect/Rec is a simple way to say Rectangle. The RECT is the area to grab from your bmp'In this case it is the whole thing while in sprites/tiles it is only portions.With rec .top = 0 .Left = 0 .Right = 189 .Bottom = 51End With 'V This here basically tells it to cut out ur color in pixel 1x1.Call Engine_BltFast(Camera.Right - rec.Right, Camera.top, DDS_HUD, rec, DDBLTFAST_SRCCOLORKEY)End Sub```And then, in the Render_Graphics```' Clarifies that you are wanting to use itbltHUD```put it anywhere depending if you want it above everything that is displayed on the screen.and test it and enjoy your new HUD or whatever you made with this!!!Sincerely, Growlith1223NOTE: it should look like the screenie below but without the green line xD Link to comment Share on other sites More sharing options...
kahnival Posted April 21, 2012 Share Posted April 21, 2012 What is the blt bit? That would probably clear things up to me what this actually does.Right now to me it looks like this is how you actually get things to sit on top of the game screen and not behind it even when you click "bring to front" on everything lol. Link to comment Share on other sites More sharing options...
Zopto Posted April 21, 2012 Share Posted April 21, 2012 wery niceee!i for now using like this i make picture box and inside i put what you went on screen xD Link to comment Share on other sites More sharing options...
Guest Posted April 21, 2012 Share Posted April 21, 2012 Thank you for this Grow ^^ Link to comment Share on other sites More sharing options...
Growlith1223 Posted April 21, 2012 Author Share Posted April 21, 2012 @kahnival:> What is the blt bit? That would probably clear things up to me what this actually does.> > Right now to me it looks like this is how you actually get things to sit on top of the game screen and not behind it even when you click "bring to front" on everything lol.The Blt bit is to clarify the properties of it and BltHUD in the Render_Graphics displays that.@Zopto:> wery niceee!thx :D@Lumiere:> Thank you for this Grow ^^No Problem ^^ Link to comment Share on other sites More sharing options...
The New World Posted April 21, 2012 Share Posted April 21, 2012 ```Public DDS_HUD As DirectDrawSuface7Public DDSD_HUD As DDSURFACEDESC2```These are the DirectDraw surfaces. They're what represent the graphic on your screen.If you don't know what you're doing, and lack to explain every unfamiliar element, then this is a waste of peoples time when they're looking to learn.You could've easily researched yourself, because when you don't know what you're doing, you're not helping anyone.The comments in the source were a nice gesture though, at least you did that much compared to others.tl;drIf you don't know, don't say anything. Link to comment Share on other sites More sharing options...
Growlith1223 Posted April 21, 2012 Author Share Posted April 21, 2012 oh i didn't know that…Thanks Rose!!!OP changed Link to comment Share on other sites More sharing options...
kahnival Posted April 21, 2012 Share Posted April 21, 2012 So is what I assumed this code does actually right? Link to comment Share on other sites More sharing options...
Growlith1223 Posted April 21, 2012 Author Share Posted April 21, 2012 …You don't have to make a new object to display this, this displays something in the picScreen and player name, sprite, etc. is behind it...What are you looking it as? Link to comment Share on other sites More sharing options...
kahnival Posted April 21, 2012 Share Posted April 21, 2012 Whenever I resize the picscreen so the game itself fills more space everything is behind it…And when I select bring them to front they are still behind...I thought that this code might be what was needed to actually bring them to the front, sorry if I'm wrong I'm still learning ^.^ 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