Converting DX7 to DX8(Day and Night System)

How would I convert this into dx8

“From Justn’s Tutorial”

modDirectDraw7

Find this line:

’ Lock the backbuffer so we can draw text and names

TexthDC = DDS_BackBuffer.GetDC

Above it add this:

’ Render Night

If DayTime = False Or frmEditor_Map.optLayer(6).Value = True Then

For X = 0 To Map.maxX

For Y = 0 To Map.maxY

BltNightTile X, Y

Next

Next

End If

Add this to the bottom of modDirectDraw7:

Public Sub BltNightTile(ByVal X As Long, ByVal Y As Long)

Dim rec As RECT, i As Long

With Map.Tile(X, Y)

i = MapLayer.Night

’ skip tile if tileset isn’t set

If (.Layer(i).tileset > 0 And .Layer(i).tileset <= NumTileSets) And (.Layer(i).X > 0 Or .Layer(i).Y > 0) Then

’ sort out rec

rec.Top = .Layer(i).Y * PIC_Y

rec.Bottom = rec.Top + PIC_Y

rec.Left = .Layer(i).X * PIC_X

rec.Right = rec.Left + PIC_X

’ render

Call Engine_BltFast(ConvertMapX(X * PIC_X), ConvertMapY(Y * PIC_Y), DDS_Tileset(.Layer(i).tileset), rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)

End If

End With

End Sub

Please explain the process and how you would convert I am truly a bad programmer

anyone… :mellow: :angry:

bump

nice

bump….?

Please just wait you see how much visitet that post already…

Just take a look on the other tile rendering and to it like there

what other tile rendering?

I figured out how to do it for dx8 i’ll post the tut in a few

Log in to reply