Now parsed particle-effect definitions are cached in a hash map in the
plugin object. To make it possible, static part of `struct
particle_effect` and `struct particle_object` are factored out to
`struct pae` and `struct pae_object` respectively.
When there are multiple instances of a model, now they share a single
model object. Model objects are retained in a hash table until the
plugin is released, which is fine because Toushin Toshi 3 doesn't reuse
a plugin across scenes.
Pointers to `struct font_size` objects are cached in `struct text_style`
objects, so the `sizes` array can't be reallocated.
This fixes a crash in Rance 02 when entering battle.
It visualizes the bounding sphere of the instance. Although it is only
called from dead code in Toushin Toshi 3, it's useful for debugging
shadow mapping.
This fixes broken shadow rendering e.g. when Nacht climbs a ladder.
Now update_bones() calculates the instance's bounding sphere which
is the minimum sphere containing the AABB of current bone coordinates.
This corresponds to the sphere that is displayed when calling
SetInstanceDebugDrawShadowVolume on the original ReignEngine.dll.
Halfwidth katakana are now displayed in half-width.
This also fixes an issue where some symbols with codepoint <256 (e.g.
MULTIPLICATION SIGN) were considered half-width, while the bundled font
has full width glyphs for those codepoints.
normal_transform can be non-orthogonal, so after transforming with it
direction vectors must be normalized.
This fixes a bug where President Garter is rendered too specular.
This fixes billboard rendering issue in some dungeons.
* For polygon models, use its AABB's center coordinates.
* Consider the camera angle, i.e. sort by view-space Z-coordinate
instead of world-space Z-coordinate.
There are two types of transparent materials: materials that have an
alpha map and materials that have a color map with an alpha channel.
This change makes the latter to be considered transparent.
Some games have assets that are too large to mmap everything on a 32-bit
address space. For example, TT3 has a total of 2.82GB of assets, which
is too large for the 3GB address space limit of 32-bit Linux. On Android
it's even stricter and mmaps of hundreds of MB can fail.
When creating a block-sized texture from a glyph, use the bitmap_left
field of FT_GlyphSlot instead of just centering it horizontally.
This improves positioning of punctuation marks in Japanese text.
Before this, the order of drawing was determined on an instance-by-
instance basis. Instances with even a single transparent material were
drawn after fully opaque instances.
After this, first the opaque meshes in all instances are drawn, and then
the transparent meshes are drawn from the nearest to the farthest.