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.
|
||||
|
||||
env.Append(CPPPATH=["src/","src/discord-game-sdk-cpp"])
|
||||
|
||||
env.Append(LIBPATH=[ "./godot-cpp/bin", "src/discord-game-sdk-cpp/lib"])
|
||||
env.Append(LIBS=[ "libgodot-cpp{}{}".format(env["suffix"], env["SHLIBSUFFIX"]), "discord_game_sdk"])
|
||||
env.Append(CPPPATH=["src/"])
|
||||
env.Append(LIBS=["discord_game_sdk"])
|
||||
env.Append(LIBPATH=["project/addons/discord-rpc-gd/lib"])
|
||||
|
||||
sources = Glob("src/*.cpp")
|
||||
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 discord;
|
||||
|
||||
Core* core{};
|
||||
Core *core{};
|
||||
|
||||
void DiscordRPC::_bind_methods() {
|
||||
void DiscordRPC::_bind_methods()
|
||||
{
|
||||
}
|
||||
|
||||
DiscordRPC::DiscordRPC() {
|
||||
DiscordRPC::DiscordRPC()
|
||||
{
|
||||
// initialize any variables here
|
||||
time_passed = 0.0;
|
||||
}
|
||||
|
||||
DiscordRPC::~DiscordRPC() {
|
||||
DiscordRPC::~DiscordRPC()
|
||||
{
|
||||
// add your cleanup here
|
||||
}
|
||||
|
||||
void DiscordRPC::_ready() {
|
||||
discord::Result res /*= Core::Create(53908232506183680, DiscordCreateFlags_NoRequireDiscord, &core)*/;
|
||||
Activity activity{};
|
||||
void DiscordRPC::_ready()
|
||||
{
|
||||
/*discord::Result res = Core::Create(53908232506183680, DiscordCreateFlags_NoRequireDiscord, &core);
|
||||
Activity activity{};
|
||||
UtilityFunctions::print(core);
|
||||
/*activity.SetState("Testing");
|
||||
activity.SetDetails("Fruit Loops");
|
||||
core->ActivityManager().UpdateActivity(activity, [](Result res) {
|
||||
});*/
|
||||
activity.SetState("Testing");
|
||||
activity.SetDetails("Fruit Loops");
|
||||
core->ActivityManager().UpdateActivity(activity, [](Result res) {});*/
|
||||
}
|
||||
|
||||
void DiscordRPC::_process(float delta) {
|
||||
void DiscordRPC::_process(float delta)
|
||||
{
|
||||
//::core->RunCallbacks();
|
||||
}
|
31
src/main.h
31
src/main.h
@@ -1,28 +1,29 @@
|
||||
#ifndef DISCORDRPC_H
|
||||
#define DISCORDRPC_H
|
||||
|
||||
|
||||
#include <godot_cpp/classes/node.hpp>
|
||||
#include "./discord-game-sdk-cpp/discord.h"
|
||||
|
||||
namespace godot {
|
||||
namespace godot
|
||||
{
|
||||
|
||||
class DiscordRPC : public Node {
|
||||
GDCLASS(DiscordRPC, Node)
|
||||
class DiscordRPC : public Node
|
||||
{
|
||||
GDCLASS(DiscordRPC, Node)
|
||||
|
||||
private:
|
||||
float time_passed;
|
||||
private:
|
||||
float time_passed;
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
DiscordRPC();
|
||||
~DiscordRPC();
|
||||
public:
|
||||
DiscordRPC();
|
||||
~DiscordRPC();
|
||||
|
||||
void _ready();
|
||||
void _process(float delta);
|
||||
};
|
||||
void _ready();
|
||||
void _process(float delta);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#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