Skip to content

Commit e1c1299

Browse files
Merge pull request #3 from thetrueoneshots/re-callbacks
Reversed engineered callbacks and start menu
2 parents c66de92 + 53954b1 commit e1c1299

31 files changed

+483
-75
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.vs
2+
out

CubeModLauncher/CMakeSettings.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "x64-Clang-Release",
5+
"generator": "Ninja",
6+
"configurationType": "RelWithDebInfo",
7+
"buildRoot": "${projectDir}\\out\\build\\${name}",
8+
"installRoot": "${projectDir}\\out\\install\\${name}",
9+
"cmakeCommandArgs": "",
10+
"buildCommandArgs": "",
11+
"ctestCommandArgs": "",
12+
"inheritEnvironments": [ "clang_cl_x64_x64" ],
13+
"variables": []
14+
}
15+
]
16+
}

CubeModLoader/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
cmake_minimum_required (VERSION 3.8)
22
project(project_CubeModLoader)
3+
add_subdirectory(CWSDK)
34
add_library (CubeModLoader SHARED
45
crc.cpp
56
DLL.cpp
67
main.cpp
7-
mutex.cpp)
8+
mutex.cpp "macros.h" "callbacks/gui/cube__StartMenuWidget__Draw.h" "callbacks/game/cube__Game__MouseUp.h")
9+
target_link_libraries (CubeModLoader LINK_PUBLIC CWSDK)

CubeModLoader/CMakeSettings.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "x64-Clang-Release",
5+
"generator": "Ninja",
6+
"configurationType": "RelWithDebInfo",
7+
"buildRoot": "${projectDir}\\out\\build\\${name}",
8+
"installRoot": "${projectDir}\\out\\install\\${name}",
9+
"cmakeCommandArgs": "",
10+
"buildCommandArgs": "",
11+
"ctestCommandArgs": "",
12+
"inheritEnvironments": [ "clang_cl_x64_x64" ],
13+
"variables": []
14+
}
15+
]
16+
}

CubeModLoader/CWSDK

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 6c3c518adec22d591721b96e1d38db5490f6010e

CubeModLoader/DLL.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
#define DLL_H
33
#include <iostream>
44
#include <windows.h>
5-
#include "GenericMod.h"
5+
#define MODLOADER 1
6+
#include "CWSDK/cwsdk.h"
7+
//#include "GenericMod.h"
68

79
class DLL
810
{

CubeModLoader/callbacks/ChatHandler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
extern "C" int ChatHandler(void* msg) {
1+
extern "C" int ChatHandler(std::wstring* msg) {
22
for (uint8_t priority = 0; priority <= 4; priority += 1) {
33
for (DLL* dll : modDLLs) {
44
if (dll->mod->OnChatPriority == (GenericMod::Priority)priority) {

CubeModLoader/callbacks/CheckInventoryFullHandler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
extern "C" int CheckInventoryFullHandler(void* player, void* item) {
1+
extern "C" int CheckInventoryFullHandler(cube::Creature* player, cube::Item* item) {
22
for (uint8_t priority = 0; priority <= 4; priority += 1) {
33
for (DLL* dll : modDLLs) {
44
if (dll->mod->OnCheckInventoryFullPriority == (GenericMod::Priority)priority) {

CubeModLoader/callbacks/ChunkRemeshHandler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
extern "C" int ChunkRemeshHandler(void* zone) {
1+
extern "C" int ChunkRemeshHandler(cube::Zone* zone) {
22
for (uint8_t priority = 0; priority <= 4; priority += 1) {
33
for (DLL* dll : modDLLs) {
44
if (dll->mod->OnChunkRemeshPriority == (GenericMod::Priority)priority) {

CubeModLoader/callbacks/ChunkRemeshedHandler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
extern "C" int ChunkRemeshedHandler(void* zone) {
1+
extern "C" int ChunkRemeshedHandler(cube::Zone* zone) {
22
for (uint8_t priority = 0; priority <= 4; priority += 1) {
33
for (DLL* dll : modDLLs) {
44
if (dll->mod->OnChunkRemeshedPriority == (GenericMod::Priority)priority) {

0 commit comments

Comments
 (0)