Save MACS rifle data in snapshot, increase snapshot version
This commit is contained in:
parent
6f47239fae
commit
3af67e1e68
@ -3686,7 +3686,7 @@ void S9xControlPreSaveState (struct SControlSnapshot *s)
|
||||
COPY(macsrifle.y);
|
||||
COPY(macsrifle.buttons);
|
||||
|
||||
assert(i == sizeof(s->internal));
|
||||
assert(i == sizeof(s->internal) + sizeof(s->internal_macs));
|
||||
|
||||
#undef COPY
|
||||
|
||||
@ -3757,13 +3757,15 @@ void S9xControlPostLoadState (struct SControlSnapshot *s)
|
||||
for (int k = 0; k < 2; k++)
|
||||
COPY(mp5[j].pads[k]);
|
||||
|
||||
assert(i == sizeof(s->internal));
|
||||
|
||||
if (s->ver > 3)
|
||||
{
|
||||
COPY(macsrifle.x);
|
||||
COPY(macsrifle.y);
|
||||
COPY(macsrifle.buttons);
|
||||
|
||||
assert(i == sizeof(s->internal));
|
||||
assert(i == sizeof(s->internal) + sizeof(s->internal_macs));
|
||||
}
|
||||
|
||||
#undef COPY
|
||||
|
@ -467,7 +467,8 @@ struct SControlSnapshot
|
||||
uint8 justifier_select;
|
||||
uint8 dummy3[8];
|
||||
bool8 pad_read, pad_read_last;
|
||||
uint8 internal[65]; // yes, we need to save this!
|
||||
uint8 internal[60]; // yes, we need to save this!
|
||||
uint8 internal_macs[5];
|
||||
};
|
||||
|
||||
void S9xControlPreSaveState (struct SControlSnapshot *s);
|
||||
|
@ -573,7 +573,8 @@ static FreezeData SnapControls[] =
|
||||
ARRAY_ENTRY(6, dummy3, 8, uint8_ARRAY_V),
|
||||
INT_ENTRY(6, pad_read),
|
||||
INT_ENTRY(6, pad_read_last),
|
||||
ARRAY_ENTRY(6, internal, 60, uint8_ARRAY_V)
|
||||
ARRAY_ENTRY(6, internal, 60, uint8_ARRAY_V),
|
||||
ARRAY_ENTRY(10, internal_macs, 5, uint8_ARRAY_V)
|
||||
};
|
||||
|
||||
#undef STRUCT
|
||||
|
@ -198,7 +198,7 @@
|
||||
#define SNAPSHOT_MAGIC "#!s9xsnp"
|
||||
#define SNAPSHOT_VERSION_IRQ 7
|
||||
#define SNAPSHOT_VERSION_BAPU 8
|
||||
#define SNAPSHOT_VERSION 9
|
||||
#define SNAPSHOT_VERSION 10
|
||||
|
||||
#define SUCCESS 1
|
||||
#define WRONG_FORMAT (-1)
|
||||
|
Loading…
Reference in New Issue
Block a user