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.
28
src/main.cpp
28
src/main.cpp
@@ -6,30 +6,34 @@
|
|||||||
using namespace godot;
|
using namespace godot;
|
||||||
using namespace discord;
|
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)*/;
|
{
|
||||||
Activity activity{};
|
/*discord::Result res = Core::Create(53908232506183680, DiscordCreateFlags_NoRequireDiscord, &core);
|
||||||
|
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();
|
||||||
}
|
}
|
31
src/main.h
31
src/main.h
@@ -1,28 +1,29 @@
|
|||||||
#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:
|
||||||
float time_passed;
|
float time_passed;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DiscordRPC();
|
DiscordRPC();
|
||||||
~DiscordRPC();
|
~DiscordRPC();
|
||||||
|
|
||||||
void _ready();
|
void _ready();
|
||||||
void _process(float delta);
|
void _process(float delta);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#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