Cached MapInfos.rxdata and map_connections.dat, reduced usage of load_data

This commit is contained in:
Maruno17
2021-02-26 23:00:27 +00:00
parent c9903c59c8
commit b281734312
16 changed files with 65 additions and 41 deletions

View File

@@ -153,7 +153,7 @@ def createMinimap2(mapid)
bitmap=BitmapWrapper.new(map.width*4,map.height*4)
black=Color.new(0,0,0)
bigmap=(map.width>40 && map.height>40)
tilesets=load_data("Data/Tilesets.rxdata")
tilesets=$data_tilesets
tileset=tilesets[map.tileset_id]
return bitmap if !tileset
helper=TileDrawingHelper.fromTileset(tileset)
@@ -181,7 +181,7 @@ def createMinimap(mapid)
return BitmapWrapper.new(32,32) if !map
bitmap=BitmapWrapper.new(map.width*4,map.height*4)
black=Color.new(0,0,0)
tilesets=load_data("Data/Tilesets.rxdata")
tilesets=$data_tilesets
tileset=tilesets[map.tileset_id]
return bitmap if !tileset
helper=TileDrawingHelper.fromTileset(tileset)