Commit graph

39 commits

Author SHA1 Message Date
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
9dade8ad33
resource: lifetime management redesign (WIP) 2023-04-29 20:01:50 +02:00
Andrei Alexeyev
ad295005db
resource: more consistent API function names 2023-04-29 20:01:50 +02:00
Andrei Alexeyev
0adaf17d5f
sprite: handle virtual paddings transparently
Most client code no longer needs to care about paddings at all, aside
from some very special cases involving dynamic creation of padded
sprites. So far we only have one known example of this in portrait_render().

This should let us optimize most of our sprites with autotrimming in the
future.

Additionally, support for deprecated offset_{x,y} keys in sprite files
has been removed.
2022-11-27 20:14:05 +01:00
Andrei Alexeyev
89ecc0c55e
Establish more-or-less consistent resource getter functions
Deprecate old ad-hoc stuff like get_sprite, r_texture_get, etc.
2020-06-09 04:33:22 +03:00
Andrei Alexeyev
b8088998d8
dialog: animate x position for multiple actors on the same side 2020-05-05 11:48:44 +03:00
Andrei Alexeyev
9f10dfef21
bunch of portrait and dialog-related shuffling around 2020-04-27 22:59:16 +03:00
Andrei Alexeyev
02eb72608e
Fix various warnings 2020-03-19 05:04:11 +02:00
Andrei Alexeyev
a8bf8012f6
shut up some anal-retentive warnings 2020-03-07 18:47:02 +02:00
Andrei Alexeyev
fb19028ed5
New dialogue system powered by coroutines 2020-03-04 22:26:50 +02:00
Andrei Alexeyev
9d3bf87559
Refactor matrix stack API to get rid of matrix mode (#177)
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.
2019-10-12 15:02:15 +03:00
Andrei Alexeyev
5187bb785d
preload dialog text shader 2019-09-12 18:33:08 +03:00
Andrei Alexeyev
80fda75ffb
Dialogue updates with dynamic facial expressions and defeated character portraits (#175)
* WIP portrait faces

* character expressions for dialogue in first 3 stages (wip)

* dialog: simplified face system, new faces, script revisions (wip)

* fix wrong face name in reimu script

* cirno angry face; elly beaten variant

* render_character_portrait(): fix garbage bg and filter-bleeding

* workaround for incorrect face blending on dialog fade

* render_character_portrait(): fix bogus debug labels

* Replace sprite offsets with the more powerful paddings

* new faces for youmu, wriggle, kurumi; dialogue updates

* fix release build

* Update portraits; add Iku faces and Elly shouting face

* Add Reimu sigh face and Marisa sweat_smile face

* Add Kurumi dissatisfied face

* update Hina
2019-08-22 22:43:34 +03:00
Andrei Alexeyev
5a23fb95fc
make upkeep script preserve existing copyrights 2019-08-03 20:44:22 +03:00
Andrei Alexeyev
cf1ab225cb
basic support for portrait faces; make charselect menu more fun 2019-07-08 03:51:15 +03:00
Andrei Alexeyev
3055901998
update my email 2019-07-03 21:00:56 +03:00
Andrei Alexeyev
c2cd91463c
New character art by Afensorm + other visual tweaks (#170)
* implement player spellcard declarations on bomb

* stagedraw: move "bottom text" to a separate (higher) layer

* update boss spell declaration effect

* import afensorm's character portrait art

* improve dialog visuals

* acknowledge afensorm in credits and COPYING

* 'alphamap' functionality; effects for wriggle and youmu portraits

* update afens art

* add cirno alphamap

* dialog: draw active speaker above other other

* charselect: use r_draw_sprite
2019-07-03 20:50:43 +03:00
Andrei Alexeyev
c7ff531a63
fixup includes 2019-03-18 06:41:12 +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
322edd0dce
Text rendering rewrite and optimizations; some refactoring (#129)
* wip font rendering stuff; hashtable monstrosity is temporary

* various text rendering fixes/improvements

* HashTables™ 3.0

* Add some comments to aid navigating the hashtable macro maze

* overhaul text rendering API; add default and example shaders

* text: implement text_render for spellcard effect; misc fixes

* README: update dependencies

Bye SDL_ttf, hello freetype2.

* text_draw: fix resolution/scale-dependent bugs

* make text_draw fallback to the current shader, fix hud and stagetext

* repair the bgm loading

* fix spell practice mode

* fix walloftext

forgot one site of text_draw earlier

* fix wrapped text rendering

* fix and simplify the hud text shader

* dynamic glyph cache

* implement font size change on window resize/quality setting change/etc.

* rename text shaders for consistency

* preloads for fonts and text shaders

* make the stagetext shader look somewhat better

* text_render: attempt to normalize height

* small improvement for stagetext
2018-06-30 00:36:51 +03:00
Andrei Alexeyev
eb43370c1d
Give projectiles EVENT_BIRTH and call them with t==0 more consistently
The only case of t==0 being skipped is if the projectile was somehow
created after the projectile processing loop for this frame has been
finished. Currently that is only possible if a particle spawns a
non-particle projectile, which, ideally, should never happen. The same
problem exists with other types of entities. For example, if you have a
funny projectile rule that spawns an Enemy, that Enemy will have the 0th
frame skipped. One way to fix this is to maintain a list of all entities
in the game and process them all in a single loop, where newly spawned
entities would be appended to the tail of the list. This is also
probably the only good way to fix this, too.

Handling of all projectile events has been made mandatory to facilitate
easier debugging of subtle and/or hard to track bugs. If t<0, then the
projectile rule MUST return ACTION_ACK, signifying that it acknowledged
the event and handled it appropriately. Otherwise, it SHOULD return
ACTION_NONE or ACTION_DESTROY. In a perfect world, those just wouldn't
be conflated in the same function with update logic.

I've also cleaned up the stage_logic routine a bit. Moved most of the
dialog handling into dialog.c and gave higher priority to boss
processing. The later is currently necessary to let boss-spawned
projectiles and particles to get called with t==0.
2018-05-16 02:38:47 +03:00
Andrei Alexeyev
59cf8f6300
Rendering system rewrite, tons of refactoring, optimizations, and other cool stuff (#116) 2018-04-12 17:08:48 +03:00
Andrei Alexeyev
a9561d7baf
Sprites and texture atlases; upgrade most graphics to a higher resolution (optimized for 1600x1200) (#113) 2018-02-06 08:19:25 +02:00
Andrei Alexeyev
485c9a8ed6
Happy New Year! 2018-01-04 19:14:31 +02:00
Andrei Alexeyev
29acd5f58a meson: intel intrinsics, various improvements 2017-12-21 03:58:54 +01:00
Andrei Alexeyev
4b53d65c23
enable GL_TEXTURE_2D by default to reduce API calls 2017-11-22 02:05:42 +02:00
Andrei Alexeyev
117eafd482
wip stage5 stuff; some new sounds 2017-11-12 19:16:15 +02:00
Andrei Alexeyev
4bdfe5f408
dialogue text autowrapping, fpslimit off key, fixes 2017-10-23 13:10:40 +03:00
Andrei Alexeyev
1992a62592 desperate attempt at refactoring plrmodes 2017-10-10 08:23:36 +03:00
Andrei "Akari" Alexeyev
7c9e54a71d
update copyright and credits 2017-09-12 04:28:15 +03:00
Andrei "Akari" Alexeyev
8668021710 Replaced strncat/strncpy with strlcat/strlcpy
The strncat/strncpy functions have dangerously counter-intuitive
semantics. They are meant to be used with fixed-width,
non-null-terminated strings, which is in, 99% cases, not what you want.

The strlcat/strlcpy ones are non-standard, however SDL provides its own
implementations on platforms that do not have them.
2017-02-16 08:29:18 +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
Andrew "Akari" Alexeyew
cb7a5ec25b dialog fix 2012-08-05 22:35:49 +03:00
laochailan
9cd2187225 GL profiling, removing redundant gl calls 2012-04-05 14:24:55 +02:00
laochailan
beef1c059e Finished stage 0
Balancing issues, different difficulty settings still not implemented.
2011-08-27 15:56:02 +02:00
laochailan
bd44c8b570 Marisa and difficulty menu 2011-06-24 12:35:03 +02:00
laochailan
3861a69d62 menus - the beginning
implemented:
[x] ingame menu
[x] main menu
[x] menus
[x] fancy fades
[x] structural earthquake
[ ] the rest of the main menu (difficulty/char select)
2011-06-13 18:48:36 +02:00
laochailan
d9fdc2aa0e Dialogs! conversational~
fun fact: taisei might build with -Wall -Werror now.
2011-05-08 13:48:25 +02:00