Commit graph

62 commits

Author SHA1 Message Date
Andrei Alexeyev
57f6d3dfd8
enemy,enemy_classes: redesign draw callbacks
Allows to pass arbitrary data to draw callbacks.

Groundwork for alternative fairy spawn animations.
2023-05-18 21:02:29 +02:00
Andrei Alexeyev
9dade8ad33
resource: lifetime management redesign (WIP) 2023-04-29 20:01:50 +02:00
Andrei Alexeyev
ee2ed10400
enemy: remove logic rule and args 2023-02-24 05:37:58 +01:00
Andrei Alexeyev
280bf94897
enemy: remove ENEMY_IMMUNE 2023-02-24 05:37:58 +01:00
Andrei Alexeyev
38e6f15b97
enemy,enemy_classes: remove deprecated visual rules 2023-02-24 05:37:58 +01:00
Andrei Alexeyev
4e07f66cba
enemy: remove enemy_flare 2023-02-24 05:37:58 +01:00
Andrei Alexeyev
9cbdb3290c
projectile: rename RULE_ARGC to PROJ_DRAWRULE_NUMARGS 2023-02-24 05:37:58 +01:00
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
8d2ee76710
replace include guards with #pragma once 2021-08-31 23:34:46 +03:00
Andrei Alexeyev
7da2c7e5ad
enemy: extended events
This is based on similar work done for projectiles in f25c8894
Enables interception of damage events and ability to determine the cause
of death.

