Guys, i have problems in item editor, i'm working in a project for tibia 64x64 and well, i can't show sprite in otb editor...
the problem is in this line on otitemeditor.cs
>>>>>>>>>>>>>>>>>>HERE not part of script ok.
in this >>>>>>>>>>HERE if is 32, 32 only open 32x32 sprites if change 64,64 give error of System.IndexOutOfRangeException in otitemeditor.Sprite.getRGBData(Byte transparentColor) sprite.cs line 159
in this line we have the code for get transparence from bitmap
original line:
if i change all script to push 64x64 bitmap dont work with the same error.
someone can help-me to show sprites in 64x64 size?
the problem is in this line on otitemeditor.cs
C++:
private void drawSprite(ref Bitmap canvas, SpriteItem spriteItem)
{
Graphics g = Graphics.FromImage(canvas);
//draw sprite
for (int frame = 0; frame < spriteItem.frames; frame++)
{
for (int cy = 0; cy < spriteItem.height; ++cy)
{
for (int cx = 0; cx < spriteItem.width; ++cx)
{
int frameIndex = cx + cy * spriteItem.width + frame * spriteItem.width * spriteItem.height;
>>>>>>>>>>>>>>>>>>>> HERE>>>>>>>>>>
Bitmap bmp = ImageUtils.getBitmap(spriteItem.getRGBData(frameIndex), PixelFormat.Format24bppRgb, 64, 64);
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
if (canvas.Width == 32)
{
g.DrawImage(bmp, new Rectangle(0, 0, bmp.Width, bmp.Height));
}
else
{
g.DrawImage(bmp, new Rectangle(0, 0, bmp.Width, bmp.Height));
}
}
}
}
g.Save();
}
>>>>>>>>>>>>>>>>>>HERE not part of script ok.
in this >>>>>>>>>>HERE if is 32, 32 only open 32x32 sprites if change 64,64 give error of System.IndexOutOfRangeException in otitemeditor.Sprite.getRGBData(Byte transparentColor) sprite.cs line 159
in this line we have the code for get transparence from bitmap
original line:
C++:
byte[] rgb32x32x3 = new byte[32 * 32 * 3];
if i change all script to push 64x64 bitmap dont work with the same error.
someone can help-me to show sprites in 64x64 size?