Commit graph

4064 commits

Author SHA1 Message Date
Andrei Alexeyev
c1082d0f8d
resources: replace stage5 demo due to desync 2024-06-16 20:34:45 +02:00
Andrei Alexeyev
3dc8624265
memory/mempool: fix warning 2024-06-15 09:31:14 +02:00
Andrei Alexeyev
0fe465522f
menu: improve grouping in spell practice and stage select 2024-06-14 22:35:24 +02:00
Andrei Alexeyev
bad453ce61
resources: replace stg3 reimuA hard demo due to desync 2024-06-14 21:15:21 +02:00
Andrei Alexeyev
a8322f5e1d
util/rectpack: refactor to use standard mempools 2024-06-05 23:53:30 +02:00
Andrei Alexeyev
f9c2748fae
memory/mempool: pass arena pointer to acquire() instead of storing in struct 2024-06-05 22:07:17 +02:00
Andrei Alexeyev
b81f338d2d
stageobjects: add type-based macros for acquiring from/releasing into the correct pool 2024-06-05 21:58:58 +02:00
Andrei Alexeyev
13ace0e5c0
memory/mempool: refactor to avoid storing object size and alignment in struct
Works similarly to DYNAMMIC_ARRAY(type)
2024-06-05 21:16:02 +02:00
Andrei Alexeyev
05168ac2d7
memory/mempool: rename from objectpool 2024-06-05 18:35:08 +02:00
Andrei Alexeyev
fc54f3f8ce
global,mainmenu: enable Quit if quitting is allowed in kiosk mode 2024-06-04 16:31:46 +02:00
Andrei Alexeyev
139ac03d5c
config: change default bomb and surge gamepad buttons
LT and RT respectively
2024-06-04 16:17:26 +02:00
Andrei Alexeyev
7548e4892d
gamepad: direction snapping; more flexible configuration options
- The free/restricted axis distinction is gone; the joystick always
  operates in "free" mode.
- Added direction snapping functionality to help aid exact movement in
  cardinal and/or diagonal directions. The snapping angle can be
  adjusted from 0% (disabled) to 100% (similar to the old "restricted"
  mode). The snapping angle can also be biased towards cardinals or
  diagonals.
- When the maximum zone is less than or equals dead zone, moving
  the character will always move at maximum speed (as in the old
  "restricted" mode).
- Most of these settings are now visualized in the options menu and can
  be tested there.
2024-05-27 19:23:59 +02:00
Andrei Alexeyev
d288f2bd27
shaders: don't use textureGrad() in powersurge_effect
Apparently it has bad performance at least on some intel iGPUs (my
laptop), and it does nothing visually here.
2024-05-22 16:25:20 +02:00
Andrei Alexeyev
149a261389
lasers: handle lasers that only have a single point 2024-05-22 16:25:19 +02:00
Andrei Alexeyev
8189f8daa6
lasers: improve degenerate sample rejection during quantization
Fixes some issues with curves that have degenerate samples at the start,
and is more efficient for curves with lots of degenerate samples in
general.
2024-05-19 06:54:30 +02:00
Andrei Alexeyev
8b37d1cbf2
src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
Andrei Alexeyev
be7905d6a3
src: run upkeep 2024-05-17 04:58:47 +02:00
Andrei Alexeyev
12fde81651
scripts/upkeep: remove taisei.h include from non-header files
It's redundant because every local header pulls it in anyway, and it
also interacts badly with clangd's automatic include insertion
2024-05-17 04:55:13 +02:00
Andrei Alexeyev
b6439b1319
scripts/upkeep: auto-update year on default copyrights 2024-05-17 04:55:13 +02:00
Andrei Alexeyev
0fc68b5778
util/consideredharmful: work around some false positives in clang 18 2024-05-16 22:24:43 +02:00
Andrei Alexeyev
76886a3f44
src/memory: remove irrelevant #include 2024-05-16 22:24:18 +02:00
Andrei Alexeyev
84a909bc8c
lasers: remove legacy compat glue 2024-05-15 21:55:42 +02:00
Andrei Alexeyev
e7c77216d2
misc/ci: enable building tests 2024-05-14 04:37:11 +02:00
Andrei Alexeyev
1ca164eea4
test/renderer: add a basic triangle "hello world" example 2024-05-14 04:37:11 +02:00
Andrei Alexeyev
0ea5f73c3c
build: add basic infra for building tests 2024-05-14 04:37:11 +02:00
Andrei Alexeyev
1914703edf
build: put most sources except main.c into a static lib
Allows building other executables (tests, tools like tsrtool, etc.) that
make use of taisei code in the future.
2024-05-14 04:37:11 +02:00
Andrei Alexeyev
b00f74c6f2
vfs/public: make APIs fail safely if VFS is not initialized 2024-05-13 03:31:48 +02:00
Andrei Alexeyev
dfa615bb77
thread: safely return NULL from thread_create() if threads not initialized 2024-05-13 03:30:19 +02:00
Andrei Alexeyev
83dfe8d5fa
renderer/api: init matrix and state stacks early 2024-05-13 03:29:43 +02:00
Andrei Alexeyev
7ed253f5c6
coroutine/cotask: allow cotask_active() when coroutine system is uninitialized 2024-05-13 03:28:41 +02:00
Andrei Alexeyev
4072d31ffa
lasers/rules: make create_dynamic_laser return MoveParams* in an out-parameter
No need to mess with LaserRuleDynamicData and LaserRuleDynamicTaskData
2024-05-10 01:31:39 +02:00
Andrei Alexeyev
07a0bdf558
lasers: compute segment visibility correctly
The previous naive check had some false negatives
2024-05-09 05:11:17 +02:00
Andrei Alexeyev
e518c7a87d
lasers: support lasers with abrupt angle changes
This requires some look-ahead, so quantize_lasers will now compute all
samples ahead of time before starting to build segments. The samples are
held in a global dynamic array to minimize reallocations.
2024-05-09 05:11:17 +02:00
Andrei Alexeyev
92183e7655
lasers: try to change the quantization sampling step as little as possible 2024-05-08 23:10:23 +02:00
Andrei Alexeyev
c8b017f974
geometry: add paranoid check to lineseg_ellipse_intersect 2024-05-08 16:14:28 +02:00
Andrei Alexeyev
fcc068f0e5
stage: check for radius<=0 in stage_clear_hazards_at 2024-05-08 16:14:24 +02:00
Andrei Alexeyev
071d1163fd
cutscene: allow interrupting already seen cutscenes 2024-05-04 20:07:12 +02:00
Andrei Alexeyev
85f74eb4bf
global: add TAISEI_KIOSK_PREVENT_QUIT env var
Defaults to 1. Set to 0 to be able to close the window in kiosk mode.
This is intended for testing and not recommended for deployment.
2024-05-04 20:07:12 +02:00
Andrei Alexeyev
858398f556
watchdog: return to main menu and reset config after inactivity in kiosk mode 2024-05-04 20:07:12 +02:00
Andrei Alexeyev
0b2280b7ed
build: remove some leftover debug spam 2024-05-04 09:27:46 +02:00
Andrei Alexeyev
b9d5c741ba
menu/gameovermenu: add "Load Quicksave" entry when available
Also move the logic of action choice handling out of the menu and into
the stage.
2024-05-03 04:20:45 +02:00
Andrei Alexeyev
208be2bccd
stage: try to quickload when autorestart is enabled for spell stages 2024-05-03 04:20:45 +02:00
Andrei Alexeyev
fa5c0696e3
menu/options: add an option to reload the last saved config 2024-05-03 04:20:45 +02:00
Andrei Alexeyev
b95a541479
config: read defaults from optional "config.default" file in resources
Not included by default, intended for custom distributions (for DoKomi
in particular)

