mirror of
https://github.com/zeldaret/ss
synced 2026-06-02 02:00:06 -04:00
b5aa43ff37
* Initial Commit - Starting to translate from TP * Collision Updates * Actor Collision -> dBgW (DZB Collision) * bg .text splits complete * fix errors * file organization * missed files * progress * weee * most of cM3dG * Revert mAng change * Progress * Progress -> Need to update from main * Fixup Merge * d_bg_s symbols.... * TList Changes * oops * d_bg_s large progress * d_bg_s_acch majority done * d_bg_s_chk OK * d_bg_s_gnd_chk OK * d_bg_s_grp_pass_chk OK * d_bg_lin_chk OK * d_bg_s_poly_pass_chk OK * d_bg_s_roof_chk and d_bg_s_sph_chk OK * d_bg_s_spl_grp_chk OK * d_bg_s_wtr_chk OK * d_bg_w started * d_bg_w_base OK * name d_bg_w_kcol symbols * d_bg_w_sv split/started * most of d_bg_w_time * stopping d_bg_w_kcol for now * d_bg_w_sv OK * work on d_bg_w_time * revert TList to take offset arg * fixup some compiler warnings * set c_bg_w OK * Update rel_sieve.py * Remove TList Macros * Bomb Header started
63 lines
1010 B
C++
63 lines
1010 B
C++
#ifndef C_BG_W_H
|
|
#define C_BG_W_H
|
|
|
|
#include "common.h"
|
|
|
|
enum {
|
|
BG_ID_MAX = 600
|
|
};
|
|
|
|
class cBgW_BgId {
|
|
private:
|
|
/* 0x0 */ s16 m_id;
|
|
/* 0x4 vtable */
|
|
|
|
public:
|
|
cBgW_BgId();
|
|
void Ct() {
|
|
m_id = BG_ID_MAX;
|
|
};
|
|
|
|
void Regist(int);
|
|
void Release();
|
|
bool ChkUsed() const;
|
|
|
|
virtual ~cBgW_BgId();
|
|
|
|
s16 GetId() const {
|
|
return m_id;
|
|
}
|
|
};
|
|
|
|
// Defines are required for these checks to not inline some float comp bool things
|
|
#if 1
|
|
|
|
#define cBgW_CheckBGround(f) (f > 0.5f)
|
|
#define cBgW_CheckBRoof(f) (f < (-4.0f / 5.0f))
|
|
|
|
inline bool cBgW_CheckBWall(f32 a1) {
|
|
if (!cBgW_CheckBGround(a1) && !cBgW_CheckBRoof(a1)) {
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
#else
|
|
inline bool cBgW_CheckBGround(f32 f) {
|
|
return f > 0.5f;
|
|
}
|
|
inline bool cBgW_CheckBRoof(f32 a1) {
|
|
return a1 <= (-4.0f / 5.0f);
|
|
}
|
|
inline bool cBgW_CheckBWall(f32 a1) {
|
|
if (!cBgW_CheckBGround(a1) && !cBgW_CheckBRoof(a1)) {
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
#endif
|
|
|
|
#endif
|