diff --git a/Client/UfrmMain.pas b/Client/UfrmMain.pas index 5396e55..95c54b1 100644 --- a/Client/UfrmMain.pas +++ b/Client/UfrmMain.pas @@ -2297,7 +2297,7 @@ var begin if cbTerrain.Checked then minID := $0 else minID := $4000; if cbStatics.Checked then maxID := $7FFF else maxID := $3FFF; - filter := AnsiLowerCase(edFilter.Text); + filter := AnsiLowerCase(UTF8ToISO_8859_1(edFilter.Text)); node := vdtTiles.GetFirstSelected; if node <> nil then @@ -2314,8 +2314,8 @@ begin begin if ResMan.Art.Exists(i) then begin - if (filter <> '') and (Pos(filter, AnsiLowerCase(TTileData( - ResMan.Tiledata.Block[i]).TileName)) = 0) then Continue; + if (filter <> '') and (Pos(filter, AnsiLowerCase( + ResMan.Tiledata.TileData[i].TileName)) = 0) then Continue; node := vdtTiles.AddChild(nil); tileInfo := vdtTiles.GetNodeData(node); tileInfo^.ID := i; diff --git a/MulProvider/UTileDataProvider.pas b/MulProvider/UTileDataProvider.pas index 800ea65..990d6d2 100644 --- a/MulProvider/UTileDataProvider.pas +++ b/MulProvider/UTileDataProvider.pas @@ -35,6 +35,9 @@ uses type TLandTileDataArray = array[$0..$3FFF] of TLandTileData; TStaticTileDataArray = array[$0..$3FFF] of TStaticTileData; + + { TTiledataProvider } + TTiledataProvider = class(TMulProvider) constructor Create(AData: TStream; AReadOnly: Boolean = False); overload; override; constructor Create(AData: string; AReadOnly: Boolean = False); overload; override; @@ -46,10 +49,12 @@ type function CalculateOffset(AID: Integer): Integer; override; function GetData(AID, AOffset: Integer): TMulBlock; override; procedure SetData(AID, AOffset: Integer; ABlock: TMulBlock); override; + function GetTileData(AID: Integer): TTiledata; public function GetBlock(AID: Integer): TMulBlock; override; property LandTiles: TLandTileDataArray read FLandTiles; property StaticTiles: TStaticTileDataArray read FStaticTiles; + property TileData[AID: Integer]: TTiledata read GetTileData; //all tiles, no cloning end; implementation @@ -139,5 +144,13 @@ begin end; end; +function TTiledataProvider.GetTileData(AID: Integer): TTiledata; +begin + if AID < $4000 then + Result := FLandTiles[AID] + else + Result := FStaticTiles[AID - $4000]; +end; + end.