07-12-2006, 03:39 PM
I know this is useless, but my internet was down yesterday so I thought I should do something:
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..
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.
ps. some types are needed for it to work.
At least I have my head focused at optimizations
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..

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.

ps. some types are needed for it to work.
At least I have my head focused at optimizations
