mirror of
https://github.com/p2r3/bareiron.git
synced 2025-10-01 23:25:09 +02:00
implement syncing world to file on disk
This commit is contained in:
21
include/serialize.h
Normal file
21
include/serialize.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef SERIALIZE_H
|
||||
#define SERIALIZE_H
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "globals.h"
|
||||
|
||||
#if defined(SYNC_WORLD_TO_DISK) && !defined(ESP_PLATFORM)
|
||||
int initSerializer ();
|
||||
void writeBlockChangesToDisk (int from, int to);
|
||||
void writeChestChangesToDisk (uint8_t *storage_ptr, uint8_t slot);
|
||||
void writePlayerDataToDisk ();
|
||||
#else
|
||||
// Define no-op placeholders for when disk syncing isn't enabled
|
||||
#define writeBlockChangesToDisk(a, b)
|
||||
#define writeChestChangesToDisk(a, b)
|
||||
#define writePlayerDataToDisk()
|
||||
#define initSerializer() 0
|
||||
#endif
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user