Minor cleanup.
This commit is contained in:
@@ -30,7 +30,7 @@ CFLAGS_DEBUG := \
|
|||||||
-std=c++20 -Wall -Wextra \
|
-std=c++20 -Wall -Wextra \
|
||||||
-Og -g -fno-omit-frame-pointer \
|
-Og -g -fno-omit-frame-pointer \
|
||||||
-I./include -I./libs/mruby/build/host/include \
|
-I./include -I./libs/mruby/build/host/include \
|
||||||
$(SDL_CFLAGS) $(MRUBY_CFLAGS)
|
$(SDL_CFLAGS) $(MRUBY_CFLAGS) $(C_SANITIZER)
|
||||||
|
|
||||||
CFLAGS_RELEASE := \
|
CFLAGS_RELEASE := \
|
||||||
-std=c++20 -O3 -mtune=generic \
|
-std=c++20 -O3 -mtune=generic \
|
||||||
|
|||||||
@@ -652,5 +652,8 @@ void Window::compute_transform() {
|
|||||||
bool Window::mouse_in_window(const Vec2<float> real_position, Vec2<float> &virtual_position) {
|
bool Window::mouse_in_window(const Vec2<float> real_position, Vec2<float> &virtual_position) {
|
||||||
virtual_position = (real_position - offset) / scale;
|
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;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -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.
|
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.
|
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.
|
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.
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -9,4 +9,4 @@
|
|||||||
- about mruby/json scripting
|
- about mruby/json scripting
|
||||||
- and usage of packer
|
- and usage of packer
|
||||||
|
|
||||||
(architectural design and file structure etc. of teh project itself)
|
(architectural design and file structure etc. of the project itself)
|
||||||
|
|||||||
@@ -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`)
|
||||||
Reference in New Issue
Block a user