2020-07-01 04:55:31 +00:00
|
|
|
#ifndef _STATE_IN_HPP
|
|
|
|
#define _STATE_IN_HPP
|
|
|
|
|
2020-10-04 12:39:43 +00:00
|
|
|
#define SFVARN_BOOL(x, n) { &(x), 1, MDFNSTATE_RLSB | MDFNSTATE_BOOL, n }
|
|
|
|
#define SFVARN(x, n) { &(x), (uint32_t)sizeof(x), MDFNSTATE_RLSB, n }
|
2020-07-01 04:55:31 +00:00
|
|
|
#define SFVAR(x) SFVARN((x), #x)
|
|
|
|
|
2020-09-14 04:31:54 +00:00
|
|
|
#define SFARRAYN(x, l, n) { (x), (uint32_t)(l), 0, n }
|
2020-07-01 04:55:31 +00:00
|
|
|
#define SFARRAY(x, l) SFARRAYN((x), (l), #x)
|
|
|
|
|
2020-09-14 04:31:54 +00:00
|
|
|
#define SFARRAY16N(x, l, n) { (x), (uint32_t)((l) * sizeof(uint16_t)), MDFNSTATE_RLSB16, n }
|
2020-07-01 04:55:31 +00:00
|
|
|
#define SFARRAY16(x, l) SFARRAY16N((x), (l), #x)
|
|
|
|
|
2020-09-14 04:31:54 +00:00
|
|
|
#define SFARRAY32N(x, l, n) { (x), (uint32_t)((l) * sizeof(uint32_t)), MDFNSTATE_RLSB32, n }
|
2020-07-01 04:55:31 +00:00
|
|
|
#define SFARRAY32(x, l) SFARRAY32N((x), (l), #x)
|
|
|
|
|
2020-09-14 04:31:54 +00:00
|
|
|
#define SFARRAY64N(x, l, n) { (x), (uint32_t)((l) * sizeof(uint64_t)), MDFNSTATE_RLSB64, n }
|
2020-07-01 04:55:31 +00:00
|
|
|
#define SFARRAY64(x, l) SFARRAY64N((x), (l), #x)
|
|
|
|
|
|
|
|
#define SFEND { 0, 0, 0, 0 }
|
|
|
|
|
|
|
|
#endif
|