Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | pmbaty | 1 | #include "matsupt.h" |
2 | #include "CORE/FW/resource.h" |
||
3 | #include "CORE/V1DB/dbsetup.h" |
||
4 | #include "harness/trace.h" |
||
5 | #include <stddef.h> |
||
6 | #include <string.h> |
||
7 | |||
8 | // IDA: br_material* __cdecl BrMaterialAllocate(char *name) |
||
9 | br_material* BrMaterialAllocate(char* name) { |
||
10 | br_material* m; |
||
11 | LOG_TRACE("(\"%s\")", name); |
||
12 | |||
13 | m = BrResAllocate(v1db.res, sizeof(br_material), BR_MEMORY_MATERIAL); |
||
14 | memcpy(m, v1db.default_material, sizeof(br_material)); |
||
15 | m->stored = NULL; |
||
16 | if (name) { |
||
17 | m->identifier = BrResStrDup(m, name); |
||
18 | } else { |
||
19 | m->identifier = NULL; |
||
20 | } |
||
21 | return m; |
||
22 | } |
||
23 | |||
24 | // IDA: void __cdecl BrMaterialFree(br_material *m) |
||
25 | void BrMaterialFree(br_material* m) { |
||
26 | LOG_TRACE("(%p)", m); |
||
27 | BrResFree(m); |
||
28 | } |