mirror of
https://notabug.org/scuti/lib3ddevil1
synced 2024-11-22 13:53:02 +05:30
Minor re-ordering
This commit is contained in:
parent
9bfc125158
commit
40db88d4eb
@ -13,6 +13,13 @@ struct PldHeader {
|
|||||||
|
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
bool (* const getheader) (struct PldHeader*, const char*);
|
||||||
|
int (* const sizeofsector)(struct PldHeader*, unsigned int, unsigned int);
|
||||||
|
void (* const printheader) (struct PldHeader*);
|
||||||
|
} namespace_struct;
|
||||||
|
extern namespace_struct const DEVIL1PLD;
|
||||||
|
|
||||||
// input: pointer to a struct, contents of the .pld file.
|
// input: pointer to a struct, contents of the .pld file.
|
||||||
// * = pass by reference of a struct PldHeader
|
// * = pass by reference of a struct PldHeader
|
||||||
static bool getpldh(struct PldHeader*, const char*);
|
static bool getpldh(struct PldHeader*, const char*);
|
||||||
@ -25,11 +32,5 @@ static int sizeofpldstruct(struct PldHeader*, unsigned int, unsigned int);
|
|||||||
// * = pass by reference of a struct PldHeader
|
// * = pass by reference of a struct PldHeader
|
||||||
static void printpldh(struct PldHeader*);
|
static void printpldh(struct PldHeader*);
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
bool (* const getheader) (struct PldHeader*, const char*);
|
|
||||||
int (* const sizeofsector)(struct PldHeader*, unsigned int, unsigned int);
|
|
||||||
void (* const printheader) (struct PldHeader*);
|
|
||||||
} namespace_struct;
|
|
||||||
extern namespace_struct const DEVIL1PLD;
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#include "devil1pld.h"
|
#include "devil1pld.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
namespace_struct const DEVIL1PLD = {getpldh, sizeofpldstruct, printpldh};
|
||||||
|
|
||||||
static bool getpldh(struct PldHeader *ph, const char *filedata) {
|
static bool getpldh(struct PldHeader *ph, const char *filedata) {
|
||||||
bool good = false;
|
bool good = false;
|
||||||
if (ph != NULL && filedata != NULL) {
|
if (ph != NULL && filedata != NULL) {
|
||||||
@ -40,5 +42,3 @@ static void printpldh(struct PldHeader *ph) {
|
|||||||
printf("offset %i = %x\n", i, ph -> offsets[i]);
|
printf("offset %i = %x\n", i, ph -> offsets[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace_struct const DEVIL1PLD = {getpldh, sizeofpldstruct, printpldh};
|
|
||||||
|
Loading…
Reference in New Issue
Block a user