Commit graph

1608 commits

Author SHA1 Message Date
Alex Zebra
e78b0f0367
Merge 2c8fd60870 into cb5bebf3ae 2026-11-03 20:25:14 +03:00
MihailRis
cb5bebf3ae fix core:pathfinding with low refresh interval
Some checks failed
Macos Build / build-dmg (push) Has been cancelled
Windows Build (CLang) / build-windows (clang, windows-latest) (push) Has been cancelled
MSVC Build / build-windows (windows-2022) (push) Has been cancelled
x86-64 AppImage / build-appimage (ubuntu-22.04) (push) Has been cancelled
Build / Build (push) Has been cancelled
2026-11-01 04:55:07 +03:00
MihailRis
17e6d2e8f6
Merge pull request #1059 from MihailRis/test-client-test
add first client test (creating_new_world.lua)
2026-11-01 04:36:51 +03:00
ostermine
3b0efb674a fix app.config_packs adding default packs twice in a client app script
Since b2bbef69 the first content-related app function ticks first, and in a
client app that tick loads the default content. app.config_packs read the
installed packs before that tick, so it asked reconfig_packs to add base
again: "pack duplication [base]". Do the pending tick before reading them.
2026-10-30 20:11:53 +03:00
MihailRis
b2bbef699c fix content-related app functions timings 2026-10-25 22:56:54 +03:00
MihailRis
10f9d89c6d add first client test (creating_new_world.lua) 2026-10-21 20:48:23 +03:00
Andrey Tazetdinov
05f9782786 track groups 2026-10-14 16:46:12 +02:00
Andrey Tazetdinov
fd17ce32ab optimize animator 2026-10-14 16:35:21 +02:00
MihailRis
57fa6393c2 feat: 'res:project' as default project 2026-10-12 20:06:30 +03:00
alexei-zebra
fbedfad478
Fix the issues found while reviewing the engine frame
Use util::str2wstr_utf8 for the window title instead of the deprecated
codecvt conversion, choose the bar control icon with a switch, and keep
the frontend layout in sync when a frame is drawn from the refresh
callback the platform calls while it blocks the main loop.

The frame forgets its interaction state when the window mode changes or
the cursor gets locked, a bar click that only moved the window is no
longer a double click, and one frame per size is drawn per resize.

The tooltips of the two window settings were only present in the Russian
locale and under a key the settings page never asks for: they are named
display.<id>.tooltip now and translated in both locales. The version label
of the debug build moves below the bar that covers the menu screen.
2026-10-11 20:06:11 +03:00
alexei-zebra
4d1b4a1638
Redraw the windows frame from WM_SIZE and keep its style
The refresh callback is triggered by WM_PAINT, but windows does not send it
while a border is dragged: the window class has neither CS_HREDRAW nor
CS_VREDRAW and nothing invalidates the client area. Only WM_SIZE arrives, so
nothing was drawn during such a resize. The frame is drawn from WM_SIZE now,
after forwarding the message to GLFW so that the new size is already in.

WM_NCHITTEST re-applies the style bits the engine frame needs and which GLFW
drops on every window mode change, taking the drag area with them. Every frame
setup logs whether the subclass had to be installed again, so a lost window
procedure is visible in the log.

The live resize switch is honoured by the GLFW backend as well: with it off the
frame from the message loop is skipped and the window keeps showing what the
system stretches.
2026-10-11 01:05:47 +03:00
alexei-zebra
68d4214627
Fix the engine window frame on windows
Four things came out of testing on windows.

The window settings were hidden outside of wayland because the check used
the backend name, while the bar height matters wherever the engine draws
the frame. The window now reports that (hasEngineFrame: barEnabled on
wayland, engineFrame on glfw) and the display page asks for it. Only the
live resize switch stays wayland specific, since the glfw backend always
draws a fresh frame.

The simplified mode is gone: when the frame is active and the surface has
alpha, the shadow and the outer resize border are always there.

The bar and its controls are drawn even when the font is missing: the early
return used to make the whole bar invisible while its hit zones kept
working.

GLFW rewrites the window style on every mode change and dropped the thick
frame the native resize border and snapping need, so the frame is set up
again after such a change.

Windows runs a modal loop while a window border is dragged and the main
loop is blocked inside it, which froze the content during a resize. The
backend draws and presents a frame from the refresh callback now, and
skips the framerate limit there.
2026-10-10 22:02:33 +03:00
alexei-zebra
27a58b584e
Fix black frames of the simple window and rename its setting
Without the shadow and the resize border composeFrame() only forced the
alpha channel, so the buffer the driver reallocated after a size change was
presented as it is, which showed up as a black frame on every resize step.
The content is now always painted from the cache and only the shadow itself
is skipped when there are no margins.

