Various Matches, J2DTextBoxEx and J2DTevs OK (#2025)

* Work on src/d/bg

* misc work

* J2dTextBoxEx OK

* J2DTevs OK

* Better return values for bool
This commit is contained in:
hatal175
2024-01-08 12:10:05 +02:00
committed by GitHub
parent dea6243c35
commit a8a159ae2c
31 changed files with 328 additions and 1386 deletions
+9 -3
View File
@@ -32,10 +32,10 @@ public:
void setCode(sBgPc&);
u32 getHorseNoEntry() const { return m_code.code0 >> 0x15 & 1; }
u32 getSpl() const { return m_code.code0 >> 0x18 & 0xF; }
s32 getSpl() const { return m_code.code0 >> 0x18 & 0xF; }
u32 getMagnet() const { return m_code.code0 >> 0x1C & 0x3; }
u32 getMonkeyBars() const { return m_code.code0 >> 0x1F; }
u32 getWallCode() const { return m_code.code1 >> 0x8 & 0xF; }
s32 getWallCode() const { return m_code.code1 >> 0x8 & 0xF; }
u32 getAtt0Code() const { return m_code.code1 >> 0xC & 0xF; }
u32 getAtt1Code() const { return m_code.code1 >> 0x10 & 0x7; }
u32 getGroundCode() const { return m_code.code1 >> 0x13 & 0x1F; }
@@ -61,8 +61,14 @@ public:
u8 getRoomPathPnt() const { return m_code.code2 >> 0x18; }
u8 getRoomInf() const { return m_code.code4; }
u8 getSnd() const { return m_code.code4 >> 0xB; }
u32 maskNrm() { return m_code.code4 & 0x100; }
// BUG: Seems like this uses the same mask as maskNrm
u32 getWtr() { return m_code.code4 & 0x100; }
u32 getObjThrough() { return m_code.code0 & 0x4000; }
u32 getCamThrough() { return m_code.code0 & 0x8000; }
u32 getLinkThrough() { return m_code.code0 & 0x10000; }
private:
/* 0x0 */ sBgPc m_code;
};
+4 -5
View File
@@ -2,8 +2,7 @@
#define D_BG_D_BG_PLC_H
#include "dolphin/types.h"
struct sBgPc;
#include "d/bg/d_bg_pc.h"
enum {
/* 0x14 */ ZELDA_CODE_SIZE = 0x14
@@ -13,7 +12,7 @@ struct PLC {
/* 0x0 */ u32 magic;
/* 0x4 */ u16 m_code_size;
/* 0x6 */ u16 m_num;
/* 0x8 */ sBgPc* field_0x8;
/* 0x8 */ sBgPc field_0x8[0];
};
class dBgPlc {
@@ -21,11 +20,11 @@ public:
/* 80074074 */ dBgPlc();
/* 80074080 */ ~dBgPlc();
/* 800740BC */ void setBase(void*);
/* 800740C4 */ void getCode(int, sBgPc**) const;
/* 800740C4 */ sBgPc* getCode(int, sBgPc**) const;
/* 800740DC */ u32 getGrpCode(int) const;
private:
/* 0x00 */ void* m_base;
/* 0x00 */ PLC* m_base;
};
#endif /* D_BG_D_BG_PLC_H */
+1 -1
View File
@@ -11,7 +11,7 @@ struct dBgPc;
struct dBgS_CaptPoly;
struct KC_PrismData {
/* 0x0 */ u16 field_0x0[2];
/* 0x0 */ f32 field_0x0;
/* 0x4 */ u16 field_0x4;
/* 0x6 */ u16 field_0x6;
/* 0x8 */ u16 field_0x8;