Eight agents took over ScoreSheet, DeathmatchManager, giantbook and boss overlays, FXLayers, PlayerManager, the menu manager with the save and prompt flow, twelve menus (character wheel, options, challenges, daily (offline), special seeds, leaderboard (local), collection, bestiary, stats, controller select, key config, cutscenes), console text input and gamepad hot-plug through platform listeners. Integration moved input to device ids. KAGE's projection matrix now reaches the 'ProjectionMatrix' uniform the basic shaders from afterbirthp.a declare, as well as the exe's 'Transform', which takes the color-mod and HQ4X passes from black to correct output. Under gdb with stubs skipped, the intro, title, file select, main menu and character wheel render as in the game. 1330 functions taken over, boot path 261/615. build/isaac stops at OnlineEmotes::init in Game::LoadConfigXmls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
53 lines
2.1 KiB
C++
53 lines
2.1 KiB
C++
#include "netplay_manager.h"
|
|
#include "kage_input.h"
|
|
#include "log.h"
|
|
#include "platform.h"
|
|
|
|
// 00906d60 Starts the netplay layer. Everything it set up is for a session: the streak, lobby popup and spinner sprites,
|
|
// the version tags lobbies are matched by, the chat and its local profile, the mute list and the lobby listener.
|
|
// Offline, none of it is ever shown or asked, so nothing is set up. Its one local listener is device_disconnect.
|
|
void NetplayManager::Init()
|
|
{
|
|
KAGE::Input::manager.disconnectListeners.push_back([this](KAGE::Input::InputDevice& device)
|
|
{ device_disconnect(device.id); });
|
|
}
|
|
|
|
// 0090b150 Runs a frame of the session and says whether the game's frame goes ahead.
|
|
// Without a session it receives nothing, has nobody to drop, revive or vote with, and always lets the frame through.
|
|
bool NetplayManager::Update()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// 0090b900 Draws the session's status line, chat and lobby prompts, none of which exist offline.
|
|
void NetplayManager::Render()
|
|
{}
|
|
|
|
// 00913760 Logs a disconnected input device, at the session's frame, which stays 0 offline.
|
|
// Online it also drops the players the device controlled.
|
|
void NetplayManager::device_disconnect(int deviceId)
|
|
{
|
|
log_printf(LOG_INFO, "[Frame: %d] Input device (ID = %d) disconnected \n", 0, deviceId);
|
|
}
|
|
|
|
// Whether a session is running, as the game tested its list of session players. Never offline.
|
|
bool NetplayManager::is_online()
|
|
{
|
|
return false;
|
|
}
|
|
|
|
// 0090b100 Whether a controller index is a player on this machine: every one is when no session lists them.
|
|
bool NetplayManager::IsIdxLocalPlayer(int)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// 0090e6d0 Whether the session's service is connected. It never is offline, so the first ask opens the lost connection
|
|
// popup and says no, and later asks say yes until the popup is closed, as the game does.
|
|
bool NetplayManager::check_connection()
|
|
{
|
|
if (lostConnectionPopupId != -1) return true;
|
|
reconstruction_missing("NetplayManager::check_connection's lost connection popup (netplay_lost_connection_callback "
|
|
"00908070)");
|
|
}
|