The setting is named simple-window and means the opposite of the previous
shadow-and-border: it is off by default, so the window keeps its shadow and
the outer border for resizing.
2026-10-10 12:23:42 +03:00
alexei-zebra
ab7f542d61
Add display settings for the wayland window frame
The frame the native wayland backend draws gets three switches in the
display tab: a narrow 24px bar instead of the 48px one, the shadow with
the outer resize area, and redrawing the content while the window is
resized (off keeps the previous behaviour of stretching the last frame).

The settings are applied at runtime: the bar geometry is rebuilt and the
surface is resized together with the toplevel geometry, no restart needed.
The narrow bar drops the insets and the gap of its controls, so that they
sit flush against the window edge.

The switches are hidden outside of the wayland backend, which reports its
name through Window::getBackendName().
2026-10-10 12:23:42 +03:00
alexei-zebra
b5416d1219
Fix the issues found while reviewing the Wayland frame work
A review of the branch turned up a number of defects, gaps and leftovers;
this commit addresses all of them.

Defects:
- the shadow uniform array held seven entries while eight locations were
  written, so the last one landed outside the object;
- CursorShape::LAST stayed in the middle of the enum after the new corner
  shapes were appended, which made the GLFW cursor table read out of
  bounds; the extra shapes are now mapped onto the ones GLFW knows, and
  the table is only filled for those;
- GlStateGuard asked glIsEnabled for an attribute pname, so it always got
  GL_INVALID_ENUM and never restored the vertex attribute arrays;
- the early returns in wayland_window_initialize left the global window
  and input pointers dangling when falling back to GLFW;
- the icon textures were listed nowhere, so none of them ever loaded;
- a shader failure disabled the shadow after the surface had already been
  sized for it, and VOXEL_DECORATIONS outlived the switch cleanup.

Behavior:
- the keyboard now releases every pressed key when it loses focus, and a
  repeat rate of zero means no repeat;
- the fourth UTF-8 lead byte is decoded with the right mask, control
  characters no longer reach text fields, and a vanished clipboard offer
  clears the cached text;
- compositor side decorations disable ours again instead of leaving two
  titles, the window destructor releases the rest of the state, and the
  content inset is computed before the GUI acts so the HUD and the
  container never disagree for a frame; the HUD clamps it;
- the window controls fall back to minimize, maximize and close, and the
  icons are drawn from textures only.

Cleanups: one monotonic timer instead of three, one vertex shader shared
by both renderers with a link check, one button layout parser, the inset
rule moved into Screen, the scissor stack moved into the base Window
(about 110 duplicated lines), named shadow and evdev constants, trimmed
includes, a README note about the Wayland dependencies, and the long
lines introduced by this branch wrapped.
2026-10-10 12:23:42 +03:00
alexei-zebra
c269d6efb3
Give the Wayland window an Adwaita-like frame
The engine-drawn title bar grew to 48 px with 24x24 window controls,
12 px away from the edge and from each other, all sharing one hover
highlight. The controls use textures now (gui/cross, gui/minimize_w,
gui/maximize_w and gui/restore_w when maximized) with the vector icons
kept as a fallback, and the title is centred in the bar, clamped to the
free space between the button groups.

The bar now sits inside invisible margins that carry a drop shadow, so
the window is resizable from outside the visible frame: the surface is
content plus twice SHADOW_MARGIN and xdg_surface.set_window_geometry
tells the compositor which part is the window. The shadow follows
Adwaita's window shadow: a Gaussian blur of 7 px (sigma 3.5) expanded by
1 px, rgba(0,0,0,0.5) focused and 0.3 in the backdrop, plus a 1 px
hairline, symmetric on all four sides - a 16 px wide frame would show a
fatter tail than the reference. Margins exist only while the window is
decorated by us and not maximized or fullscreen.

The engine composes the frame itself: it renders exactly as before, then
the backend copies the frame into a texture, clears the surface, draws
the shadow and puts the content in place with alpha forced to 1, which
keeps the frame opaque without touching a single render pass. Only
frames the engine actually drew are cached, and the EGL window is
resized before its surface size is asked for, so no frame is composed
from a buffer the compositor just replaced - that was the one frame
blink after a resize.

