Skip to content
Open
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
2 changes: 2 additions & 0 deletions include/nsmb/core/boot/scene.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@


//ov1
// The addresses of these methods are all wrong. Who knows, maybe the overlay indicated above is also wrong.
// The entries in symbols9.x have been commented out.
class BootScene : public Scene
{
public:
Expand Down
5 changes: 1 addition & 4 deletions include/nsmb/core/entity/base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ class Base
//0204d2ac (C2, most likely protected)
Base();

//0204d23c (D2, D1 is pure??)
//~Base()

//0204cba0
BaseReturnState processCreate();

Expand Down Expand Up @@ -60,7 +57,7 @@ class Base
//0204cac0
bool hasChildNotCreated();

//D1 is null
// D1 is null; D0: 0x0204d270; D2: 0x0204d23c
virtual ~Base();

//0204d078
Expand Down
4 changes: 2 additions & 2 deletions include/nsmb/core/system/save.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,10 @@ namespace Save {
//02013064
void clearOptionSave(OptionSave* save);

//02013090
//02013090 (Is this adderss wrong, or do we just have two names for the same function?)
bool createOptionSave();

//020130b4
//02013090
bool generateOptionSave();

//020130b4
Expand Down
4 changes: 2 additions & 2 deletions include/nsmb/extra/assert.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ struct __ntr {

#endif

NTR_COPY(OS_Terminate) NTR_FORMAT(printf, 4, 5) static void terminate(const char* file, const char* function, int line, const char* fmt, ...)
NTR_COPY(OS_Terminate) NTR_FORMAT(printf, 4, 5) NTR_INLINE static void terminate(const char* file, const char* function, int line, const char* fmt, ...)
#ifndef NTR_DEBUG
asm("OS_Terminate");
{ OS_Terminate(); }
#else
{

Expand Down
54 changes: 27 additions & 27 deletions include/nsmb/game/physics/linecontroller.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,33 +50,33 @@ class LineController
void clearOffsets();
bool checkEndTile();

bool calculateHorizontalStep(fx32 slope, fx32 length, Vec2 source, Vec2 target, Vec2& out) const;
bool calculateVerticalStep(fx32 length, Vec2 source, Vec2 target, fx32& out) const;
u16 calculateCurveStep(fx32 radiusSquared, Vec2 source, Vec2 target) const;

bool attachToAscSlope(Vec2 target, Vec2 source, Vec2 current);
bool attachToDescSlope(Vec2 target, Vec2 source, Vec2 current);
bool attachToHorizontalCorner(Vec2 target, Vec2 source, Vec2 current);
bool attachToVerticalCorner(Vec2 target, Vec2 source, Vec2 current);
bool attachToHorizontal(Vec2 target, Vec2 source, Vec2 current);
bool attachToVertical(Vec2 target, Vec2 source, Vec2 current);
bool attachToAscFlatSlopeLeft(Vec2 target, Vec2 source, Vec2 current);
bool attachToAscFlatSlopeRight(Vec2 target, Vec2 source, Vec2 current);
bool attachToDescFlatSlopeLeft(Vec2 target, Vec2 source, Vec2 current);
bool attachToDescFlatSlopeRight(Vec2 target, Vec2 source, Vec2 current);
bool attachToAscSteepSlopeTop(Vec2 target, Vec2 source, Vec2 current);
bool attachToAscSteepSlopeBottom(Vec2 target, Vec2 source, Vec2 current);
bool attachToDescSteepSlopeBottom(Vec2 target, Vec2 source, Vec2 current);
bool attachToDescSteepSlopeTop(Vec2 target, Vec2 source, Vec2 current);
u16 attachToSmallCircle(Vec2 target, Vec2 source, Vec2 current);
u16 attachToMedium2ndArc(Vec2 target, Vec2 source, Vec2 current);
u16 attachToMedium1stArc(Vec2 target, Vec2 source, Vec2 current);
u16 attachToMedium3rdArc(Vec2 target, Vec2 source, Vec2 current);
u16 attachToMedium4thArc(Vec2 target, Vec2 source, Vec2 current);
u16 attachToBig1stArc(Vec2 target, Vec2 source, Vec2 current);
u16 attachToBig2ndArc(Vec2 target, Vec2 source, Vec2 current);
u16 attachToBig3rdArc(Vec2 target, Vec2 source, Vec2 current);
u16 attachToBig4thArc(Vec2 target, Vec2 source, Vec2 current);
bool calculateHorizontalStep(fx32 slope, fx32 length, Vec2& source, Vec2& target, Vec2& out) const;
bool calculateVerticalStep(fx32 length, Vec2& source, Vec2& target, fx32& out) const;
u16 calculateCurveStep(fx32 radiusSquared, Vec2& source, Vec2& target) const;

bool attachToAscSlope(Vec2& target, Vec2& source, Vec2& current);
bool attachToDescSlope(Vec2& target, Vec2& source, Vec2& current);
bool attachToHorizontalCorner(Vec2& target, Vec2& source, Vec2& current);
bool attachToVerticalCorner(Vec2& target, Vec2& source, Vec2& current);
bool attachToHorizontal(Vec2& target, Vec2& source, Vec2& current);
bool attachToVertical(Vec2& target, Vec2& source, Vec2& current);
bool attachToAscFlatSlopeLeft(Vec2& target, Vec2& source, Vec2& current);
bool attachToAscFlatSlopeRight(Vec2& target, Vec2& source, Vec2& current);
bool attachToDescFlatSlopeLeft(Vec2& target, Vec2& source, Vec2& current);
bool attachToDescFlatSlopeRight(Vec2& target, Vec2& source, Vec2& current);
bool attachToAscSteepSlopeTop(Vec2& target, Vec2& source, Vec2& current);
bool attachToAscSteepSlopeBottom(Vec2& target, Vec2& source, Vec2& current);
bool attachToDescSteepSlopeBottom(Vec2& target, Vec2& source, Vec2& current);
bool attachToDescSteepSlopeTop(Vec2& target, Vec2& source, Vec2& current);
u16 attachToSmallCircle(Vec2& target, Vec2& source, Vec2& current);
u16 attachToMedium2ndArc(Vec2& target, Vec2& source, Vec2& current);
u16 attachToMedium1stArc(Vec2& target, Vec2& source, Vec2& current);
u16 attachToMedium3rdArc(Vec2& target, Vec2& source, Vec2& current);
u16 attachToMedium4thArc(Vec2& target, Vec2& source, Vec2& current);
u16 attachToBig1stArc(Vec2& target, Vec2& source, Vec2& current);
u16 attachToBig2ndArc(Vec2& target, Vec2& source, Vec2& current);
u16 attachToBig3rdArc(Vec2& target, Vec2& source, Vec2& current);
u16 attachToBig4thArc(Vec2& target, Vec2& source, Vec2& current);
void attachToLine();

void beginIdle();
Expand Down
8 changes: 7 additions & 1 deletion include/nsmb/game/stage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
#include "stage/actors/ov10/stagefx.hpp"
#include "stage/actors/ov10/zoom.hpp"

// Overlay 14 - MegaGoomba
#include "stage/actors/ov14/megagoomba.hpp"

// Overlay 22 - PipeEnemySpawner
#include "stage/actors/ov22/pipeenemyspawner.hpp"

Expand Down Expand Up @@ -69,13 +72,16 @@
#include "stage/actors/ov48/tiltmetaldish.hpp"
#include "stage/actors/ov48/wobblerock.hpp"

// Overlay 54 - Checkpoint, CoinSpawner, Trampoline, VolcanoEruption, TileGod, DonutLift
// Overlay 54 - Checkpoint, CoinSpawner, Trampoline, VolcanoEruption, TileGod, DonutLift, RedCoinRing, WarpEntrance, Door
#include "stage/actors/ov54/checkpoint.hpp"
#include "stage/actors/ov54/coinspawner.hpp"
#include "stage/actors/ov54/trampoline.hpp"
#include "stage/actors/ov54/volcanoeruption.hpp"
#include "stage/actors/ov54/tilegod.hpp"
#include "stage/actors/ov54/donutlift.hpp"
#include "stage/actors/ov54/redcoinring.hpp"
#include "stage/actors/ov54/warpentrance.hpp"
#include "stage/actors/ov54/door.hpp"

// Overlay 57 - ChainChomp, ChainChompLog
#include "stage/actors/ov57/chainchomp.hpp"
Expand Down
2 changes: 1 addition & 1 deletion include/nsmb/game/stage/actors/ov14/megagoomba.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <nsmb/core/math/math.hpp>
#include <nsmb/core/graphics/3d/animationctrl.hpp>

// vtable at 021330F4 (ov54)
// vtable at 021330F4 (ov14)
class MegaGoomba : public StageEntity3DAnm
{
public:
Expand Down
2 changes: 2 additions & 0 deletions include/nsmb/game/stage/actors/ov23/pokey.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ class Pokey : public StageEntity

using StateFunction = bool(Pokey::*)();

virtual ~Pokey();

s32 onCreate() override;
s32 onDestroy() override;
s32 onRender() override;
Expand Down
2 changes: 1 addition & 1 deletion include/nsmb/game/stage/entity.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ class alignas(4) StageEntity : public StageActor
// 0209a144
void attachToPlayerHands(fx32 z, fx32 y, fx32 x);

// 0209a23c (TODO)
// 0209a23c
u32 updateSolidActiveCollider(bool push, u32 flags, u8 playerID);

// 0209a4f0
Expand Down
3 changes: 0 additions & 3 deletions include/nsmb/game/stage/player/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ namespace Game {

};

extern u8 playerPowerup[2];
extern bool playerDead[2];
extern u8 playerInventoryPowerup[2];
extern u8 playerCharacter[2];
extern s16 playerMegaTimer[2];
extern BOOL playerInCutscene;
Expand Down
7 changes: 4 additions & 3 deletions include/nsmb/game/vsconnect/scene.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ class VSConnectScene : public Scene
VSConnectScene* owner;
};

typedef void (VSConnectScene::*VSConnectScene_mfunc)();
struct SubMenu
{
void (VSConnectScene::*create)();
void (VSConnectScene::*update)();
void (VSConnectScene::*render)();
VSConnectScene_mfunc create;
VSConnectScene_mfunc update;
VSConnectScene_mfunc render;
u32 unused;
};

Expand Down
26 changes: 20 additions & 6 deletions include/nsmb/game/worldmap/actor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <nsmb/core/entity/actor.hpp>

//vtable: 021a9040
//vtable: 020E9680 (overlay 8)
class WorldmapActor : public Actor
{
public:
Expand All @@ -25,17 +25,31 @@ class WorldmapActor : public Actor
StarcoinSignWaiting,
};

//C1:02199d58
//C3:0219ab98
//C1:020da398
WorldmapActor();

//D0:02199788
//D1:02199a74
//D0:020d9dc8
//D1:020da0b4
virtual ~WorldmapActor() override;

//021983cc
//020d8a0c
virtual s32 onCreate() override;

//020d81d0
virtual s32 onDestroy() override;

//020d6e30
virtual s32 onUpdate() override;

//020d7734
virtual s32 onRender() override;

//020d81cc
virtual void onCleanupResources() override;

//020e96bc
virtual bool onPrepareResources() override;

static constexpr u16 ObjectID = 319;

static constexpr u16 UpdatePriority = ObjectID;
Expand Down
3 changes: 2 additions & 1 deletion include/nsmb/game/worldmap/camera.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <nsmb/core/graphics/util/perspview.hpp>

// ov8
// vtable at 0x020E8C3C (overlay 8)
class WorldMapCamera : public PerspView
{
public:
Expand Down Expand Up @@ -32,6 +32,7 @@ class WorldMapCamera : public PerspView
//0x020E8BEC
static ObjectProfile profile;

// TODO: These three addresses are incorrect.
//021a65b0
static VecFx32 worldLightPositions[8];

Expand Down
1 change: 1 addition & 0 deletions include/nsmb/game/worldmap/entity.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <nsmb/core/graphics/3d/modelanm.hpp>
#include <nsmb/core/graphics/3d/animationctrl.hpp>

// TODO: These addresses are incorrect.
class WorldmapEntityModel
{
public:
Expand Down
1 change: 1 addition & 0 deletions include/nsmb/game/worldmap/player.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <nsmb/game/player.hpp>

//vtable 021a9530
// TODO: These addresses are incorrect.
class WorldmapPlayerModel
{
public:
Expand Down
Loading