Mercurial > hg > dmlib
annotate src/dmresw.h @ 1583:fd0d1b4efc83
Cleanup.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 14 May 2018 00:09:36 +0300 |
parents | 9f06f6661cdf |
children | 0cac3360a0aa |
rev | line source |
---|---|
59
c560703e85ed
Add resource writing functions (only work for stdio backend)
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
1 /* |
c560703e85ed
Add resource writing functions (only work for stdio backend)
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
2 * DMLib |
c560703e85ed
Add resource writing functions (only work for stdio backend)
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
3 * -- Resource management write helpers |
c560703e85ed
Add resource writing functions (only work for stdio backend)
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
4 * Programmed and designed by Matti 'ccr' Hamalainen |
863 | 5 * (C) Copyright 2011-2015 Tecnic Software productions (TNSP) |
59
c560703e85ed
Add resource writing functions (only work for stdio backend)
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
6 */ |
c560703e85ed
Add resource writing functions (only work for stdio backend)
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
7 #ifndef DMRESW_H |
c560703e85ed
Add resource writing functions (only work for stdio backend)
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
8 #define DMRESW_H |
c560703e85ed
Add resource writing functions (only work for stdio backend)
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
9 |
c560703e85ed
Add resource writing functions (only work for stdio backend)
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
10 #include "dmres.h" |
c560703e85ed
Add resource writing functions (only work for stdio backend)
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
11 |
c560703e85ed
Add resource writing functions (only work for stdio backend)
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
12 #ifdef __cplusplus |
c560703e85ed
Add resource writing functions (only work for stdio backend)
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
13 extern "C" { |
c560703e85ed
Add resource writing functions (only work for stdio backend)
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
14 #endif |
c560703e85ed
Add resource writing functions (only work for stdio backend)
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
15 |
1088
9f06f6661cdf
Cleanups for file endianess read/write helper functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
872
diff
changeset
|
16 int dmf_write_str(DMResource *, const void *, const size_t); |
437
3d9c044ec08d
Add dmf_{write,read}_byte() convenience functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
17 BOOL dmf_write_byte(DMResource *, const Uint8); |
3d9c044ec08d
Add dmf_{write,read}_byte() convenience functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
18 |
1088
9f06f6661cdf
Cleanups for file endianess read/write helper functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
872
diff
changeset
|
19 #define DM_DEFINE_FFUNC(xname, xtype, z) \ |
9f06f6661cdf
Cleanups for file endianess read/write helper functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
872
diff
changeset
|
20 BOOL dmf_write_ ## xname (DMResource *fh, const xtype v); |
872
b01d04e44b6f
Assume we always have 64bit type.
Matti Hamalainen <ccr@tnsp.org>
parents:
863
diff
changeset
|
21 |
1088
9f06f6661cdf
Cleanups for file endianess read/write helper functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
872
diff
changeset
|
22 #include "dmfiletmpl.h" |
59
c560703e85ed
Add resource writing functions (only work for stdio backend)
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
23 |
1088
9f06f6661cdf
Cleanups for file endianess read/write helper functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
872
diff
changeset
|
24 #undef DM_DEFINE_FFUNC |
59
c560703e85ed
Add resource writing functions (only work for stdio backend)
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
25 |
c560703e85ed
Add resource writing functions (only work for stdio backend)
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
26 #ifdef __cplusplus |
c560703e85ed
Add resource writing functions (only work for stdio backend)
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
27 } |
c560703e85ed
Add resource writing functions (only work for stdio backend)
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
28 #endif |
c560703e85ed
Add resource writing functions (only work for stdio backend)
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
29 |
c560703e85ed
Add resource writing functions (only work for stdio backend)
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
30 #endif // DMRESW_H |