11-10-2006, 01:29 PM
So here I have some work I've done. It's not yet complete so Ill submit the finish code later. So you guys can decide if it has been optimized:
Completed!
Replace this:With this:
Also add this at the top of the Sub:
Now will this speed it up?
Also this has to be done for the fringe too.. And also a system that blts over the text area. I can do all those, I just need to know if this will speed anything up first.
Completed!
Replace this:
Code:
For y = 0 To MAX_MAPY
For x = 0 To MAX_MAPX
Call BltTile(x, y)
Next x
Next y
Code:
' Blit out tiles layers ground/anim1/anim2
If InEditor Then
For y = 0 To MAX_MAPY
For x = 0 To MAX_MAPX
Call BltTile(x, y)
Next x
Next y
Else
yChange1 = 2
yChange2 = 2
xChange1 = 2
xChange2 = 2
If GetPlayerY(MyIndex) - 2 < 0 Then yChange1 = 1
If GetPlayerY(MyIndex) + 2 > MAX_MAPY Then yChange2 = 1
If GetPlayerX(MyIndex) - 2 < 1 Then xChange1 = 1
If GetPlayerX(MyIndex) + 2 > MAX_MAPX Then xChange2 = 1
If GetPlayerY(MyIndex) - 1 < 0 Then yChange1 = 0
If GetPlayerY(MyIndex) + 1 > MAX_MAPY Then yChange2 = 0
If GetPlayerX(MyIndex) - 1 < 0 Then xChange1 = 0
If GetPlayerX(MyIndex) + 1 > MAX_MAPX Then xChange2 = 0
For y = GetPlayerY(MyIndex) - yChange1 To GetPlayerY(MyIndex) + yChange2
For x = GetPlayerX(MyIndex) - xChange1 To GetPlayerX(MyIndex) + xChange2
Call BltTile(x, y)
Next x
Next y
End If
Also add this at the top of the Sub:
Code:
Dim xChange1 As Byte, xChange2 As Byte, yChange1 As Byte, yChange2 As Byte
Also this has to be done for the fringe too.. And also a system that blts over the text area. I can do all those, I just need to know if this will speed anything up first.