commit
2007fb7edc
200 files changed
+27710
No files matched your search
+13
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
struct Game;
|
||||
|
||||
// The whole simulation as bytes, to hand a player joining a game already running. The game state is plain data that
|
||||
// lays out the same on every platform (no pointers or heap inside the structs; see Attack and FixedList), so most of it
|
||||
// goes as it sits in memory, and the few lists as a count and their items. It starts with a layout signature (the sizes
|
||||
// of everything), so a build that lays things out differently refuses it rather than loading garbage. The menu and
|
||||
// everything else this screen alone sees isn't part of it, nor is the bots' map of the world, rebuilt on loading.
|
||||
std::string state_save(Game& game);
|
||||
bool state_load(Game& game, const std::string& bytes);
|
||||
Reference in new issue
Block a user