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