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
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cmake-build-release/
cmake-build-debug/
.idea/
.vs/
build/
/.vs
out/
12 changes: 12 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[submodule "dep/imgui"]
path = dep/imgui
url = https://github.com/ocornut/imgui.git
[submodule "dep/libmcc"]
path = dep/libmcc
url = https://github.com/SpringContingency/libmcc.git
[submodule "dep/spdlog"]
path = dep/spdlog
url = https://github.com/gabime/spdlog.git
[submodule "dep/json"]
path = dep/json
url = https://github.com/nlohmann/json.git
24 changes: 24 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**",
"${vcpkgRoot}/x64-windows/include",
"${vcpkgRoot}/x86-windows/include"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.22621.0",
"compilerPath": "cl.exe",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "windows-msvc-x64",
"configurationProvider": "ms-vscode.cmake-tools"
}
],
"version": 4
}
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"C_Cpp.errorSquiggles": "enabled",
"cmake.configureSettings": {
"CMAKE_TOOLCHAIN_FILE": "C:/Users/jackb/Repositories/vcpkg/scripts/buildsystems/vcpkg.cmake",
"VCPKG_TARGET_TRIPLET": "x64-windows-static-md"
}
}
32 changes: 21 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ project(alpha_ring)

set(CMAKE_CXX_STANDARD 17)

find_package(SDL2 CONFIG REQUIRED)
find_package(SDL2_mixer CONFIG REQUIRED)

set(VERSION "1.3528.0.0")

set(WRAPPER_NAME "WTSAPI32")
Expand All @@ -22,38 +25,39 @@ include_directories(${CMAKE_SOURCE_DIR}/lib/json/include)
# imgui
add_library(imgui SHARED IMPORTED)
include_directories(${CMAKE_SOURCE_DIR}/lib/imgui/inc)
set_target_properties(imgui PROPERTIES IMPORTED_IMPLIB "${CMAKE_SOURCE_DIR}/lib/imgui/lib/${CMAKE_BUILD_TYPE}/imgui.lib")
set_target_properties(imgui PROPERTIES IMPORTED_IMPLIB "${CMAKE_SOURCE_DIR}/lib/imgui/lib/release/imgui.lib")

# lua
add_library(lua SHARED IMPORTED)
include_directories(${CMAKE_SOURCE_DIR}/lib/lua/inc)
set_target_properties(lua PROPERTIES IMPORTED_IMPLIB "${CMAKE_SOURCE_DIR}/lib/lua/lib/${CMAKE_BUILD_TYPE}/lua.lib")
set_target_properties(lua PROPERTIES IMPORTED_IMPLIB "${CMAKE_SOURCE_DIR}/lib/lua/lib/release/lua.lib")

# spdlog
add_library(spdlog SHARED IMPORTED)
include_directories(${CMAKE_SOURCE_DIR}/lib/spdlog/inc)
set_target_properties(spdlog PROPERTIES IMPORTED_IMPLIB "${CMAKE_SOURCE_DIR}/lib/spdlog/lib/${CMAKE_BUILD_TYPE}/spdlog.lib")
set_target_properties(spdlog PROPERTIES IMPORTED_IMPLIB "${CMAKE_SOURCE_DIR}/lib/spdlog/lib/release/spdlog.lib")

# tinyxml2
add_library(tinyxml2 SHARED IMPORTED)
include_directories(${CMAKE_SOURCE_DIR}/lib/tinyxml2/inc)
set_target_properties(tinyxml2 PROPERTIES IMPORTED_IMPLIB "${CMAKE_SOURCE_DIR}/lib/tinyxml2/lib/${CMAKE_BUILD_TYPE}/tinyxml2.lib")
set_target_properties(tinyxml2 PROPERTIES IMPORTED_IMPLIB "${CMAKE_SOURCE_DIR}/lib/tinyxml2/lib/release/tinyxml2.lib")

