Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "3rdParty/daScript"]
path = 3rdParty/daScript
url = https://github.com/imp5imp5/daScript-1.git
[submodule "3rdParty/miniaudio"]
path = 3rdParty/miniaudio
url = https://github.com/mackron/miniaudio.git
Expand All @@ -19,3 +16,6 @@
[submodule "3rdParty/zstd"]
path = 3rdParty/zstd
url = https://github.com/imp5imp5/zstd.git
[submodule "3rdParty/daScript"]
path = 3rdParty/daScript
url = https://github.com/GaijinEntertainment/daScript
2 changes: 1 addition & 1 deletion 3rdParty/daScript
Submodule daScript updated 847 files
15 changes: 7 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ set(DAS_MINFFT_DISABLED YES)
set(DAS_SOUND_DISABLED YES)
# set(DAS_BUILD_TOOLS NO) # <--- need to build tools to support AOT generation build step in daScript modules
set(DAS_CONFIG_INCLUDE_DIR "src")
# FIXME: for no reason dascript examples builds from the root folder, so we need to disable them.
# Otherwise cmake fail with "cannot find dasbox/examples/tutorial/"
set(DAS_TUTORIAL_DISABLED YES)
set(DAS_TESTS_DISABLED YES)
set(DAS_PROFILE_DISABLED YES)

add_subdirectory(3rdParty/daScript)

Expand Down Expand Up @@ -95,12 +100,6 @@ if(APPLE)
endif()


# log implementation for standalone executables
add_library(logStandalone STATIC src/daScript/logStandalone.cpp)
add_dependencies(daScript logStandalone)
target_link_libraries(daScript logStandalone)


# dasbox
add_executable(dasbox ${SRC})
target_compile_features(dasbox PRIVATE cxx_std_17)
Expand Down Expand Up @@ -163,6 +162,6 @@ endif()

set_target_properties(dasbox PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin"
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${PROJECT_SOURCE_DIR}/bin"
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${PROJECT_SOURCE_DIR}/bin"
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${PROJECT_SOURCE_DIR}/bin/Debug"
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${PROJECT_SOURCE_DIR}/bin/"
)
3 changes: 3 additions & 0 deletions build_windows_vs_2022.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set CMAKE_GEN_TARGET="Visual Studio 17" -A x64
set VS_NUMBER=2022
call build_vs.impl.bat
4 changes: 4 additions & 0 deletions build_windows_vs_2022_debug.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set CMAKE_GEN_TARGET="Visual Studio 17" -A x64
set VS_NUMBER=2022
set CONFIGURATION=Debug
call build_vs.impl.bat
2 changes: 1 addition & 1 deletion samples/controls/gamepad_input_demo.das
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var


[export]
def initialize()
def initialize(full_restart: bool)
set_window_title("Gamepad Input Demo")
return

Expand Down
2 changes: 1 addition & 1 deletion samples/controls/keyboard_input_demo.das
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ var


[export]
def initialize()
def initialize(full_restart: bool)
set_window_title("Keyboard Input Demo")


Expand Down
2 changes: 1 addition & 1 deletion samples/controls/mouse_input_demo.das
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var


[export]
def initialize()
def initialize(full_restart: bool)
set_window_title("Mouse Input Demo")


Expand Down
2 changes: 1 addition & 1 deletion samples/custom_fonts/custom_fonts.das
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require daslib/media

[export]
def initialize
def initialize(full_restart: bool)
set_window_title("Custom Fonts")

[export]
Expand Down
5 changes: 3 additions & 2 deletions samples/dasbox_initial_menu.das
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
include daslib/internal_menu_background.das
require fio

/* options debugger // uncomment for debug in VS Code
require daslib/debug // uncomment for debug in VS Code */
let
SELECT_Y = 328.0
LIST_LINE_HEIGHT = 60.0
Expand Down Expand Up @@ -425,7 +426,7 @@ def recreate_menu()


