| Mirage Source http://miragesource.net/forums/ |
|
| Meh http://miragesource.net/forums/viewtopic.php?f=201&t=3829 |
Page 1 of 1 |
| Author: | GIAKEN [ Sat Jun 14, 2008 10:36 pm ] |
| Post subject: | Meh |
I'm trying to get a scrolling parallax background thing going on...and it's not working too well. What I'm basically trying to do is get one picture to follow the other down, but above the picture to get it to look like it's continually moving down... Code: Dim sRECTT As RECT Dim sRECTT2 As RECT Dim dRECTT As RECT Dim tmrBlah As Long Dim tmrBlah2 As Long Me.Visible = True With dRECTT .top = 0 .Bottom = 400 .Left = 0 .Right = 400 End With With sRECTT .top = 0 .Bottom = 400 .Left = 0 .Right = 400 End With With sRECTT2 .top = -400 .Bottom = 0 .Left = 0 .Right = 400 End With Do If tmrBlah < GetTickCount Then With sRECTT .top = .top - 1 .Bottom = .top + 400 End With With sRECTT2 .top = .top - 1 .Bottom = .Bottom - 1 End With tmrBlah = GetTickCount + 10 End If If sRECTT.top = -400 Then sRECTT.top = 0 DD_Background.BltToDC picBack.hdc, sRECTT, dRECTT DD_Background.BltToDC picBack.hdc, sRECTT2, dRECTT If tmrBlah2 < GetTickCount Then picBack.Refresh tmrBlah2 = GetTickCount + 10 End If DoEvents Loop End Sub I know it's going to be probably messed up a lot...anybody help? |
|
| Author: | Robin [ Wed Jun 18, 2008 9:30 pm ] |
| Post subject: | Re: Meh |
I'm pretty sure you can't render off-screen in DX7. Is it not appearing at all? If so, that's probably why. |
|
| Author: | GIAKEN [ Wed Jun 18, 2008 9:33 pm ] |
| Post subject: | Re: Meh |
No, it's appearing, it's just a moving block going down alone and then it appears at the top and repeats the process. The blocks aren't following each other to make it look like it's continuous...just that lonely block moving down. |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|