Skip to content

Commit 5e24028

Browse files
committed
Implemented camera X/Y inversion
1 parent 0998819 commit 5e24028

17 files changed

Lines changed: 103 additions & 11 deletions

File tree

MarathonRecomp/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ set(MARATHON_RECOMP_HID_CXX_SOURCES
136136

137137
set(MARATHON_RECOMP_PATCHES_CXX_SOURCES
138138
"patches/aspect_ratio_patches.cpp"
139-
"patches/audio_patches.cpp"
139+
"patches/audio_patches.cpp"
140+
"patches/camera_patches.cpp"
140141
"patches/frontend_listener.cpp"
141142
"patches/misc_patches.cpp"
142143
"patches/TitleTask_patches.cpp"

MarathonRecomp/api/CSD/Manager/csdmResourceBase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace Chao::CSD
1515
};
1616

1717
xpointer<Vftable> m_pVftable;
18-
RCPtr<uint8_t> m_rcResourceHolder;
18+
MARATHON_INSERT_PADDING(4);
1919
xpointer<T> m_pResource;
2020

2121
~CResourceBase();

MarathonRecomp/api/Marathon.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515
#include "CSD/Manager/csdmSceneObserver.h"
1616
#include "CSD/Manager/csdmSubjectBase.h"
1717
#include "CSD/Platform/csdTexList.h"
18+
#include "Sonicteam/Actor.h"
1819
#include "Sonicteam/AppMarathon.h"
20+
#include "Sonicteam/Camera/CameraMode.h"
21+
#include "Sonicteam/Camera/Cameraman.h"
22+
#include "Sonicteam/Camera/SonicCamera.h"
1923
#include "Sonicteam/DocMarathonImp.h"
2024
#include "Sonicteam/DocMarathonState.h"
2125
#include "Sonicteam/SoX/Component.h"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#pragma once
2+
3+
#include <Marathon.inl>
4+
#include <Sonicteam/SoX/Engine/Task.h>
5+
6+
namespace Sonicteam
7+
{
8+
class Actor : public SoX::Engine::Task {};
9+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#pragma once
2+
3+
#include <Marathon.inl>
4+
#include <Sonicteam/SoX/MessageReceiver.h>
5+
6+
namespace Sonicteam::Camera
7+
{
8+
class CameraMode : public SoX::MessageReceiver
9+
{
10+
public:
11+
MARATHON_INSERT_PADDING(0x24);
12+
};
13+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#pragma once
2+
3+
#include <Marathon.inl>
4+
#include <boost/smart_ptr/shared_ptr.h>
5+
6+
namespace Sonicteam::Camera
7+
{
8+
class Cameraman : Actor
9+
{
10+
public:
11+
MARATHON_INSERT_PADDING(0x28);
12+
boost::anonymous_shared_ptr m_spMyInputObj;
13+
MARATHON_INSERT_PADDING(0x34);
14+
be<float> m_FOV;
15+
MARATHON_INSERT_PADDING(0x04);
16+
boost::anonymous_shared_ptr m_spKynapseControl;
17+
};
18+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#pragma once
2+
3+
namespace Sonicteam::Camera
4+
{
5+
class SonicCamera : public CameraMode
6+
{
7+
public:
8+
MARATHON_INSERT_PADDING(0x1C);
9+
be<float> m_SpringK;
10+
be<float> m_DampingK;
11+
MARATHON_INSERT_PADDING(0x08);
12+
be<float> m_AzDriveK;
13+
be<float> m_AzDampingK;
14+
be<float> m_AltDriveK;
15+
be<float> m_AltDampingK;
16+
MARATHON_INSERT_PADDING(0x3C);
17+
be<float> m_FovY;
18+
};
19+
}

MarathonRecomp/api/Sonicteam/SoX/Component.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ namespace Sonicteam::SoX
88
class Component : public Object
99
{
1010
public:
11-
MARATHON_INSERT_PADDING(0x20);
11+
MARATHON_INSERT_PADDING(0x1C);
1212
};
1313
}

MarathonRecomp/api/Sonicteam/SoX/Engine/Doc.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ namespace Sonicteam::SoX::Engine
77
class Doc
88
{
99
public:
10-
MARATHON_INSERT_PADDING(0x5C);
10+
xpointer<void> m_pVftable;
11+
MARATHON_INSERT_PADDING(0x58);
1112
};
1213
}

MarathonRecomp/api/Sonicteam/SoX/Engine/Task.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ namespace Sonicteam::SoX::Engine
99
class Task : public Component, public MessageReceiver
1010
{
1111
public:
12-
MARATHON_INSERT_PADDING(0x4C);
12+
MARATHON_INSERT_PADDING(0x28);
1313
};
1414
}

0 commit comments

Comments
 (0)