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.
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.
* 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
* 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
* 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
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.
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.