Difference between revisions of "MAPINFO"

From Wulinshu
Jump to navigation Jump to search
 
(36 intermediate revisions by 2 users not shown)
Line 2: Line 2:
[[Category:Shenmue]]
[[Category:Shenmue]]
[[Category:Files]]
[[Category:Files]]
[[Category:Map]]
The mapinfo is the main file for each scene map.
It contains many things such as the shenmue scene script, model loading and definition, collisions, light, weather, sound program setup and cutscenes.


===ATTR===
===Nodes===
Ignored.
 
===SNDP===
 
====SNDD====
 
====SNDA====
 
====SNDR====
 
====SNDM====
 
=====SMAP=====
{| class="wikitable"
{| class="wikitable"
|-
|-
! Position !! Length !! Type !! Description  
! Signature !! Description  
|-
|-
| 0x00 || 0x04 || string || Identifier (SMAP)
| ATTR || empty
|-
|-
| 0x04 || 0x04 || string || Map name 1
| [[SNDP]] || Sound program
|-
|-
| 0x08 || 0x04 || string || Map name 2
| [[LGHT]] || Scene light
|-
|-
| 0x0C || 0x04 || uint || Size in bytes
| [[ECAM]] || Event camera
|}
 
=====SBTS=====
{| class="wikitable"
|-
|-
! Position !! Length !! Type !! Description
| [[COLS]] || Collisions (SM1)
|-
|-
| 0x00 || 0x04 || string || Identifier (SBTS)
| [[FLDD]] || Collision field (SM2)
|-
|-
| 0x04 || 0x04 || string || Map name 1
| [[DOOR]] || Doors
|-
|-
| 0x08 || 0x04 || string || Map name 2
| [[SCEX]] || Cutscenes
|-
|-
| 0x0C || 0x04 || uint || Size in bytes
| [[SCN3]] || Scene script v3
|}
 
===LGHT===
(HLTaskFunc)LT_LightTask
 
Parent Node:
{| class="wikitable"
|-
|-
! Position !! Length !! Type !! Description
| [[SCN4]] || Scene script v4
|-
|-
| 0x00 || 0x04 || string || Identifier (LGHT)
| REGD || empty
|-
|-
| 0x04 || 0x04 || uint || Size in bytes
| [[WTHR]] || Weather
|-
|-
| 0x08 || 0x04 || string || Unknown (Sub node name)
| EVFD || empty
|-
|-
| 0x0C || 0x04 || uint || Size relativ to 0x08
| LSCN || empty
|}
 
Child Node:
{| class="wikitable"
|-
|-
! Position !! Length !! Type !! Description
| [[MAPR]] || unknown
|-
|-
| 0x00 || 0x04 || string || Identifier (LGHT)
| [[MAPT]] || unknown
|-
|-
| 0x04 || 0x04 || uint || Size in bytes
| [[SCRL]] || unknown
|-
|-
| 0x08 || 0x04 || float || Unknown
| [[CHRD]] || Character data (External models)
|-
|-
| 0x0C || 0x02 || ushort || Entry count
| END || EOF
|-
| 0x0E || 0x02 || short || Flag for something (cmp 3)
|-
| 0x10 || 0x04 || ? || Unknown
|-
| 0x14 || 0x04 || ? || Unknown
|}
|}


Child Node Entry (32 bytes):
===Memory Models===
{| class="wikitable"
|-
! Position !! Length !! Type !! Description
|-
| 0x00 || 0x02 || short || Unused?
|-
| 0x02 || 0x01 || byte || Unknown (same value as 0x00 but used)
|-
| 0x04 || 0x01 || byte || Unknown
|-
| 0x06 || 0x01 || byte || Unused?
|-
| 0x08 || 0x14 || half floats || Unknown
|-
| 0x1E || 0x02 || short || Unknown
|}


===ECAM===
Could be the MAPINFO memory model:
 
===FLDD===
 
====PROP====
Header:
{| class="wikitable"
{| class="wikitable"
|-
|-
! Position !! Length !! Type !! Description  
! Position !! Length !! Type !! Description  
|-
|-
| 0x00 || 0x04 || string || Identifier (PROP)
| 0x00 || 0x04 || string || Identifier (SCNC)
|-
| 0x04 || 0x04 || uint || Content offset
|-
| 0x08 || 0x04 || uint || Footer offset
|}
 
Footer:
{| class="wikitable"
|-
|-
! Position !! Length !! Type !! Description
| 0x04 || 0x0? || ? || Variable size (contains pointers)
|-
|-
| 0x00 || 0x04 || uint || Positions offset
| 0x0? || 0x04 || string || Identifier (USE ) //space at the end
|-
|-
| 0x04 || 0x0? || ? || Unknown offsets
| 0x0? || 0x0? || ? || Variable size (contains pointers)
|}
|}


