-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
4,810 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include "JSystem/J3DGraphBase/J3DMaterial.hpp" | ||
|
||
J3DAlphaComp::J3DAlphaComp() { | ||
u16 val = sUnk; | ||
_2 = 0; | ||
_0 = val; | ||
_3 = 0; | ||
} | ||
|
||
#ifdef NON_MATCHING | ||
// some scheduling issues | ||
void J3DCurrentMtx::setCurrentTexMtx(u8 a1, u8 a2, u8 a3, u8 a4, u8 a5, u8 a6, u8 a7, u8 a8) { | ||
_0 = (a4 << 24) | (a3 << 18) & 0x3FC0000 | (a1 << 6) & 0x3FC0 | (a2 << 12) & 0xFF000; | ||
_4 = (a8 << 18) | (a7 << 12) & 0xFF000 | a5 & 0xFFF00FFF | (a6 << 6) & 0x3FC0; | ||
} | ||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include "JSystem/J3DGraphBase/J3DVertex.hpp" | ||
|
||
J3DDrawMtxData::J3DDrawMtxData() { | ||
mDrawMatrixCount = 0; | ||
_4 = 0; | ||
mDrawMtxArray = nullptr; | ||
} | ||
|
||
J3DDrawMtxData::~J3DDrawMtxData() { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
#include "JSystem/JAudio2/JASSeqCtrl.hpp" | ||
#include "JSystem/JAudio2/JASTrack.hpp" | ||
|
||
JASSeqParser JASSeqCtrl::sDefaultParser = JASSeqParser(); | ||
|
||
JASSeqCtrl::JASSeqCtrl() { | ||
JASSeqReader::init(); | ||
mParser = &sDefaultParser; | ||
mTimer = 0; | ||
mCursorSwap = nullptr; | ||
_48 = 0; | ||
_4C = 0; | ||
_4E = 0; | ||
mIntTimer = 0; | ||
_51 = false; | ||
_54 = 0; | ||
_58 = 0; | ||
JASSeqReader::init(); | ||
} | ||
|
||
void JASSeqCtrl::init() { | ||
JASSeqReader::init(); | ||
mParser = &sDefaultParser; | ||
mTimer = 0; | ||
mCursorSwap = nullptr; | ||
_48 = 0; | ||
_4C = 0; | ||
_4E = 0; | ||
mIntTimer = 0; | ||
_54 = 0; | ||
_58 = 0; | ||
_51 = false; | ||
} | ||
|
||
void JASSeqCtrl::start(void *, u32 offset) { | ||
JASSeqReader::init(); | ||
mSeqCursor = (void *)((u8 *)mSeqBuff + offset); | ||
} | ||
|
||
int JASSeqCtrl::tickProc(JASTrack *track) { | ||
if(!mSeqBuff) return 0; | ||
interrupt(JASSeqCtrl::INTR_6); | ||
timerProcess(); | ||
if(_51) { | ||
if(!track->checkNoteStop(0)) return 0; | ||
_51 = false; | ||
} | ||
if(mTimer > 0) mTimer--; | ||
checkIntr(); | ||
|
||
while((!mTimer || mCursorSwap) && !_51) { | ||
if(mParser->parse(track) < 0) return -1; | ||
} | ||
|
||
return 0; | ||
} | ||
|
||
void JASSeqCtrl::interrupt(JASSeqCtrl::IntrType interrupt) { | ||
u32 mask = 1 << interrupt; | ||
if(!(_4E & mask)) return; | ||
_4C |= mask; | ||
} | ||
|
||
void JASSeqCtrl::setIntrMask(u32 mask) { | ||
_4E |= mask; | ||
} | ||
|
||
void JASSeqCtrl::clrIntrMask(u32 mask) { | ||
_4E &= ~mask; | ||
} | ||
|
||
bool JASSeqCtrl::retIntr() { | ||
if(!mCursorSwap) return false; | ||
mSeqCursor = mCursorSwap; | ||
mCursorSwap = nullptr; | ||
return true; | ||
} | ||
|
||
s32 JASSeqCtrl::findIntr() { | ||
u32 intr = _4E & _4C; | ||
for(u32 i = 0; intr != 0; i++) { | ||
if(intr & 1) { | ||
_4C &= ~(1 << i); | ||
return i; | ||
} | ||
else intr >>= 1; | ||
} | ||
return -1; | ||
} | ||
|
||
void JASSeqCtrl::checkIntr() { | ||
s32 intr; | ||
if(!mCursorSwap && (intr = findIntr()) >= 0) { | ||
intr = intr * 3 + _48; | ||
u32 offset = calcSeekAmt(intr); | ||
mCursorSwap = mSeqCursor; | ||
mSeqCursor = (void *)((u8 *)mSeqBuff + offset); | ||
} | ||
} | ||
|
||
void JASSeqCtrl::timerProcess() { | ||
if(_54 != 0) { | ||
if(!--_54) { | ||
interrupt(INTR_5); | ||
if(mIntTimer) { | ||
if(--mIntTimer) { | ||
_54 = _58; | ||
} | ||
} | ||
else _54 = _58; | ||
} | ||
} | ||
} | ||
|
||
JASSeqParser::JASSeqParser() {} |
Oops, something went wrong.