-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some fixes to engien to editor mappings. Still WIP
- Loading branch information
1 parent
c65f805
commit fd1b9fe
Showing
57 changed files
with
1,119 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "Bridging_Header.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#pragma once | ||
|
||
#include <shared/Exported.hxx> | ||
#include <shared/NativePointer.hxx> | ||
|
||
#include <stdint.h> | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
/** | ||
* @brief Initializes the asset packages | ||
* @param loader The loader to use. Creates the engine's internal one if none provided. | ||
*/ | ||
EXPORTED void AssetPackages_Initialize(NativePointer loader); | ||
|
||
/** | ||
* @brief Loads an asset package | ||
* @param path The path to the asset package | ||
* @return The asset package | ||
*/ | ||
EXPORTED void AssetPackages_LoadAssetPackages(const char* path, NativePointer* buffer, size_t* numPackages); | ||
|
||
/** | ||
* @brief Loads a texture | ||
* @param uuid The uuid of the texture | ||
* @return The texture | ||
*/ | ||
EXPORTED NativePointer AssetPackages_LoadTexture(NativePointer assetPackage, const char* uuid); | ||
|
||
/** | ||
* @brief Loads a mesh | ||
* @param uuid The uuid of the mesh | ||
* @return The mesh | ||
*/ | ||
EXPORTED NativePointer AssetPackages_LoadMesh(NativePointer assetPackage, const char* uuid); | ||
|
||
/** | ||
* @brief Loads a material | ||
* @param uuid The uuid of the material | ||
* @return The material | ||
*/ | ||
EXPORTED NativePointer AssetPackages_LoadMaterial(NativePointer assetPackage, const char* uuid); | ||
|
||
/** | ||
* @brief Loads a shader | ||
* @param uuid The uuid of the shader | ||
* @return The shader | ||
*/ | ||
EXPORTED NativePointer AssetPackages_LoadShader(NativePointer assetPackage, const char* uuid); | ||
|
||
/** | ||
* @brief Loads an audioclip | ||
* @param uuid The uuid of the audioclip | ||
* @return The audioclip | ||
*/ | ||
EXPORTED NativePointer AssetPackages_LoadAudioClip(NativePointer assetPackage, const char* uuid); | ||
|
||
/** | ||
* @brief Clears an asset | ||
* @param asset The asset to clear | ||
*/ | ||
EXPORTED void AssetPackages_DisposeAsset(NativePointer asset); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
#pragma once | ||
|
||
#include <shared/Exported.hxx> | ||
#include <shared/NativePointer.hxx> | ||
|
||
#include <stdint.h> | ||
#include <stdbool.h> | ||
#include <stddef.h> | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
EXPORTED void Audio_Init(); | ||
|
||
/** | ||
* @brief Creates an audio device | ||
* | ||
* @return NativePointer | ||
*/ | ||
EXPORTED NativePointer Audio_CreateDevice(); | ||
|
||
/** | ||
* @brief Destroys an audio device | ||
* | ||
* @param device The device to be destroyed | ||
*/ | ||
EXPORTED void Audio_DestroyDevice(NativePointer device); | ||
|
||
/** | ||
* @brief Creates a new audiosource. | ||
* | ||
* @param x X position of the source | ||
* @param y Y position of the source | ||
* @param z Z position of the source | ||
* @return uint64_t The id of the source | ||
*/ | ||
EXPORTED NativePointer Audio_CreateAudioSource(float x, float y, float z); | ||
|
||
/** | ||
* @brief Destroys an audiosource via its id | ||
* | ||
* @param source The id of the source | ||
*/ | ||
EXPORTED void Audio_DestroyAudioSource(NativePointer source); | ||
|
||
/** | ||
* @brief Creates a new audioclip from a given file | ||
* | ||
* @param path The path of the file | ||
* @return uint64_t The id of the clip | ||
*/ | ||
EXPORTED NativePointer Audio_CreateAudioClip(const char* path); | ||
|
||
/** | ||
* @brief Gets the sample rate of a given clip | ||
* | ||
* @param clip The clip to query | ||
* @return uint32_t | ||
*/ | ||
EXPORTED uint32_t Audio_ClipGetSampleRate(NativePointer clip); | ||
|
||
/** | ||
* @brief Gets he bitdepth for a given clip | ||
* | ||
* @param clip The clip to be queried | ||
* @return uint32_t | ||
*/ | ||
EXPORTED uint32_t Audio_ClipGetBitDepth(NativePointer clip); | ||
|
||
/** | ||
* @brief Gets the number of channels for a given clip | ||
* | ||
* @param clip The clip to be queried | ||
* @return uint8_t | ||
*/ | ||
EXPORTED uint8_t Audio_ClipGetChannels(NativePointer clip); | ||
|
||
/** | ||
* @brief Plays an audio clip via an audiosource | ||
* | ||
* @param source The source to be used | ||
* @param clip The clip to be played | ||
*/ | ||
EXPORTED void Audio_AudioSourceSetAudioClip(NativePointer source, NativePointer clip); | ||
|
||
/** | ||
* @brief Starts playback of an audiosource | ||
* | ||
* @param source The source | ||
*/ | ||
EXPORTED void Audio_AudioSourceStart(NativePointer source); | ||
|
||
/** | ||
* @brief Stops playback of an audiosource | ||
* | ||
* @param source The source | ||
*/ | ||
EXPORTED void Audio_AudioSourceStop(NativePointer source); | ||
|
||
/** | ||
* @brief Toggles looping for the given source | ||
* | ||
* @param source The source | ||
*/ | ||
EXPORTED void Audio_AudioSourceSetLooping(NativePointer source, bool looping); | ||
|
||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
#pragma once | ||
|
||
#include <shared/Exported.hxx> | ||
#include <shared/NativePointer.hxx> | ||
|
||
#include <stdint.h> | ||
#include <stdbool.h> | ||
#include <stddef.h> | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* @brief Initialies the core module | ||
* | ||
*/ | ||
EXPORTED void Core_Init(); | ||
|
||
/** | ||
* @brief Creates a new window | ||
* | ||
* @param title The title of the Window | ||
* @param posX The position horizontal of the window | ||
* @param posY The vertical position of the window | ||
* @param width The width of the window | ||
* @param height The height of the window | ||
* @param flags Flas the window should use | ||
* @param renderBackend The render backend to use for the window (0 = OpenGL, 1 = Vulkan, 2 = D3D12) | ||
* @return uint64_t* Returns a pointer to the window | ||
*/ | ||
EXPORTED NativePointer Core_CreateWindow( | ||
const char* title, | ||
uint32_t* posX, | ||
uint32_t* posY, | ||
uint32_t width, | ||
uint32_t height, | ||
uint32_t flags, | ||
uint8_t renderBackend, | ||
bool silent | ||
); | ||
|
||
/** | ||
* @brief Creates a new window | ||
* | ||
* @param title The native window | ||
* @return uint64_t* Returns a pointer to the window | ||
*/ | ||
EXPORTED NativePointer Core_CreateWindowFromNative(NativePointer nativeWindow); | ||
|
||
/** | ||
* @brief Destroys an audiosource via its pointer | ||
* | ||
* @param window The window | ||
*/ | ||
EXPORTED void Core_DestroyWindow(NativePointer window); | ||
|
||
/** | ||
* @brief Shows the window | ||
* | ||
* @param window The window to be shown | ||
*/ | ||
EXPORTED void Core_ShowWindow(NativePointer window); | ||
|
||
/** | ||
* @brief Hides the window | ||
* | ||
* @param window The window to be hidden | ||
*/ | ||
EXPORTED void Core_HideWindow(NativePointer window); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |
Oops, something went wrong.