Compare commits
2
Commits
6d056560e7
...
d878463ccb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d878463ccb | ||
|
|
5d8337af7e |
No files matched your search
@@ -17,7 +17,6 @@ cmake_policy(SET CMP0079 NEW)
|
|||||||
|
|
||||||
option(DUSK_BUILD_TESTS "Enable tests" OFF)
|
option(DUSK_BUILD_TESTS "Enable tests" OFF)
|
||||||
option(DUSK_NETWORK "Enable network support" ON)
|
option(DUSK_NETWORK "Enable network support" ON)
|
||||||
option(DUSK_SCRIPT "Enable scripting support" ON)
|
|
||||||
|
|
||||||
set(DUSK_GAME_NAME "Dusk" CACHE STRING "Game display name")
|
set(DUSK_GAME_NAME "Dusk" CACHE STRING "Game display name")
|
||||||
set(DUSK_GAME_AUTHOR "YourWishes" CACHE STRING "Game author / coder")
|
set(DUSK_GAME_AUTHOR "YourWishes" CACHE STRING "Game author / coder")
|
||||||
@@ -111,12 +110,6 @@ if(DUSK_NETWORK)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(DUSK_SCRIPT)
|
|
||||||
target_compile_definitions(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
|
|
||||||
DUSK_SCRIPT
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Toolchains
|
# Toolchains
|
||||||
include(cmake/targets/${DUSK_TARGET_SYSTEM}.cmake)
|
include(cmake/targets/${DUSK_TARGET_SYSTEM}.cmake)
|
||||||
|
|
||||||
|
|||||||
+1
-4
@@ -9,10 +9,7 @@ if(DUSK_NETWORK)
|
|||||||
add_subdirectory(dusknetwork)
|
add_subdirectory(dusknetwork)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(
|
if(DUSK_TARGET_SYSTEM STREQUAL "linux" OR DUSK_TARGET_SYSTEM STREQUAL "knulli")
|
||||||
DUSK_SCRIPT AND
|
|
||||||
(DUSK_TARGET_SYSTEM STREQUAL "linux" OR DUSK_TARGET_SYSTEM STREQUAL "knulli")
|
|
||||||
)
|
|
||||||
# The duskscript runtime itself lives in src/dusk/script, added
|
# The duskscript runtime itself lives in src/dusk/script, added
|
||||||
# unconditionally of platform there since it is plain, portable C; this is
|
# unconditionally of platform there since it is plain, portable C; this is
|
||||||
# just the duskscriptcc compiler, a host tool only built on the dev machine.
|
# just the duskscriptcc compiler, a host tool only built on the dev machine.
|
||||||
|
|||||||
@@ -82,9 +82,7 @@ add_subdirectory(input)
|
|||||||
add_subdirectory(locale)
|
add_subdirectory(locale)
|
||||||
add_subdirectory(perf)
|
add_subdirectory(perf)
|
||||||
add_subdirectory(rpg)
|
add_subdirectory(rpg)
|
||||||
if(DUSK_SCRIPT)
|
add_subdirectory(script)
|
||||||
add_subdirectory(script)
|
|
||||||
endif()
|
|
||||||
add_subdirectory(scene)
|
add_subdirectory(scene)
|
||||||
add_subdirectory(system)
|
add_subdirectory(system)
|
||||||
add_subdirectory(time)
|
add_subdirectory(time)
|
||||||
|
|||||||
@@ -20,9 +20,7 @@
|
|||||||
#ifdef DUSK_NETWORK
|
#ifdef DUSK_NETWORK
|
||||||
#include "network/network.h"
|
#include "network/network.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef DUSK_SCRIPT
|
#include "script/script.h"
|
||||||
#include "script/script.h"
|
|
||||||
#endif
|
|
||||||
#include "system/system.h"
|
#include "system/system.h"
|
||||||
#include "console/console.h"
|
#include "console/console.h"
|
||||||
#include "save/save.h"
|
#include "save/save.h"
|
||||||
@@ -55,9 +53,7 @@ errorret_t engineInit(const int32_t argc, const char_t **argv) {
|
|||||||
#ifdef DUSK_NETWORK
|
#ifdef DUSK_NETWORK
|
||||||
errorChain(networkInit());
|
errorChain(networkInit());
|
||||||
#endif
|
#endif
|
||||||
#ifdef DUSK_SCRIPT
|
errorChain(scriptInit());
|
||||||
errorChain(scriptInit());
|
|
||||||
#endif
|
|
||||||
errorChain(sceneInit());
|
errorChain(sceneInit());
|
||||||
|
|
||||||
consolePrint("Engine initialized");
|
consolePrint("Engine initialized");
|
||||||
@@ -101,9 +97,7 @@ void engineExit(void) {
|
|||||||
|
|
||||||
errorret_t engineDispose(void) {
|
errorret_t engineDispose(void) {
|
||||||
errorChain(sceneDispose());
|
errorChain(sceneDispose());
|
||||||
#ifdef DUSK_SCRIPT
|
errorChain(scriptDispose());
|
||||||
errorChain(scriptDispose());
|
|
||||||
#endif
|
|
||||||
#ifdef DUSK_NETWORK
|
#ifdef DUSK_NETWORK
|
||||||
errorChain(networkDispose());
|
errorChain(networkDispose());
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -6,22 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "dusk.h"
|
#include "script/script.h"
|
||||||
#include "duskscript.h"
|
|
||||||
#include "scripttypes.h"
|
|
||||||
#include "builtin/scriptbuiltin.h"
|
|
||||||
#include "builtin/scriptarg.h"
|
|
||||||
#include "builtin/scriptbuiltinregister.h"
|
|
||||||
#include "error/scriptraise.h"
|
|
||||||
#include "value/scriptvalueprimitive.h"
|
|
||||||
#include "string/scriptstringnew.h"
|
|
||||||
#include "array/scriptarraynew.h"
|
|
||||||
#include "array/scriptarraymodify.h"
|
|
||||||
#include "struct/scriptstruct.h"
|
|
||||||
#include "promise/scriptpromisenew.h"
|
|
||||||
#include "promise/scriptpromisesettle.h"
|
|
||||||
#include "promise/scripttimer.h"
|
|
||||||
#include "runtime/scriptruntimeload.h"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers the consolePrint(text) native, letting scripts write directly to
|
* Registers the consolePrint(text) native, letting scripts write directly to
|
||||||
|
|||||||
@@ -8,10 +8,30 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "dusk.h"
|
#include "dusk.h"
|
||||||
#include "error/error.h"
|
#include "error/error.h"
|
||||||
|
|
||||||
|
// Everything duskscript: values, the heap, the built in functions, running
|
||||||
|
// scripts, and the bytecode virtual machine that runs compiled ones.
|
||||||
#include "duskscript.h"
|
#include "duskscript.h"
|
||||||
#include "image/scriptvmattach.h"
|
#include "image/scriptvmattach.h"
|
||||||
#include "image/scriptvmrun.h"
|
#include "image/scriptvmrun.h"
|
||||||
|
|
||||||
|
// What a native function needs: the types, the argument helpers and the value
|
||||||
|
// constructors. Include "script/script.h" for this, not these directly.
|
||||||
|
#include "scripttypes.h"
|
||||||
|
#include "builtin/scriptbuiltin.h"
|
||||||
|
#include "builtin/scriptarg.h"
|
||||||
|
#include "builtin/scriptbuiltinregister.h"
|
||||||
|
#include "error/scriptraise.h"
|
||||||
|
#include "value/scriptvalueprimitive.h"
|
||||||
|
#include "string/scriptstringnew.h"
|
||||||
|
#include "array/scriptarraynew.h"
|
||||||
|
#include "array/scriptarraymodify.h"
|
||||||
|
#include "struct/scriptstruct.h"
|
||||||
|
#include "promise/scriptpromisenew.h"
|
||||||
|
#include "promise/scriptpromisesettle.h"
|
||||||
|
#include "promise/scripttimer.h"
|
||||||
|
#include "runtime/scriptruntimeload.h"
|
||||||
|
|
||||||
// The whole memory budget of the script context. The runtime never asks the
|
// The whole memory budget of the script context. The runtime never asks the
|
||||||
// system for more than this, see scriptRuntimeCreate.
|
// system for more than this, see scriptRuntimeCreate.
|
||||||
#define SCRIPT_MEMORY_SIZE (512 * 1024)
|
#define SCRIPT_MEMORY_SIZE (512 * 1024)
|
||||||
|
|||||||
+1
-4
@@ -7,10 +7,7 @@ add_subdirectory(animation)
|
|||||||
add_subdirectory(assert)
|
add_subdirectory(assert)
|
||||||
add_subdirectory(asset)
|
add_subdirectory(asset)
|
||||||
add_subdirectory(console)
|
add_subdirectory(console)
|
||||||
if(
|
if(DUSK_TARGET_SYSTEM STREQUAL "linux" OR DUSK_TARGET_SYSTEM STREQUAL "knulli")
|
||||||
DUSK_SCRIPT AND
|
|
||||||
(DUSK_TARGET_SYSTEM STREQUAL "linux" OR DUSK_TARGET_SYSTEM STREQUAL "knulli")
|
|
||||||
)
|
|
||||||
add_subdirectory(duskscript)
|
add_subdirectory(duskscript)
|
||||||
endif()
|
endif()
|
||||||
add_subdirectory(error)
|
add_subdirectory(error)
|
||||||
|
|||||||
Reference in new issue
Block a user