This also subtly changes the scheduling of 'killed' events; they are
fired as soon as the death is registered now instead of just before
deletion.
2021-05-03 22:09:23 +03:00
Andrei Alexeyev
40425c346b
Enemy system extensions (#256)
* Add red fairies; tweaks to blue fairies and circles

* Add more fairies and a simple enemy archetype system

Note that existing stages not utilizing the new enemy spawning system
will have a visual regression - fairies will not have their magic
circles and particle effects visible. These are no longer implemented by
the enemy visual rules and require additional setup from the new spawner
wrappers. All stages should be converted to the new system.

Also improved old fairy sprites

* enemy_classes: rebalance HP

* enemy_classes: add EnemySpawner typedef

* items: add ITEMS() shortcut macro for use with enemy spawners
2020-10-08 05:00:52 +03:00
Andrei Alexeyev
f329a9f016
Extended enemy properties
ENEMY_IMMUNE is now deprecated. Spawning an enemy with ENEMY_IMMUNE hp
sets up the new flags field to match old behavior. The hp value itself
has (almost) no special meaning anymore.
2020-07-09 15:25:57 +03:00
Andrei Alexeyev
a1a40913cd
Remove ENEMY_BOMB 2020-04-23 00:28:01 +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
01e7ea8a33
Coroutinize ReimuA (#199) 2020-03-13 22:54:07 +02:00
Andrei Alexeyev
c3d7827b7c
add generic move support for enemies 2020-03-04 21:52:53 +02:00
Andrei Alexeyev
9fe54e0335
experimental event system for coroutine-based stages 2020-03-04 21:50:50 +02:00
Andrei Alexeyev
80b1026d08
Don't redefine standard complex macro; use a new cmplx typedef
This also introduces `float32`, `float64`, and `real` typedefs to be
used in place of `float` and `double` later. `real` is for game code and
other places where we don't particularly care about the precision and
format of the underlying type, and is currently defined to `double`.
`float32` and `float64` should replace `float` and `double` respectively
2019-11-22 05:38:48 +02:00
Andrei Alexeyev
5a23fb95fc
make upkeep script preserve existing copyrights 2019-08-03 20:44:22 +03:00
Andrei Alexeyev
3055901998
update my email 2019-07-03 21:00:56 +03:00
Andrei Alexeyev
715dec0373
show enemy/boss hitboxes in hitbox display mode 2019-03-01 18:10:49 +02:00
Andrei Alexeyev
4159ea1249
'upkeep' target for maintenance tasks; back to include guards; happy new year! 2019-01-23 22:10:43 +02:00
Andrei Alexeyev
e9ef77abee
basic entity damage generalization 2018-07-30 10:04:39 +03:00
laochailan
e1805c07e6
trigger sounds on low hp only 2018-06-12 21:51:32 +02:00
Andrei Alexeyev
a1eb27abc2
shitty workarounds to make enemy spawns look nicer 2018-06-02 00:55:37 +03:00
Andrei Alexeyev
eb6ee85872
workaround for enemies dropping items when disappearing offscreen 2018-06-01 23:56:22 +03:00
Andrei Alexeyev
83a8961df6
use "anchored" lists for most game objects
these have a pointer to the last element, thus appending is fast
2018-06-01 21:40:18 +03:00
Andrei Alexeyev
f67396423e
Projectile prototypes system (#118)
* wip projectile prototypes

* Partial fix for replay desyncs

* some YoumuA fixes

* fix various ToE problems

* fix MarisaB

* fix master spark

* fix iku slave particle position

* this timeout was somehow halved during the changes

* remove some v1.2 compat hacks
2018-05-02 07:46:48 +03:00
Andrei Alexeyev
8ef5ffd32c
Flexible draw order; entity "base class" for all game objects 2018-04-15 09:43:11 +03:00
Andrei Alexeyev
513d613387
Consistent indentation: indent with tabs, align with spaces (#104)
I would've preferred to just go with 4-spaces for indent and no tabs,
but lao is a bit conservative about it. :^)

Still, this is a ton better than mixing different styles all over the
place, especially within the same file.
2018-01-12 20:26:07 +02:00
Andrei Alexeyev
485c9a8ed6
Happy New Year! 2018-01-04 19:14:31 +02:00
Andrei Alexeyev
de31a20497
objectpool: dynamic extents and other improvements 2017-12-24 05:00:19 +02:00
Andrei Alexeyev
29acd5f58a meson: intel intrinsics, various improvements 2017-12-21 03:58:54 +01:00
Andrei Alexeyev
abbc62b49c
object pools 2017-12-13 21:08:23 +02:00
Andrei Alexeyev
76ee80b6da
(attempt to) prevent draw code from altering state 2017-11-16 22:25:03 +02:00
Andrei Alexeyev
9948ec95cc
remove unbombable enemies 2017-10-16 00:07:09 +03:00
makise-homura
2b35177cb4 Removed excess and added missing newlines at end of files 2017-10-10 21:10:35 +03:00
laochailan
03a2426012
update to use #pragma once 2017-09-27 14:14:53 +02:00
Andrei "Akari" Alexeyev
7c9e54a71d
update copyright and credits 2017-09-12 04:28:15 +03:00
Andrei "Akari" Alexeyev
c82928a8da WIP transition from resource scanning to manual preloading 2017-03-11 21:36:25 +02:00
Andrei "Akari" Alexeyev
dacbf96427 moved util functions from global to where they make a bit more sense 2017-03-06 03:24:47 +02:00
Andrei "Akari" Alexeyev
9a7a874783 Use the standard bool type instead of that stupid enum
Also removed all of the annoying trailing tabs/whitespaces
2017-02-11 05:56:47 +02:00
Andrei "Akari" Alexeyev
8566c65f4b Fixed clang warnings 2017-02-07 20:34:55 +02:00
laochailan
62621ae345 removed some ancient comments 2012-08-03 17:06:25 +02:00
Andrew "Akari" Alexeyew
c7886ac0ae Merge remote-tracking branch 'upstream/master' into stage3
Conflicts:
	src/enemy.c
	src/global.c
2012-07-29 09:19:58 +03:00
laochailan
c5eba2156d enemy.unbombable, bombs hurt bosses 2012-07-28 19:45:51 +02:00
Andrew "Akari" Alexeyew
55ebc35247 Merge remote-tracking branch 'upstream/master' into stage3
Conflicts:
	src/enemy.c
2012-07-19 20:59:08 +03:00
laochailan
f021a1a9cd stupid me. 2012-07-19 19:53:33 +02:00
laochailan
131fbd7b26 EVENT_DEATH for boss and killall function 2012-07-19 19:48:17 +02:00
Andrew "Akari" Alexeyew
f590fb4bd8 part of pre-midboss stage (wip) 2012-07-18 13:33:37 +03:00