Please help developing new korea mir engine~~~

DarkSide Mir3

StuJnX6ry

Loyal Member
Loyal Member
Jul 1, 2014
18
1
15
Location
[Solved]Dyeing Problem

hm... i'm upgrading my graphic engine to be compatible with korea mir3 WTL resources, higher resolution and much more gorgeous armors.

i have carefully read the source code in crystal engine and C# WTL viewer:

// FROM
var block = new byte[size];
Array.Copy(fBytes, blockOffSet, block, 0, size);// block[8] contain 2 * 16b color info


// VIA
private static void DecompressBlock(IList<byte> newPixels, byte[] block)


// WE GET
var newPixels = new byte[64]; // 4 * 4 * 32b color info


// COPY TO THE DST
Array.Copy(newPixels, pixelOffSet, sourcePixel, 0, 4);
pixelOffSet += 4;
if (destPixel + 4 > cap)
break;
for (int pc = 0; pc < 4; pc++)
pixels[destPixel + pc] = sourcePixel[pc];

my engine can display the WTL image now, though the decompressing process looks so weird(using two 16bit colors to produce sixteen 32bit colors...?!).

buuuuuuuuuuuuuuut, there is a functional problem about dyeing. What is the symbol of dyeing in WTL like 0x00C2 and 0x00C3 in old WIL?


in the WIL decompressing process, we do dyeing like this:

if ( srcColor == 0x00C2 || srcColor == 0x00C3 )
{
dyeing code...
}


but in the WTL decompressing process...

// block header : 4 bytes offset info and 4 bytes info about the number of the block
// block : 4 bytes colors + 4 bytes indices

no symbol was found...


could someone lend me a hand please?

related discussion is welcome.
 
Last edited:
Legend Of Mir 3 HispaRed

Jamie

LOMCN Developer
Developer
Mar 29, 2003
4,773
235
251
United Kingdom
  • Best Coder 2018
  • Biggest Carrot Jockey 2017
  • Most Popular 2017
  • Best Coder 2017
You should find the Overlay Image Data("Dyeing" Image) directly after the data for the default Image.

[Header]
[Image]
[OverLay]

[Header]
[Image]
[OverLay]
 

DjDarkBoyZ

Mir3 ZenX Coder
Dedicated Member
Aug 11, 2006
1,031
143
190
127.Ø.Ø.1
nobody has recoded wil/wtl readers to gain speed.

i only recoded wil for speed reading, for wtl i cannot help you because i dont touched much this library.

but in a first stage seems very similar to wil.

you are working using new server and protocol?
 

StuJnX6ry

Loyal Member
Loyal Member
Jul 1, 2014
18
1
15
Location
You should find the Overlay Image Data("Dyeing" Image) directly after the data for the default Image.

[Header]
[Image]
[OverLay]

[Header]
[Image]
[OverLay]
Oh? There are OverLay Data?

Thank you Jamie. I'll check this out later.

nobody has recoded wil/wtl readers to gain speed.

i only recoded wil for speed reading, for wtl i cannot help you because i dont touched much this library.

but in a first stage seems very similar to wil.

you are working using new server and protocol?
Thank you anyway Dj.:p

Yes, I’m coding both server side and client side to current korea mir3 at this stage.
 
Last edited:

DjDarkBoyZ

Mir3 ZenX Coder
Dedicated Member
Aug 11, 2006
1,031
143
190
127.Ø.Ø.1
Oh? There are OverLay Data?

Thank you Jamie. I'll check this out later.



Thank you anyway Dj.:p

Yes, I’m coding both server side and client side to current korea mir3 at this stage.
No problem.

I hope you the best for your project :)
Its nice to see ppl working on mir3, now im not alone XD