lib3ddevil1/include/devil1pld.h

33 lines
808 B
C
Raw Normal View History

#ifndef DEVIL1PLD_H
#define DEVIL1PLD_H
#include <stdint.h>
2018-04-07 03:12:52 +05:30
#include <stdbool.h>
#pragma pack(push, 1)
struct PldHeader {
int32_t numOffset;
// array of numOffset elements
uint32_t *offsets; // <format=hex>
};
2018-04-07 03:12:52 +05:30
#pragma pack(pop)
2018-04-18 08:12:28 +05:30
typedef struct {
// input: pointer to a struct, contents of the .pld file.
// * = pass by reference of a struct PldHeader
2018-04-19 17:49:02 +05:30
bool (* const getheader) (struct PldHeader*, const char*);
// input: pointer to header, index of offset, filesize
// * = pass by reference of a struct PldHeader
2018-04-19 17:49:02 +05:30
int (* const sizeofsector)(struct PldHeader*, unsigned int, unsigned int);
// input: a pld header struct.
// * = pass by reference of a struct PldHeader
2018-04-19 17:49:02 +05:30
void (* const printheader) (struct PldHeader*);
2018-04-19 17:49:02 +05:30
} fn_devil1pld;
extern fn_devil1pld const DEVIL1PLD;
2018-04-18 08:07:59 +05:30
#endif