[export]
def initialize()
def initialize(full_restart: bool)
background_initialize()
recreate_menu()

Expand Down
11 changes: 7 additions & 4 deletions samples/ecs/decs_demo_basic.das
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,12 @@ def update_particle(var p: Particle)
def draw_particle(var p: Particle)
fill_circle(p.pos.x, p.pos.y, p.radius, 0xFFFFFF)



[export]
def initialize(is_hard_reload: bool)
def initialize(full_restart: bool)
set_window_title("DECS Demo (Entity Component System)")

if is_hard_reload
if full_restart
restart()
for i in range(4)
let pos = float2(200.0 + float(i * 100), 200.0 + float(i * 50))
let vel = float2(120.1, 0.0)
Expand All @@ -54,14 +53,18 @@ def initialize(is_hard_reload: bool)

[export]
def act(dt: float)
var quit = false
if get_key(VK_ESCAPE)
schedule_quit_game()
quit = true

if get_mouse_button_down(MB_LEFT)
make_particle(get_mouse_position(), float2(-300.0, -300.0), 20.0)
commit()

decs_stage("update")
if quit
restart()


[export]
Expand Down
2 changes: 1 addition & 1 deletion samples/flappy_box/flappy_box.das
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def reset_game()


[export]
def initialize
def initialize(full_restart: bool)
set_window_title("Flappy Box")
randomize_seed(RAND_SEED)
reset_game()
Expand Down
2 changes: 1 addition & 1 deletion samples/graphics/graphics_demo.das
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var texture: ImageHandle


[export]
def initialize()
def initialize(full_restart: bool)
print("initialize\n")
set_window_title("Graphics Demo")
//set_antialiasing(4)
Expand Down
2 changes: 1 addition & 1 deletion samples/images/images_demo.das
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var ball: ImageHandle
var ball2: ImageHandle

[export]
def initialize()
def initialize(full_restart: bool)
print("initialize\n")
set_window_title("Images Demo")

Expand Down
2 changes: 1 addition & 1 deletion samples/minimal.das
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ require daslib/media

// 'initialize' runs once when game starts and every hot-reload
[export]
def initialize
def initialize(full_restart: bool)
return

// this function is called to update game data,
Expand Down
2 changes: 1 addition & 1 deletion samples/sound/sound_demo.das
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ var


[export]
def initialize
def initialize(full_restart: bool)
set_window_title("Sound Demo")
gong <- create_managed_sound("gong.wav")
print("gong.channels = {gong.channels}\n")
Expand Down
2 changes: 1 addition & 1 deletion samples/space_rocks_and_lasers/rocks_and_lasers.das
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def reset_game


[export]
def initialize()
def initialize(full_restart: bool)
set_antialiasing(4)
set_window_title("Space, Rocks and Lasers")
print("Screen size: {get_screen_width()} x {get_screen_height()}\n")
Expand Down
2 changes: 1 addition & 1 deletion samples/tests/main.das
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def self_test(step_name: string)


[export]
def initialize
def initialize(full_restart: bool)
log::init_log() // initialize dastest log
startTime = ref_time_ticks()
self_test("init")
Expand Down
2 changes: 1 addition & 1 deletion samples/will_o_wisp/will_o_wisp.das
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def grass_mesh(var m: GrassMesh &; pos: float2; color_: uint; count: int)


[export]
def initialize
def initialize(full_restart: bool)
set_window_title("Will-o'-Wisp")
set_antialiasing(4)
grass_leaf_gradient <- create_image(2, 1, [{uint[] 0xFFFFFFFF; 0xFF000000}])
Expand Down
2 changes: 1 addition & 1 deletion src/buildDate.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#pragma once
#define DASBOX_BUILD_DATE "14.12.2022"
#define DASBOX_BUILD_DATE "16.2.2024"
168 changes: 0 additions & 168 deletions src/daScript/das_config.h

This file was deleted.

Loading