Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SetHighMaxMap
#1
I know this is useless, but my internet was down yesterday so I thought I should do something:

Code:
Public Sub SetHighMaxMap()
Dim FilePath As String
Dim f As Long, i As Long

    For i = 1 To MAX_MAPS
        f = FreeFile
        FilePath = App.Path & "\Maps\Map" & i & ".dat"
        Open FilePath For Binary As #f
            Get #f, , HighMap(i)
            If HighMap(i).HighTile(0, 0).Ground  0 Then
                HIGH_MAX_MAPS = i
            End If
        Close
    Next i
End Sub

This could be usefull for Engines (not games), cause in a engine you might set the max_maps = 1000, and you only use 15 maps.. Tongue So then it will only loop to 15.

This can easily be done for all the different MAX_ thingys, but I don't think its a good idea. Just thought I should post it. Tongue

ps. some types are needed for it to work.

At least I have my head focused at optimizations Tongue
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)