Skip to content

Commit

Permalink
ChatRoom: add chatroom accessible with Y key
Browse files Browse the repository at this point in the history
also disabled game input when overlay/chat is active
(might be worth adding option to allow controller inputs though...)
  • Loading branch information
emoose committed Dec 29, 2024
1 parent a55518e commit 30adc30
Show file tree
Hide file tree
Showing 9 changed files with 381 additions and 27 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@
[submodule "external/imgui"]
path = external/imgui
url = https://github.com/ocornut/imgui.git
[submodule "external/IXWebSocket"]
path = external/IXWebSocket
url = https://github.com/machinezone/IXWebSocket.git
103 changes: 103 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,15 @@ FetchContent_Declare(jsoncpp
)
FetchContent_MakeAvailable(jsoncpp)

message(STATUS "Fetching zlib (v1.3.1)...")
FetchContent_Declare(zlib
GIT_REPOSITORY
"https://github.com/madler/zlib"
GIT_TAG
v1.3.1
)
FetchContent_MakeAvailable(zlib)

# Target: spdlog
set(spdlog_SOURCES
cmake.toml
Expand Down Expand Up @@ -159,6 +168,98 @@ set(outrun2006tweaks_SOURCES
OutRun2006Tweaks.ini
OutRun2006Tweaks.lods.ini
cmake.toml
"external/IXWebSocket/ixwebsocket/IXBase64.h"
"external/IXWebSocket/ixwebsocket/IXBench.cpp"
"external/IXWebSocket/ixwebsocket/IXBench.h"
"external/IXWebSocket/ixwebsocket/IXCancellationRequest.cpp"
"external/IXWebSocket/ixwebsocket/IXCancellationRequest.h"
"external/IXWebSocket/ixwebsocket/IXConnectionState.cpp"
"external/IXWebSocket/ixwebsocket/IXConnectionState.h"
"external/IXWebSocket/ixwebsocket/IXDNSLookup.cpp"
"external/IXWebSocket/ixwebsocket/IXDNSLookup.h"
"external/IXWebSocket/ixwebsocket/IXExponentialBackoff.cpp"
"external/IXWebSocket/ixwebsocket/IXExponentialBackoff.h"
"external/IXWebSocket/ixwebsocket/IXGetFreePort.cpp"
"external/IXWebSocket/ixwebsocket/IXGetFreePort.h"
"external/IXWebSocket/ixwebsocket/IXGzipCodec.cpp"
"external/IXWebSocket/ixwebsocket/IXGzipCodec.h"
"external/IXWebSocket/ixwebsocket/IXHttp.cpp"
"external/IXWebSocket/ixwebsocket/IXHttp.h"
"external/IXWebSocket/ixwebsocket/IXHttpClient.cpp"
"external/IXWebSocket/ixwebsocket/IXHttpClient.h"
"external/IXWebSocket/ixwebsocket/IXHttpServer.cpp"
"external/IXWebSocket/ixwebsocket/IXHttpServer.h"
"external/IXWebSocket/ixwebsocket/IXNetSystem.cpp"
"external/IXWebSocket/ixwebsocket/IXNetSystem.h"
"external/IXWebSocket/ixwebsocket/IXProgressCallback.h"
"external/IXWebSocket/ixwebsocket/IXSelectInterrupt.cpp"
"external/IXWebSocket/ixwebsocket/IXSelectInterrupt.h"
"external/IXWebSocket/ixwebsocket/IXSelectInterruptEvent.cpp"
"external/IXWebSocket/ixwebsocket/IXSelectInterruptEvent.h"
"external/IXWebSocket/ixwebsocket/IXSelectInterruptFactory.cpp"
"external/IXWebSocket/ixwebsocket/IXSelectInterruptFactory.h"
"external/IXWebSocket/ixwebsocket/IXSelectInterruptPipe.cpp"
"external/IXWebSocket/ixwebsocket/IXSelectInterruptPipe.h"
"external/IXWebSocket/ixwebsocket/IXSetThreadName.cpp"
"external/IXWebSocket/ixwebsocket/IXSetThreadName.h"
"external/IXWebSocket/ixwebsocket/IXSocket.cpp"
"external/IXWebSocket/ixwebsocket/IXSocket.h"
"external/IXWebSocket/ixwebsocket/IXSocketAppleSSL.cpp"
"external/IXWebSocket/ixwebsocket/IXSocketAppleSSL.h"
"external/IXWebSocket/ixwebsocket/IXSocketConnect.cpp"
"external/IXWebSocket/ixwebsocket/IXSocketConnect.h"
"external/IXWebSocket/ixwebsocket/IXSocketFactory.cpp"
"external/IXWebSocket/ixwebsocket/IXSocketFactory.h"
"external/IXWebSocket/ixwebsocket/IXSocketMbedTLS.cpp"
"external/IXWebSocket/ixwebsocket/IXSocketMbedTLS.h"
"external/IXWebSocket/ixwebsocket/IXSocketOpenSSL.cpp"
"external/IXWebSocket/ixwebsocket/IXSocketOpenSSL.h"
"external/IXWebSocket/ixwebsocket/IXSocketServer.cpp"
"external/IXWebSocket/ixwebsocket/IXSocketServer.h"
"external/IXWebSocket/ixwebsocket/IXSocketTLSOptions.cpp"
"external/IXWebSocket/ixwebsocket/IXSocketTLSOptions.h"
"external/IXWebSocket/ixwebsocket/IXStrCaseCompare.cpp"
"external/IXWebSocket/ixwebsocket/IXStrCaseCompare.h"
"external/IXWebSocket/ixwebsocket/IXUdpSocket.cpp"
"external/IXWebSocket/ixwebsocket/IXUdpSocket.h"
"external/IXWebSocket/ixwebsocket/IXUniquePtr.h"
"external/IXWebSocket/ixwebsocket/IXUrlParser.cpp"
"external/IXWebSocket/ixwebsocket/IXUrlParser.h"
"external/IXWebSocket/ixwebsocket/IXUserAgent.cpp"
"external/IXWebSocket/ixwebsocket/IXUserAgent.h"
"external/IXWebSocket/ixwebsocket/IXUtf8Validator.h"
"external/IXWebSocket/ixwebsocket/IXUuid.cpp"
"external/IXWebSocket/ixwebsocket/IXUuid.h"
"external/IXWebSocket/ixwebsocket/IXWebSocket.cpp"
"external/IXWebSocket/ixwebsocket/IXWebSocket.h"
"external/IXWebSocket/ixwebsocket/IXWebSocketCloseConstants.cpp"
"external/IXWebSocket/ixwebsocket/IXWebSocketCloseConstants.h"
"external/IXWebSocket/ixwebsocket/IXWebSocketCloseInfo.h"
"external/IXWebSocket/ixwebsocket/IXWebSocketErrorInfo.h"
"external/IXWebSocket/ixwebsocket/IXWebSocketHandshake.cpp"
"external/IXWebSocket/ixwebsocket/IXWebSocketHandshake.h"
"external/IXWebSocket/ixwebsocket/IXWebSocketHandshakeKeyGen.h"
"external/IXWebSocket/ixwebsocket/IXWebSocketHttpHeaders.cpp"
"external/IXWebSocket/ixwebsocket/IXWebSocketHttpHeaders.h"
"external/IXWebSocket/ixwebsocket/IXWebSocketInitResult.h"
"external/IXWebSocket/ixwebsocket/IXWebSocketMessage.h"
"external/IXWebSocket/ixwebsocket/IXWebSocketMessageType.h"
"external/IXWebSocket/ixwebsocket/IXWebSocketOpenInfo.h"
"external/IXWebSocket/ixwebsocket/IXWebSocketPerMessageDeflate.cpp"
"external/IXWebSocket/ixwebsocket/IXWebSocketPerMessageDeflate.h"
"external/IXWebSocket/ixwebsocket/IXWebSocketPerMessageDeflateCodec.cpp"
"external/IXWebSocket/ixwebsocket/IXWebSocketPerMessageDeflateCodec.h"
"external/IXWebSocket/ixwebsocket/IXWebSocketPerMessageDeflateOptions.cpp"
"external/IXWebSocket/ixwebsocket/IXWebSocketPerMessageDeflateOptions.h"
"external/IXWebSocket/ixwebsocket/IXWebSocketProxyServer.cpp"
"external/IXWebSocket/ixwebsocket/IXWebSocketProxyServer.h"
"external/IXWebSocket/ixwebsocket/IXWebSocketSendData.h"
"external/IXWebSocket/ixwebsocket/IXWebSocketSendInfo.h"
"external/IXWebSocket/ixwebsocket/IXWebSocketServer.cpp"
"external/IXWebSocket/ixwebsocket/IXWebSocketServer.h"
"external/IXWebSocket/ixwebsocket/IXWebSocketTransport.cpp"
"external/IXWebSocket/ixwebsocket/IXWebSocketTransport.h"
"external/IXWebSocket/ixwebsocket/IXWebSocketVersion.h"
"external/ModUtils/MemoryMgr.h"
"external/ModUtils/Patterns.cpp"
"external/ModUtils/Patterns.h"
Expand Down Expand Up @@ -197,6 +298,7 @@ set(outrun2006tweaks_SOURCES
"src/hooks_textures.cpp"
"src/hooks_uiscaling.cpp"
"src/network.cpp"
"src/overlay/chatroom.cpp"
"src/overlay/course_editor.cpp"
"src/overlay/hooks_overlay.cpp"
"src/overlay/notifications.hpp"
Expand Down Expand Up @@ -240,6 +342,7 @@ target_include_directories(outrun2006tweaks PUBLIC
"external/xxHash/"
"external/miniz/"
"external/imgui/"
"external/IXWebSocket/"
)

target_link_libraries(outrun2006tweaks PUBLIC
Expand Down
5 changes: 4 additions & 1 deletion cmake.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ ogg = { git = "https://github.com/xiph/ogg", tag = "v1.3.5" }
flac = { git = "https://github.com/xiph/flac", tag = "1.4.3" }
miniupnpc = { git = "https://github.com/miniupnp/miniupnp", tag = "miniupnpd_2_3_7", subdir = "miniupnpc" }
jsoncpp = { git = "https://github.com/open-source-parsers/jsoncpp.git", tag = "1.9.6" }
zlib = { git = "https://github.com/madler/zlib", tag = "v1.3.1" }

[target.outrun2006tweaks]
type = "shared"
Expand All @@ -74,14 +75,16 @@ sources = ["*.ini", "src/**.cpp", "src/**.c", "src/**.def", "src/Resource.rc",
"external/imgui/imgui_draw.cpp",
"external/imgui/imgui_tables.cpp",
"external/imgui/imgui_widgets.cpp",
"external/IXWebSocket/ixwebsocket/**"
]
headers = ["src/**.hpp", "src/**.h", "external/ModUtils/Patterns.h", "external/ModUtils/MemoryMgr.h", "external/xxHash/xxhash.h", "external/miniz/miniz.h", "external/ini-cpp/ini/ini.h"]
include-directories = ["shared/", "src/", "include/",
"external/ModUtils/",
"external/ini-cpp/ini/",
"external/xxHash/",
"external/miniz/",
"external/imgui/"
"external/imgui/",
"external/IXWebSocket/"
]
compile-options = ["/GR-", "/GS-", "/bigobj", "/EHa", "/MP"]
link-options = ["/DEBUG", "/OPT:REF", "/OPT:ICF"]
Expand Down
1 change: 1 addition & 0 deletions external/IXWebSocket
Submodule IXWebSocket added at fb5a1f
4 changes: 3 additions & 1 deletion src/hooks_framerate.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "hook_mgr.hpp"
#include "plugin.hpp"
#include "game_addrs.hpp"
#include "overlay/overlay.hpp"

// from timeapi.h, which we can't include since our proxy timeBeginPeriod etc funcs will conflict...
typedef struct timecaps_tag {
Expand Down Expand Up @@ -295,7 +296,8 @@ class ReplaceGameUpdateLoop : public Hook
// (do this inside our update-loop so that any hooked game funcs have accurate state...)
Input::Update();

Game::ReadIO();
if (!Overlay::IsActive)
Game::ReadIO();
Game::SoundControl_mb();
Game::LinkControlReceive();
Game::ModeControl();
Expand Down
Loading

0 comments on commit 30adc30

Please sign in to comment.