godot-cpp/src/core/RID.cpp

22 lines
289 B
C++
Raw Normal View History

2017-03-06 07:49:24 +00:00
#include "RID.hpp"
2017-10-03 10:37:34 +00:00
#include <gdnative/rid.h>
2017-10-20 23:42:10 +00:00
#include "GodotGlobal.hpp"
namespace godot {
RID::RID(Object *p)
{
2017-10-20 23:42:10 +00:00
godot::api->godot_rid_new_with_resource(&_godot_rid, (const godot_object *) p);
}
int32_t RID::get_rid() const
{
2017-10-20 23:42:10 +00:00
return godot::api->godot_rid_get_id(&_godot_rid);
}
}