mirror of
https://github.com/pret/pokeplatinum.git
synced 2026-05-09 04:11:55 -05:00
This synchonizes the terminology used in BDHC-related code with the new terminology specified in the Markdown BDHC and file format spec documents. In particular: - rename `xSize` to `xCount` for the various fields of the BDHC file header - rename the strip's `lowerBound` to `scanline` - rename the plate's `height` to `constant` - rename the plate's `slope` to `normal` - rename the point's `y` to `z` Signed-off-by: Kuruyia <github@kuruyia.net>
51 lines
1.2 KiB
C
51 lines
1.2 KiB
C
#ifndef POKEPLATINUM_OV5_BDHC_H
|
|
#define POKEPLATINUM_OV5_BDHC_H
|
|
|
|
#include <nitro/fx/fx.h>
|
|
#include <nitro/types.h>
|
|
|
|
#include "narc.h"
|
|
#include "sys_task_manager.h"
|
|
|
|
typedef struct BDHCPlate {
|
|
u16 firstPointIndex;
|
|
u16 secondPointIndex;
|
|
u16 normalIndex;
|
|
u16 constantIndex;
|
|
} BDHCPlate;
|
|
|
|
typedef struct BDHCPoint {
|
|
fx32 x;
|
|
fx32 z;
|
|
} BDHCPoint;
|
|
|
|
typedef struct BDHCStrip {
|
|
fx32 scanline;
|
|
u16 accessListElementCount;
|
|
u16 accessListStartIndex;
|
|
} BDHCStrip;
|
|
|
|
typedef struct BDHC {
|
|
BDHCPlate *plates;
|
|
fx32 *constants;
|
|
BDHCStrip *strips;
|
|
u16 *accessList;
|
|
BDHCPoint *points;
|
|
VecFx32 *normals;
|
|
BOOL loaded;
|
|
int stripsCount;
|
|
} BDHC;
|
|
|
|
BOOL CalculateObjectHeight(const fx32 objectHeight, const fx32 objectX, const fx32 objectZ, const BDHC *bdhc, fx32 *newObjectHeight);
|
|
|
|
void BDHC_Load(NARC *narc, const int bdhcSize, BDHC *bdhc, u8 *buffer);
|
|
SysTask *BDHC_LazyLoad(NARC *landDataNARC, const int unused1, BDHC *bdhc, int *param3, u8 **buffer, int *param5);
|
|
void BDHC_KillLoad(SysTask *sysTask);
|
|
void BDHC_MarkNotLoaded(BDHC *bdhc);
|
|
|
|
BDHC *BDHC_New(void);
|
|
void BDHC_Free(BDHC *bdhc);
|
|
void BDHC_Reset(BDHC *bdhc);
|
|
|
|
#endif // POKEPLATINUM_OV5_BDHC_H
|