Files
2024-06-13 23:44:19 -07:00

34 lines
616 B
C++

#ifndef EZ_SFO_H
#define EZ_SFO_H
#pragma once
#include <cstdint>
#include <string>
#include <map>
struct SfoHeader
{
uint32_t magic;
uint32_t version;
uint32_t keyofs;
uint32_t valofs;
uint32_t count;
} __attribute__((packed));
struct SfoEntry
{
uint16_t nameofs;
uint8_t alignment;
uint8_t type;
uint32_t valsize;
uint32_t totalsize;
uint32_t dataofs;
} __attribute__((packed));
namespace SFO {
const char* GetString(const char* buffer, size_t size, const char *name);
std::map<std::string, std::string> GetParams(const char* buffer, size_t size);
}
#endif