Skip to content

Commit

Permalink
remove -ipa file and do some other small changes to match some acto…
Browse files Browse the repository at this point in the history
…rs properly
  • Loading branch information
shibbo committed Nov 27, 2024
1 parent f2320d1 commit 63df4ed
Show file tree
Hide file tree
Showing 21 changed files with 57 additions and 64 deletions.
4 changes: 2 additions & 2 deletions config/RMGK01/splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4106,14 +4106,14 @@ Game/MapObj/AstroDomeSky.cpp:
.text start:0x801AE3F8 end:0x801AEE08
.ctors start:0x8052EC40 end:0x8052EC44
.rodata start:0x80533018 end:0x80533048
.data start:0x8058E9B8 end:0x8058EBA0
.data start:0x8058E9B8 end:0x8058EB60
.sbss start:0x806B4DF8 end:0x806B4E18
.sdata2 start:0x806BC758 end:0x806BC780

Game/MapObj/AstroMapBoard.cpp:
.text start:0x801AEE08 end:0x801AEFF4
.ctors start:0x8052EC44 end:0x8052EC48
.data start:0x8058EBA0 end:0x8058EC40
.data start:0x8058EB60 end:0x8058EC40
.sdata start:0x806B1D38 end:0x806B1D40
.sbss start:0x806B4E18 end:0x806B4E20
.sdata2 start:0x806BC780 end:0x806BC788
Expand Down
11 changes: 5 additions & 6 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@
"-fp_contract on",
"-str reuse",
"-enc SJIS",
"-ipa file",
"-i include",
"-i libs/JSystem/include",
"-i libs/MSL_C++/include",
Expand Down Expand Up @@ -446,11 +445,11 @@ def JSysLib(lib_name: str, objects: List[Object]) -> Dict[str, Any]:
"progress_category": "sdk", # str | List[str]
"objects": [
Object(NonMatching, "Runtime/__mem.c"),
Object(NonMatching, "Runtime/__va_arg.c"),
Object(Matching, "Runtime/__va_arg.c"),
Object(NonMatching, "Runtime/global_destructor_chain.c"),
Object(NonMatching, "Runtime/NMWException.cpp"),
Object(NonMatching, "Runtime/ptmf.c"),
Object(NonMatching, "Runtime/runtime.c"),
Object(Matching, "Runtime/runtime.c"),
Object(NonMatching, "Runtime/__init_cpp_exceptions.cpp"),
Object(NonMatching, "Runtime/Gecko_ExceptionPPC.cpp"),
Object(NonMatching, "Runtime/GCN_mem_alloc.c")
Expand Down Expand Up @@ -2141,9 +2140,9 @@ def JSysLib(lib_name: str, objects: List[Object]) -> Dict[str, Any]:
Object(NonMatching, "Game/System/WPadStick.cpp"),
Object(NonMatching, "Game/System/HomeButtonMenuWrapper.cpp"),
Object(NonMatching, "Game/System/HomeButtonStateNotifier.cpp"),
Object(Matching, "Game/System/ConfigDataHolder.cpp"),
Object(Matching, "Game/System/ConfigDataMii.cpp"),
Object(Matching, "Game/System/ConfigDataMisc.cpp"),
Object(NonMatching, "Game/System/ConfigDataHolder.cpp"),
Object(NonMatching, "Game/System/ConfigDataMii.cpp"),
Object(NonMatching, "Game/System/ConfigDataMisc.cpp"),
Object(NonMatching, "Game/System/FindingLuigiEventScheduler.cpp"),
Object(NonMatching, "Game/System/GalaxyCometScheduler.cpp"),
Object(NonMatching, "Game/System/GalaxyCometState.cpp"),
Expand Down
9 changes: 5 additions & 4 deletions include/Game/LiveActor/Nerve.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@ public:\
class name : public Nerve\
{\
public:\
name() NO_INLINE {\
};\
virtual void execute(Spine *pSpine) const {\
};\
name() NO_INLINE {}\
virtual void execute(Spine *pSpine) const {}\
inline static name* get() {\
return &sInstance;\
}\
static name sInstance;\
};\
4 changes: 0 additions & 4 deletions include/Game/MapObj/AstroMapBoard.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,3 @@ class AstroMapBoard : public MapObjActor {
virtual void initAfterPlacement();
virtual void connectToScene(const MapObjActorInitInfo &);
};

namespace NrvAstroMapBoard {
NERVE_DECL_NULL(AstroMapBoardNrvWait);
};
21 changes: 3 additions & 18 deletions include/Game/MapObj/MapObjActor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,12 @@ namespace NrvMapObjActor {
NERVE(HostTypeDone);
};

namespace {
const char* cBrkNameColorChange = "ColorChange";
const char* cBtpNameTexChange = "TexChange";
const char* cBtkNameTexChange = "TexChange";
const char* cEffectNameAppear = "Appear";
const char* cBckNameMove = "Move";
const char* cFollowJointName = "Move";
const char* cEffectNameBreak = "Break";
const char* cBckNameBreak = "Break";
};

class MapObjActor : public LiveActor {
public:
MapObjActor(const char *);
MapObjActor(const char *, const char *);

virtual ~MapObjActor() {

}
inline virtual ~MapObjActor();

virtual void init(const JMapInfoIter &);
virtual void initAfterPlacement();
Expand All @@ -52,9 +39,7 @@ class MapObjActor : public LiveActor {
virtual void initCaseNoUseSwitchA(const MapObjActorInitInfo &);
virtual void initCaseUseSwitchB(const MapObjActorInitInfo &);
virtual void initCaseNoUseSwitchB(const MapObjActorInitInfo &);
virtual void makeSubModels(const JMapInfoIter &, const MapObjActorInitInfo &) {

}
virtual void makeSubModels(const JMapInfoIter &, const MapObjActorInitInfo &);

void initialize(const JMapInfoIter &, const MapObjActorInitInfo &);
bool isObjectName(const char *) const;
Expand Down Expand Up @@ -121,4 +106,4 @@ class MapObjActorUtil {
static void setupInitInfoColorChangeArg0(MapObjActorInitInfo *, const JMapInfoIter &);
static void setupInitInfoTextureChangeArg1(MapObjActorInitInfo *, const JMapInfoIter &);
static void setupInitInfoShadowLengthArg2(MapObjActorInitInfo *, const JMapInfoIter &);
};
};
3 changes: 2 additions & 1 deletion include/Game/Player/J3DModelX.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <JSystem/J3DGraphAnimator/J3DModel.hpp>
#include <revolution/gd/GDBase.h>

class J3DShapeX;
class J3DShapePacketX;
Expand Down Expand Up @@ -91,4 +92,4 @@ class J3DModelX : public J3DModel {
s32 _1E0;
u8 _1E4;
u8 _1E5;
};
};
6 changes: 0 additions & 6 deletions include/Game/Util/MathUtil.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@
#include <revolution.h>
#include "JSystem/JGeometry.hpp"

static f32 minDegree = 0.0f;
static f32 maxDegree = 360.0f;

static f32 flt_8060FC80[1816];

namespace MR {

void initAcosTable();

template<typename T>
Expand Down
4 changes: 3 additions & 1 deletion libs/JSystem/include/JSystem/JGeometry/TUtil.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ namespace JGeometry {
}

static f32 asin(f32 val) NO_INLINE {


if (val >= 1.0f) {
return 1.5707964f;
}
Expand All @@ -52,4 +54,4 @@ namespace JGeometry {
static T clamp(T, T, T);
static T inv_sqrt(T);
};
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

class JSUMemoryOutputStream : public JSURandomOutputStream {
public:
JSUMemoryOutputStream() {

inline JSUMemoryOutputStream() {
}

virtual ~JSUMemoryOutputStream();
Expand All @@ -19,4 +19,4 @@ class JSUMemoryOutputStream : public JSURandomOutputStream {
void* mBuffer; // 0x8
s32 mLength; // 0xC
s32 mPosition; // 0x10
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ enum JSUStreamSeekFrom;

class JSURandomInputStream : public JSUInputStream {
public:
JSURandomInputStream() : JSUInputStream() {

}
inline JSURandomInputStream();

virtual ~JSURandomInputStream();

Expand All @@ -23,4 +21,4 @@ class JSURandomInputStream : public JSUInputStream {
virtual s32 seekPos(s32, JSUStreamSeekFrom) = 0;

s32 seek(s32, JSUStreamSeekFrom);
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

class JSURandomOutputStream : public JSUOutputStream {
public:
inline JSURandomOutputStream();

virtual s32 writeData(const void *, s32) = 0;
virtual s32 getLength() const = 0;
virtual s32 getPosition() const = 0;
virtual void seek(s32, JSUStreamSeekFrom);
virtual s32 getAvailable() const;
};
};
3 changes: 1 addition & 2 deletions libs/RVL_SDK/include/revolution/gd.h
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#include "revolution/gd/GDBase.h"
#include "revolution/gd/GDGeometry.h"
#include "revolution/gd/GDGeometry.h"
3 changes: 1 addition & 2 deletions libs/RVL_SDK/include/revolution/gx.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@ extern "C" {
#include "revolution/gx/GXTexture.h"
#include "revolution/gx/GXTransform.h"
#include "revolution/gx/GXTypes.h"
#include "revolution/gx/GXVert.h"
#include "revolution/types.h"


#ifdef __cplusplus
}
#endif

#endif // GX_H
#endif // GX_H
4 changes: 2 additions & 2 deletions libs/RVL_SDK/include/revolution/gx/GXGeometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ void GXSetTexCoordGen2(GXTexCoordID, GXTexGenType, GXTexGenSrc, u32, GXBool, u32
void GXSetNumTexGens(u8);


static void GXEnd(void) {
static inline void GXEnd(void) {

}

void __GXSetSUTexRegs(void);
Expand Down
3 changes: 1 addition & 2 deletions src/Game/Map/OceanRingDrawer.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#include "Game/Map/OceanRingDrawer.hpp"
#include "Game/Map/OceanRing.hpp"
#include "Game/Map/WaterAreaHolder.hpp"
#include "Game/Util.hpp"

#include <revolution/gd/GDBase.h>
static u8 unknownVal = 1;

static GXColor color1 = { 0x28, 0x28, 0x28, 0x14 };
Expand Down
6 changes: 5 additions & 1 deletion src/Game/MapObj/AstroMapBoard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ namespace {
static const char* cDummyTexName = "MapDummy";
};

namespace NrvAstroMapBoard {
NERVE_DECL_NULL(AstroMapBoardNrvWait);
};

AstroMapBoard::AstroMapBoard(const char *pName) : MapObjActor(pName) {

}
Expand All @@ -14,7 +18,7 @@ void AstroMapBoard::init(const JMapInfoIter &rIter) {
MapObjActorInitInfo info;
MapObjActorUtil::setupInitInfoSimpleMapObj(&info);
info.setupPrepareChangeDummyTexture(cDummyTexName);
info.setupNerve(&NrvAstroMapBoard::AstroMapBoardNrvWait::sInstance);
info.setupNerve(NrvAstroMapBoard::AstroMapBoardNrvWait::get());
info.setupFarClipping(-1.0f);
info.setupNoAppearRiddleSE();
initialize(rIter, info);
Expand Down
11 changes: 11 additions & 0 deletions src/Game/MapObj/MapObjActor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ NrvMapObjActor::HostTypeDone NrvMapObjActor::HostTypeDone::sInstance;
NrvMapObjActor::HostTypeMove NrvMapObjActor::HostTypeMove::sInstance;
NrvMapObjActor::HostTypeWait NrvMapObjActor::HostTypeWait::sInstance;

namespace {
const char* cBrkNameColorChange = "ColorChange";
const char* cBtpNameTexChange = "TexChange";
const char* cBtkNameTexChange = "TexChange";
const char* cEffectNameAppear = "Appear";
const char* cBckNameMove = "Move";
const char* cFollowJointName = "Move";
const char* cEffectNameBreak = "Break";
const char* cBckNameBreak = "Break";
};

MapObjActor::MapObjActor(const char *pName) : LiveActor(pName) {
mObjectName = 0;
mPlanetLodCtrl = 0;
Expand Down
5 changes: 2 additions & 3 deletions src/Game/MapObj/SpinDriverPathDrawer.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "Game/MapObj/SpinDriverPathDrawer.hpp"
#include "Game/Scene/SceneObjHolder.hpp"
#include "Game/Util.hpp"
#include "Game/Util/DirectDraw.hpp"
#include <revolution/gx/GXVert.h>


SpinDriverPathDrawInit::SpinDriverPathDrawInit() : NameObj("スピンドライバーレール描画初期化"),
Expand Down Expand Up @@ -206,4 +205,4 @@ SpinDriverPathDrawer::~SpinDriverPathDrawer() {

SpinDriverPathDrawInit::~SpinDriverPathDrawInit() {

}
}
1 change: 1 addition & 0 deletions src/Game/Screen/THPDraw.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <revolution.h>
#include <revolution/gx/GXVert.h>

#ifdef __cplusplus
extern "C" {
Expand Down
3 changes: 3 additions & 0 deletions src/Game/Util/MathUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

#include <cmath>

static f32 minDegree = 0.0f;
static f32 maxDegree = 360.0f;

namespace MR {
f32 getRandom(f32 min, f32 max) {
return (min + ((max - min) * getRandom()));
Expand Down
4 changes: 2 additions & 2 deletions src/RVL_SDK/gd/GDBase.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <revolution/gd.h>
#include <revolution/gd/GDBase.h>

GDLObj* __GDCurrentDL = NULL;
static GDOverflowCallback overflowcb = NULL;
Expand Down Expand Up @@ -27,4 +27,4 @@ void GDOverflowed() {
if (overflowcb) {
(*overflowcb)();
}
}
}

0 comments on commit 63df4ed

Please sign in to comment.