Skip to content

Commit

Permalink
zukan2d fixes / misc cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
PikHacker committed Oct 14, 2024
1 parent cdea138 commit 253758b
Show file tree
Hide file tree
Showing 23 changed files with 158 additions and 395 deletions.
24 changes: 12 additions & 12 deletions docs/recommended_todo.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/fakePiki.cpp">fakePiki.cpp</a> | 42148 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/collinfo.cpp">collinfo.cpp</a> | 42951 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/cellPyramid.cpp">cellPyramid.cpp</a> | 48069 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/aiFormation.cpp">aiFormation.cpp</a> | 53090 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/pelletState.cpp">pelletState.cpp</a> | 63251 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemUjamushi.cpp">itemUjamushi.cpp</a> | 64561 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemPlant.cpp">itemPlant.cpp</a> | 73568 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/baseGameSection.cpp">baseGameSection.cpp</a> | 86076 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemPlant.cpp">itemPlant.cpp</a> | 73568 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/baseGameSection.cpp">baseGameSection.cpp</a> | 86168 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/aiPrimitives.cpp">aiPrimitives.cpp</a> | 117179 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/pelletMgr.cpp">pelletMgr.cpp</a> | 130665 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/pikiState.cpp">pikiState.cpp</a> | 140997 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/navi.cpp">navi.cpp</a> | 148740 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/naviState.cpp">naviState.cpp</a> | 163246 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/singleGS_Zukan.cpp">singleGS_Zukan.cpp</a> | 163886 |
Expand All @@ -92,19 +92,19 @@
| File | Size (bytes) | File | Size (bytes) |
| ---- | ---- | ---- | ---- |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKonoU/khFinalResult.cpp">khFinalResult.cpp</a> | 60103 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKonoU/khDayEndResult.cpp">khDayEndResult.cpp</a> | 81751 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKonoU/khWorldMap.cpp">khWorldMap.cpp</a> | 119372 | | |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKonoU/khWorldMap.cpp">khWorldMap.cpp</a> | 119406 | | |

### <section id="plugProjectMorimuraU">plugProjectMorimuraU</section>
| File | Size (bytes) | File | Size (bytes) |
| ---- | ---- | ---- | ---- |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/scrollList.cpp">scrollList.cpp</a> | 25920 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/dayEndCount.cpp">dayEndCount.cpp</a> | 26621 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/scrollList.cpp">scrollList.cpp</a> | 25904 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/dayEndCount.cpp">dayEndCount.cpp</a> | 26621 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/hurryUp2D.cpp">hurryUp2D.cpp</a> | 27172 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/miulin.cpp">miulin.cpp</a> | 27527 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/jigumo.cpp">jigumo.cpp</a> | 42368 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/shijimiChou.cpp">shijimiChou.cpp</a> | 43362 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/panModoki.cpp">panModoki.cpp</a> | 45170 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/kingChappyState.cpp">kingChappyState.cpp</a> | 50819 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/umiMushi.cpp">umiMushi.cpp</a> | 60146 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/kingChappy.cpp">kingChappy.cpp</a> | 64498 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/hiScore2D.cpp">hiScore2D.cpp</a> | 76415 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/blackMan.cpp">blackMan.cpp</a> | 121903 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/zukan2D.cpp">zukan2D.cpp</a> | 134435 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/challengeResult2D.cpp">challengeResult2D.cpp</a> | 142165 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/challengeSelect2D.cpp">challengeSelect2D.cpp</a> | 186008 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/vsSelect2D.cpp">vsSelect2D.cpp</a> | 196392 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/hiScore2D.cpp">hiScore2D.cpp</a> | 76289 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/blackMan.cpp">blackMan.cpp</a> | 121950 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/zukan2D.cpp">zukan2D.cpp</a> | 134332 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/challengeResult2D.cpp">challengeResult2D.cpp</a> | 142165 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/challengeSelect2D.cpp">challengeSelect2D.cpp</a> | 186008 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectMorimuraU/vsSelect2D.cpp">vsSelect2D.cpp</a> | 196329 |