# minhook
add_library(minhook SHARED IMPORTED)
include_directories(${CMAKE_SOURCE_DIR}/lib/minhook/inc)
set_target_properties(minhook PROPERTIES IMPORTED_IMPLIB "${CMAKE_SOURCE_DIR}/lib/minhook/lib/${CMAKE_BUILD_TYPE}/libMinhook.x64.lib")
# set_target_properties(minhook PROPERTIES IMPORTED_IMPLIB "${CMAKE_SOURCE_DIR}/lib/minhook/lib/${CMAKE_BUILD_TYPE}/libMinHook.x64.lib")
set_target_properties(minhook PROPERTIES IMPORTED_IMPLIB "${CMAKE_SOURCE_DIR}/lib/minhook/lib/release/libMinHook.x64.lib")

# utils
file(GLOB_RECURSE UTILS_SRC ${CMAKE_SOURCE_DIR}/lib/utils/src/*.cpp)
include_directories(${CMAKE_SOURCE_DIR}/lib/utils/inc)
add_library(utils ${UTILS_SRC} "lib/game/inc/1.3495.0.0/offset_groundhog.h" "lib/game/inc/1.3495.0.0/offset_halo1.h" "lib/game/inc/1.3495.0.0/offset_halo2.h" "lib/game/inc/1.3495.0.0/offset_halo3.h" "lib/game/inc/1.3495.0.0/offset_halo3odst.h" "lib/game/inc/1.3495.0.0/offset_halo4.h" "lib/game/inc/1.3495.0.0/offset_haloreach.h" "lib/game/inc/1.3495.0.0/offset_mcc.h")
add_library(utils ${UTILS_SRC} "lib/game/inc/${VERSION}/offset_groundhog.h" "lib/game/inc/${VERSION}/offset_halo1.h" "lib/game/inc/${VERSION}/offset_halo2.h" "lib/game/inc/${VERSION}/offset_halo3.h" "lib/game/inc/${VERSION}/offset_halo3odst.h" "lib/game/inc/${VERSION}/offset_halo4.h" "lib/game/inc/${VERSION}/offset_haloreach.h" "lib/game/inc/${VERSION}/offset_mcc.h")

# game
file(GLOB_RECURSE GAME_SRC ${CMAKE_SOURCE_DIR}/lib/game/src/*.cpp)
include_directories(${CMAKE_SOURCE_DIR}/lib/game/inc)
include_directories(${CMAKE_SOURCE_DIR}/lib/game/inc/${VERSION})
add_library(game ${GAME_SRC} "lib/game/inc/1.3495.0.0/offset_groundhog.h" "lib/game/inc/1.3495.0.0/offset_halo1.h" "lib/game/inc/1.3495.0.0/offset_halo2.h" "lib/game/inc/1.3495.0.0/offset_halo3.h" "lib/game/inc/1.3495.0.0/offset_halo3odst.h" "lib/game/inc/1.3495.0.0/offset_halo4.h" "lib/game/inc/1.3495.0.0/offset_haloreach.h" "lib/game/inc/1.3495.0.0/offset_mcc.h")
add_library(game ${GAME_SRC} "lib/game/inc/${VERSION}/offset_groundhog.h" "lib/game/inc/${VERSION}/offset_halo1.h" "lib/game/inc/${VERSION}/offset_halo2.h" "lib/game/inc/${VERSION}/offset_halo3.h" "lib/game/inc/${VERSION}/offset_halo3odst.h" "lib/game/inc/${VERSION}/offset_halo4.h" "lib/game/inc/${VERSION}/offset_haloreach.h" "lib/game/inc/${VERSION}/offset_mcc.h")

# disable warning c4996
add_definitions(-D_SILENCE_ALL_MS_EXT_DEPRECATION_WARNINGS)
Expand All @@ -62,11 +66,17 @@ add_definitions(-DIMGUI_DEFINE_MATH_OPERATORS)
add_compile_definitions(WRAPPER_DLL_NAME="${WRAPPER_DLL_NAME}")
add_compile_definitions(GAME_VERSION="${VERSION}")

file(GLOB_RECURSE CORE_SRC ${CMAKE_SOURCE_DIR}/src/*.cpp)
file(GLOB_RECURSE CORE_SRC
${CMAKE_SOURCE_DIR}/src/*.cpp
${CMAKE_SOURCE_DIR}/src/*.c
)

add_library(${WRAPPER_NAME} SHARED ${CORE_SRC} "lib/game/inc/1.3495.0.0/offset_groundhog.h" "lib/game/inc/1.3495.0.0/offset_halo1.h" "lib/game/inc/1.3495.0.0/offset_halo2.h" "lib/game/inc/1.3495.0.0/offset_halo3.h" "lib/game/inc/1.3495.0.0/offset_halo3odst.h" "lib/game/inc/1.3495.0.0/offset_halo4.h" "lib/game/inc/1.3495.0.0/offset_haloreach.h" "lib/game/inc/1.3495.0.0/offset_mcc.h")
add_library(${WRAPPER_NAME} SHARED ${CORE_SRC} "lib/game/inc/${VERSION}/offset_groundhog.h" "lib/game/inc/${VERSION}/offset_halo1.h" "lib/game/inc/${VERSION}/offset_halo2.h" "lib/game/inc/${VERSION}/offset_halo3.h" "lib/game/inc/${VERSION}/offset_halo3odst.h" "lib/game/inc/${VERSION}/offset_halo4.h" "lib/game/inc/${VERSION}/offset_haloreach.h" "lib/game/inc/${VERSION}/offset_mcc.h")

target_link_libraries(${WRAPPER_NAME} PUBLIC ${LIBRARY_LIST})
target_link_libraries(${WRAPPER_NAME} PUBLIC ${LIBRARY_LIST}
SDL2::SDL2-static
SDL2_mixer::SDL2_mixer-static
)

if (MSVC)
target_link_options(${WRAPPER_NAME} PUBLIC /DEBUG)
Expand All @@ -75,4 +85,4 @@ else ()
endif()

install(TARGETS ${WRAPPER_NAME} DESTINATION "${MCC_DIR}/mcc/binaries/win64")
install(DIRECTORY "${CMAKE_SOURCE_DIR}/res/" DESTINATION "${MCC_DIR}/alpha_ring")
install(DIRECTORY "${CMAKE_SOURCE_DIR}/res/" DESTINATION "${MCC_DIR}/alpha_ring")
98 changes: 92 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,47 @@
## Alpha Ring
# AlphaRing - thejackbitt fork

>
> **Based on:** JackBitt's AlphaRing v1.2.1 (commit `bdad7eb`)
>
> For the original project, see [WinterSquire/AlphaRing](https://github.com/WinterSquire/AlphaRing)

---

## What's New in This Fork

### Features Added

#### 1. Controller-to-Player Binding (Splitscreen)
- Each player now has a **"Bind" button** next to the controller dropdown
- Click "Bind" → Press any button on a controller → Automatically assigns that controller to the player
- No more guessing which controller is "Controller 1" vs "Controller 2"

#### 2. Button-to-Action Binding (Gamepad Mapping)
- Each action in the Gamepad Mapping section has a **"Bind" button**
- Click "Bind" → Press a button → That button is assigned to the action

#### 3. Fixed Default Gamepad Mappings
- **Bug fixed:** Previously, all actions defaulted to "Left Trigger" due to uninitialized memory
- **Now:** New profiles initialize with standard Xbox Halo controls:

| Action | Button |
|--------|--------|
| Jump | A |
| Melee | B |
| Action/Interact | X |
| Change Weapon | Y |
| Reload | RB |
| Switch Grenades | LB |
| Shoot | RT |
| Throw Grenade | LT |
| Flashlight | D-pad Up |
| Crouch | Left Stick Click |
| Zoom | Right Stick Click |

---

## Original Alpha Ring

A Modding Tool for MCC

[![Build status](https://ci.appveyor.com/api/projects/status/o3qbtc7jirw81xmb?svg=true)](https://ci.appveyor.com/project/WinterSquire/alpharing)
Expand All @@ -19,26 +62,69 @@ A Modding Tool for MCC
### Installation
Make sure you have the latest [Microsoft Visual C++ Redistributable](https://aka.ms/vs/17/release/vc_redist.x64.exe) installed.

Download the latest stable build from the [Releases](https://github.com/WinterSquire/AlphaRing/releases) page.
Download the latest stable build from the [Releases](https://github.com/kirklandsig/AlphaRing/releases) page.

Place the DLL into the "Halo The Master Chief Collection\mcc\binaries\win64" directory and launch the game with EAC off.

For Running on Steam Deck/Linux, add the following command in the Steam Game Launch Options:
```
```
WINEDLLOVERRIDES="WTSAPI32=n,b" %command%
```

#### Batocera Linux / Steam Deck

Works with **any Proton version** (Proton 9.0, Proton Experimental, Proton GE, etc.)

1. **Configure the game**:
- Right-click MCC → Properties → Compatibility
- Enable "Force the use of a specific Steam Play compatibility tool"
- Select any Proton version (Proton 9.0, Experimental, or Proton GE all work)

2. **Set launch options**: Add the following to Steam Launch Options:
```
WINEDLLOVERRIDES="WTSAPI32=n,b" %command%
```

3. **Controller Setup (Important for non-Xbox controllers)**:
- For 8BitDo and other third-party controllers, enable **Steam Input** for the controller
- Go to Steam → Settings → Controller → Enable "Xbox Configuration Support"
- This allows Steam to translate your controller inputs to XInput, which MCC and AlphaRing expect
- Without this, some buttons (like A or stick clicks) may not be detected

> **Note:** Tested on Batocera Linux with the unofficial Batocera add-ons Steam client.

### Usage
Toggle menu: `F4` or `Controller Back` + `Controller Start`

To navigate using Controller use the `Right Stick` to move the mouse and `RB` to click.

When the menu is open, game input is disabled.

### Bugs Report
Submit it in the [Issues](https://github.com/WinterSquire/AlphaRing/issues) page.
---

## Building from Source

### Prerequisites
- Visual Studio 2022 Build Tools
- CMake 3.27+

### Build Commands
```bash
# First time setup
mkdir build && cd build
cmake .. -G "Visual Studio 17 2022" -A x64

# Build
"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" WTSAPI32.vcxproj -p:Configuration=Release -p:Platform=x64
```

Output: `build/Release/WTSAPI32.dll`

---

### Credits
## Credits
- **Original AlphaRing:** [WinterSquire](https://github.com/WinterSquire/AlphaRing)
- **Controller Binding and Proton Fixes Fork:** [kirklandsig](https://github.com/kirklandsig/AlphaRing)
- [Assembly](https://github.com/XboxChaos/Assembly) for the tag group research.
- [Blender](https://github.com/blender/blender) for the bezier curve calculation.
- [Priception](https://github.com/Priception) for adding UI controller support and helping with the interface and crash issue.
31 changes: 31 additions & 0 deletions colorMapping.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
AlphaRing,Halo 4,Halo Reach,Halo 3,Halo 3 ODST,Halo 2,Halo 2 Anniversary,Halo 1
Steel,H4_Color0_Steel,HR_Color_Steel,H3_COLOR0_STEEL,ODST_COLOR_BLACK,H2_Color_2,H2A_Color_2,H1_Color_2
Silver,H4_Color1_Silver,HR_Color_Silver,H3_COLOR1_SILVER,ODST_COLOR_GRAY,H2_Color_2,H2A_Color_1,H1_Color_5
White,H4_Color2_White,HR_Color_White,H3_COLOR2_WHITE,ODST_COLOR_SNOW,H2_Color_1,H2A_Color_3,H1_Color_1
Brown,H4_Color3_Brown,HR_Color_Brown,H3_COLOR27_BROWN,ODST_COLOR_BROWN,H2_Color_17,H2A_Color_4,H1_Color_15
Tan,H4_Color4_Tan,HR_Color_Tan,H3_COLOR28_TAN,ODST_COLOR_TAN,H2_Color_18,H2A_Color_5,H1_Color_16
Khaki,H4_Color5_Khaki,HR_Color_Khaki,H3_COLOR29_KHAKI,ODST_COLOR_KHAKI,H2_Color_18,H2A_Color_6,H1_Color_16
Sage,H4_Color6_Sage,HR_Color_Sage,H3_COLOR12_SAGE,ODST_COLOR_SAGE,H2_Color_8,H2A_Color_7,H1_Color_14
Olive,H4_Color7_Olive,HR_Color_Olive,H3_COLOR14_OLIVE,ODST_COLOR_OLIVE,H2_Color_6,H2A_Color_8,H1_Color_14
Drab,H4_Color8_Drab,HR_Color_Drab,H3_COLOR13_GREEN,ODST_COLOR_DRAB,H2_Color_7,H2A_Color_9,H1_Color_7
Forest,H4_Color9_Forest,HR_Color_Forest,H3_COLOR12_SAGE,ODST_COLOR_FOREST,H2_Color_8,H2A_Color_10,H1_Color_14
Green,H4_Color10_Green,HR_Color_Green,H3_COLOR13_GREEN,ODST_COLOR_GREEN,H2_Color_7,H2A_Color_11,H1_Color_14
Sea Foam,H4_Color11_SeaFoam,HR_Color_SeaFoam,H3_COLOR15_TEAL,ODST_COLOR_SEA_FOAM,H2_Color_10,H2A_Color_12,H1_Color_13
Teal,H4_Color12_Teal,HR_Color_Teal,H3_COLOR15_TEAL,ODST_COLOR_TEAL,H2_Color_10,H2A_Color_13,H1_Color_13
Aqua,H4_Color13_Aqua,HR_Color_Aqua,H3_COLOR16_AQUA,ODST_COLOR_AQUA,H2_Color_9,H2A_Color_14,H1_Color_10
Cyan,H4_Color14_Cyan,HR_Color_Cyan,H3_COLOR17_CYAN,ODST_COLOR_CYAN,H2_Color_9,H2A_Color_15,H1_Color_10
Blue,H4_Color15_Blue,HR_Color_Blue,H3_COLOR18_BLUE,ODST_COLOR_BLUE,H2_Color_12,H2A_Color_16,H1_Color_4
Cobalt,H4_Color16_Cobalt,HR_Color_Cobalt,H3_COLOR19_COBALT,ODST_COLOR_COBALT,H2_Color_11,H2A_Color_17,H1_Color_11
Ice,H4_Color17_Ice,HR_Color_Ice,H3_COLOR20_SAPHIRE,ODST_COLOR_ICE,H2_Color_11,H2A_Color_18,H1_Color_11
Violet,H4_Color18_Violet,HR_Color_Violet,H3_COLOR21_VIOLET,ODST_COLOR_VIOLET,H2_Color_13,H2A_Color_19,H1_Color_9
Orchid,H4_Color19_Orchid,HR_Color_Orchid,H3_COLOR22_ORCHID,ODST_COLOR_PINK,H2_Color_15,H2A_Color_20,H1_Color_8
Lavender,H4_Color20_Lavender,HR_Color_Lavender,H3_COLOR23_LAVENDER,ODST_COLOR_LAVENDER,H2_Color_14,H2A_Color_21,H1_Color_9
Maroon,H4_Color21_Maroon,HR_Color_Maroon,H3_COLOR3_RED,ODST_COLOR_MAROON,H2_Color_16,H2A_Color_22,H1_Color_17
Brick,H4_Color22_Brick,HR_Color_Brick,H3_COLOR3_RED,ODST_COLOR_BRICK,H2_Color_3,H2A_Color_23,H1_Color_3
Rose,H4_Color23_Rose,HR_Color_Rose,H3_COLOR5_SALMON,ODST_COLOR_ROSE,H2_Color_15,H2A_Color_24,H1_Color_8
Rust,H4_Color24_Rust,HR_Color_Rust,H3_COLOR6_ORANGE,ODST_COLOR_COCOA,H2_Color_4,H2A_Color_25,H1_Color_12
Coral,H4_Color25_Coral,HR_Color_Coral,H3_COLOR7_CORAL,ODST_COLOR_CORAL,H2_Color_4,H2A_Color_26,H1_Color_12
Peach,H4_Color26_Peach,HR_Color_Peach,H3_COLOR8_PEACH,ODST_COLOR_ROSE,H2_Color_15,H2A_Color_27,H1_Color_18
Gold,H4_Color27_Gold,HR_Color_Gold,H3_COLOR9_GOLD,ODST_COLOR_GOLD,H2_Color_5,H2A_Color_28,H1_Color_16
Yellow,H4_Color28_Yellow,HR_Color_Yellow,H3_COLOR10_YELLOW,ODST_COLOR_SAND,H2_Color_5,H2A_Color_29,H1_Color_6
Pale,H4_Color28_Yellow,HR_Color_Pale,H3_COLOR11_PALE,ODST_COLOR_DESERT,H2_Color_5,H2A_Color_29,H1_Color_6
Loading