Skip to content
This repository has been archived by the owner on Nov 30, 2018. It is now read-only.

Commit

Permalink
Fixed chat
Browse files Browse the repository at this point in the history
  • Loading branch information
MCMrARM committed Aug 19, 2017
1 parent 8422b1b commit cf5ad88
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/linux_appplatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ void LinuxAppPlatform::initVtable(void* lib) {
replaceVtableEntry(lib, vta, "_ZN19AppPlatform_android19getPlatformTempPathEv", (void*) &LinuxAppPlatform::getPlatformTempPath);
replaceVtableEntry(lib, vta, "_ZN19AppPlatform_android14createDeviceIDEv", (void*) &LinuxAppPlatform::createDeviceID);
replaceVtableEntry(lib, vta, "_ZN19AppPlatform_android18queueForMainThreadESt8functionIFvvEE", (void*) &LinuxAppPlatform::queueForMainThread);
replaceVtableEntry(lib, vta, "_ZN19AppPlatform_android35getMultiplayerServiceListToRegisterEv", (void*) &LinuxAppPlatform::getMultiplayerServiceListToRegister);
}

void LinuxAppPlatform::hideMousePointer() {
Expand Down
8 changes: 8 additions & 0 deletions src/linux_appplatform.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
#include <sys/param.h>
#include <vector>
#include <mutex>
#include <memory>
#include "minecraft/gl.h"
#include "minecraft/AppPlatform.h"
#include "minecraft/ImagePickingCallback.h"
#include "path_helper.h"
#include "minecraft/MultiplayerService.h"

class ImageData;
class ImagePickingCallback;
Expand Down Expand Up @@ -150,6 +152,12 @@ class LinuxAppPlatform : public AppPlatform {
return "linux";
}

std::vector<std::unique_ptr<Social::MultiplayerService>> getMultiplayerServiceListToRegister() {
std::vector<std::unique_ptr<Social::MultiplayerService>> ret;
ret.push_back(std::unique_ptr<Social::MultiplayerService>(new Social::MultiplayerXBL()));
return ret;
}

void queueForMainThread(std::function<void ()> f) {
runOnMainThreadMutex.lock();
runOnMainThreadQueue.push_back(f);
Expand Down
9 changes: 5 additions & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,23 @@
#include "minecraft/gl.h"
#include "minecraft/AppPlatform.h"
#include "minecraft/MinecraftGame.h"
#include "linux_appplatform.h"
#include "linux_store.h"
#include "minecraft/Mouse.h"
#include "minecraft/Keyboard.h"
#include "minecraft/Options.h"
#include "minecraft/Common.h"
#include "minecraft/Xbox.h"
#include "minecraft/MultiplayerService.h"
#include "linux_appplatform.h"
#include "linux_store.h"
#include "common.h"
#include "hook.h"
#include "minecraft/Xbox.h"
#include "xboxlive.h"
#include "extract.h"
#ifndef DISABLE_CEF
#include "browser.h"
#include "xbox_login_browser.h"
#include "initial_setup_browser.h"
#include "path_helper.h"

#endif
#ifndef DISABLE_PLAYAPI
#include "google_login_browser.h"
Expand Down Expand Up @@ -605,6 +605,7 @@ int main(int argc, char *argv[]) {
xbox::services::system::auth_manager::auth_manager_internal_get_token_and_signature = (pplx::task (*)(xbox::services::system::auth_manager*, mcpe::string, mcpe::string const&, mcpe::string const&, mcpe::string, std::vector<unsigned char> const&, bool, bool, mcpe::string const&)) hybris_dlsym(handle, "_ZN4xbox8services6system12auth_manager32internal_get_token_and_signatureESsRKSsS4_SsRKSt6vectorIhSaIhEEbbS4_");
xbox::services::system::auth_config::auth_config_set_xtoken_composition = (void (*)(xbox::services::system::auth_config*, std::vector<xbox::services::system::token_identity_type>)) hybris_dlsym(handle, "_ZN4xbox8services6system11auth_config22set_xtoken_compositionESt6vectorINS1_19token_identity_typeESaIS4_EE");
xbox::services::system::auth_config::auth_config_xbox_live_endpoint = (mcpe::string const& (*)(xbox::services::system::auth_config*)) hybris_dlsym(handle, "_ZNK4xbox8services6system11auth_config18xbox_live_endpointEv");
Social::MultiplayerXBL::MultiplayerXBL_MultiplayerXBL = (void (*)(Social::MultiplayerXBL*)) hybris_dlsym(handle, "_ZN6Social14MultiplayerXBLC2Ev");

std::cout << "init window\n";
eglutInitWindowSize(windowWidth, windowHeight);
Expand Down
21 changes: 21 additions & 0 deletions src/minecraft/MultiplayerService.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#pragma once

namespace Social {

struct MultiplayerService {
//
};

struct MultiplayerXBL : public MultiplayerService {

static void (*MultiplayerXBL_MultiplayerXBL)(MultiplayerXBL*);

char filler[0x200];

MultiplayerXBL() {
MultiplayerXBL_MultiplayerXBL(this);
}

};

}
4 changes: 4 additions & 0 deletions src/minecraft/types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ xbox::services::xbox_live_result<void> (*task::task_xbox_live_result_void_get)(t
xbox::services::xbox_live_result<xbox::services::system::token_and_signature_result> (*task::task_xbox_live_result_token_and_signature_get)(task*);
}

#include "MultiplayerService.h"

void (*Social::MultiplayerXBL::MultiplayerXBL_MultiplayerXBL)(Social::MultiplayerXBL*);

#include "Common.h"

mcpe::string (*Common::Common_getGameVersionStringNet)();

0 comments on commit cf5ad88

Please sign in to comment.