a similar error now but at least scons knows it
This commit is contained in:
@@ -14,10 +14,9 @@ env = SConscript("./godot-cpp/SConstruct")
|
|||||||
|
|
||||||
# tweak this if you want to use different folders, or more folders, to store your source code in.
|
# tweak this if you want to use different folders, or more folders, to store your source code in.
|
||||||
|
|
||||||
env.Append(CPPPATH=["src/","src/discord-game-sdk-cpp"])
|
env.Append(CPPPATH=["src/"])
|
||||||
|
env.Append(LIBS=["discord_game_sdk"])
|
||||||
env.Append(LIBPATH=[ "./godot-cpp/bin", "src/discord-game-sdk-cpp/lib"])
|
env.Append(LIBPATH=["project/addons/discord-rpc-gd/lib"])
|
||||||
env.Append(LIBS=[ "libgodot-cpp{}{}".format(env["suffix"], env["SHLIBSUFFIX"]), "discord_game_sdk"])
|
|
||||||
|
|
||||||
sources = Glob("src/*.cpp")
|
sources = Glob("src/*.cpp")
|
||||||
if env["platform"] == "macos":
|
if env["platform"] == "macos":
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
22
src/main.cpp
22
src/main.cpp
@@ -8,28 +8,32 @@ using namespace discord;
|
|||||||
|
|
||||||
Core *core{};
|
Core *core{};
|
||||||
|
|
||||||
void DiscordRPC::_bind_methods() {
|
void DiscordRPC::_bind_methods()
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
DiscordRPC::DiscordRPC() {
|
DiscordRPC::DiscordRPC()
|
||||||
|
{
|
||||||
// initialize any variables here
|
// initialize any variables here
|
||||||
time_passed = 0.0;
|
time_passed = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
DiscordRPC::~DiscordRPC() {
|
DiscordRPC::~DiscordRPC()
|
||||||
|
{
|
||||||
// add your cleanup here
|
// add your cleanup here
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiscordRPC::_ready() {
|
void DiscordRPC::_ready()
|
||||||
discord::Result res /*= Core::Create(53908232506183680, DiscordCreateFlags_NoRequireDiscord, &core)*/;
|
{
|
||||||
|
/*discord::Result res = Core::Create(53908232506183680, DiscordCreateFlags_NoRequireDiscord, &core);
|
||||||
Activity activity{};
|
Activity activity{};
|
||||||
UtilityFunctions::print(core);
|
UtilityFunctions::print(core);
|
||||||
/*activity.SetState("Testing");
|
activity.SetState("Testing");
|
||||||
activity.SetDetails("Fruit Loops");
|
activity.SetDetails("Fruit Loops");
|
||||||
core->ActivityManager().UpdateActivity(activity, [](Result res) {
|
core->ActivityManager().UpdateActivity(activity, [](Result res) {});*/
|
||||||
});*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiscordRPC::_process(float delta) {
|
void DiscordRPC::_process(float delta)
|
||||||
|
{
|
||||||
//::core->RunCallbacks();
|
//::core->RunCallbacks();
|
||||||
}
|
}
|
@@ -1,12 +1,14 @@
|
|||||||
#ifndef DISCORDRPC_H
|
#ifndef DISCORDRPC_H
|
||||||
#define DISCORDRPC_H
|
#define DISCORDRPC_H
|
||||||
|
|
||||||
|
|
||||||
#include <godot_cpp/classes/node.hpp>
|
#include <godot_cpp/classes/node.hpp>
|
||||||
|
#include "./discord-game-sdk-cpp/discord.h"
|
||||||
|
|
||||||
namespace godot {
|
namespace godot
|
||||||
|
{
|
||||||
|
|
||||||
class DiscordRPC : public Node {
|
class DiscordRPC : public Node
|
||||||
|
{
|
||||||
GDCLASS(DiscordRPC, Node)
|
GDCLASS(DiscordRPC, Node)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -24,5 +26,4 @@ public:
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
BIN
src/main.windows.template_debug.x86_64.obj
Normal file
BIN
src/main.windows.template_debug.x86_64.obj
Normal file
Binary file not shown.
BIN
src/register_types.windows.template_debug.x86_64.obj
Normal file
BIN
src/register_types.windows.template_debug.x86_64.obj
Normal file
Binary file not shown.
Reference in New Issue
Block a user