### <section id="plugProjectNishimuraU">plugProjectNishimuraU</section>
| File | Size (bytes) | File | Size (bytes) |
Expand All @@ -114,12 +114,12 @@
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/KumaChappy.cpp">KumaChappy.cpp</a> | 10290 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/SnakeWholeShadow.cpp">SnakeWholeShadow.cpp</a> | 11928 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/SnakeCrowShadow.cpp">SnakeCrowShadow.cpp</a> | 12091 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/BabyState.cpp">BabyState.cpp</a> | 12331 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/Kogane.cpp">Kogane.cpp</a> | 14498 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/RandMapMgr.cpp">RandMapMgr.cpp</a> | 15237 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/Rock.cpp">Rock.cpp</a> | 17638 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/Ujia.cpp">Ujia.cpp</a> | 18104 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/JointShadowBase.cpp">JointShadowBase.cpp</a> | 18414 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/Ujib.cpp">Ujib.cpp</a> | 18626 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/ElecBug.cpp">ElecBug.cpp</a> | 18636 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/ImomushiState.cpp">ImomushiState.cpp</a> | 19604 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/Imomushi.cpp">Imomushi.cpp</a> | 20110 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/UjiaState.cpp">UjiaState.cpp</a> | 20343 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/Armor.cpp">Armor.cpp</a> | 20970 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/ElecHiba.cpp">ElecHiba.cpp</a> | 21756 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/QueenState.cpp">QueenState.cpp</a> | 22553 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/MiniHoudai.cpp">MiniHoudai.cpp</a> | 22737 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/MiniHoudai.cpp">MiniHoudai.cpp</a> | 17291 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/Rock.cpp">Rock.cpp</a> | 17638 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/Ujia.cpp">Ujia.cpp</a> | 18104 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/JointShadowBase.cpp">JointShadowBase.cpp</a> | 18414 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/Ujib.cpp">Ujib.cpp</a> | 18626 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/ElecBug.cpp">ElecBug.cpp</a> | 18636 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/ImomushiState.cpp">ImomushiState.cpp</a> | 19604 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/Imomushi.cpp">Imomushi.cpp</a> | 20110 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/UjiaState.cpp">UjiaState.cpp</a> | 20343 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/Armor.cpp">Armor.cpp</a> | 20970 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/ElecHiba.cpp">ElecHiba.cpp</a> | 21756 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/QueenState.cpp">QueenState.cpp</a> | 22553 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/UjibState.cpp">UjibState.cpp</a> | 25546 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/Tobi.cpp">Tobi.cpp</a> | 25548 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/BigTreasureShadow.cpp">BigTreasureShadow.cpp</a> | 25799 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/ArmorState.cpp">ArmorState.cpp</a> | 26549 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/TobiState.cpp">TobiState.cpp</a> | 27052 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/SaraiState.cpp">SaraiState.cpp</a> | 27370 |
Expand Down
20 changes: 10 additions & 10 deletions include/Game/BaseGameSection.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@ enum DemoTimers {
};

enum DrawBufferType {
DB_NormalLayer = 0,
DB_NormalFogOffLayer,
DB_MapLayer,
DB_PikiLayer,
DB_PostRenderLayer,
DB_2DLayer,
DB_FirstLayer,
DB_PostShadowLayer,
DB_ObjectLastLayer,
DB_FarmLayer,
DB_NormalLayer = 0,
DB_NormalFogOffLayer = 1,
DB_MapLayer = 2,
DB_PikiLayer = 3,
DB_PostRenderLayer = 4,
DB_2DLayer = 5,
DB_FirstLayer = 6,
DB_PostShadowLayer = 7,
DB_ObjectLastLayer = 8,
DB_FarmLayer = 9,
};

