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.
On wayland the scaling factor doesn't seem to be initialized correctly,
as we get a different framebuffer size from what was requested
initially, followed by a resize event with the correct size.
TAISEI_VIDEO_RECREATE_ON_RESIZE=1 to recreate window when changing size
(e.g. in the options menu). Enabled by default on X11 and Emscripten.
Doesn't apply when toggling fullscreen mode.
TAISEI_VIDEO_RECREATE_ON_FULLSCREEN=1 to recreate window when toggling
fullscreen mode on/off. Enabled by default on X11.
Introduces wrappers around memory allocation functions in `memory.h`
that should be used instead of the standard C ones.
These never return NULL and, with the exception of `mem_realloc()`,
zero-initialize the allocated memory like `calloc()` does.
All allocations made with the memory.h API must be deallocated with
`mem_free()`. Although standard `free()` will work on some platforms,
it's not portable (currently it won't work on Windows). Likewise,
`mem_free()` must not be used to free foreign allocations.
The standard C allocation functions are now diagnosed as deprecated.
They are, however, available with the `libc_` prefix in case interfacing
with foreign APIs is required. So far they are only used to implement
`memory.h`.
Perhaps the most important change is the introduction of the `ALLOC()`,
`ALLOC_ARRAY()`, and `ALLOC_FLEX()` macros. They take a type as a
parameter, and allocate enough memory with the correct alignment for
that type. That includes overaligned types as well. In most
circumstances you should prefer to use these macros. See the `memory.h`
header for some usage examples.
* Split conversion-related code into a separate file.
* Renamed loaders to fileformat handlers.
* Added API for exporting into one of the supported file formats.
* Replaced serialization APIs with an "internal" fileformat capable of
of storing any Pixmap. It is identical to the serialization format.
* Removed PNG writing code from video_screenshot_task, now using the new
pixmap export API instead.
* Split replay.c into multiple files under replay/; improve logical
separation of replay-related code.
* Separate replay playback state from data.
* Get rid of global static replay struct and avoid unnecessary replay
copying.
* Replay playback and recording are now independent and may occur
simultaneously, although this functionality is not yet exposed. This
enables replay "re-recording" while synthesizing new desync check
events, possibly at a different rate from the original replay.
* Rate of recorded desync check events can now be controlled with the
TAISEI_REPLAY_DESYNC_CHECK_FREQUENCY environment variable. The default
value is 300 as before.
* Probably other stuff I forgot about.
SDL_WINDOW_ALLOW_HIGHDPI is now used. On platforms where SDL supports
this flag, the window size units are interpreted as abstract scaled
points rather than raw pixels, and may not match the underlying
framebuffer resolution if the display scaling factor is not 1. The
scaling factor and the effective framebuffer resolution are now
displayed in the options menu to reflect this fact.
In addition, the hidden "fullscreen_desktop_mode" setting has been
removed and the behavior is now always as if the value was "1" (the
default). Exclusive fullscreen with modesetting is not very useful,
and does not work well on some platforms (X11 in particular). That code
is not worth maintaining together with the frankly ridiculous complexity
of dancing around with the DPI scaling shenanigans of various operating
systems.
On platforms that do not support SDL_WINDOW_ALLOW_HIGHDPI, the window
size is assumed to correspond to raw pixels, and an effort is made to
disable the operating system's DPI upscaling mechanism, when possible.
This commit also fixes the Windows manifest, broken by
dc57f78d89 thanks to microshaft's amazing
documentation.
Closes #211
This replaces the r_mat_foo functions with specialized r_mat_{mv,tex,proj}_foo counterparts that operate explicitly on the modelview, texture, and projection matrix stacks respectively.
* Initial port
* Switch specific video modes
* Handle clean exit
* Hide option to disable gamepads, force it enabled
* Match buttons layout with Switch controllers
* Hide player name setting (to avoid getting stuck)
* Switch specific VFS setup instead of env bootstrap
* Clean up, get rid of warnings and a few ifdefs
* Add Switch specific build script and assets
* Make vfs setup mount packages
* Re-enable packaging on Switch
* Transpile shaders to es and install them
* Add applet warning and shader deps to README
* Remove script; instead using meson build scripts
* Strict prototypes
* Build script compat with project minimum meson ver
Refactor of pack.py exclude option
* Uniformise header inclusion on arch_switch.c
* Allow input for any dev; hide the option on Switch
* Silence unsused function warnings