2021-03-28 22:49:05 +02:00
|
|
|
#ifndef M_DO_M_DO_LIB_H
|
|
|
|
|
#define M_DO_M_DO_LIB_H
|
|
|
|
|
|
2021-06-02 14:13:31 +02:00
|
|
|
#include "JSystem/J3DU/J3DUClipper.h"
|
2021-03-28 22:49:05 +02:00
|
|
|
#include "dolphin/types.h"
|
2022-08-30 14:22:17 -07:00
|
|
|
#include "JSystem/JUtility/JUTTexture.h"
|
2021-03-28 22:49:05 +02:00
|
|
|
|
2021-06-02 14:13:31 +02:00
|
|
|
struct mDoLib_clipper {
|
|
|
|
|
/* 8001528C */ void setup(f32, f32, f32, f32);
|
|
|
|
|
|
2023-01-03 17:43:38 -08:00
|
|
|
static void changeFar(f32 far) {
|
|
|
|
|
mClipper.setFar(far);
|
|
|
|
|
mClipper.calcViewFrustum();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static u32 clip(const Mtx m, const Vec* param_1, const Vec* param_2) {
|
|
|
|
|
return mClipper.clip(m, (Vec*)param_1, (Vec*)param_2);
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-05 16:17:19 -07:00
|
|
|
static u32 clip(const Mtx m, Vec param_1, f32 param_2) {
|
|
|
|
|
return mClipper.clip(m, param_1, param_2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static f32 getFar() { return mSystemFar; }
|
|
|
|
|
|
|
|
|
|
static void resetFar() {
|
|
|
|
|
mClipper.setFar(mSystemFar);
|
|
|
|
|
mClipper.calcViewFrustum();
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-02 14:13:31 +02:00
|
|
|
static J3DUClipper mClipper;
|
|
|
|
|
static f32 mSystemFar;
|
|
|
|
|
static f32 mFovyRate;
|
|
|
|
|
};
|
|
|
|
|
|
2023-02-10 23:02:39 -07:00
|
|
|
void mDoLib_project(Vec* src, Vec* dst);
|
|
|
|
|
u8 mDoLib_setResTimgObj(ResTIMG const* res, GXTexObj* o_texObj, u32 tlut_name,
|
2022-08-30 14:22:17 -07:00
|
|
|
GXTlutObj* o_tlutObj);
|
2023-02-10 23:02:39 -07:00
|
|
|
void mDoLib_pos2camera(Vec* src, Vec* dst);
|
2022-02-24 14:04:56 -08:00
|
|
|
|
2021-03-28 22:49:05 +02:00
|
|
|
#endif /* M_DO_M_DO_LIB_H */
|