File Converter

This is a discussion on File Converter within the C++ Programming forums, part of the General Programming Boards category; Hi, i need some help writing a file converter for game files of the computergame Operation Flashpoint and I thought ...

  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    2

    File Converter

    Hi,

    i need some help writing a file converter for game files of the computergame Operation Flashpoint and I thought i'd get some help here. You DON'T have to know anything about the game or the engine or something like that. And yeah there are tools who can do this but I need my own.

    Now:
    In Operation Flashpoint there are also cpp files(90% the same as c++) which are well kinda parsed or converted(NOT compiled) into bin files.
    I found this: raP File Format - OFP - Bohemia Interactive Community
    about the raP file format (the bin files). I understand what it is about and so on but i have problems realizing it.

    Would be great if someone could help...
    Ah yeah, I post an example file (a cpp file and the 'parsed' version):
    Click me

  2. #2
    Registered User
    Join Date
    Oct 2006
    Location
    Canada
    Posts
    1,243
    maybe im just speaking for myself, but i dont think anyone (including myself) is going to go through your links and zip files to dig through the code, learn it, and debug it for you.

    it would be much better, i think, if you were to post a snippet of code (in your post, with the code tags) or specific idea/concept you dont understand, say what you have tried or exactly dont understand, any possible solutions, and a concrete question.

    remember, we are here offering our help for free (which is already a lot to ask in todays world). maybe you will get someone who doesnt mind doing all of this investigation for you, but i certainly dont, after writing code all day at work.

  3. #3
    Registered User
    Join Date
    May 2009
    Posts
    2
    well my problem is how exactly to start?
    I mean I loaded the bin file into a string. I started with the 8th byte because in the wiki they say:
    A raPified file has the first 4 bytes of the file encoded as follows: "\0raP"
    For OFP and RESISTANCE the next three bytes are "\004\0\0"
    Then they say
    The rest of the file contain Class Body packets of 3 different construct types with the 1st byte defining what 'type' it is.
    Code:
    struct ClassBody
    {
       byte    PacketType; // 0 Classname
                           // 1 TokenName
                           // 2 Array
       ....... depends on packet type
    };
    if you load the bin file in a hex editor the byte before the class name (for example cfgpatches or ah64) is always another one... or have i understood something wrong?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Data Structure Eror
    By prominababy in forum C Programming
    Replies: 3
    Last Post: 01-06-2009, 09:35 AM
  2. archive format
    By Nor in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 08-05-2003, 08:01 PM
  3. Making a LIB file from a DEF file for a DLL
    By JMPACS in forum C++ Programming
    Replies: 0
    Last Post: 08-02-2003, 09:19 PM
  4. Hmm....help me take a look at this: File Encryptor
    By heljy in forum C Programming
    Replies: 3
    Last Post: 03-23-2002, 10:57 AM
  5. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 02:58 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21