Author Topic: (PSX FF7) FIELD\*.BSX files models section  (Read 2705 times)

Lazy Bastard

  • *
  • Posts: 290
  • I may be lazy, but I can...zzzZZZzzzZZZzzz...
    • View Profile
    • GameHacking.org
(PSX FF7) FIELD\*.BSX files models section
« on: 2012-08-07 19:00:55 »
In the wiki, the pseudo-code below is throwing me off.:

Code: [Select]
struct StrModel {
    u16 model_id;          // ID of the model
    u16 scale;             // (12 bix fixed point)
    u32 offset_skeleton;   // Offset to the parts, bones and animations of the model
    byte r, g, b;
    byte unknown[7];
    byte index_bones;      // Start index of bones
    byte unknown;
    byte r1, g1, b1;
    byte num_bones;        // Additionnal number of bones in the model's skeleton
    byte unknown[6];
    byte index_parts;      // Start index of parts
    byte unknown;
    byte r2, g2, b2;
    byte num_parts;        // Additionnal number of parts in the model's skeleton
    byte unknown[6];
    byte index_animations; // Start index of animations
    byte unknown;
    byte r3, g3, b3;
    byte num_animations;   // Additionnal number of animations
} // sizeof = 48

It specifies that this is 48 bytes in size, but I must be missing something. Looking at the above, I see 'unsigned 16-bit' (two bytes), 'unsigned 16-bit' (two bytes), 'unsigned 32-bit' (four bytes), one byte, seven bytes, one byte, one byte, one byte, one byte, six bytes, one byte, one byte, one byte, one byte, six bytes, one byte, one byte, one byte, one byte...which equals 40 bytes total. Where am I missing eight bytes...or is there a mistake in this snippet?

Lazy Bastard

  • *
  • Posts: 290
  • I may be lazy, but I can...zzzZZZzzzZZZzzz...
    • View Profile
    • GameHacking.org
Re: (PSX FF7) FIELD\*.BSX files models section
« Reply #1 on: 2012-08-07 19:02:51 »
Ack, I think I just caught my own mistake: 'byte r2, g2, b2;' must reference three bytes. Let me know if I'm wrong.

Update: Yeah, I'm right. I identified this data in entirety in MD1STIN.BSX, per model.
« Last Edit: 2012-08-07 20:02:53 by Lazy Bastard »

lasyan3

  • *
  • Posts: 76
    • View Profile
Re: (PSX FF7) FIELD\*.BSX files models section
« Reply #2 on: 2012-08-08 05:31:38 »
You're welcome :-D