Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HUGE optimization
#2
Hey,

I have searched :

Code:
rec.Top = (.Ground \ TILESHEET_WIDTH) * PIC_Y
                rec.Bottom = rec.Top + PIC_Y
                rec.Left = (.Ground Mod TILESHEET_WIDTH) * PIC_X
                rec.Right = rec.Left + PIC_X
                DDS_BackBuffer.BltFast X * PIC_X, Y * PIC_Y, DDS_Tile, rec, DDBLTFAST_WAIT

But I have found nothing, except :

Code:
MapTilePosition(X, Y).Ground.Top = (Map.Tile(X, Y).Ground \ TILESHEET_WIDTH) * PIC_Y
            MapTilePosition(X, Y).Ground.Bottom = MapTilePosition(X, Y).Ground.Top + PIC_Y
            MapTilePosition(X, Y).Ground.Left = (Map.Tile(X, Y).Ground Mod TILESHEET_WIDTH) * PIC_X
            MapTilePosition(X, Y).Ground.Right = MapTilePosition(X, Y).Ground.Left + PIC_X

In Public Sub CalcTilePositions()
And i have modified this by :

Code:
If Map.Tile(X, Y).Ground > 0 Then
            MapTilePosition(X, Y).Ground.Top = (Map.Tile(X, Y).Ground \ TILESHEET_WIDTH) * PIC_Y
            MapTilePosition(X, Y).Ground.Bottom = MapTilePosition(X, Y).Ground.Top + PIC_Y
            MapTilePosition(X, Y).Ground.Left = (Map.Tile(X, Y).Ground Mod TILESHEET_WIDTH) * PIC_X
            MapTilePosition(X, Y).Ground.Right = MapTilePosition(X, Y).Ground.Left + PIC_X
       End If

But, when you change map, it's not refresh the ground in a blank map, you see the ground of the other map..
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)