Also improve the upgrade mechanism by ignoring settings that were not
changed in the config being parsed.
2024-05-03 04:20:45 +02:00
Andrei Alexeyev
a84e574f4b
bitarray: add a basic packed bitarray type of arbitrary size 2024-05-03 02:35:39 +02:00
Andrei Alexeyev
4986c89680
cli,video: add --width and --height arguments to set initial window size 2024-05-02 00:24:06 +02:00
Andrei Alexeyev
8d5ffe4b91
renderer: remove old r_screenshot() API 2024-05-01 01:07:18 +02:00
Andrei Alexeyev
f11a09649d
gl33: implement sync fallback for framebuffer async read 2024-05-01 01:01:09 +02:00
Andrei Alexeyev
783172861a
renderer: simplify async readback API; use glMapBufferRange
glGetBufferSubData is not available on GLES
2024-05-01 00:19:07 +02:00
Andrei Alexeyev
d03b2eb38c
video: add "framedump" mode; use async readback for screenshots;
The framedump mode captures every frame and saves it as a .png image.
This can be useful for rendering videos.

To activate, set the `TAISEI_FRAMEDUMP` environment variable to a
prefix. A 8-digit frame number followed by ".png" will be appended to
this string to form the filename of each frame.

Example:
	$ mkdir /var/tmp/taisei
	$ export TAISEI_FRAMEDUMP="/var/tmp/taisei/frame-"
	$ taisei -f1 -r /foo/some-replay.tsr
	$ ls /var/tmp/taisei
	frame-00000000.png  frame-00000001.png frame-00000002.png
	...

`TAISEI_FRAMEDUMP_SOURCE` can be set to either "screen" or "viewport".
The default is "screen", which records the whole game screen as it
appears (minus the letterboxing borders). "viewport" makes it record the
stage viewport only. The image is taken directly from the viewport
framebuffer, so elements that are drawn over the viewport will be
missing, such as the dialogue or the pause menu.

`TAISEI_FRAMEDUMP_COMPRESSION` can be set to change the quality of zlib
compression of the png images, ranging from 0 to 9. The default is 1.

Additionally, it's now possible to take screenshots of the game viewport
by pressing Alt+P (by default). This works on the same principle as
`TAISEI_FRAMEDUMP_SOURCE=viewport`, so the same caveats apply. This can
be used to take a clean screenshot of the viewport while the game is
paused.
2024-04-29 01:15:15 +02:00