diff --git a/Makefile b/Makefile index 601f970..f83da87 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ CFLAGS_DEBUG := \ -std=c++20 -Wall -Wextra \ -Og -g -fno-omit-frame-pointer \ -I./include -I./libs/mruby/build/host/include \ - $(SDL_CFLAGS) $(MRUBY_CFLAGS) + $(SDL_CFLAGS) $(MRUBY_CFLAGS) $(C_SANITIZER) CFLAGS_RELEASE := \ -std=c++20 -O3 -mtune=generic \ diff --git a/src/window/window.cc b/src/window/window.cc index 258385d..c3f5217 100644 --- a/src/window/window.cc +++ b/src/window/window.cc @@ -652,5 +652,8 @@ void Window::compute_transform() { bool Window::mouse_in_window(const Vec2 real_position, Vec2 &virtual_position) { virtual_position = (real_position - offset) / scale; - return virtual_position.x >= 0 && virtual_position.x <= virtual_size.x && virtual_position.y >= 0 && virtual_position.y <= virtual_size.y; + return virtual_position.x >= 0 + && virtual_position.x <= virtual_size.x + && virtual_position.y >= 0 + && virtual_position.y <= virtual_size.y; } diff --git a/writeup/analysis.md b/writeup/analysis.md index 72a4250..a1667e4 100644 --- a/writeup/analysis.md +++ b/writeup/analysis.md @@ -359,7 +359,7 @@ But if i instead use a library that automatically detects and uses the appropria This engine does not use a UI based builder. And so all gameplay logic, entity behaviour, definitions etc. must be implemented directly through code. Because of this it is important to use a well established language in which the developer can write their code. -Embedded scripting languages are programming lanaguges that are designed to be embedded in a host programming language. The embedded language is often an interpreted language which the host is a compiled static typed language. They allow adding code to the program that can be modified and interpreted at runtime. They are often used to extend on the functionality of the host language. And they also allow using functions defined in the host language which are usually much more performance optimized. +Embedded scripting languages are programming lanaguges that are designed to be embedded in a host programming language. The embedded language is often an interpreted language while the host is a compiled static typed language. They allow adding code to the program that can be modified and interpreted at runtime. They are often used to extend on the functionality of the host language. And they also allow using functions defined in the host language which are usually much more performance optimized. They are usually very lightweight (so that the final binary doesn't get bloated and runs fast enough). They are very useful for cuztom DSL/syntax. diff --git a/writeup/design.md b/writeup/design.md index bb47a65..af86ba7 100644 --- a/writeup/design.md +++ b/writeup/design.md @@ -9,4 +9,4 @@ - about mruby/json scripting - and usage of packer -(architectural design and file structure etc. of teh project itself) +(architectural design and file structure etc. of the project itself) diff --git a/writeup/todo.md b/writeup/todo.md new file mode 100644 index 0000000..c250121 --- /dev/null +++ b/writeup/todo.md @@ -0,0 +1,5 @@ +implement a virtual file system for assets / scripts: + +that can use either: +1. file system, when used with `misth run ./input.rb` +2. .misthpack file when used with `misth run ./input.misthpack` (produced with `misth build ./input.json`)