Skip to content

Commit d9e87a9

Browse files
committed
Merge branch 'repentance-plus'
2 parents 8fd2c80 + 458e191 commit d9e87a9

File tree

286 files changed

+16595
-12208
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

286 files changed

+16595
-12208
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,3 +552,4 @@ include/IsaacRepentance.h
552552
libzhl/IsaacRepentance.cpp
553553
updater/updater.rc
554554
updater_rsrc
555+
include/hooks.json

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,6 @@
4141
[submodule "Launcher"]
4242
path = Launcher
4343
url = https://github.com/TeamREPENTOGON/Launcher.git
44+
[submodule "libs/injector"]
45+
path = libs/injector
46+
url = https://github.com/TeamREPENTOGON/injector.git

CMakeLists.txt

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,12 @@ option(CURL_DISABLE_SMB "" ON)
6060
option(CURL_DISABLE_SMTP "" ON)
6161
option(CURL_DISABLE_TELNET "" ON)
6262
option(CURL_DISABLE_TFTP "" ON)
63+
option(CURL_ZLIB "" OFF)
6364
add_subdirectory("libs/curl")
6465

66+
# General logger
67+
add_library(logger STATIC ${CMAKE_SOURCE_DIR}/logger/logger.cpp)
68+
6569
# Crypto++
6670
option(CRYPTOPP_BUILD_TESTING "" OFF)
6771
add_subdirectory("libs/cryptopp-cmake")
@@ -71,7 +75,7 @@ target_compile_options(cryptopp PUBLIC "/MD" "/wd4996")
7175
# Parser
7276
FILE(GLOB PARSER_SRC ${CMAKE_SOURCE_DIR}/libzhlgen/*.cpp)
7377
add_executable(zhlparser ${PARSER_SRC})
74-
target_link_libraries(zhlparser antlr4_shared)
78+
target_link_libraries(zhlparser antlr4_shared logger)
7579
target_compile_options(zhlparser PUBLIC "/wd4251" "/wd4275")
7680
# wd4251 ignore warning C4251: 'type' : class 'type1' needs to have dll-interface to be used by clients of class 'type2'
7781
# wd4275 ignore warning C4275: non - DLL-interface class 'class_1' used as base for DLL-interface class 'class_2'
@@ -98,6 +102,7 @@ add_compile_definitions(GLAD_GLAPI_EXPORT GLAD_GLAPI_EXPORT_BUILD)
98102
add_library(libzhl SHARED ${ZHL_SRC})
99103
target_compile_options(libzhl PUBLIC "/MD" "/wd4251" "/wd4996")
100104
target_compile_definitions(libzhl PRIVATE CMAKE_ZHL_VERSION="${CMAKE_ZHL_VERSION}")
105+
add_custom_command(TARGET libzhl POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/include/hooks.json" "$<TARGET_FILE_DIR:zhlparser>")
101106
# wd4251 ignore warning C4251: 'type' : class 'type1' needs to have dll-interface to be used by clients of class 'type2'
102107
# wd4996 ignores warning C4996: using a depricated function
103108

@@ -217,6 +222,12 @@ add_custom_command(TARGET zhlREPENTOGON POST_BUILD COMMAND ${CMAKE_COMMAND} -E c
217222
add_custom_command(TARGET zhlREPENTOGON POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory "${PROJECT_SOURCE_DIR}/repentogon/resources-repentogon" "$<TARGET_FILE_DIR:zhlREPENTOGON>/resources-repentogon")
218223
# add_custom_command(TARGET zhlDelirium POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory "${PROJECT_SOURCE_DIR}/delirium/resources-delirium" "$<TARGET_FILE_DIR:zhlDelirium>/resources-delirium")
219224

225+
add_subdirectory("libs/injector")
226+
add_executable(offline_scanner "${CMAKE_SOURCE_DIR}/offline_scanner/offline_scanner.cpp")
227+
target_include_directories(offline_scanner PRIVATE "${CMAKE_SOURCE_DIR}/libzhl" "${CMAKE_SOURCE_DIR}/libs/injector/include")
228+
target_link_libraries(offline_scanner injector)
229+
230+
220231
if(NOT ISAAC_DIRECTORY STREQUAL "")
221232
message (STATUS "Files will be installed to " ${ISAAC_DIRECTORY})
222233
add_custom_command(TARGET Lua5.4 POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE_DIR:dsound>/Lua5.4.dll" "${ISAAC_DIRECTORY}")
@@ -226,7 +237,7 @@ if(NOT ISAAC_DIRECTORY STREQUAL "")
226237
add_custom_command(TARGET zhlREPENTOGON POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE_DIR:zhlREPENTOGON>/zhlREPENTOGON.dll" "${ISAAC_DIRECTORY}")
227238
add_custom_command(TARGET zhlREPENTOGON POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory "${PROJECT_SOURCE_DIR}/repentogon/resources" "${ISAAC_DIRECTORY}/resources")
228239
add_custom_command(TARGET zhlREPENTOGON POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory "${PROJECT_SOURCE_DIR}/repentogon/resources-repentogon" "${ISAAC_DIRECTORY}/resources-repentogon")
229-
add_custom_command(TARGET zhlDelirium POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE_DIR:zhlDelirium>/zhlDelirium.dll" "${ISAAC_DIRECTORY}")
240+
# add_custom_command(TARGET zhlDelirium POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE_DIR:zhlDelirium>/zhlDelirium.dll" "${ISAAC_DIRECTORY}")
230241
# add_custom_command(TARGET zhlDelirium POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory "${PROJECT_SOURCE_DIR}/delirium/resources-delirium" "${ISAAC_DIRECTORY}/resources-delirium")
231242
endif()
232243

changelog.txt

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ Additions:
1010
* EntityPlayer:
1111
- [Get/Set]ActionHoldDrop - how long player holds action drop button.
1212
- [Get/Set]ForgottenSwapFormCooldown
13+
- [Get/Set]RockBottomMoveSpeed
14+
- [Get/Set]RockBottomMaxFireDelay
15+
- [Get/Set]RockBottomDamage
16+
- [Get/Set]RockBottomTearRange
17+
- [Get/Set]RockBottomShotSpeed
18+
- [Get/Set]RockBottomLuck
1319
* EntityFamiliar:
1420
- IsLilDelirium
1521
- SetLilDelirium
@@ -19,10 +25,9 @@ Additions:
1925
- MC_PRE_PLAYER_POCKET_ITEMS_SWAP(EntityPlayer player)
2026
Triggers when the player swaps their pocket items using the action drop button (even if they are empty).
2127
Return true to cancel pocket item swap.
22-
- MC_PRE_TRIGGER_BED_SLEEP_EFFECT(EntityPlayer player, EntityPickup bed)
23-
Triggers if Bed target (bed.Target) is set to player and "SleepFillHP" item overlay sprite's event is triggered, and before the hearts addition is applied.
28+
- MC_PRE_TRIGGER_BED_SLEEP_EFFECT(EntityPlayer player)
29+
Triggers if "SleepFillHP" item overlay sprite's event is triggered, and before the hearts addition is applied.
2430
Return true to cancel vanilla behavior.
25-
- MC_POST_TRIGGER_BED_SLEEP_EFFECT(EntityPlayer player, EntityPickup bed)
2631
- MC_PRE_BED_SLEEP(EntityPlayer player, EntityPickup bed)
2732
Triggers on bed collision and before playing sleep sequence.
2833
Return true to cancel vanilla behavior.
@@ -67,15 +72,16 @@ Modified:
6772
* EntityPlayer:
6873
- DropCollectible now returns the spawned pedestal if one was spawned, as intended
6974
- SwapForgottenForm returns boolean, depending if Forgotten/Soul form was switched or not.
75+
* Level:
76+
- TryPlaceRoom(AtDoor) no longer plays the key unlock sound if a room is created that connects to the player's current room.
7077
* ImGui:
7178
- Adding an element with the same id as an existing one will now replace the existing element instead of throwing an error.
7279
- If an error is caused by a callback, imgui will now properly throw an error
73-
* Level:
74-
- TryPlaceRoom(AtDoor) no longer plays the key unlock sound if a room is created that connects to the player's current room.
7580
* ModCallbacks:
7681
- MC_POST_PLAYER_TRIGGER_EFFECT_REMOVED(EntityPlayer Player, int Count)
7782
Added Count argument (how many instances of this effect were removed)
7883
* Vanilla daily run leaderboard will now mark the submitted run entry with a transparent color if the run was cheated.
84+
* Daily goal path icon will now be displayed on Mega Satan daily runs.
7985
Fixes:
8086
* ImGui:
8187
- Fixed RemoveElement not working on elements created with AddInputColor.

docs/docs/enums/EventCounter.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,4 +502,29 @@ tags:
502502
|493 |BABY_PLUM_KILLS {: .copyable } | |
503503
|494 |BATTERY_BUMS_KILLED {: .copyable } | |
504504
|495 |BATTERY_BUM_COLLECTIBLE_PAYOUTS {: .copyable } | counts how often the battery bum paid out with a collectible item |
505-
|496 |NUM_EVENT_COUNTERS {: .copyable } | |
505+
|496 |UNKNOWN_EVENT_496 {: .copyable } | TODO: Currently Unknown. Maybe Daily Multiplayer run Streak? |
506+
|497 |ONLINE_CURRENT_STREAK {: .copyable } | Current Online Mode streak |
507+
|498 |ONLINE_BEST_STREAK {: .copyable } | Best streak in Online Gameplay |
508+
|499 |UNKNOWN_EVENT_499 {: .copyable } | TODO: Currently Unknown. Maybe Daily Multiplayer run Streak? |
509+
|500 |ONLINE_SIN_ETERNAL {: .copyable } | |
510+
|501 |ONLINE_SIN_HEARTLESS {: .copyable } | |
511+
|502 |ONLINE_SIN_ENVIOUS {: .copyable } | |
512+
|503 |ONLINE_SIN_DRESSED_UP {: .copyable } | |
513+
|504 |ONLINE_SIN_PRIDEFUL {: .copyable } | |
514+
|505 |ONLINE_SIN_SAVIOR {: .copyable } | |
515+
|506 |ONLINE_SIN_WRATHFUL {: .copyable } | |
516+
|507 |ONLINE_SIN_BIG_BOSS {: .copyable } | |
517+
|508 |ONLINE_SIN_EXPLORER {: .copyable } | |
518+
|509 |ONLINE_SIN_EXPRESSIVE {: .copyable } | |
519+
|510 |ONLINE_SIN_GLUTTONOUS {: .copyable } | |
520+
|511 |ONLINE_SIN_RECKLESS {: .copyable } | |
521+
|512 |ONLINE_SIN_ESCAPE_ARTIST {: .copyable } | |
522+
|513 |ONLINE_SIN_GAMBLER {: .copyable } | |
523+
|514 |ONLINE_SIN_GREEDY {: .copyable } | |
524+
|515 |ONLINE_SIN_MYSTIC {: .copyable } | |
525+
|516 |ONLINE_SIN_PILL_POPPER {: .copyable } | |
526+
|517 |ONLINE_SIN_BIG_SPENDER {: .copyable } | |
527+
|518 |ONLINE_SIN_JANITOR {: .copyable } | |
528+
|519 |ONLINE_SIN_LUSTFUL {: .copyable } | |
529+
|520 |ONLINE_SIN_SLOTHFUL {: .copyable } | |
530+
|521 |NUM_EVENT_COUNTERS {: .copyable } | |

dsound/dllmain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReser
176176
sLogger->Info("dsound: Update checking done\n");
177177
}
178178

179-
if (version != "1.7.9b.J835") {
179+
if (version != "1.9.7.8.J181") {
180180
sLogger->Info("This Version of Isaac is not compatible!!\n");
181181
return TRUE;
182182
}

dsound/version.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ int GetIsaacVersion()
1919
else
2020
{
2121
unsigned int sz = pe->OptionalHeader.SizeOfImage;
22-
if(sz == 2760704)
22+
if (sz == 2760704)
2323
g_Version = ISAAC_REBIRTH;
24-
else if(sz == 3825664)
24+
else if (sz == 3825664)
2525
g_Version = ISAAC_AFTERBIRTH;
26-
else if(sz == 8820440)
26+
else if (sz == 8820440)
2727
g_Version = ISAAC_REPENTANCE;
28+
else if (sz == 8671696)
29+
g_Version = ISAAC_REPENTANCEP;
2830
else
2931
g_Version = ISAAC_UNKNOWN;
3032
}

dsound/version.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
#define ISAAC_AFTERBIRTH 2
66
//#define ISAAC_AFTERBIRTHP 3 fuck you
77
#define ISAAC_REPENTANCE 4
8+
#define ISAAC_REPENTANCEP 5
89

910
int GetIsaacVersion();

include/HookSystem.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
#pragma warning (disable: 4530)
44

55
#include "libzhl.h"
6-
#include <stdlib.h>
6+
#include <cstdlib>
77
#include <typeinfo>
88

9+
#include <string>
10+
911
//=================================================================================================
1012

1113
namespace ZHL

include/logger/logger.h

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#pragma once
2+
3+
#include <cstdarg>
4+
#include <cstdio>
5+
#include <initializer_list>
6+
#include <string>
7+
#include <vector>
8+
9+
enum LogLevel {
10+
LOG_TRACE,
11+
LOG_DEBUG,
12+
LOG_INFO,
13+
LOG_WARN,
14+
LOG_ERROR,
15+
LOG_FATAL,
16+
LOG_ABORT
17+
};
18+
19+
class ILogOutput {
20+
public:
21+
virtual void Log(LogLevel level, const char* text) = 0;
22+
virtual void Close() = 0;
23+
};
24+
25+
class StdoutLogOutput : public ILogOutput {
26+
public:
27+
void Log(LogLevel level, const char* text) override;
28+
void Close() override;
29+
};
30+
31+
class StderrLogOutput : public ILogOutput {
32+
public:
33+
void Log(LogLevel level, const char* text) override;
34+
void Close() override { }
35+
};
36+
37+
class FileLogOutput : public ILogOutput {
38+
public:
39+
FileLogOutput(const char* file, const char* mode, bool flush = false);
40+
void Log(LogLevel level, const char* text) override;
41+
void Close() override;
42+
43+
private:
44+
FILE* _file;
45+
bool _flush;
46+
};
47+
48+
class Logger {
49+
public:
50+
Logger(LogLevel level, const char* prefix, std::initializer_list<ILogOutput*> outputs);
51+
~Logger();
52+
53+
void Trace(const char* fmt, ...);
54+
void Debug(const char* fmt, ...);
55+
void Info(const char* fmt, ...);
56+
void Warn(const char* fmt, ...);
57+
void Error(const char* fmt, ...);
58+
void Fatal(const char* fmt, ...);
59+
void Abort(const char* fmt, ...);
60+
61+
private:
62+
void Log(LogLevel level, const char* fmt, va_list va);
63+
64+
LogLevel _level = LOG_INFO;
65+
std::string _prefix = "";
66+
std::vector<ILogOutput*> _outputs;
67+
};

0 commit comments

Comments
 (0)