Commit graph

2917 commits

Author SHA1 Message Date
Andrei Alexeyev
9deea31f06
Update portraits 2020-05-04 05:21:46 +03:00
Andrei Alexeyev
556ba2ee6f
Cancel hosted events before unregistering hosted entity 2020-05-02 01:19:15 +03:00
Andrei Alexeyev
b7a855c323
Make INIT_BOSS_ATTACK useful outside of BossAttack-conforming tasks 2020-04-30 21:49:10 +03:00
Andrei Alexeyev
31adaa7e0f
Add WAIT_EVENT_ONCE(event)
Waits for event if it hasn't been signaled yet. It if has, returns
without waiting, as if the event has just been signaled.
2020-04-30 21:49:10 +03:00
Andrei Alexeyev
354fa2718e
fix rng_irange macro 2020-04-30 21:49:10 +03:00
Andrei Alexeyev
032829656b
the stars need to align 2020-04-29 00:25:16 +03:00
Andrei Alexeyev
174a6f582e
remove bogus UV clamping from boss_zoom shader 2020-04-28 04:58:33 +03:00
Andrei Alexeyev
9bcaa36634
Revamp boss distortion effect 2020-04-28 03:53:27 +03:00
Andrei Alexeyev
8e6d2ff71e
implement vecX versions of tanh for legacy glsl 2020-04-28 02:25:24 +03:00
Andrei Alexeyev
21e9b0cbbe
Fix broken logic in GLSL_ATLEAST and ESSL_ATLEAST macros 2020-04-28 02:25:21 +03:00
Andrei Alexeyev
a7eb246664
Purge some dead code 2020-04-28 00:13:15 +03:00
Andrei Alexeyev
9f10dfef21
bunch of portrait and dialog-related shuffling around 2020-04-27 22:59:16 +03:00
Alice D
ea90164f3a
Merge pull request #221 from taisei-project/remove-swp
Delete .swp
2020-04-26 20:33:13 -04:00
Alice D
c734967d69
Delete .swp 2020-04-26 20:32:38 -04:00
Alice D
56e64498a6
Player Statistics (#219) 2020-04-26 22:27:13 +03:00
Andrei Alexeyev
7d7f1b157f
Migrate OpenGL loader to glad2 (#217)
* Migrate to glad2

* basic OpenGL 2.1+ fallback support
2020-04-26 04:10:00 +03:00
Andrei Alexeyev
a9775c065b
Store sprite texture coords in normalized form 2020-04-25 05:36:48 +03:00
Andrei Alexeyev
fb353f24a9
Update portraits and regen atlases 2020-04-25 03:52:26 +03:00
Andrei Alexeyev
3fc75a4bbd
Add stage_add_static_framebuffer
Register a stagedraw-managed framebuffer with static size
2020-04-25 03:04:33 +03:00
Andrei Alexeyev
f12fc3db0f
fix global postprocessing framebuffers not reacting to resizes 2020-04-24 00:11:54 +03:00
Andrei Alexeyev
a842ba7b7d
cli: add --version option 2020-04-23 17:47:42 +03:00
Andrei Alexeyev
83d4197e86
Remove Player.lastmovedir
This is only relevant for YoumuA, so track it there
2020-04-23 00:35:06 +03:00
Andrei Alexeyev
a1a40913cd
Remove ENEMY_BOMB 2020-04-23 00:28:01 +03:00
Andrei Alexeyev
693ffb54b5
MarisaB: fix accidental lack of focus inversion 2020-04-23 00:25:23 +03:00
Andrei Alexeyev
d4fb6ab5bd
player: remove "focus" property and "focus_circle"
focus_circle is replaced with a custom PlayerIndicators entity
(responsible for drawing the focus hitbox/cross and powersurge bar)
2020-04-23 00:17:40 +03:00
Andrei Alexeyev
42956c2ace
Remove Player.slaves 2020-04-22 22:37:04 +03:00
Andrei Alexeyev
d2a813d4ff
Coroutinize MarisaB (#216) 2020-04-22 22:33:38 +03:00
Andrei Alexeyev
2c00cec422
Coroutinize YoumuB (#215) 2020-04-21 20:11:09 +03:00
Andrei Alexeyev
eceecaf0c3
"fix" projectile collision effect 2020-04-17 19:31:37 +03:00
Andrei Alexeyev
e16e2184a3
Refactor entity system (#214)
* Smarter generic entity macros

The list of "core" entities is now defined in one macro, and hardcoded
_Generic dispatch tables are eliminated

* Get rid of "custom" entities

All entities are now "first-class". The list of known entity types has
been moved to known_entities.h. The system no longer needs to know the
definition of all entity structs.

* Refactor guts of ENT_BOX/ENT_UNBOX

Made the functions inline, Box::ent is now a proper pointer type (but
please don't use it directly), ENT_UNBOX returns NULL if the box is
"empty" (references NULL entity)

* Merge TASK_BIND_UNBOXED with TASK_BIND

* s/YoumuMyon/YoumuAMyon for consistency
2020-04-17 10:18:53 +03:00
Andrei Alexeyev
b3ce65d5ac
Improve high-DPI handling (#213)
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
2020-04-16 19:25:54 +03:00
Andrei Alexeyev
ae06fd09f4
Coroutinize YoumuA (#212)
* WIP coroutinize YoumuA

bomb not implemented yet

* implement YoumuA bomb

* YoumuA: define constants for shot dmg/delays

still not balanced

* gotta go fast
2020-04-14 01:54:42 +03:00
Andrei Alexeyev
cdcea06ba6
stagedraw: add postprocessing events 2020-04-13 14:27:57 +03:00
Andrei Alexeyev
d9d6f66458
Make cnormalize return 0 instead of nan 2020-04-13 14:27:56 +03:00
Andrei Alexeyev
f1dfa3cdfe
add LIKELY and UNLIKELY macros to annotate branches 2020-04-13 14:27:56 +03:00
Andrei Alexeyev
c0e0e0970e
our headers are not C++ 2020-04-10 07:19:54 +03:00
Andrei Alexeyev
0928f0be98
update for building with latest emscripten 2020-04-10 06:09:36 +03:00
Andrei Alexeyev
72c61462a3
Fix vfs_dir_list_sorted reporting bogus error when dir is empty
Regression introduced in 0cbc86c6

Fixes #210
2020-04-09 20:35:58 +03:00
Andrei Alexeyev
e9085a7a4d
add PFLAG_INDESTRUCTIBLE and PFLAG_NOAUTOREMOVE 2020-04-08 08:39:45 +03:00
Andrei Alexeyev
45a4283225
use custom ents for Reimu; cleanup Marisa; etc. 2020-04-06 04:34:55 +03:00
Andrei Alexeyev
4223b023dc
CANCEL_TASK macro 2020-04-06 04:34:55 +03:00
Andrei Alexeyev
fe3aabcdc1
Add TASK_HOST_CUSTOM_ENT and TASK_HOST_EVENTS APIs (#208)
TASK_HOST_CUSTOM_ENT(type) allocates a custom entity from a reserved
region on the task's stack (same as TASK_MALLOC) and registers it. The
entity will be automatically unregistered when the task terminates for
any reason. Only one entity can be hosted by any particular task. This
macro returns a pointer to the hosted entity.

TASK_HOST_EVENTS(events) associates a custom array of events (created
with COEVENTS_ARRAY) with the task. All events in the array are
automatically initialized when this macro is called, and cancelled when
the task terminates for any reason. Only one array of events can be
hosted by any particular task.
2020-04-06 04:34:13 +03:00
Andrei Alexeyev
7fbe987b94
Add API for task-bound dynamic memory allocation (#201)
TASK_MALLOC(size) allocates a memory region with a lifetime bound to the
active task. It can't be free'd manually.

Allocation requests are served from a dedicated region on the task's
stack whenever possible, which is fast and essentially free. If there is
not enough free space to serve the request, then the memory is allocated
on the heap. Such heap allocations are automatically free'd when the
task expires.

The allocated memory is zero-initialized and aligned as strictly as
max_align_t.
2020-04-06 04:30:52 +03:00
Andrei Alexeyev
54030d17ba
fix clang warnings 2020-04-05 07:41:34 +03:00
Andrei Alexeyev
0cbc86c66e
Add generic type-safe facility for dynamic arrays (#207)
Replace most ad-hoc opencoded dynamic arrays across the codebase
2020-04-05 05:51:00 +03:00
Andrei Alexeyev
54c93d8923
Disable -Wimplicit-fallthrough for now
Unfortunately with clang10 this generates lots of spurious warnings from
SDL headers, even though they have fallthrough comments.
2020-04-04 02:54:00 +03:00
Martin Herkt
f60e0b1df3
Update email 2020-04-02 18:40:55 +02:00
Andrei Alexeyev
431237f0f2
Coroutinize MarisaA (#206) 2020-04-01 23:08:40 +03:00
Andrei Alexeyev
7b445fbc77
ent->spawn_id must not overflow 2020-04-01 02:15:13 +03:00
Andrei Alexeyev
40a604a6a5
Add 'use_gnu_ext' option
Controls the USE_GNU_EXTENSIONS define in compat.h
2020-03-31 22:51:31 +03:00