Compare commits
20 Commits
godot-3.2-
...
3.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd457bda8c | ||
|
|
30298009f5 | ||
|
|
68174528c9 | ||
|
|
134212db03 | ||
|
|
2840b31344 | ||
|
|
ec43f875e5 | ||
|
|
bd863357de | ||
|
|
a8ab6802c3 | ||
|
|
bab3c758d5 | ||
|
|
4bae481fc3 | ||
|
|
8a52bd0701 | ||
|
|
226e67be05 | ||
|
|
cec9b8ebb2 | ||
|
|
38cfba79bb | ||
|
|
34401939f3 | ||
|
|
e03903ac70 | ||
|
|
afd4b26c1b | ||
|
|
d93984d820 | ||
|
|
2f20022adf | ||
|
|
ddf67cc7b8 |
@@ -1,6 +1,6 @@
|
||||
# MIT License
|
||||
|
||||
Copyright (c) 2017-2020 GodotNativeTools
|
||||
Copyright (c) 2017-2021 Godot Engine contributors.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
186
README.md
@@ -1,30 +1,58 @@
|
||||
# godot_headers
|
||||
#### `GDNative / NativeScript`
|
||||
# godot-headers
|
||||
|
||||
> `GDNative` enables the use of dynamically linked libraries inside of [**Godot**](https://github.com/godotengine/godot).
|
||||
This repository contains C headers for
|
||||
[**Godot Engine**](https://github.com/godotengine/godot)'s *GDNative* API,
|
||||
which can be used to write *NativeScripts*.
|
||||
|
||||
> `GDNative` enables the use of dynamically linked libraries inside of
|
||||
> [**Godot**](https://github.com/godotengine/godot).
|
||||
|
||||
> `NativeScript` uses GDNative to implement scripts backed by native code.
|
||||
|
||||
- [**Getting Started**](#getting-started)
|
||||
- [**FAQ**](#faq)
|
||||
- [**Versioning**](#versioning)
|
||||
- [**Getting Started**](#getting-started)
|
||||
- [**FAQ**](#faq)
|
||||
- [**Updating Headers**](#updating-headers)
|
||||
|
||||
## Versioning
|
||||
|
||||
This repositories follows the same branch versioning as the main [Godot Engine
|
||||
repository](https://github.com/godotengine/godot):
|
||||
|
||||
- `master` tracks the current development branch. As this is a moving target,
|
||||
the headers in this repository may not always be fully in sync with upstream.
|
||||
See [**Updating Headers**](#updating-headers) if you need to bring
|
||||
them up to date.
|
||||
- `3.x` tracks the development of the next 3.x minor release. Like `master`, it
|
||||
might not always be fully up-to-date with upstream.
|
||||
- Other versioned branches (e.g. `3.3`, `3.2`) track the latest stable release
|
||||
in the corresponding branch.
|
||||
|
||||
Stable releases are also tagged on this repository:
|
||||
[**Tags**](https://github.com/godotengine/godot-headers/tags).
|
||||
|
||||
**For any project built against a stable release of Godot, we recommend using
|
||||
this repository as a Git submodule, checking out the specific tag matching your
|
||||
Godot version.**
|
||||
|
||||
## Getting Started
|
||||
|
||||
| **Build latest version of Godot** | [**GitHub**](https://github.com/godotengine/godot) | [**Docs**](https://godot.readthedocs.io/en/latest/development/compiling/index.html) |
|
||||
| **Build latest version of Godot** | [**GitHub**](https://github.com/godotengine/godot) | [**Docs**](https://docs.godotengine.org/en/latest/development/compiling/index.html) |
|
||||
| --- | --- | --- |
|
||||
|
||||
### Clone godot_headers into Library
|
||||
### Clone `godot-headers` into Library
|
||||
|
||||
Clone `godot_headers` under `SimpleLibrary/`
|
||||
Clone `godot-headers` under `SimpleLibrary/`
|
||||
|
||||
```bash
|
||||
cd SimpleLibrary
|
||||
git clone https://github.com/GodotNativeTools/godot_headers
|
||||
git clone https://github.com/godotengine/godot-headers
|
||||
```
|
||||
|
||||
> Note that the master branch of this repository contains the header for the latest Godot master. If you want to build GDNative modules for older versions of Godot add `-b <version>` to the git clone command above. i.e. `git clone https://github.com/GodotNativeTools/godot_headers -b 3.0` will retrieve headers compatible with Godot 3.0.
|
||||
|
||||
> With the exception of a breaking change in the ARVR module between 3.0 and 3.1, GDNative plugins written for an older version of Godot will work in newer versions.
|
||||
Note that the master branch of this repository contains the headers for the
|
||||
latest Godot `master` branch. See [**Versioning**](#versioning) for details.
|
||||
You can use `-b <version>` to the above Git clone command to retrieve a specific
|
||||
branch or tag (e.g. `-b 3.x` or `-b godot-3.3.3-stable`).
|
||||
|
||||
```bash
|
||||
[SimpleLibrary]
|
||||
@@ -34,7 +62,7 @@ git clone https://github.com/GodotNativeTools/godot_headers
|
||||
|
||||
### Create Script
|
||||
|
||||
Create `test.c` under `SimpleLibrary/src/`
|
||||
Create `test.c` under `SimpleLibrary/src/`.
|
||||
|
||||
<details>
|
||||
|
||||
@@ -45,22 +73,22 @@ Create `test.c` under `SimpleLibrary/src/`
|
||||
#include <stdio.h>
|
||||
|
||||
void *test_constructor(godot_object *obj, void *method_data) {
|
||||
printf("test.constructor()\n");
|
||||
return 0;
|
||||
printf("test.constructor()\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void test_destructor(godot_object *obj, void *method_data, void *user_data) {
|
||||
printf("test.destructor()\n");
|
||||
printf("test.destructor()\n");
|
||||
}
|
||||
|
||||
/** func _ready() **/
|
||||
godot_variant test_ready(godot_object *obj, void *method_data, void *user_data, int num_args, godot_variant **args) {
|
||||
godot_variant ret;
|
||||
godot_variant_new_nil(&ret);
|
||||
godot_variant ret;
|
||||
godot_variant_new_nil(&ret);
|
||||
|
||||
printf("_ready()\n");
|
||||
printf("_ready()\n");
|
||||
|
||||
return ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/** Library entry point **/
|
||||
@@ -77,64 +105,64 @@ void GDN_EXPORT godot_nativescript_init(void *desc) {
|
||||
|
||||
godot_instance_create_func create_func = {
|
||||
.create_func = &test_constructor,
|
||||
.method_data = 0,
|
||||
.free_func = 0
|
||||
};
|
||||
.method_data = 0,
|
||||
.free_func = 0
|
||||
};
|
||||
|
||||
godot_instance_destroy_func destroy_func = {
|
||||
.destroy_func = &test_destructor,
|
||||
.method_data = 0,
|
||||
.free_func = 0
|
||||
};
|
||||
godot_instance_destroy_func destroy_func = {
|
||||
.destroy_func = &test_destructor,
|
||||
.method_data = 0,
|
||||
.free_func = 0
|
||||
};
|
||||
|
||||
godot_nativescript_register_class(desc, "SimpleClass", "Node", create_func, destroy_func);
|
||||
godot_nativescript_register_class(desc, "SimpleClass", "Node", create_func, destroy_func);
|
||||
|
||||
{
|
||||
godot_instance_method method = {
|
||||
.method = &test_ready,
|
||||
.method_data = 0,
|
||||
.free_func = 0
|
||||
};
|
||||
{
|
||||
godot_instance_method method = {
|
||||
.method = &test_ready,
|
||||
.method_data = 0,
|
||||
.free_func = 0
|
||||
};
|
||||
|
||||
godot_method_attributes attr = {
|
||||
.rpc_type = GODOT_METHOD_RPC_MODE_DISABLED
|
||||
};
|
||||
godot_method_attributes attr = {
|
||||
.rpc_type = GODOT_METHOD_RPC_MODE_DISABLED
|
||||
};
|
||||
|
||||
godot_nativescript_register_method(desc, "SimpleClass", "_ready", attr, method);
|
||||
}
|
||||
godot_nativescript_register_method(desc, "SimpleClass", "_ready", attr, method);
|
||||
}
|
||||
}
|
||||
|
||||
godot_variant GDN_EXPORT some_test_procedure(void *data, godot_array *args) {
|
||||
godot_variant ret;
|
||||
godot_variant_new_int(&ret, 42);
|
||||
godot_variant ret;
|
||||
godot_variant_new_int(&ret, 42);
|
||||
|
||||
godot_string s;
|
||||
godot_string_new_unicode_data(&s, L"Hello World", 11);
|
||||
godot_print(&s);
|
||||
godot_string s;
|
||||
godot_string_new_with_wide_string(&s, L"Hello World", 11);
|
||||
godot_print(&s);
|
||||
|
||||
godot_string_destroy(&s);
|
||||
godot_string_destroy(&s);
|
||||
|
||||
return ret;
|
||||
return ret;
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
`Expand details for example code.`
|
||||
Expand *Details* for example code.
|
||||
|
||||
### Compile Library
|
||||
|
||||
On Linux:
|
||||
|
||||
```bash
|
||||
clang -g -fPIC -std=c99 -c src/test.c -I/path/to/godot/headers/ -o src/test.os
|
||||
clang -g -fPIC -c src/test.c -I/path/to/godot/headers/ -o src/test.os
|
||||
clang -g -shared src/test.os -o lib/test.so
|
||||
```
|
||||
|
||||
On MacOS:
|
||||
|
||||
```bash
|
||||
clang -g -fPIC -std=c99 -c src/test.c -I/path/to/godot/headers/ -o src/test.os
|
||||
clang -g -fPIC -c src/test.c -I/path/to/godot/headers/ -o src/test.os
|
||||
clang -g -shared -framework Cocoa -Wl,-undefined,dynamic_lookup src/test.os -o lib/test.dylib
|
||||
```
|
||||
|
||||
@@ -145,9 +173,9 @@ clang -g -shared -framework Cocoa -Wl,-undefined,dynamic_lookup src/test.os -o l
|
||||
The GDNativeLibrary resource contains links to the libraries for each platform.
|
||||
|
||||
1. Create a new resource in memory and edit it.
|
||||
1. Select `Resource > GDNativeLibrary`.
|
||||
1. Set the library file for your platform inside the inspector.
|
||||
1. Save the edited resource as a `.tres`
|
||||
2. Select `Resource > GDNativeLibrary`.
|
||||
3. Set the library file for your platform inside the inspector.
|
||||
4. Save the edited resource as a `.tres`
|
||||
|
||||
<details>
|
||||
|
||||
@@ -161,7 +189,7 @@ The GDNativeLibrary resource contains links to the libraries for each platform.
|
||||
|
||||
</details>
|
||||
|
||||
`Expand details for screenshots.`
|
||||
Expand *Details* for screenshots.
|
||||
|
||||
### Using GDNativeLibrary in GDScript
|
||||
|
||||
@@ -169,25 +197,25 @@ The GDNativeLibrary resource contains links to the libraries for each platform.
|
||||
extends Node
|
||||
|
||||
func _ready():
|
||||
var gdn = GDNative.new()
|
||||
gdn.library = load("res://lib/libtest.tres")
|
||||
var gdn = GDNative.new()
|
||||
gdn.library = load("res://lib/libtest.tres")
|
||||
|
||||
gdn.initialize()
|
||||
gdn.initialize()
|
||||
|
||||
var res = gdn.call_native("standard_varcall", "some_test_procedure", [])
|
||||
var res = gdn.call_native("standard_varcall", "some_test_procedure", [])
|
||||
|
||||
print("result: ", res)
|
||||
print("result: ", res)
|
||||
|
||||
gdn.terminate()
|
||||
gdn.terminate()
|
||||
```
|
||||
|
||||
### Attaching GDNativeLibrary to a Node
|
||||
|
||||
1. Attach a new script to a node.
|
||||
1. In the pop-up dialog, choose NativeScript in the `Language` menu.
|
||||
1. Enable built-in script, or create a `.gdn` file, which only contains a name.
|
||||
1. Specify the `Class Name`.
|
||||
1. Press `Create`.
|
||||
2. In the pop-up dialog, choose NativeScript in the `Language` menu.
|
||||
3. Enable built-in script, or create a `.gdn` file, which only contains a name.
|
||||
4. Specify the `Class Name`.
|
||||
5. Press `Create`.
|
||||
|
||||
The GDNativeLibrary field in a NativeScript is empty by default.
|
||||
|
||||
@@ -200,7 +228,7 @@ The GDNativeLibrary field in a NativeScript is empty by default.
|
||||
|
||||
</details>
|
||||
|
||||
`Expand details for screenshots.`
|
||||
Expand *Details* for screenshots.
|
||||
|
||||
## FAQ
|
||||
|
||||
@@ -214,8 +242,8 @@ use of GDNative to implement scripts backed by native code.
|
||||
|
||||
**Which languages are binding as a NativeScript?**
|
||||
|
||||
[**C++**](https://github.com/GodotNativeTools/cpp_bindings),
|
||||
[**D**](https://github.com/GodotNativeTools/d_bindings),
|
||||
[**C++**](https://github.com/godotengine/godot-cpp),
|
||||
[**D**](https://github.com/godot-d/godot-d),
|
||||
[**Nim**](https://github.com/pragmagic/godot-nim)
|
||||
|
||||
**Can you debug NativeScripts?**
|
||||
@@ -230,5 +258,25 @@ You can! ✨
|
||||
**What is the reason behind the name "GDNative"?**
|
||||
|
||||
GDNative was originally named "cscript" because it exposes a C API, but people
|
||||
mistook a relation to C#, which is sometimes abbreviated as "cs". Then named "DLScript", but that brought up some confusion, so we settled with
|
||||
GDNative. 📖
|
||||
mistook a relation to C#, which is sometimes abbreviated as "cs". Then named
|
||||
"DLScript", but that brought up some confusion, so we settled with GDNative. 📖
|
||||
|
||||
## Updating Headers
|
||||
|
||||
See [**Versioning**](#versioning) for details on the Godot versions tracked by
|
||||
each branch of this repository.
|
||||
|
||||
If the relevant branch is not up-to-date for your needs, or if you want to sync
|
||||
the headers with your own modified version of Godot, here is the update
|
||||
procedure used to sync this repository with upstream releases:
|
||||
|
||||
- Compile [Godot Engine](https://github.com/godotengine/godot) at the specific
|
||||
version/commit which you are using.
|
||||
- Use the compiled executable to generate the `api.json` file with:
|
||||
`godot --gdnative-generate-json-api api.json`
|
||||
- Copy the file `modules/gdnative/gdnative_api.json` to this repository.
|
||||
- Copy the files and folders from `modules/gdnative/include` to this repository,
|
||||
overwriting existing content. (To be sure to be in sync, you can delete the
|
||||
folders of this repository first, then copy the upstream folders in place.)
|
||||
Make sure that you compiled the correct Godot version so that the generated
|
||||
`gdnative_api_struct.gen.h` is up-to-date.
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
@@ -42,7 +42,7 @@ extern "C" {
|
||||
|
||||
// Use these to populate version in your plugin
|
||||
#define GODOTVR_API_MAJOR 1
|
||||
#define GODOTVR_API_MINOR 1
|
||||
#define GODOTVR_API_MINOR 2
|
||||
|
||||
typedef struct {
|
||||
godot_gdnative_api_version version; /* version of our API */
|
||||
@@ -65,6 +65,8 @@ typedef struct {
|
||||
godot_int (*get_external_texture_for_eye)(void *, godot_int);
|
||||
void (*notification)(void *, godot_int);
|
||||
godot_int (*get_camera_feed_id)(void *);
|
||||
// only in 1.2 onwards
|
||||
godot_int (*get_external_depth_for_eye)(void *, godot_int);
|
||||
} godot_arvr_interface_gdnative;
|
||||
|
||||
void GDAPI godot_arvr_register_interface(const godot_arvr_interface_gdnative *p_interface);
|
||||
@@ -85,6 +87,10 @@ void GDAPI godot_arvr_set_controller_button(godot_int p_controller_id, godot_int
|
||||
void GDAPI godot_arvr_set_controller_axis(godot_int p_controller_id, godot_int p_axis, godot_real p_value, godot_bool p_can_be_negative);
|
||||
godot_real GDAPI godot_arvr_get_controller_rumble(godot_int p_controller_id);
|
||||
|
||||
// ARVR 1.2 functions
|
||||
void GDAPI godot_arvr_set_interface(godot_object *p_arvr_interface, const godot_arvr_interface_gdnative *p_gdn_interface);
|
||||
godot_int GDAPI godot_arvr_get_depthid(godot_rid *p_render_target);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
@@ -53,7 +53,9 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
// This is for libraries *using* the header, NOT GODOT EXPOSING STUFF!!
|
||||
#ifdef _WIN32
|
||||
#ifdef __GNUC__
|
||||
#define GDN_EXPORT __attribute__((visibility("default")))
|
||||
#elif defined(_WIN32)
|
||||
#define GDN_EXPORT __declspec(dllexport)
|
||||
#else
|
||||
#define GDN_EXPORT
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
@@ -219,7 +219,7 @@ godot_bool godot_string_empty(const godot_string *p_self);
|
||||
// path functions
|
||||
godot_string GDAPI godot_string_get_base_dir(const godot_string *p_self);
|
||||
godot_string GDAPI godot_string_get_file(const godot_string *p_self);
|
||||
godot_string GDAPI godot_string_humanize_size(size_t p_size);
|
||||
godot_string GDAPI godot_string_humanize_size(uint64_t p_size);
|
||||
godot_bool GDAPI godot_string_is_abs_path(const godot_string *p_self);
|
||||
godot_bool GDAPI godot_string_is_rel_path(const godot_string *p_self);
|
||||
godot_bool GDAPI godot_string_is_resource_file(const godot_string *p_self);
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
@@ -37,7 +37,7 @@ extern "C" {
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define GODOT_VARIANT_SIZE (16 + sizeof(void *))
|
||||
#define GODOT_VARIANT_SIZE (16 + sizeof(int64_t))
|
||||
|
||||
#ifndef GODOT_CORE_API_GODOT_VARIANT_TYPE_DEFINED
|
||||
#define GODOT_CORE_API_GODOT_VARIANT_TYPE_DEFINED
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
|
||||
@@ -5847,7 +5847,7 @@
|
||||
"name": "godot_string_humanize_size",
|
||||
"return_type": "godot_string",
|
||||
"arguments": [
|
||||
["size_t", "p_size"]
|
||||
["uint64_t", "p_size"]
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -6459,7 +6459,32 @@
|
||||
"major": 1,
|
||||
"minor": 1
|
||||
},
|
||||
"next": null,
|
||||
"next": {
|
||||
"name": "arvr",
|
||||
"type": "ARVR",
|
||||
"version": {
|
||||
"major": 1,
|
||||
"minor": 2
|
||||
},
|
||||
"next": null,
|
||||
"api": [
|
||||
{
|
||||
"name": "godot_arvr_set_interface",
|
||||
"return_type": "void",
|
||||
"arguments": [
|
||||
["godot_object *", "p_arvr_interface"],
|
||||
["const godot_arvr_interface_gdnative *", "p_gdn_interface"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "godot_arvr_get_depthid",
|
||||
"return_type": "godot_int",
|
||||
"arguments": [
|
||||
["godot_rid *", "p_render_target"]
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"api": [
|
||||
{
|
||||
"name": "godot_arvr_register_interface",
|
||||
|
||||
@@ -105,6 +105,14 @@ typedef struct godot_gdnative_ext_android_api_struct {
|
||||
bool (*godot_android_is_activity_resumed)();
|
||||
} godot_gdnative_ext_android_api_struct;
|
||||
|
||||
typedef struct godot_gdnative_ext_arvr_1_2_api_struct {
|
||||
unsigned int type;
|
||||
godot_gdnative_api_version version;
|
||||
const godot_gdnative_api_struct *next;
|
||||
void (*godot_arvr_set_interface)(godot_object *p_arvr_interface, const godot_arvr_interface_gdnative *p_gdn_interface);
|
||||
godot_int (*godot_arvr_get_depthid)(godot_rid *p_render_target);
|
||||
} godot_gdnative_ext_arvr_1_2_api_struct;
|
||||
|
||||
typedef struct godot_gdnative_ext_arvr_api_struct {
|
||||
unsigned int type;
|
||||
godot_gdnative_api_version version;
|
||||
@@ -916,7 +924,7 @@ typedef struct godot_gdnative_core_api_struct {
|
||||
godot_bool (*godot_string_empty)(const godot_string *p_self);
|
||||
godot_string (*godot_string_get_base_dir)(const godot_string *p_self);
|
||||
godot_string (*godot_string_get_file)(const godot_string *p_self);
|
||||
godot_string (*godot_string_humanize_size)(size_t p_size);
|
||||
godot_string (*godot_string_humanize_size)(uint64_t p_size);
|
||||
godot_bool (*godot_string_is_abs_path)(const godot_string *p_self);
|
||||
godot_bool (*godot_string_is_rel_path)(const godot_string *p_self);
|
||||
godot_bool (*godot_string_is_resource_file)(const godot_string *p_self);
|
||||
|
||||
0
images/.gdignore
Normal file
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 9.5 KiB |
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* GODOT ENGINE */
|
||||
/* https://godotengine.org */
|
||||
/*************************************************************************/
|
||||
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
|
||||
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
|
||||
/* */
|
||||
/* Permission is hereby granted, free of charge, to any person obtaining */
|
||||
/* a copy of this software and associated documentation files (the */
|
||||
|
||||