Lephisto/src/serializer.h

40 lines
859 B
C++

#pragma once
#include <vector>
#include "libs.h"
#define SAVEFILE_VERSION 1
class Frame;
namespace Serializer {
void IndexFrames(void);
Frame* LookupFrame(Frame* f);
namespace Write {
bool Game(const char* filename);
void wr_byte(unsigned char x);
void wr_short(short x);
void wr_int(int x);
void wr_float(float f);
void wr_double(double f);
void wr_cstring(const char* s);
void wr_string(std::string& s);
void wr_vector3d(vector3d& vec);
}
namespace Read {
bool Game(const char* filename);
bool is_olderthan(int version);
unsigned char rd_byte(void);
short rd_short(void);
int rd_int(void);
float rd_float(void);
double rd_double(void);
std::string rd_string(void);
char* rd_cstring(void);
void rd_cstring2(char* buf, int len);
vector3d rd_vector3d(void);
}
}