Skip to content

Instantly share code, notes, and snippets.

@x1nixmzeng
Created January 30, 2016 17:05

Revisions

  1. x1nixmzeng created this gist Jan 30, 2016.
    52 changes: 52 additions & 0 deletions gmd_texts.bt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,52 @@
    //--------------------------------------
    //--- 010 Editor v5.0 Binary Template
    //
    // File: pause_history_eng.2A2BB29A
    // Author: wrs
    // Revision: 1
    // Purpose: GMD texts
    //--------------------------------------

    char magic[4]; // "GMD\0"
    uint un;
    uint unknown_1;
    uint unknown_0a;
    uint unknown_0b;

    uint count_textkeys;
    uint count_textval;

    uint sizeof_textkeys;
    uint sizeof_textval;

    uint len;
    char name[len + (4 - (len % 4))]; // pad to 4

    struct data
    {
    uint pid;
    int pstr; // may be -1
    };

    data lookup_tb[count_textkeys];

    struct text {
    string val;
    };

    struct
    {
    text keys[count_textkeys] <optimize=false>;
    } TextKeys;

    struct
    {
    text values[count_textval] <optimize=false>;
    } TextVal;

    local int i;

    for( i = 0; i < count_textkeys; ++i )
    {
    Printf("%s == %s\n", TextKeys.keys[i].val, TextVal.values[lookup_tb[i].pid].val);
    }