Commit graph

137 commits

Author SHA1 Message Date
Alex Zebra
e78b0f0367
Merge 2c8fd60870 into cb5bebf3ae 2026-11-03 20:25:14 +03:00
Andrey Tazetdinov
fd17ce32ab optimize animator 2026-10-14 16:35:21 +02:00
ostermine
40ff68aa86 remove comment 2026-10-14 00:30:08 +03:00
ostermine
293d68a0fb call on_hud_render before rendering the frame
Hud scripts update the first-person hand skeleton, blockwraps and
animations in on_hud_render, which ran after renderFrame, so these
changes were drawn one frame late. With fast camera rotation the hand
visibly lagged and jittered behind the view.
2026-10-12 13:09:16 +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
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
MihailRis
5060a8635d fix locked cursor if world was closed with menu hidden 2026-10-07 23:09:40 +03:00
MihailRis
c73b036099 cleanup World references 2026-06-20 22:17:27 +03:00
MihailRis
ac00c561ee move weather from WorldRenderer to LevelFrontend 2026-06-19 00:01:45 +03:00
clasher113
e6ac30143c particles fix 2026-05-29 11:28:08 +03:00
MihailRis
91b14f4264 fix LevelScreen::saveWorldPreview 2026-04-11 19:11:46 +03:00
MihailRis
dbc7cd56bd feat: solid entity material support & minor refactor 2026-03-05 20:52:45 +03:00
ChancellorIkseew
cb2b901985
PlayerContoroller and LevelScreen refactoring (#806) 2026-03-02 01:18:47 +03:00
MihailRis
8ee2edef5c update gui.create_frame return value 2026-02-06 17:55:57 +03:00
MihailRis
8468ab184d add gui.get_active_frame, set_active_frame & update cursor lock behavior 2026-02-06 14:16:30 +03:00
MihailRis
2475a7e8f5 cleanup 2026-02-03 14:00:58 +03:00
MihailRis
5380bcf013 refactor world renderer a bit 2026-02-02 22:40:54 +03:00
MihailRis
42c4716be2 change: skeletons are assets now, not content units 2026-01-16 01:01:15 +03:00
MihailRis
6bc549dd90 fix world previews generation 2025-11-22 19:23:46 +03:00
MihailRis
f721731ecc add 'on_block_removed' event 2025-11-18 22:11:44 +03:00
MihailRis
0a45277f96 add 'graphics.soft-lighting' setting 2025-11-10 18:28:24 +03:00
MihailRis
0e6fb878bf add app.reset_content 'non_reset_packs' optional argument 2025-11-09 23:04:50 +03:00
MihailRis
17ffa73ce7 refactor: move and rename EnginePaths 2025-11-09 20:13:59 +03:00
MihailRis
87ff77a73f add project start application script 2025-11-09 18:26:36 +03:00
MihailRis
ca1b761c8c Merge branch 'dev' into pathfinding 2025-08-19 19:47:10 +03:00
MihailRis
0a02d3fbec add on_screen_change project script event & fix UIDocument::rebuildIndices & move menu background to project script 2025-08-07 22:14:52 +03:00
MihailRis
8290c147c5 refactor: move shadows-related code to separate module 2025-07-29 00:29:55 +03:00
MihailRis
0ab23a117d Merge branch 'main' into update-gfx-pipeline 2025-07-10 19:44:53 +03:00
RomanDonw
150c9d4b8c fix includes 2025-07-10 18:16:03 +10:00
MihailRis
5751802da2 Merge branch 'main' into update-gfx-pipeline 2025-07-01 23:38:38 +03:00
MihailRis
215ae02fa9
fix content control (#538)
* update ContentControl
* feat: more debug logging
* fix engine paths
2025-07-01 23:38:00 +03:00
MihailRis
fc46b7c434 initial commit 2025-05-07 20:42:50 +03:00
MihailRis
4e5199d89a feat: lights debug mode 2025-04-29 15:59:52 +03:00
MihailRis
64039f0e43 add post-effect-slot resource & add gfx.posteffects library 2025-04-06 12:47:25 +03:00
MihailRis
881edb7b28 rename keycode, mousecode enumerations 2025-04-02 17:39:31 +03:00
MihailRis
9843a1fc27 remove Viewport class 2025-04-02 17:35:17 +03:00
MihailRis
f99d909f34 cleanup 2025-04-02 15:01:24 +03:00
MihailRis
7262119f5b refactor GLFWWindow 2025-04-02 15:01:24 +03:00
MihailRis
0b8d56afe1 cleanup 2025-04-02 14:59:53 +03:00
MihailRis
9694a59649 refactor: add Window interface 2025-04-02 14:59:53 +03:00
MihailRis
b3feb5945b reduce extra includes 2025-04-02 14:55:53 +03:00
MihailRis
b202d1455b refactor: replace references to Events with Input 2025-04-02 14:55:53 +03:00
MihailRis
4c48afbb90 refactor: add GUI instance reference to UI nodes 2025-04-02 14:55:53 +03:00
MihailRis
74a94f869c refactor: reduce Window references 2025-04-02 14:55:53 +03:00
MihailRis
3d22de761f fix compiler warnings (GCC + Clang) 2025-03-20 22:04:29 +03:00
MihailRis
70b3a4d91e refactor 2025-03-09 23:10:22 +03:00
MihailRis
db620010a3 move weather back to gfx & add world:client/environment.json file 2025-03-09 22:50:45 +03:00
MihailRis
9c4db8fa10 refactor: move Weather instance to WorldInfo 2025-02-28 18:49:44 +03:00
MihailRis
02d8d8d6bf weather change test 2025-02-26 12:19:47 +03:00
MihailRis
589518fb25 add fall.max_opacity, fall.opaque properties & update snow texture & weather mix test 2025-02-26 06:24:05 +03:00