- Fixed drawing of TileName in the tile list (assuming ISO8859-1 encoding) - fixes #37

This commit is contained in:
Andreas Schneider 2009-10-24 14:29:32 +02:00
parent c3bdc98219
commit f58bef6d63
2 changed files with 11 additions and 6 deletions

View File

@ -1,7 +1,7 @@
object frmMain: TfrmMain object frmMain: TfrmMain
Left = 229 Left = 228
Height = 603 Height = 603
Top = 126 Top = 128
Width = 766 Width = 766
ActiveControl = oglGameWindow ActiveControl = oglGameWindow
Caption = 'UO CentrED' Caption = 'UO CentrED'

View File

@ -350,7 +350,7 @@ uses
UfrmBoundaries, UfrmElevateSettings, UfrmConfirmation, UfrmMoveSettings, UfrmBoundaries, UfrmElevateSettings, UfrmConfirmation, UfrmMoveSettings,
UfrmAbout, UPacketHandlers, UfrmHueSettings, UfrmRadar, UfrmLargeScaleCommand, UfrmAbout, UPacketHandlers, UfrmHueSettings, UfrmRadar, UfrmLargeScaleCommand,
UfrmLogin, UResourceManager, UfrmVirtualLayer, UfrmFilter, UfrmTileInfo, UfrmLogin, UResourceManager, UfrmVirtualLayer, UfrmFilter, UfrmTileInfo,
UfrmRegionControl, Logging; UfrmRegionControl, Logging, LConvEncoding;
type type
TGLArrayf4 = array[0..3] of GLfloat; TGLArrayf4 = array[0..3] of GLfloat;
@ -1338,13 +1338,16 @@ begin
id := tileInfo^.ID; id := tileInfo^.ID;
if id > $3FFF then if id > $3FFF then
Dec(id, $4000); Dec(id, $4000);
PaintInfo.Canvas.TextRect(PaintInfo.CellRect, 0, 0, Format('$%x', [id]), textStyle); PaintInfo.Canvas.TextRect(PaintInfo.CellRect, 0, 0, Format('$%x', [id]),
textStyle);
end; end;
1: 1:
begin begin
if ResMan.Art.Exists(tileInfo^.ID) then if ResMan.Art.Exists(tileInfo^.ID) then
begin begin
artEntry := ResMan.Art.GetArt(tileInfo^.ID, RGB2ARGB(PaintInfo.Canvas.Pixels[PaintInfo.CellRect.Left, PaintInfo.CellRect.Top]), nil, False); artEntry := ResMan.Art.GetArt(tileInfo^.ID,
RGB2ARGB(PaintInfo.Canvas.Pixels[PaintInfo.CellRect.Left,
PaintInfo.CellRect.Top]), nil, False);
DisplayImage(PaintInfo.Canvas, PaintInfo.CellRect, artEntry.Graphic); DisplayImage(PaintInfo.Canvas, PaintInfo.CellRect, artEntry.Graphic);
artEntry.Free; artEntry.Free;
end; end;
@ -1352,7 +1355,9 @@ begin
2: 2:
begin begin
tileData := TTileData(ResMan.Tiledata.Block[tileInfo^.ID]); tileData := TTileData(ResMan.Tiledata.Block[tileInfo^.ID]);
PaintInfo.Canvas.TextRect(PaintInfo.CellRect, PaintInfo.CellRect.Left, PaintInfo.CellRect.Top, Trim(tileData.TileName), textStyle); PaintInfo.Canvas.TextRect(PaintInfo.CellRect, PaintInfo.CellRect.Left,
PaintInfo.CellRect.Top, ISO_8859_1ToUTF8(Trim(tileData.TileName)),
textStyle);
tileData.Free; tileData.Free;
end; end;
end; end;