Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Night
#7
Add this to the bottom of:Public Sub BltTile(ByVal x As Long, ByVal y As Long)

Code:
If GameTime = 1 Then
        With rec
            .top = Int(Night / 32) * PIC_Y
                .Bottom = .top + PIC_Y
                .Left = (Night - Int(Night / 32) * 32) * PIC_X
                .Right = .Left + PIC_X
            End With
            Call DD_BackBuffer.BltFast(x * PIC_X, y * PIC_Y, DD_TileSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
End If

The variable night refers to which tile it is going to blit over. So make your second tile on your tile sheet a 32x32 checker board. Dim Night as 1.

This is a very primitive way to display night. If you want to just test it as night all the time, get rid of the if statement.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)