]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'TimePath/structs' into 'master'
authorTimePath <andrew.hardaker1995@gmail.com>
Thu, 27 Aug 2015 07:28:28 +0000 (07:28 +0000)
committerTimePath <andrew.hardaker1995@gmail.com>
Thu, 27 Aug 2015 07:28:28 +0000 (07:28 +0000)
Struct support

Example:

```c
#define STRUCT_PAIR(_, my) \
    _(my, first, float, ) \
    _(my, second, float, END) // END is required
STRUCT(PAIR, STRUCT_PAIR)

STRUCT_DECLARE(last, STRUCT_PAIR) // no semicolon because gmqcc won't allow it

void test(STRUCT_PARAM(in, STRUCT_PAIR)) {
    STRUCT_DECLARE(local, STRUCT_PAIR);
    local_first = in_second;
    local_second = in_first;
    STRUCT_STORE(local, last, STRUCT_PAIR); // local goes to last
    next(STRUCT_PASS(local, STRUCT_PAIR));
}
```

See merge request !183


Trivial merge