Sfx file format

Results 1 to 10 of 10
  1. #1
    Elite Member Duotone is offline
    Member +Rank
    Jun 2009 Join Date
    107Posts

    Sfx file format

    Well. Thats all i could figure out so far. Any help appreciated.
    Code:
    struct quad_data
    {
        short unknown1;
        float position_x;   //position vector. added after rotation
        float position_y;
        float position_z;
        float unk1;
        float unk2;
        float unk3;
        float scale_x_OR_cylinder_upper_radius;  //scale_x is for a 2D scaleing (texture's quad)
        float scale_y_OR_cylinder_height;  //2D
        float quad_z_OR_cylinder_bottom_radius;   //Z koordinate to the quad only used by (quad type 4)
        float rotate_x;
        float rotate_y;
        float rotate_z;
        int animation_time; //milisecs
    };
    //animateing this is easy. you just take the next quad_data from the array, do the wigth-awarage with the current one, and display the result
    
    struct SFX
    {
        char version[8];
        int ntextures;
        
        struct sfx_part
        {
            int part_type;  //1 = horizontal quad, 2 = vertical quad, 3 = ???, 4 = cylinder
            if(version[5] > '1')
            {
                int comment_len;
                char comment[ comment_len ];
            }
            int texture_name_len;
            char texture_name[ texture_name_len ];
    
            short unknown1;
            short unknown2;
            int unknown3;
            int quad_type; //1 = billboard, 2 = horizontal, 4 = vertical
            if(version[5] > '1')
            {
                int unknown5;
            }
            if(part_type == 2)
            {
                byte unknown6[10];
                float q[15];
                if(version[5] >= '2')
                {
                    int unknown6_2[8];  //zero?
                    float unk_degree;
                    int unknown6_3;
                    if(version[5] == '3')
                    {
                        int unknown6_4;
                    }
                    float q2[12];
                }
            }
    
            short n;
            short unknown7;
    
            quad_data animation_states[ n ];   //these data uses the texture above
    
            if(part_type == 4)
            {
                int n4;   //divides each cylinder into n4 parts
            }
    
        } texture_data[ ntextures ];
    } sfx;
    Oldest one (without SFX0. header)

    Code:
    struct quad_data
    {
        short unknown1;
        float position_x;   //position vector. added after rotation
        float position_y;
        float position_z;
        float unk1;
        float unk2;
        float unk3;
        float scale_x_OR_cylinder_upper_radius;  //scale_x is for a 2D scaleing (texture's quad)
        float scale_y_OR_cylinder_height;  //scale_y is 2D
        float quad_z_OR_cylinder_bottom_radius;   //Z koordinate to the quad only used by (quad type 4)
        float rotate_x;
        float rotate_y;
        float rotate_z;
        int animation_time; //milisecs
    };
    
    
    struct SFX
    {
        int ntextures;
        
        struct ELEM
        {
            int part_type;  //1 = horizontal quad, 2 = vertical quad, 3 = ???, 4 = cylinder
            int texture_name_len;
            char texture_name[ texture_name_len ];
    
            short unknown1;
            short unknown2;
            int quad_type; //1 = billboard, 2 = horizontal, 4 = vertical
            if(part_type == 2)
            {
                byte unknown6[10];
                float q[15];
            }
            short n;
            short unknown7;
    
            quad_data animation_states[ n ];
    
            if(part_type == 4)
            {
                int n4;   //divides each cylinder into n4 parts
            }
    
        } texture_data[ ntextures ];
    } sfx;
    And some pic's:


    http://image-storage.co.uk/Images/41...ic19dacf9e.JPG
    http://image-storage.co.uk/Images/41...ic233549ab.JPG
    http://image-storage.co.uk/Images/41...ic38dda63f.JPG
    http://image-storage.co.uk/Images/41...ic413fb23b.JPG
    http://image-storage.co.uk/Images/41...ic50287c6f.JPG
    http://image-storage.co.uk/Images/41...ic619f5b00.JPG



    Thanks to Nicco and his mate for the picture shareing site
    Last edited by Duotone; 15-11-09 at 09:33 PM.


  2. #2
    Grand Master Organic is offline
    Grand MasterRank
    May 2007 Join Date
    2,077Posts

    Re: Sfx file format

    naisly done duo.

  3. #3
    Elite Member guardiananqel is offline
    Member +Rank
    Oct 2008 Join Date
    153Posts

    Re: Sfx file format

    Really Nice !!!!
    its perfect x3

  4. #4
    Grand Master divinepunition is offline
    Grand MasterRank
    Dec 2008 Join Date
    FranceLocation
    621Posts

    Re: Sfx file format

    nice done ^^

    In futur i hope we will be able to edit or create our own sfx :p

  5. #5
    Game Developer MisterKid is offline
    Grand MasterRank
    Jun 2009 Join Date
    1,585Posts

    Re: Sfx file format

    Nice ^^ I'm curious how you find out those things, well if you have time to explain.
    A link would be fine to xD
    Last edited by MisterKid; 16-11-09 at 06:54 PM.

  6. #6
    Grand Master Shinija is offline
    Grand MasterRank
    Oct 2007 Join Date
    UKLocation
    684Posts

    Re: Sfx file format

    Quote Originally Posted by MisterKid View Post
    Nice ^^ I'm curious how you find out those things, well if you have time to explain.
    A link would be fine to xD
    Reverse Engineering i recall?

  7. #7
    Game Developer MisterKid is offline
    Grand MasterRank
    Jun 2009 Join Date
    1,585Posts

    Re: Sfx file format

    Quote Originally Posted by azntrung View Post
    Reverse Engineering i recall?
    ohh :O lets google tuts XD thank you

  8. #8
    Grand Master Masius is offline
    Grand MasterRank
    Dec 2007 Join Date
    1,580Posts

    Re: Sfx file format

    Quote Originally Posted by MisterKid View Post
    ohh :O lets google tuts XD thank you
    Reverse Engineering is for medium to advanced programmers. I'm more than sure your programming experience is not enough to advance to this step mate.. Try learning a bit more and getting used to a programming language first.

  9. #9
    Grand Master divinepunition is offline
    Grand MasterRank
    Dec 2008 Join Date
    FranceLocation
    621Posts

    Re: Sfx file format

    up ! this thread should be pined with o3d structure and also rgn, res and lnd structures find by xadet too :o

  10. #10
    Grand Master GlaphanKing is offline
    Grand MasterRank
    Sep 2008 Join Date
    World of MorrowLocation
    2,593Posts

    Re: Sfx file format

    Good idea. If the format is done, I can pin it in the release section, otherwise I can pin it here for the time being.



Advertisement