Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matched a couple JSystem TUs #218

Merged
merged 2 commits into from
Sep 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@
Object(Matching, "JSystem/J2D/J2DPerspGraph.cpp"),
Object(Matching, "JSystem/J2D/J2DGrafContext.cpp"),
Object(Matching, "JSystem/J2D/J2DPane.cpp"),
Object(NonMatching, "JSystem/J2D/J2DPicture.cpp"),
Object(Matching, "JSystem/J2D/J2DPicture.cpp"),
Object(Matching, "JSystem/J2D/J2DPrint.cpp"),
Object(NonMatching, "JSystem/J2D/J2DScreen.cpp"),
Object(Matching, "JSystem/J2D/J2DTextBox.cpp"),
Expand Down Expand Up @@ -555,7 +555,7 @@
Object(Matching, "JSystem/JAudio/JAS/JASPlayer_impl.cpp"),
Object(Matching, "JSystem/JAudio/JAS/JASRegisterParam.cpp"),
Object(Matching, "JSystem/JAudio/JAS/JASSeqCtrl.cpp"),
Object(NonMatching, "JSystem/JAudio/JAS/JASSeqParser.cpp"),
Object(Matching, "JSystem/JAudio/JAS/JASSeqParser.cpp"),
Object(NonMatching, "JSystem/JAudio/JAS/JASTrack.cpp"),
Object(Matching, "JSystem/JAudio/JAS/JASTrackInterrupt.cpp"),
Object(Matching, "JSystem/JAudio/JAS/JASOscillator.cpp"),
Expand Down
8 changes: 4 additions & 4 deletions include/JSystem/J2D/J2DPicture.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// Size: 0x168
struct J2DPicture : public J2DPane {
struct TCornerColor {
TCornerColor() { }
TCornerColor() {}

TCornerColor(u32 col1, u32 col2, u32 col3, u32 col4)
{
Expand Down Expand Up @@ -43,9 +43,6 @@ struct J2DPicture : public J2DPane {
virtual u16 getTypeID() const { return PANETYPE_Picture; }; // _0C (weak)
virtual void drawSelf(f32 x, f32 y); // _34
virtual void drawSelf(f32 x, f32 y, Mtx* texMtx); // _38
virtual bool isUsed(const ResTIMG* resource); // _4C
virtual bool isUsed(const ResFONT* resource) { return J2DPane::isUsed(resource); } // _50 (weak)
virtual void rewriteAlpha() { } // _58 (weak)
virtual void initiate(const ResTIMG* img, const ResTLUT* lut); // _94
virtual bool prepareTexture(u8); // _98
virtual bool append(const ResTIMG* resource, f32 blendRatio) { return insert(resource, mTextureCount, blendRatio); } // _9C (weak)
Expand Down Expand Up @@ -143,6 +140,9 @@ struct J2DPicture : public J2DPane {
virtual void drawTexCoord(f32 x, f32 y, f32 width, f32 height, s16 btmLeftS, s16 btmLeftT, s16 btmRightS, s16 btmRightT, s16 topLeftS,
s16 topLeftT, s16 topRightS, s16 topRightT, Mtx* texMtx); // _144
virtual u8 getUsableTlut(u8 id); // _148
virtual bool isUsed(const ResTIMG* resource); // _4C
virtual bool isUsed(const ResFONT* resource) { return J2DPane::isUsed(resource); } // _50 (weak)
virtual void rewriteAlpha() {} // _58 (weak)

void initinfo();
void private_readStream(J2DPane* parent, JSURandomInputStream* input, JKRArchive* arc);
Expand Down
6 changes: 5 additions & 1 deletion include/JSystem/JAudio/JAS/JASSeqCtrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@ struct JASSeqCtrl {
u16 get16(u32 offset) const;
u32 get24(u32 offset) const;
u32 get32(u32 offset) const;
u32 read16();
u16 read16();
u32 read24();

// unused/inlined
u32 read32();

u8 readByte() { return *mCurrentFilePtr++; }
u8* getAddr(u32 offset) { return mRawFilePtr + offset; }
void jump(u32 offset) { mCurrentFilePtr = mRawFilePtr + offset; }

u8* mRawFilePtr; // _00
u8* mCurrentFilePtr; // _04
int mWaitTimer; // _08
Expand Down
20 changes: 13 additions & 7 deletions include/JSystem/JAudio/JAS/JASSeqParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@

#include "types.h"

struct JASTrack;

struct JASSeqParser {
int parseSeq(struct JASTrack*);
typedef int (JASSeqParser::*CmdFunc)(JASTrack*, u32*);

int parseSeq(JASTrack*);
int cmdOpenTrack(JASTrack*, u32*);
int cmdOpenTrackBros(JASTrack*, u32*);
int cmdCall(JASTrack*, u32*);
Expand Down Expand Up @@ -38,12 +42,12 @@ struct JASSeqParser {
int cmdRetI(JASTrack*, u32*);
int cmdIntTimer(JASTrack*, u32*);
int cmdSyncCPU(JASTrack*, u32*);
u32 cmdFlushAll(JASTrack*, u32*);
u32 cmdFlushRelease(JASTrack*, u32*);
int cmdFlushAll(JASTrack*, u32*);
int cmdFlushRelease(JASTrack*, u32*);
int cmdTimeBase(JASTrack*, u32*);
int cmdTempo(JASTrack*, u32*);
u32 cmdFinish(JASTrack*, u32*);
u32 cmdNop(JASTrack*, u32*);
int cmdFinish(JASTrack*, u32*);
int cmdNop(JASTrack*, u32*);
int cmdPanPowSet(JASTrack*, u32*);
int cmdFIRSet(JASTrack*, u32*);
int cmdEXTSet(JASTrack*, u32*);
Expand All @@ -64,8 +68,10 @@ struct JASSeqParser {

bool conditionCheck(JASTrack*, u8);

void Cmd_Process(JASTrack*, u8, u16);
void RegCmd_Process(JASTrack*, int, int);
int Cmd_Process(JASTrack*, u8, u16);
int RegCmd_Process(JASTrack*, int, int);

static CmdFunc sCmdPList[];
};

#endif
4 changes: 2 additions & 2 deletions include/JSystem/JAudio/JAS/JASTrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ struct JASTrack : public JSUList<JASChannel> {
};

union TimedParam_ {
TimedParam_() { }
TimedParam_() {}

AInnerParam_ mInnerParam; // get individual params by member name
MoveParam_ mMoveParams[TIMED_Count]; // get individual params by index
Expand Down Expand Up @@ -319,7 +319,7 @@ struct JASTrack : public JSUList<JASChannel> {
int getChannelCount() const;
int getReleaseChannelCount() const;

inline JASSeqCtrl* getCtrl() { return &mSeqCtrl; }
inline JASSeqCtrl* getSeq() { return &mSeqCtrl; }
inline JASOuterParam* getExtBuffer() const { return mExtBuffer; }

inline void initOscillators()
Expand Down
Loading