:: New Mir3 Source discussion Thread ::

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
New Home for Mir3 Dev. thanks to the Admin Team :)

a good thing is to post Knowlage and Source here...
Code things please in Code Sections.

:: Links ::

by Omikkk
i'm a newbie programmer, but that may be useful http://www.megaupload.com/?d=LK39J6SY.

by DjDarkBoyZ
All of this sources can be downloaded from
http://www.pudn.com , is a chinese web for chinese developers and have some mir codes in Delphi, C sharp and others examples.

by Omikkk
yes, i know, but there's nothing new atm =/
 
Last edited:

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,966
110
310
Stoke, UK
Wouldn't it be easier.. (I don't know anything about how Mir 2 is coded), to take Mir 2's Diamond source and recode to use Mir 3's protocols etc?

Or .. I dunno lol

/Mick
 

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
I believe at first we begin slow with Tools like Mir3 Editors ;-).
Every kind of Sourcecode is wanted (VB, C/C++, C#,Java,Delphi)

:: what we need ::

- Correct Map Header Knowledge
- Wil/Wix Reading Knowledge (Kaori [Java] and I [Delphi] have the knowledge)
- Ideas what function and things we need in the Editor
 

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
OK, I Post my File Header and some Information here.
I hope, I not the only one who will post things in here.

Code:

:: Delphi Code ::
:: (WIL / WIX Header) ::


Code:
  PWIX_Header = ^TWIX_Header;
  TWIX_Header = packed record
    Lib_Info      : array [0..19] of Char;
    Total_Index   : Word;
  end;

  PWIL_Header = ^TWIL_Header;
  TWIL_Header = packed record
    Valid         : Byte;                      
    Lib_Info      : array [0..20] of Char;    
    Lib_Version   : Word;                      
    Total_Index   : Word;                    
  end;

  PWIL_Img_Header = ^TWIL_Img_Header;        
  TWIL_Img_Header = packed record
    Width           : Word;                    
    Height          : Word;                      
    Offset_X        : Smallint;                  
    Offset_Y        : Smallint;                  
    Shadow_type     : Byte;                      
    Shadow_Offset_X : Smallint;                  
    Shadow_Offset_Y : Smallint;                  
    FileSize        : Cardinal;                  // FileSize Only in Mir3 Type2 
  end;



:: Delphi Code ::
:: (Map Header) ::


Code:
  // Map Header
  PMapFileHeader = ^TMapFileHeader;
  TMapFileHeader = packed record
    mfhDesc            : array [0..19] of Char;
    mfhAttr            : Word;
    mfhWidth           : Word;
    mfhHeight          : Word;
    mfhEventFileIdx    : Byte;
    mfhFogColor        : Byte;
  end;

  // Tile Record
  PTileInfo = ^TTileInfo;
  TTileInfo = packed record
    tiFileIdx          : Byte;
    tiImageIdx         : Word;
  end;

  // Cell Record
  PCellInfo = ^TCellInfo;
  TCellInfo = packed record
    ciBarrier          : Byte;  // Baiere  
    ciFrontAnimation   : Byte;  // Animation 
    ciBackAnimation    : Byte;  // Animation 
    ciTopFile          : Byte;  // Top Object 
    ciBotFile          : Byte;  // Bottom Object 
    ciBotImg           : Word;  // Bottom Image
    ciTopImg           : Word;  // Top Image
    ciAniFrame         : Byte;
    ciAniTick          : Byte;
    ciAniCurrTick      : Word;
    ciLigth            : Byte;  // Licht  
  end;


:: (Correct Image ID Catalog) ::


Code:
Folder name:
    D  = Data
    W  = Wood
    F  = Forest
    SA = Sand
    SW = Snow

    0 :  'D-Tilesc'
    1 :  'D-Tiles30c'
    2 :  'D-Tiles5c'
    3 :  'D-Smtilesc'
    4 :  'D-Housesc'
    5 :  'D-Cliffsc'
    6 :  'D-Dungeonsc'
    7 :  'D-Innersc'
    8 :  'D-Furnituresc'
    9 :  'D-Wallsc'
   10 :  'D-SmObjectsc'
   11 :  'D-Animationsc'
   12 :  'D-Object1c'
   13 :  'D-Object2c'

   15 :  'W-Tilesc'
   16 :  'W-Tiles30c'
   17 :  'W-Tiles5c'
   18 :  'W-Smtilesc'
   19 :  'W-Housesc'
   20 :  'W-Cliffsc'
   21 :  'W-Dungeonsc'
   22 :  'W-Innersc'
   23 :  'W-Furnituresc'
   24 :  'W-Wallsc'
   25 :  'W-SmObjectsc'
   26 :  'W-Animationsc'
   27 :  'W-Object1c'
   28 :  'W-Object2c'

   30 :  'SA-Tilesc'
   31 :  'SA-Tiles30c'
   32 :  'SA-Tiles5c'
   33 :  'SA-Smtilesc'
   34 :  'SA-Housesc'
   35 :  'SA-Cliffsc'
   36 :  'SA-Dungeonsc'
   37 :  'SA-Innersc'
   38 :  'SA-Furnituresc'
   39 :  'SA-Wallsc'
   40 :  'SA-SmObjectsc'
   41 :  'SA-Animationsc'
   42 :  'SA-Object1c'
   43 :  'SA-Object2c'

   45 :  'SW-Tilesc'
   46 :  'SW-Tiles30c'
   47 :  'SW-Tiles5c'
   48 :  'SW-Smtilesc'
   49 :  'SW-Housesc'
   50 :  'SW-Cliffsc'
   51 :  'SW-Dungeonsc'
   52 :  'SW-Innersc'
   53 :  'SW-Furnituresc'
   54 :  'SW-Wallsc'
   55 :  'SW-SmObjectsc'
   56 :  'SW-Animationsc'
   57 :  'SW-Object1c'
   58 :  'SW-Object2c'

   60 :  'F-Tilesc'
   61 :  'F-Tiles30c'
   62 :  'F-Tiles5c'
   63 :  'F-Smtilesc'
   64 :  'F-Housesc'
   65 :  'F-Cliffsc'
   66 :  'F-Dungeonsc'
   67 :  'F-Innersc'
   68 :  'F-Furnituresc'
   69 :  'F-Wallsc'
   70 :  'F-SmObjectsc'
   71 :  'F-Animationsc'
   72 :  'F-Object1c'
   73 :  'F-Object2c'
 

DjDarkBoyZ

Dev
Golden Oldie
Aug 11, 2006
1,065
228
260
127.Ø.Ø.1
Im making a viewer, if my info helps im happy ^^

Tile Information (starting at position 28 in map file)

SizeOfTileInfo = 3* MAPFILEHEADER.shWidth * MAPFILEHEADER.shHeight / 4

FileIndex == 1 byte
TileIndex == 2 Bytes

'--------------------------------------------------

Cell Info (at the end of the Tile information position)
Size = MAPFILEHEADER.shWidth * MAPFILEHEADER.shHeight
Positions:

Code:
MapFlag          = 1 Byte  / Position 0
Unknown          = 1 Byte  / Position 1
TopObjFileID     = 1 Byte  / Position 2
BottomObjFileID  = 1 Byte  / Position 3
BottomObjImageID = 2 Bytes / Position 4  And 5
Unknown          = 1 Byte  / Position 6
TopObjImageID    = 2 Bytes / Position 7  AND 8
Obj1_2/Ani       = 2 Bytes / Position 9  AND 10
Obj1_2/Ani       = 2 Bytes / Position 11 AND 12
Light            = 1 Byte  / Position 13

I think this info is correct,atm my viewer is working ok except animations i dont finished for no time.

If anyone have a correction please tell me :)

I post more info when i have more time.
Thx coly for the petition of this section.Its cool! ;)
 
Last edited by a moderator:

Far

tsniffer
Staff member
Developer
May 19, 2003
20,164
30
2,763
540
sorry to bump this old thread. but i looked on pudn.com and found old client and server sources in c++ (just typed mir3 in the search box, whether they will compile is another matter)

but im having trouble downloading them, does anyone have an account. or already have these files to hand? i'd love to give it a shot working on them.
 

mapadale

Guest
If you want Mir3 source you need the old JOB source that demonic had or work from the phili source and create a mir3 server from that.
 

Far

tsniffer
Staff member
Developer
May 19, 2003
20,164
30
2,763
540
If you want Mir3 source you need the old JOB source that demonic had or work from the phili source and create a mir3 server from that.

im not an advanced programmer, and have seen that the map rendering for mir3 is quite complicated, so if i were to get anywhere id need a mir3 source which was atleast a very old version of mir3. even the 2.9 ei files would do, but i cldnt start it from scratch with the phili sources.

will look around for the job sources and see if i can get anywhere with them.
 

mapadale

Guest
im not an advanced programmer, and have seen that the map rendering for mir3 is quite complicated, so if i were to get anywhere id need a mir3 source which was atleast a very old version of mir3. even the 2.9 ei files would do, but i cldnt start it from scratch with the phili sources.

will look around for the job sources and see if i can get anywhere with them.
I've been trying to get hold of Demonic for timne for the old source, but he is a man that is hard to get hold of.
 

Far

tsniffer
Staff member
Developer
May 19, 2003
20,164
30
2,763
540
i doubt he still has it tbh, he left mir3 a long time ago.
 

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
Littel Info for someone if he need...

The main problem to render the maps correct is to understand File Type 1 and 2.
We know both begin on other Position. If we use now a MapEditor Code like my older
then not all map looks correct. Some Maps use Images from Type 1 and Type 2 Libs
like WoomyWood so the view is wrong. The Key is to handle the Type 1 and 2 Libs
correct.

With my own MapEditor (not for Mir3) I can render all Map (new and old) 100% Correct.
 

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
Excemple :

WoomyCorrect.PNG
 

Hazuki

VIP
VIP
Apr 14, 2004
3,459
38
285
United Kingdom
Great work coly as always!

There is a mir2 mapeditor source somewhere that will open both types of maps, I know its a long shot but might be able to help.
 

mapadale

Guest
With my own MapEditor (not for Mir3) I can render all Map (new and old) 100% Correct.
The main issue with the old map editors where the way the headers were placed, as these where incorrect and so displaced the maps. Also to the point they where also only pointing to a certain set of data files and not reading as you said type 1 over type 2 and vice versa.

We resolved this with our own editor and reader and can read all maps with it. Still working on the editor side of things for it.
 

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
The main issue with the old map editors where the way the headers were placed, as these where incorrect and so displaced the maps. Also to the point they where also only pointing to a certain set of data files and not reading as you said type 1 over type 2 and vice versa.

We resolved this with our own editor and reader and can read all maps with it. Still working on the editor side of things for it.

hmm you have see the Pic ? Is based on the same Header I use long time... I only change is the Image Lib Engine. I can render all maps with
correct Animation.

@Haze, if some one need help... I am here ;-)
 

mapadale

Guest
hmm you have see the Pic ? Is based on the same Header I use long time... I only change is the Image Lib Engine. I can render all maps with
correct Animation.

@Haze, if some one need help... I am here ;-)
We found that by changing the way the headers where read, that it allowed us to not only read type1, but also type 2 correctly and also found that it reads all maps now.

We are just now working on editing for the maps as well, which is fitting in rather well.

We've also created it so that it shows maps in grid, so that you know your tile placements as well.