diff options
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/gamesdk/GameSDK.java')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/gamesdk/GameSDK.java | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/GameSDK.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/GameSDK.java index 973e5fca..0f591f22 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/GameSDK.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/GameSDK.java @@ -91,86 +91,4 @@ public class GameSDK { System.arraycopy(bts, 0, asdasd, 0, i); return new String(asdasd); } - - public static void main(String args[]) throws InterruptedException { - NativeGameSDK nativeGameSDK = getNativeGameSDK(); - DiscordCreateParams discordCreateParams = new DiscordCreateParams(); - discordCreateParams.client_id = new DiscordClientID(816298079732498473L); - - IDiscordActivityEvents activityEvents = new IDiscordActivityEvents(); - activityEvents.OnActivityInvite = new IDiscordActivityEvents.OnActivityInviteCallback() { - @Override - public void onActivityInvite(Pointer eventData, EDiscordActivityActionType type, DiscordUser user, DiscordActivity activity) { - - } - }; - activityEvents.OnActivityJoin = new IDiscordActivityEvents.OnActivityJoinCallback() { - @Override - public void onActivityJoin(Pointer eventData, String secret) { - - } - }; - activityEvents.OnActivityJoinRequest = new IDiscordActivityEvents.OnActivityJoinRequestCallback() { - @Override - public void onActivityJoinRequest(Pointer eventData, DiscordUser user) { - - } - }; - activityEvents.OnActivitySpectate = new IDiscordActivityEvents.OnActivitySpectateCallback() { - @Override - public void onActivitySpectate(Pointer eventData, String secret) { - - } - }; - activityEvents.write(); - discordCreateParams.activity_events = new IDiscordActivityEvents.ByReference(activityEvents.getPointer()); - - - PointerByReference pointerByReference = new PointerByReference(); - nativeGameSDK.DiscordCreate(new DiscordVersion(NativeGameSDK.DISCORD_VERSION), discordCreateParams, pointerByReference); - IDiscordCore iDiscordCore = new IDiscordCore(pointerByReference.getValue()); - - iDiscordCore.SetLogHook.setLogHook(iDiscordCore, EDiscordLogLevel.DiscordLogLevel_Debug, Pointer.NULL, new IDiscordCore.LogHook() { - @Override - public void hook(Pointer hookData, EDiscordLogLevel level, String message) { - System.out.println(message+" - "+level+" - "+hookData); - } - }); - - DiscordActivity discordActivity = new DiscordActivity(); - discordActivity.activityType = EDiscordActivityType.DiscordActivityType_Playing; - writeString(discordActivity.details, "Dungeons Guide RPC Test Det"); - writeString(discordActivity.state, "Dungeons Guide RPC Test Sta"); - discordActivity.party = new DiscordActivityParty(); - writeString(discordActivity.party.id, "partyid"); - discordActivity.party.discordActivityParty = new DiscordPartySize(); - discordActivity.party.discordActivityParty.current_size = new Int32(4); - discordActivity.party.discordActivityParty.max_size = new Int32(10); - discordActivity.instance = false; - discordActivity.timestamps = new DiscordActivityTimestamps(); - discordActivity.timestamps.start = new DiscordTimestamp(System.currentTimeMillis()); - discordActivity.timestamps.end = new DiscordTimestamp(System.currentTimeMillis()+1000*60*60); - discordActivity.secrets = new DiscordActivitySecrets(); - writeString(discordActivity.secrets.join, "thisisjoinsecret"); - writeString(discordActivity.secrets.spectate, "thisisspectatesecret"); - writeString(discordActivity.secrets.match, "thisismatchsecret"); - discordActivity.assets = new DiscordActivityAssets(); - writeString(discordActivity.assets.large_text, "thisislargetext"); - writeString(discordActivity.assets.large_image, "mort"); - - - - IDiscordActivityManager iDiscordActivityManager = iDiscordCore.GetActivityManager.getActivityManager(iDiscordCore); - iDiscordActivityManager.UpdateActivity.updateActivity(iDiscordActivityManager, discordActivity, Pointer.NULL, new NativeGameSDK.DiscordCallback() { - @Override - public void callback(Pointer callbackData, EDiscordResult result) { - System.out.println("Callback: "+callbackData+" - "+result); - } - }); - - while(true) { - iDiscordCore.RunCallbacks.runCallbacks(iDiscordCore); - Thread.sleep(100); - } - } } |