mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
Debug+retail matches and clean up some fakematches (#2910)
* Debug matches * Match daAlink_c::procGrassWhistleWait * Match JASAramStream::channelProc * More debug matches * Match JAUStreamStaticAramMgr_::deleteStreamAram and bitset inlines * Fix some fakematches * Fix gameinfo player info not being a struct * Update bug comments * Fix procids in alink * d_a_scene_exit OK
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define J2DMATBLOCK_H
|
||||
|
||||
#include "JSystem/J2DGraph/J2DTevs.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "JSystem/JUtility/TColor.h"
|
||||
|
||||
class JUTFont;
|
||||
@@ -117,6 +118,7 @@ public:
|
||||
}
|
||||
virtual J2DTevOrder* getTevOrder(u32 index) { return &mTevOrder[index]; }
|
||||
virtual void setTevColor(u32 index, J2DGXColorS10 color) {
|
||||
J3D_PANIC(250, index < 4, "Error : range over.");
|
||||
mTevColor[index] = color;
|
||||
}
|
||||
virtual J2DGXColorS10* getTevColor(u32 index) { return &mTevColor[index]; }
|
||||
@@ -212,6 +214,7 @@ public:
|
||||
}
|
||||
virtual J2DTevOrder* getTevOrder(u32 index) { return &mTevOrder[index]; }
|
||||
virtual void setTevColor(u32 index, J2DGXColorS10 color) {
|
||||
J3D_PANIC(360, index < 4, "Error : range over.");
|
||||
mTevColor[index] = color;
|
||||
}
|
||||
virtual J2DGXColorS10* getTevColor(u32 index) { return &mTevColor[index]; }
|
||||
@@ -309,6 +312,7 @@ public:
|
||||
}
|
||||
virtual J2DTevOrder* getTevOrder(u32 index) { return &mTevOrder[index]; }
|
||||
virtual void setTevColor(u32 index, J2DGXColorS10 color) {
|
||||
J3D_PANIC(468, index < 4, "Error : range over.");
|
||||
mTevColor[index] = color;
|
||||
}
|
||||
virtual J2DGXColorS10* getTevColor(u32 index) { return &mTevColor[index]; }
|
||||
@@ -406,6 +410,7 @@ public:
|
||||
}
|
||||
virtual J2DTevOrder* getTevOrder(u32 index) { return &mTevOrder[index]; }
|
||||
virtual void setTevColor(u32 index, J2DGXColorS10 color) {
|
||||
J3D_PANIC(579, index < 4, "Error : range over.");
|
||||
mTevColor[index] = color;
|
||||
}
|
||||
virtual J2DGXColorS10* getTevColor(u32 index) { return &mTevColor[index]; }
|
||||
@@ -504,6 +509,7 @@ public:
|
||||
}
|
||||
virtual J2DTevOrder* getTevOrder(u32 index) { return &mTevOrder[index]; }
|
||||
virtual void setTevColor(u32 index, J2DGXColorS10 color) {
|
||||
J3D_PANIC(691, index < 4, "Error : range over.");
|
||||
mTevColor[index] = color;
|
||||
}
|
||||
virtual J2DGXColorS10* getTevColor(u32 index) { return &mTevColor[index]; }
|
||||
|
||||
@@ -11,8 +11,6 @@ namespace JASDsp {
|
||||
class TChannel;
|
||||
}
|
||||
|
||||
#define CHANNEL_MAX 6
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jaudio
|
||||
*
|
||||
@@ -130,6 +128,8 @@ public:
|
||||
|
||||
static u32 getBlockSize() { return sBlockSize; }
|
||||
|
||||
static const int CHANNEL_MAX = 6;
|
||||
|
||||
/* 0x000 */ OSMessageQueue field_0x000;
|
||||
/* 0x020 */ OSMessageQueue field_0x020;
|
||||
/* 0x040 */ void* field_0x040[16];
|
||||
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
|
||||
void* getBase() { return mBase; }
|
||||
bool isAllocated() { return mBase; }
|
||||
u32 getSize() { return mSize; }
|
||||
u32 getSize() const { return mSize; }
|
||||
|
||||
/* 0x00 */ JSUTree<JASHeap> mTree;
|
||||
/* 0x1C */ OSMutex mMutex;
|
||||
|
||||
@@ -59,7 +59,6 @@ public:
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
// NONMATCHING regalloc
|
||||
virtual bool deleteStreamAram(u32 param_0) {
|
||||
for (u32 i = 0; i < field_0x4c; i++) {
|
||||
if (!this->field_0x4.test(i)) {
|
||||
@@ -80,7 +79,7 @@ public:
|
||||
if (!heap) {
|
||||
heap = JASKernel::getAramHeap();
|
||||
}
|
||||
if (numReserve < 1) {
|
||||
if (numReserve <= 0) {
|
||||
numReserve = 1;
|
||||
}
|
||||
JUT_ASSERT(83, numReserve <= MAX_CHUNKS);
|
||||
|
||||
@@ -268,19 +268,15 @@ struct TVec3<f32> : public Vec {
|
||||
return inv_norm * sq;
|
||||
}
|
||||
|
||||
void normalize(const TVec3<f32>& other) {
|
||||
f32 normalize(const TVec3<f32>& other) {
|
||||
f32 sq = other.squared();
|
||||
if (sq <= TUtil<f32>::epsilon()) {
|
||||
zero();
|
||||
return;
|
||||
}
|
||||
f32 norm;
|
||||
if (sq <= 0.0f) {
|
||||
norm = sq;
|
||||
} else {
|
||||
norm = fsqrt_step(sq);
|
||||
return 0.0f;
|
||||
}
|
||||
f32 norm = TUtil<f32>::inv_sqrt(sq);
|
||||
scale(norm, other);
|
||||
return norm * sq;
|
||||
}
|
||||
|
||||
f32 length() const {
|
||||
@@ -411,12 +407,12 @@ struct TVec2 {
|
||||
TVec2(T v) { set(v); }
|
||||
|
||||
template <typename U>
|
||||
TVec2(U x, U y) { set(x, y); }
|
||||
TVec2(const U x, const U y) { set(x, y); }
|
||||
|
||||
void set(T v) { y = x = v; }
|
||||
|
||||
template <typename U>
|
||||
void set(U x, U y) {
|
||||
void set(const U x, const U y) {
|
||||
this->x = x;
|
||||
this->y = y;
|
||||
}
|
||||
@@ -518,7 +514,7 @@ struct TBox2 : public TBox<TVec2<T> > {
|
||||
}
|
||||
}
|
||||
|
||||
void set(const TBox2& other) { set(other.i, other.f); }
|
||||
void set(const TBox<TVec2<T> >& other) { set(other.i, other.f); }
|
||||
void set(const TVec2<f32>& i, const TVec2<f32>& f) { this->i.set(i), this->f.set(f); }
|
||||
void set(f32 x0, f32 y0, f32 x1, f32 y1) { this->i.set(x0, y0); this->f.set(x1, y1); }
|
||||
};
|
||||
|
||||
@@ -85,7 +85,7 @@ inline u8* JKRAramToMainRam(u32 p1, u8* p2, u32 p3, JKRExpandSwitch p4, u32 p5,
|
||||
return JKRAram::aramToMainRam(p1, p2, p3, p4, p5, p6, p7, p8);
|
||||
}
|
||||
|
||||
inline JKRAramBlock *JKRMainRamToAram(u8 *buf, u32 bufSize, u32 alignedSize, JKRExpandSwitch expandSwitch, u32 fileSize, JKRHeap *heap, int id, u32 *pSize) {
|
||||
inline JKRAramBlock* JKRMainRamToAram(u8 *buf, u32 bufSize, u32 alignedSize, JKRExpandSwitch expandSwitch, u32 fileSize, JKRHeap *heap, int id, u32 *pSize) {
|
||||
return JKRAram::mainRamToAram(buf, bufSize, alignedSize, expandSwitch, fileSize, heap, id, pSize);
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,10 @@ inline u8 JSUHiByte(u16 in) {
|
||||
return in >> 8;
|
||||
}
|
||||
|
||||
inline u16 JSUHiHalf(u32 in) {
|
||||
return (in >> 16);
|
||||
}
|
||||
|
||||
inline u16 JSULoHalf(u32 param_0) {return param_0; }
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user