Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO]How to add more map layers?


GammaÃâžÂ
 Share

Recommended Posts

find for fringe

in moddirectdraw7 add

Public Sub BltMapCustomTile(ByVal x As Long, ByVal Y As Long)
Dim rec As DxVBLib.RECT
Dim i As Long

    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    With Map.Tile(x, Y)
        For i = MapLayer.custom To MapLayer.custom
            ' 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
        Next
    End With

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "BltMapcustomTile", "modDirectDraw7", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...