Misc Matches using debug (#2388)

This commit is contained in:
hatal175
2025-04-12 00:54:08 +03:00
committed by GitHub
parent 04a3af66ec
commit 912bec802f
21 changed files with 248 additions and 367 deletions
+1 -1
View File
@@ -144,7 +144,7 @@ public:
MtxP getGlbMtx() { return mGlobalMtx; }
JGeometry::TBox2<f32>& getGlbBounds() { return mGlobalBounds; }
const JGeometry::TBox2<f32>& getGlbBounds() const { return mGlobalBounds; }
void setMtx(Mtx m) { MTXCopy(m, mPositionMtx); }
+1 -2
View File
@@ -93,7 +93,7 @@ struct TValueIterator {
const void* get() const { return mBegin; }
typename Parser::ParseType operator*() const {
return *(typename Parser::ParseType*)get();
return Parser::parse(get());
}
TValueIterator& operator++() {
@@ -127,7 +127,6 @@ struct TParseValue_misaligned : TParseValue_raw_<T> {
template<typename T>
struct TValueIterator_misaligned : public TValueIterator<TParseValue_misaligned<T>, sizeof(T)> {
TValueIterator_misaligned(const TValueIterator_misaligned<T>& other) : TValueIterator<TParseValue_misaligned<T>, sizeof(T)>(other) {}
TValueIterator_misaligned(const void* begin) : TValueIterator<TParseValue_misaligned<T>, sizeof(T)>(begin) {}
};
+2 -1
View File
@@ -7,6 +7,7 @@ template<class T>
class TPointer {
public:
TPointer(T* ptr) : mPtr(ptr) {}
~TPointer() {}
void set(T* ptr) { mPtr = ptr; }
T* mPtr;
};
@@ -22,4 +23,4 @@ public:
}
#endif
#endif
+1 -1
View File
@@ -12,7 +12,7 @@ void JMAVECScaleAdd(register const Vec* vec1, register const Vec* vec2, register
register f32 scale);
inline int JMAAbs(int value) {
return value > 0 ? value : -value;
return __abs(value);
}
inline f32 JMAFastReciprocal(f32 value) {
+11 -4
View File
@@ -20,10 +20,6 @@ struct TRandom_fast_ {
u32 get_bit32(void) { return this->get(); }
u8 get_uint8(u8 param_0) {
return get_ufloat_1() * param_0;
}
// due to the float constant, having this function inlined adds that float to data,
// making it not match
float get_ufloat_1(void) {
@@ -39,6 +35,17 @@ struct TRandom_fast_ {
void setSeed(u32 seed) { value = seed; }
};
template <class RandomT>
class TRandom_ : public RandomT {
public:
TRandom_(u32 value) : RandomT(value) {}
u8 get_uint8(u8 param_0) {
return get_ufloat_1() * param_0;
}
};
} // namespace JMath
#endif /* RANDOM_H */
+4
View File
@@ -17,6 +17,9 @@
#define JUT_WARN(LINE, ...) \
JUTAssertion::setWarningMessage_f(JUTAssertion::getSDevice(), __FILE__, LINE, __VA_ARGS__); \
#define JUT_WARN_1(LINE, ...) \
JUTAssertion::setWarningMessage_f(1, __FILE__, LINE, __VA_ARGS__); \
#define JUT_LOG(LINE, ...) \
JUTAssertion::setLogMessage_f(JUTAssertion::getSDevice(), __FILE__, LINE, __VA_ARGS__)
@@ -28,6 +31,7 @@
#define JUT_ASSERT_MSG(...) (void)0;
#define JUT_PANIC(...)
#define JUT_WARN(...)
#define JUT_WARN_1(...)
#define JUT_LOG(...)
#define JUT_CONFIRM(...)
#endif