struct BaseGameSection : public BaseHIOSection {
Expand Down
16 changes: 13 additions & 3 deletions include/Game/gameGenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ struct Generator : public CNode {
return count;
}

// These represent the "reserved" value from the gen file entry
enum ReservedFlag {
Reserved_Null = 0, // This value should always be used in defaultgen, plantgen, or day gens
Reserved_doSaveGen = 1, // needed to save gen info, such as object type and pellet info
Reserved_doSaveCreature = 2, // needed to save creature info, mostly needed for position and item specific properties
Reserved_doTrackDeath = 4, // needed for respawn days to take effect? This ones weird, but enemies that respawn use it
Reserved_doTrackPosition = 8, // used for pellets to save current position between loads, might work for enemies
};
inline bool isReservedFlag(u8 flag) { return mReservedNum & flag; }

GenObject* mObject; // _18
u32 mId; // _1C /* Initialized to '____' */
char mGenObjName[32]; // _20 /* shift-jis name given in generator files */
Expand All @@ -86,12 +96,12 @@ struct Generator : public CNode {
u8 _88[12]; // _88
Vector3f mPosition; // _94
Vector3f mOffset; // _A0
u8 mIsInactive; // _AC
u8 mIsInactive; // _AC, if true, the object wont spawn or need its assets loaded
int mIndex; // _B0

enum RamMode {
RM_Disc = 0,
RM_MemoryCache,
RM_Disc = 0,
RM_MemoryCache = 1,
};
static u8 ramMode;
};
Expand Down
9 changes: 2 additions & 7 deletions include/Morimura/ScrollList.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ struct TIndexPane {

void doIconOffsetY();

inline void setPaneOffset(f32 offset) { mPane->setOffsetY(mYOffset + offset); }
inline void setOffset(f32 y) { mPane->setOffset(mPane->mOffset.x, mYOffset + y); }

inline f32 getPaneYOffset() const { return mYOffset; }

Expand Down Expand Up @@ -152,12 +152,7 @@ struct TScrollList : public TTestBase {

inline TIndexPane* getIndexPane(int i) const { return mIndexPaneList[i]; }

inline void updateIDPaneYOffset(int id, f32 yoffs)
{
// should be using r4 instead of r3
getIndexPane(id)->setPaneOffset(yoffs);
getIndexPane(id)->mYOffset = getIndexPane(id)->getPaneOffsetY();
}
inline f32 getHeight() const { return mIndexPaneList[1]->getMainPane()->getOffsetY() - mIndexPaneList[0]->getMainPane()->getOffsetY(); }

// _00 = VTBL1
// _18 = VTBL2
Expand Down
1 change: 0 additions & 1 deletion include/ebi/FS.h
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,6 @@ struct TMgr {
bool mInSeq; // _C3C
FSMStateMachine mStateMachine; // _C40
FSMState* mCurrentState; // _C5C
// TODO: members
};
} // namespace FS
} // namespace ebi
Expand Down
8 changes: 4 additions & 4 deletions include/kh/khUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ struct khUtilFadePaneWM : public khUtilFadePane {
virtual ~khUtilFadePaneWM() { } // _08 (weak)
virtual void fadeout_finish(); // _20

static khUtilFadePaneWM* create(P2DScreen::Mgr*, u64, u8); // UNUSED
void create(P2DScreen::Mgr*, J2DPane*, u8); // UNUSED
static khUtilFadePaneWM* create(P2DScreen::Mgr*, u64, u8); // UNUSED
static khUtilFadePaneWM* create(P2DScreen::Mgr*, J2DPane*, u8); // UNUSED

// _00 = VTBL
// _00-_30 = khUtilFadePane
Expand All @@ -91,7 +91,7 @@ struct khUtilFadePaneWM : public khUtilFadePane {
};

struct khUtilColorAnm : public P2DScreen::CallBackNode {
khUtilColorAnm(P2DScreen::Mgr* screen, u64 tag, int panes, int length);
khUtilColorAnm(P2DScreen::Mgr* screen, u64 tag, int colors, int length);

virtual ~khUtilColorAnm() { } // _08 (weak)
virtual void update(); // _10 (weak)
Expand All @@ -113,7 +113,7 @@ struct khUtilColorAnm : public P2DScreen::CallBackNode {
JUtility::TColor* mColorList; // _1C
JUtility::TColor mColor; // _20
JUtility::TColor mDisabledColor; // _24
int mPaneNum; // _28
int mColorCount; // _28
int mLength; // _2C
int mFrame; // _30
bool mUpdateMode; // _34
Expand Down
4 changes: 2 additions & 2 deletions src/plugProjectKandoU/baseGameSection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -950,13 +950,13 @@ void BaseGameSection::saveToGeneratorCache(CourseInfo* courseinfo)
generatorCache->beginSave(courseinfo->mCourseIndex);
FOREACH_NODE(Generator, generatorCache->getFirstGenerator(), node)
{
if (node->mReservedNum & 1) {
if (node->isReservedFlag(Generator::Reserved_doSaveGen)) {
generatorCache->saveGenerator(node);
}
}
FOREACH_NODE(Generator, generatorCache->getFirstGenerator(), node)
{
if (node->mReservedNum & 1 && node->mReservedNum & 2) {
if (node->isReservedFlag(Generator::Reserved_doSaveGen) && node->isReservedFlag(Generator::Reserved_doSaveCreature)) {
generatorCache->saveCreature(node);
}
}
Expand Down
22 changes: 13 additions & 9 deletions src/plugProjectKandoU/gameGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "JSystem/JUtility/JUTException.h"
#include "nans.h"
#include "Parameters.h"
#include "types.h"

u32 GeneratorCurrentVersion = 'v0.3';

Expand Down Expand Up @@ -155,7 +154,7 @@ Generator::Generator()
{
mObject = nullptr;
mId = '____';
mReservedNum = 0;
mReservedNum = Reserved_Null;
mNameId.setID(' ');
mVersion.setID(GeneratorCurrentVersion);
strcpy(mGenObjName, "unset");
Expand Down Expand Up @@ -228,8 +227,8 @@ bool Generator::loadCreature(Stream& input)
if (mCreature) {
mCreature->mGenerator = this;
u8 flag = 0;
if (mReservedNum & 0x8) {
flag |= 0x1;
if (isReservedFlag(Reserved_doTrackPosition)) {
flag |= CREATURE_SAVE_FLAG_POSITION;
}
mCreature->load(input, flag);
} else {
Expand Down Expand Up @@ -266,7 +265,7 @@ void Generator::saveCreature(Stream& output)
{
if (mCreature) {
u8 conversion = 0;
if (mReservedNum & 8) {
if (isReservedFlag(Reserved_doTrackPosition)) {
conversion |= CREATURE_SAVE_FLAG_POSITION;
}

Expand Down Expand Up @@ -298,14 +297,14 @@ void Generator::generate()
mUnusedVal = 0;
mDeathCount = 0;
mDayNum = gameSystem->mTimeMgr->mDayCount;
} else if ((mReservedNum & 4) == 0) {
} else if (!isReservedFlag(Reserved_doTrackDeath)) {
mUnusedVal = 0;
return;
}

mCreature = nullptr;
if (mObject) {
if (ramMode != RM_Disc && (mReservedNum & 4) != 0
if (ramMode != RM_Disc && isReservedFlag(Reserved_doTrackDeath)
&& (int)gameSystem->mTimeMgr->mDayCount >= (int)(mDayNum + mDaysTillResurrection)) {
mDayNum = gameSystem->mTimeMgr->mDayCount;
mDeathCount = 0;
Expand Down Expand Up @@ -429,6 +428,9 @@ void Generator::read(Stream& input)
*/
void Generator::write(Stream& output)
{
// Note that the entire functionality of outputting Generators as text is unused code
// Only binary is ever used by the actual game

output.textWriteTab(output.mTabCount);
ID32 id(GeneratorCurrentVersion);
id.write(output);
Expand All @@ -443,20 +445,21 @@ void Generator::write(Stream& output)
output.textWriteText("\t# 復活日数\r\n"); // 'resurrection days'

if (ramMode == RM_Disc) {
// generator files as stored on disc
// write the generator's name when working with plain text
output.textWriteTab(output.mTabCount);
for (int i = 0; i < 32; i++) {
output.writeByte(mGenObjName[i]);
}
output.textWriteText("\t# <%s>\r\n", mGenObjName);
} else {
// gencache?
// binary skips writing the name, but does write additional values to keep track of its alive status
output.writeByte('\0');
output.writeShort(mDeathCount);
output.writeShort(mDayNum);
output.writeShort(mDayLimit);
}

// Store position as shorts in binary mode, as floats in text mode
if (ramMode != RM_Disc) {
output.writeShort((s16)mPosition.x + mOffset.x);
output.writeShort((s16)mPosition.y + mOffset.y);
Expand All @@ -474,6 +477,7 @@ void Generator::write(Stream& output)
output.writeFloat(mOffset.z);
output.textWriteText("\t# offset\r\n");
}

if (mObject) {
mObject->write(output);
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/plugProjectKandoU/gameGeneratorCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ void GeneratorCache::updateUseList()
void GeneratorCache::createNumberGenerators()
{
for (Generator* gen = getFirstGenerator(); gen != nullptr; gen = (Generator*)gen->mNext) {
if (gen->mIsInactive == FALSE && (gen->mReservedNum & 4U) != 0) {
if (gen->mIsInactive == FALSE && gen->isReservedFlag(Generator::Reserved_doTrackDeath)) {
Generator::ramMode = Generator::RM_MemoryCache;
gen->generate();
Generator::ramMode = Generator::RM_Disc;
Expand Down
6 changes: 3 additions & 3 deletions src/plugProjectKandoU/gameSeaMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ void AABBWaterBox::doEntry()
if (gameSystem && !gameSystem->isStoryMode() && !gameSystem->isZukanMode()
&& (!gameSystem->isChallengeMode() || gameSystem->isMultiplayerMode())) {
if (gameSystem) {
gameSystem->setDrawBuffer(4);
gameSystem->setDrawBuffer(DB_PostRenderLayer);
mModel->mJ3dModel->calcMaterial();
mModel->mJ3dModel->entry();
}
Expand All @@ -195,7 +195,7 @@ void AABBWaterBox::doEntry()
BaseGameSection* section = gameSystem->getSection();
if (section->mPrevNaviIdx == NAVIID_Multiplayer) {
if (gameSystem) {
gameSystem->setDrawBuffer(4);
gameSystem->setDrawBuffer(DB_PostRenderLayer);
Mtx copyMatrix;
PSMTXIdentity(copyMatrix);
J3DTexMtx* texMtx = mModel->mJ3dModel->mModelData->mMaterialTable.mMaterials[0]->mTexGenBlock->getTexMtx(3); // good lord
Expand Down Expand Up @@ -244,7 +244,7 @@ void AABBWaterBox::doEntry()
}

if (gameSystem) {
gameSystem->setDrawBuffer(4);
gameSystem->setDrawBuffer(DB_PostRenderLayer);
mModel->mJ3dModel->calcMaterial();

if (mFbTexture) {
Expand Down
Loading

0 comments on commit 253758b

Please sign in to comment.