===DOOR===
Found at qword_7FF717119290 (v1.03) in the code segment (CS).
 
It is accessed when reading the TRCK segment.
===SCEX===
<sub>
 
    struct s1 {
====TRCK====
        signed char[8] pad8;
 
        signed char f8; //bool set to 1 at end
====ASEQ====
        signed char[7] pad16;
 
        struct s0* f16;
====ACAM====
        struct s2* f24; //ASEQ
 
        struct s2* f32; //ACAM
====AMOV====
        struct s2* f40; //AMOV
 
        struct s2* f48; //ASTR
====ASTR====
        struct s2* f56; //ALIP
 
        uint64_t f64;
====AUVW====
        uint64_t f72;
 
        signed char[8] pad88;
=====LGHC=====
        int32_t f88;
 
        int32_t f92;
=====RFBD=====
        int32_t f96;
 
        int32_t f100;
=====EYES=====
        signed char[12] pad116;
 
        struct s2* f116;
=====HAID=====
        signed char[4] pad128;
 
        struct s2* f128;
=====HADT=====
        signed char[42376] pad42512;
 
        int32_t f42512;
=====HAND=====
        int16_t f42516;
 
    };
=====FACX=====


=====FADE=====
    struct s0 {
        signed char[4] pad4;
        int32_t f4;
        int32_t f8;
    };


=====MBTK=====
    struct s2 {
 
        int32_t f0;
=====FOBJ=====
        int32_t f4;
 
        signed char[1] pad9;
=====FCLP=====
        signed char f9;
 
        signed char[2] pad12;
=====DOOR=====
        int32_t f12;
 
    };
=====LGHS=====
 
===SCN3===
 
===SCN4===
 
===REGD===
Empty.
 
===WTHR===
 
===EVFD===
Empty.
 
===LSCN===
Empty.
 
===MAPR===
 
===MAPT===
 
===CHRD===
 
====CHRS====
 
=====CMDM=====
 
====STRG====
{| class="wikitable"
|-
! Position !! Length !! Type !! Description
|-
| 0x00 || 0x04 || string || Identifier (STRG)
|-
| 0x04 || 0x04 || uint || Size in bytes
|-
| 0x08 || 0x0? || strings || Strings with zero termination
|}


===END===
</sub>

Latest revision as of 19:13, 12 May 2019

The mapinfo is the main file for each scene map. It contains many things such as the shenmue scene script, model loading and definition, collisions, light, weather, sound program setup and cutscenes.

Nodes

Signature Description
ATTR empty
SNDP Sound program
LGHT Scene light
ECAM Event camera
COLS Collisions (SM1)
FLDD Collision field (SM2)
DOOR Doors
SCEX Cutscenes
SCN3 Scene script v3
SCN4 Scene script v4
REGD empty
WTHR Weather
EVFD empty
LSCN empty
MAPR unknown
MAPT unknown
SCRL unknown
CHRD Character data (External models)
END EOF

Memory Models

Could be the MAPINFO memory model:

Position Length Type Description
0x00 0x04 string Identifier (SCNC)
0x04 0x0? ? Variable size (contains pointers)
0x0? 0x04 string Identifier (USE ) //space at the end
0x0? 0x0? ? Variable size (contains pointers)

Found at qword_7FF717119290 (v1.03) in the code segment (CS). It is accessed when reading the TRCK segment.

   struct s1 {
       signed char[8] pad8;
       signed char f8; //bool set to 1 at end
       signed char[7] pad16;
       struct s0* f16;
       struct s2* f24; //ASEQ
       struct s2* f32; //ACAM
       struct s2* f40; //AMOV
       struct s2* f48; //ASTR
       struct s2* f56; //ALIP
       uint64_t f64;
       uint64_t f72;
       signed char[8] pad88;
       int32_t f88;
       int32_t f92;
       int32_t f96;
       int32_t f100;
       signed char[12] pad116;
       struct s2* f116;
       signed char[4] pad128;
       struct s2* f128;
       signed char[42376] pad42512;
       int32_t f42512;
       int16_t f42516;
   };
   struct s0 {
       signed char[4] pad4;
       int32_t f4;
       int32_t f8;
   };
   struct s2 {
       int32_t f0;
       int32_t f4;
       signed char[1] pad9;
       signed char f9;
       signed char[2] pad12;
       int32_t f12;
   };