Link dowsing_target, eggException, d_lyt_meter_drink (#128)

* Link dowsing_target, eggException

* d_lyt_meter_drink OK (thanks Zeldex!)

* More sensible DowsingTarget flag code

* Attempt explaining TList inline
This commit is contained in:
robojumper
2025-03-14 03:13:15 +01:00
committed by GitHub
parent 01b964c831
commit 32cbf96184
8 changed files with 53 additions and 43 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ public:
static u32 getTickPerVRetrace();
static const GXRenderModeObj *getStandardRenderModeObj(const RenderModeObjSet *);
GXRenderModeObj *getCurrentOrFallbackRenderModeObj() const {
const GXRenderModeObj *getCurrentOrFallbackRenderModeObj() const {
if (pRenderMode == nullptr) {
return &lbl_8055FC64;
}
+1 -1
View File
@@ -21,7 +21,7 @@ public:
static Exception *sException;
volatile static nw4r::db::ConsoleHandle sConsoleHandle;
static nw4r::db::ConsoleHandle sConsoleHandle;
static void *sMapFileWorks;
static u32 sMapFileNumMax;
static u32 sCurrentMapFileNum;
+1 -1
View File
@@ -27,7 +27,7 @@ struct BitGXNums {
template <typename T>
inline bool TestBit(T bits, int index) {
T mask = 1 << index;
return bits & mask;
return (bits & mask) != 0;
}
template <typename T>
inline void SetBit(T *bits, int pos, bool val) {
+15
View File
@@ -78,6 +78,21 @@ public:
}
}
/**
* Returns an iterator representing the position of pT in this
* list. If pT is not in the list, the result is the end iterator.
*
* This is typically used to check if an object is contained in a
* list of this type.
*/
Iterator GetPosition(T *pT) {
if (pT->mLink.mpNext == nullptr || pT->mLink.mpPrev == nullptr) {
return GetEndIter();
} else {
return Iterator(pT);
}
}
Iterator GetEndIter() {
return Iterator(GetPtrFromNode(&mStartEnd));
}