- Add Hashes struct for known save file offsets - Add Float union for type conversion - Implement placeholder functions for: * Reading u32/float from addresses * Writing float to addresses * Save file writing - Add player position hash constant
28 lines
No EOL
434 B
C
28 lines
No EOL
434 B
C
#ifndef SAVE_H
|
|
#define SAVE_H
|
|
|
|
#include <stdlib.h>
|
|
|
|
typedef struct
|
|
{
|
|
size_t length;
|
|
char * saveFile;
|
|
} gameDataSav;
|
|
|
|
typedef struct {
|
|
u32 PLAYER_POSITION;
|
|
} Hashes;
|
|
|
|
typedef union Float {
|
|
float m_float;
|
|
u8 m_bytes[sizeof(float)];
|
|
} Float;
|
|
|
|
u32 readU32FromAddr(u32 addr);
|
|
float readF32FromAddr(u32 addr);
|
|
void writeF32ToAddr(u32 addr, float value);
|
|
void processSave();
|
|
void openSave();
|
|
void writeSave();
|
|
|
|
#endif |