Skip to content

Commit c75f7ae

Browse files
authored
Merge branch 'main' into SonicGaugeCodeEx
2 parents ecdba83 + c8fd07c commit c75f7ae

24 files changed

Lines changed: 354 additions & 197 deletions

File tree

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 49 deletions
This file was deleted.
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Bug Report
2+
description: Report a bug in Marathon Recompiled
3+
type: "Bug"
4+
body:
5+
- type: checkboxes
6+
id: validation
7+
attributes:
8+
label: Validation
9+
options:
10+
- label: I have checked the [Issues](https://github.com/sonicnext-dev/MarathonRecomp/issues) page to see if my problem has already been reported
11+
required: true
12+
- label: I have confirmed that this bug does not occur in the original game running on original Xbox 360 hardware
13+
required: true
14+
- type: checkboxes
15+
id: dlc
16+
attributes:
17+
label: DLC
18+
description: If you have DLC installed, please specify which ones you have.
19+
options:
20+
- label: Shadow Boss Attack
21+
- label: Silver Boss Attack
22+
- label: Sonic Boss Attack
23+
- label: Team Attack Amigo
24+
- label: Mission Pack Shadow Very Hard
25+
- label: Mission Pack Silver Very Hard
26+
- label: Mission Pack Sonic Very Hard
27+
- type: textarea
28+
id: mods
29+
attributes:
30+
label: Mods
31+
description: Provide a list of your enabled mods in Mod Manager here. You will not receive support for issues *caused* by mods.
32+
- type: textarea
33+
id: codes
34+
attributes:
35+
label: Codes
36+
description: Provide a list of your enabled codes in Mod Manager here.
37+
- type: textarea
38+
id: description
39+
attributes:
40+
label: Describe the Bug
41+
description: A clear and concise description of what the bug is.
42+
validations:
43+
required: true
44+
- type: textarea
45+
id: reproduction
46+
attributes:
47+
label: Steps to Reproduce
48+
description: Provide steps to reproduce the bug
49+
placeholder: |
50+
1. Go to '...'
51+
2. etc.
52+
validations:
53+
required: true
54+
- type: textarea
55+
id: expected
56+
attributes:
57+
label: Expected Behavior
58+
description: A clear and concise description of what you expected to happen.
59+
validations:
60+
required: true
61+
- type: textarea
62+
id: footage
63+
attributes:
64+
label: Footage
65+
description: Attach a screenshot or video of the bug. If possible, please also provide footage of the expected behaviour on original Xbox 360 hardware.
66+
- type: textarea
67+
id: specifications
68+
attributes:
69+
label: Specifications
70+
description: Fill out the following details
71+
value: |
72+
- CPU: (e.g. Intel Core [...], AMD Ryzen [...], etc.)
73+
- GPU: (e.g. NVIDIA GeForce [...], Radeon HD [...], Intel HD [...], etc.)
74+
- GPU Driver: (e.g NVIDIA driver 545.XX, AMD driver 24.X.X, etc.)
75+
- OS: (e.g. Windows 10, Windows 11, Linux distro)
76+
- Version: (e.g. 1.0.0)
77+
validations:
78+
required: true
79+
- type: textarea
80+
id: context
81+
attributes:
82+
label: Additional Context
83+
description: Provide any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: Dev Report
2+
description: For developer use only!
3+
body:
4+
- type: textarea
5+
id: description
6+
attributes:
7+
label: Description
8+
validations:
9+
required: true

.github/workflows/validate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
- name: Install Dependencies (Linux)
5353
run: |-
5454
sudo apt update
55-
sudo apt install -y ninja-build llvm-${{ env.LLVM_VERSION }}-dev libgtk-3-dev
55+
sudo apt install -y ninja-build llvm-${{ env.LLVM_VERSION }}-dev libgtk-3-dev libasound2-dev libpulse-dev libpipewire-0.3-dev
5656
5757
- name: Cache ccache Directory
5858
uses: actions/cache@v4

MarathonRecomp/api/Marathon.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "CSD/Platform/csdTexList.h"
1818
#include "Sonicteam/Actor.h"
1919
#include "Sonicteam/AppMarathon.h"
20+
#include "Sonicteam/AudioEngineXenon.h"
2021
#include "Sonicteam/Camera/CameraMode.h"
2122
#include "Sonicteam/Camera/Cameraman.h"
2223
#include "Sonicteam/Camera/SonicCamera.h"
@@ -51,12 +52,15 @@
5152
#include "Sonicteam/Player/State/TailsContext.h"
5253
#include "Sonicteam/Player/Weapon/SonicWeapons.h"
5354
#include "Sonicteam/SoX/AI/StateMachine.h"
55+
#include "Sonicteam/SoX/Audio/IAudioEngine.h"
5456
#include "Sonicteam/SoX/Component.h"
5557
#include "Sonicteam/SoX/Engine/Doc.h"
5658
#include "Sonicteam/SoX/Engine/DocMode.h"
5759
#include "Sonicteam/SoX/Engine/Task.h"
5860
#include "Sonicteam/SoX/MessageReceiver.h"
5961
#include "Sonicteam/SoX/Object.h"
62+
#include "Sonicteam/System/CreateStatic.h"
63+
#include "Sonicteam/System/Singleton.h"
6064
#include "Sonicteam/TitleTask.h"
6165
#include "boost/smart_ptr/make_shared_object.h"
6266
#include "boost/smart_ptr/shared_ptr.h"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#pragma once
2+
3+
#include <Marathon.inl>
4+
#include <Sonicteam/SoX/Engine/Doc.h>
5+
#include <Sonicteam/SoX/Audio/IAudioEngine.h>
6+
#include <Sonicteam/System/CreateStatic.h>
7+
#include <Sonicteam/System/Singleton.h>
8+
9+
namespace Sonicteam
10+
{
11+
class AudioEngineXenon : public SoX::Audio::IAudioEngine, public System::Singleton<AudioEngineXenon, 0x82D37AC8, System::CreateStatic<AudioEngineXenon, 0x824A5C78>>
12+
{
13+
public:
14+
MARATHON_INSERT_PADDING(8);
15+
be<float> m_MusicVolume;
16+
be<float> m_EffectsVolume;
17+
MARATHON_INSERT_PADDING(0x14);
18+
};
19+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#pragma once
2+
3+
#include <Marathon.inl>
4+
5+
namespace Sonicteam::SoX::Audio
6+
{
7+
class IAudioEngine
8+
{
9+
public:
10+
xpointer<void> m_pVftable;
11+
};
12+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#pragma once
2+
3+
namespace Sonicteam::System
4+
{
5+
template <typename T, uint32_t TCreator>
6+
class CreateStatic
7+
{
8+
public:
9+
static T* Create()
10+
{
11+
return GuestToHostFunction<T*>(TCreator);
12+
}
13+
};
14+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#pragma once
2+
3+
namespace Sonicteam::System
4+
{
5+
template <typename T, const uint32_t Ptr, typename TCreator>
6+
class Singleton
7+
{
8+
inline static TCreator ms_Creator{};
9+
10+
public:
11+
static T* GetInstance()
12+
{
13+
auto pInstance = (xpointer<T>*)g_memory.Translate(Ptr);
14+
15+
if (!pInstance->ptr.get())
16+
*pInstance = ms_Creator.Create();
17+
18+
return *pInstance;
19+
}
20+
};
21+
}

0 commit comments

Comments
 (0)