Commit graph

3436 commits

Author SHA1 Message Date
Andrei Alexeyev
748b92fc7f
enemy: add max_viewport_dist attribute
Analogous to the max_viewport_dist in Projectiles
2022-11-05 22:13:29 +01:00
Andrei Alexeyev
f5e8cfe65e
dynstage: fix data race with async logging system 2022-11-04 16:24:17 +01:00
Andrei Alexeyev
8fe2cde9e6
build: fix compile with old gcc versions 2022-11-04 15:50:53 +01:00
Alice D
41fe828395
update experimental emscription builds (this will fail, don't worry about it) 2022-10-14 14:06:38 -04:00
Alice D
05a3d35b78
bump versions of actions (#348) 2022-10-14 12:24:06 -04:00
Andrei Alexeyev
ba1dc70619
player: freeze effective power during surge (experimental) 2022-10-03 20:53:22 +02:00
Andrei Alexeyev
3c7283f1c7
player: refactor power handling
Separate concepts of "stored" and "effective" power.
2022-10-03 20:53:22 +02:00
Andrei Alexeyev
b746738c5c
common_tasks: add common_rotate_velocity 2022-09-24 04:11:32 +02:00
Andrei Alexeyev
68173e811b
hashtable,plrmodes,stage1: fix minor warnings 2022-09-20 00:07:35 +02:00
Andrei Alexeyev
ffb005c8c6
common_tasks: respect overbright colors in common_charge 2022-09-13 17:08:56 +02:00
Andrei Alexeyev
3fd3c33371
gl33: fix inverted logic in gl33_framebuffer_attach 2022-09-05 06:23:35 +02:00
Andrei Alexeyev
dc62286cf1
stage2: nerf redwall fairies on easy 2022-09-03 08:41:15 +02:00
Andrei Alexeyev
77e0c7b19f
stage2: adjust starcaller fairies 2022-09-03 08:40:46 +02:00
Andrei Alexeyev
26662582df
log: add categories and filtering functionality
A "category" (or "module") is now displayed with each log message
together with the source function. The name of the category is derived
from the source file name (see modname() in log.c).

Taisei now also loads a "logfilter" file from the storage directory that
controls which messages are propagated to the console. You can filter by
log level, category, and function. Simple glob pattern matching is
supported. Each line contains a new rule; empty lines and lines starting
with # are ignored. Rules are processed from top to bottom.

Example logfilter file:

        # [mask]         [category]       [function]
        # Hide debug messages by default:
        -d               *                *
        # Show debug messages from all of the rendering-related modules:
        +d               renderer/*       *
        # Also show debug messages from my specific function:
        +d               *                my_function
        # Hide info about resource loading/unloading:
        -i               resource         unload_resource
        -i               resource         load_resource_finish
        # Suppress everything from a specific module:
        -a               spam             *

Note that only the console output is filtered; the log file still
contains all messages. In addition to that, the log file now also
contains the filename and line number of the original log call with
every message.
2022-09-01 06:02:29 +02:00
Andrei Alexeyev
21c3aebce5
build,log: make __FILE__ produce concise and consistent filenames
The output of __FILE__ previously depended on where the build directory
is and was needlessly verbose. With this change, all filenames are
relative to the src/ directory.

Logging of source file names is now also enabled for release builds
(although this is not used yet).
2022-09-01 05:50:55 +02:00
Andrei Alexeyev
dca1aefbd8
util/stringops: add strmatch() and strnmatch()
Primitive "glob"-style pattern matching functions.
2022-08-27 03:14:00 +03:00
Andrei Alexeyev
e1b1fecaf2
util/stringops: add memmem() polyfill 2022-08-27 02:40:55 +03:00
Andrei Alexeyev
b0beea92dd
scripts/smoke-test-standalone-linux-exe.py: fix for musl systems 2022-08-17 16:31:44 +03:00
Andrei Alexeyev
9669e1d30a
scripts: add smoke-test-standalone-linux-exe.py
To be used in CI later
2022-08-16 21:23:47 +03:00
Andrei Alexeyev
cdf2280c0d
build: set default_library=static for all subprojects 2022-08-16 08:39:47 +03:00
Andrei Alexeyev
c2f5ca59bb
filewatch_inotify: complain if inotify queue overflows 2022-07-12 01:58:41 +03:00
Andrei Alexeyev
c24abd2b92
filewatch_inotify: handle misaligned inotify_event entries
This shouldn't be needed, as according to the Linux inotify(7) man page,
the entries are supposed to be aligned. It looks like libinotify-kqueue
doesn't respect this and doesn't properly zero-pad the name field.
2022-07-12 01:58:41 +03:00
Andrei Alexeyev
287c77cc8b
filewatch_inotify: fix compilation with libinotify-kqueue 2022-07-12 01:58:41 +03:00
Andrei Alexeyev
d2c01b8ce5
dynstage: don't destroy library filewatch on deletion 2022-07-12 01:58:41 +03:00
Andrei Alexeyev
c668267888
log: sync outputs before shutdown or crash
Previously this half-worked: fflush() was called on log_fatal, but not
in case of assertion failure, leaving the on-disk log truncated.
2022-07-12 01:57:35 +03:00
Andrei Alexeyev
1191b239bc
util/io: add SDL_RWsync function
This function is meant to flush any internal buffers and (hopefully)
ensure the data has reached its ultimate destination (e.g. a file on
disk) before returning. This is currently implemented as a crude hack
and only supports stdio-based RWops. It calls fflush() on the internal
FILE* pointer, and on POSIX-systems it also calls fsync() on the file
descriptor.
2022-07-12 01:57:35 +03:00
Andrei Alexeyev
b9fb06843d
filewatch: rewrite inotify backend
It's now based on directory monitoring, which is more complicated, but
also much more reliable, especially when dealing with move events and
hard links. It is also closer to the semantics we actually want
(monitoring fs paths for changes, not inodes). It will still get
confused if the directory itself gets moved (directly or indirectly),
though, but handling that correctly is absurdly difficult and not
important for our use-case.

Importantly, FileWatch no longer becomes useless after reporting a
FILEWATCH_FILE_DELETED event: if another file is placed onto the same
path later, the FileWatch will report FILEWATCH_FILE_UPDATED. Some
client logic can be simplified because of that.
2022-07-07 05:52:53 +03:00
Andrei Alexeyev
69ea82d1ff
util/stringops: add memrchr() polyfill 2022-07-07 05:52:53 +03:00
Andrei Alexeyev
057f3f5571
util/stringops: prefer strtok_r from libc 2022-07-07 05:52:53 +03:00
Andrei Alexeyev
00dca36a59
util/sha256_openssl: fix libressl compat 2022-05-25 04:49:39 +03:00
Andrei Alexeyev
1358f35856
resource/shader_program: fix segfault when file fails to open 2022-05-25 04:46:58 +03:00
Alice D
b8a2188bef
fix openssl deprecation error (#344)
PR review changes

add libssl to test suite

fix segfault
2022-05-19 15:20:55 -04:00
Alice D
9fde7f50c3
fix unused variable error 2022-05-09 17:38:45 -04:00
Alice D
83dc767598
Dockerfiles (#278)
* add Dockerfiles, Makefile, and .dockerignore

* move makefile to other branch, add new pip lib

* Dockerfile work

* stashing changes, but Windows ANGLE build is almost working

* actually compiles ANGLE

* fix one typo

* more refactoring

* more 'fixes'

* deck chairs on the titanic

* it absolutely must be Visual Studio and not Build Tools because Google

* moar space

* this ACTUALLY builds ANGLE in a container, yay

* stashing makefile changes

* move dockerfile directories, port over changes from fork

* cleanup

* change filename

* pre-emptive PR changes, move to misc/ci/

* use proper build args

* Dockerfile for building Switch tools for GHA

* less deps for switch dockerfile

* windows dockerfile improvement

* clean up Dockerfiles, move Docker-specific Makefile to /misc/ci

* make this actually work

* add gnupg

* bump switch/debian version in dockerfile

* package name change for Switch dockerfile

* update and remove cursed ANGLE build (we have GHA for that now)

* remove last of ANGLE build nightmare

* new Windows build image file
2022-05-01 13:49:17 -04:00
Alice D
74e02a4981
fix meson commands 2022-04-01 17:25:31 -04:00
Alice D
282dd4c4fb
always upload logs in CI 2022-02-22 14:39:31 -05:00
Andrei Alexeyev
f10a8c17be
build,ci: emscripten updates 2022-02-22 11:37:11 +02:00
Andrei Alexeyev
90cc06b98e
main: disable SDL_HINT_EMSCRIPTEN_ASYNCIFY on emscripten
We don't rely on this functionality
2022-02-18 13:23:14 +02:00
Andrei Alexeyev
2151d3e729
replay: avoid silly gcc7 warning 2022-02-18 07:44:25 +02:00
Alice D
d6aa197c3b
scripts: support building universal macOS .dmg (#338) 2022-02-18 02:01:29 +02:00
Andrei Alexeyev
3833637b5b
stage: don't hot-reload while playing a replay 2022-02-16 11:45:49 +02:00
Andrei Alexeyev
d8824c6a3d
stage: add stage_load_quicksave() public API
Equivalent to pressing the quickload hotkey. Can be used in stage logic
code to create temporary "loops" during development.
2022-02-16 11:26:45 +02:00
Andrei Alexeyev
85b2f3205f
menu/options: use draw_menu_list()
This fixes controls menu overflowing the screen in dev builds.
2022-02-16 05:10:21 +02:00
Andrei Alexeyev
6f25a4b7d4
menu/common: add context argument for draw_menu_list() 2022-02-16 05:09:30 +02:00
Andrei Alexeyev
7495b1073e
filewatch_inotify: ignore IN_ATTRIB events 2022-02-16 04:26:55 +02:00
Alice D
dfecb7c32e
bump MacOS test runner to 11 2022-02-12 18:57:27 -05:00
Andrei Alexeyev
d1b64ae010
stage3: preload stage3_wriggle_bg shader 2022-02-13 01:25:24 +02:00
Andrei Alexeyev
44ef44e24f
stage3: remake wriggle's spellbg as a shader (and fix it)
Old version broke when we started using a floating point framebuffer for
the background.
2022-02-13 01:21:36 +02:00
Andrei Alexeyev
52a75e1610
renderer: destroy static models idx buffer on shutdown 2022-02-09 05:51:41 +02:00
Andrei Alexeyev
7d9603f0da
gl33: index buffer fixes
* Allow updates before VAO association happens
* Fix array out of bounds on destroy
2022-02-09 05:51:41 +02:00