Resize cursors match GNOME: directional shapes for edges and corners
(w/e/n/s/ne/nw/se/sw) instead of the double-headed diagonals, with the
extra CursorShape values appended so the existing GLFW indices stay.

Measured: window 1123x751 opens as saved, fullscreen round trip returns
the same size with the settings untouched, the shadow alpha profile is
0.20/0.10/0.03 at 1/4/7 px from the edge against Adwaita's 0.21/0.095/
0.055, all four sides equal, menu layout baseline unchanged (706),
no errors in the log.
2026-10-10 12:23:41 +03:00
ostermine
d8017ff995 fix reload_module ignoring pack environment
reload_module loaded the new module code with the global environment,
while require runs modules in their pack environment. After reload,
PACK_ID and other pack globals were nil in the module.
2026-10-10 00:52:23 +03:00
MihailRis
76e5e5b6f8 fix vca 'configure' directive parsing 2026-10-05 22:11:21 +03:00
MihailRis
f6a7a99a74 revert "update shadows.glsl"
This reverts commit 19a952a3be.
2026-10-03 11:10:56 +03:00
MihailRis
ef4207aed0 fixes 2026-10-02 17:44:48 +03:00
MihailRis
fc16c1ebcd Merge branch 'main' into vca-fixes 2026-10-01 21:53:30 +03:00
MihailRis
e4eae0416e fix the 2026-09-29 18:59:28 +03:00
MihailRis
dd577dd080 cleanup 2026-09-29 18:44:19 +03:00
MihailRis
d3de449b7b fix absolute bezier keyframes 2026-09-29 18:41:02 +03:00
MihailRis
ea63d29221 fix custom curves 2026-09-29 18:39:46 +03:00
MihailRis
19a952a3be update shadows.glsl 2026-09-28 01:47:23 +03:00
MihailRis
ffba11e87f update clouds shader 2026-09-28 01:40:48 +03:00
MihailRis
8726a95a9b fix 2026-09-27 23:23:21 +03:00
MihailRis
2b8d97a2ca feat: color temperature compensation 2026-09-27 23:21:45 +03:00
MihailRis
771c72324c update advanced shading 2026-09-27 23:13:45 +03:00
MihailRis
0151fdfbf7 implement actual animation blending in core:animator 2026-09-27 02:14:36 +03:00
MihailRis
c3ca6be056 add missing local 2026-09-26 23:13:54 +03:00
MihailRis
6b36992119 make VCA animation line intensity multiplier implicit 2026-09-26 23:09:40 +03:00
MihailRis
cbe2a27e34 update en_US.txt, ru_RU.txt 2026-09-26 19:21:00 +03:00
MihailRis
cdc5302dd1 add 'Fog' settings to ui 2026-09-26 19:18:29 +03:00
MihailRis
e467c85adc add 'enable-fog' setting 2026-09-26 19:13:08 +03:00
MihailRis
f5de330f3f fix abs function is not available in VCA expressions 2026-09-26 18:07:45 +03:00
MihailRis
0dfc87700d cleanup 2026-09-25 23:58:42 +03:00
MihailRis
e485aedc8e add 'period' keyframes-based line parameter 2026-09-25 23:56:32 +03:00
MihailRis
5310de45f0 fix: cos function is not available in VCA expressions 2026-09-25 23:32:59 +03:00
MihailRis
8b4cfd1099 disable codegen trace 2026-09-23 22:27:12 +03:00
MihailRis
c573d01cb7 add 'texture' vca directive 2026-09-23 22:26:54 +03:00
MihailRis
b9b17358a1 fix file.remove_ext 2026-09-20 22:01:18 +03:00
MihailRis
60f184ae43 fix file.ext 2026-09-20 21:58:36 +03:00
MihailRis
ca9ff7ba7e fix missing default rotation-order value 2026-09-19 15:27:21 +03:00
MihailRis
d40070abab Merge branch 'main' into new-animation-features 2026-09-17 00:14:03 +03:00
MihailRis
ad22763a1f add new skeleton:get_color, skeleton:set_color overloads 2026-09-16 23:40:41 +03:00
MihailRis
ae082abaa2 feat: allow passing rgba color to entity skeletons and block wraps 2026-09-16 23:28:03 +03:00
MihailRis
9f40303661 Merge branch 'main' into new-animation-features 2026-09-15 21:04:28 +03:00
MihailRis
85cc55c63b
Merge pull request #972 from MihailRis/upgrade-http-in-vc
upgrade http requests
2026-09-14 22:42:33 +03:00