MCPcopy Create free account
hub / github.com/doldecomp/mkdd / getTexNo

Method getTexNo

libs/JSystem/J2DGraph/J2DAnimation.cpp:730–746  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

728}
729
730void J2DAnmTexPattern::getTexNo(u16 idx, u16 *texNo) const
731{
732 u16 maxFrame = mAnmTable[idx].mData[0][0];
733 f32 frame = getFrame();
734 if (frame < 0)
735 {
736 *texNo = mValues[mAnmTable[idx].mData[0][1]];
737 }
738 else if (frame >= maxFrame)
739 {
740 *texNo = mValues[mAnmTable[idx].mData[0][1] + (maxFrame - 1)];
741 }
742 else
743 {
744 *texNo = mValues[mAnmTable[idx].mData[0][1] + (int)frame];
745 }
746}
747
748ResTIMG *J2DAnmTexPattern::getResTIMG(u16 idx) const
749{

Callers 6

getResTIMGMethod · 0.95
getPaletteMethod · 0.95
simpleDrawMethod · 0.45
drawBaseMethod · 0.45
animationMethod · 0.45
writeMaterialBlockMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected