Fix bug where SACT2.Music_IsPlay would return true after a stream
stopped playing. This was causing infinite loops in Sengoku Rance when
waiting for a fade-out to complete.
Implement "VolumeValancer" mixer channels from the .ini file. Mixers are
now recursive, with the master and voice channels being parent nodes
(this seems to be hardcoded in system 4, or at least I haven't found
where the hierarchy is specified).
Also implement .wai file support (needed for mixer channel info on sound
files).
Replace SDL_mixer with an audio implementation using libsndfile,
sts_mixer (a single-file header library) and SDL's basic audio
interface.
This allows for much more flexibility in controlling audio playback.
Fading is now properly implemented, as well as various other functions
from the SACT2/KiwiSoundEngine interface.
sts_mixer can support recursive mixing, so it will be possible to
implement the "VolumeValancer" mixer channels specified in
System40.ini in the future (once I figure out how the mapping of audio
files to mixer channels is supposed to work).
MangaGamer's version of Sengoku Rance calls SP_GetBrightness and then
SP_SetBrightness with the returned value, generating a lot of spurious
warnings. This just silences these warnings when setting to the default
value (255).
Used in Shaman's Sanctuary.
This implementation doesn't give the same result as SACT2.dll. SACT2.dll
zigzag's the image along both axes, whereas this implementation only
does the zigzag along one axis.
* Cells loaded from walk-data are half-transparent.
* The player symbol is half-transparent when showing different floors.
* Clear the texture before drawing a small map so that no garbage is
left when the drawing is clipped.
This one is used quite frequently in Sengoku Rance.
The implementation here is slightly wrong, in that the anchor point for
the pixel zoom is at the lop left of the screen instead of the center.
In OpenGL ES 3, glTexImage2D cannot handle GL_BGRA format. SDL_ttf
returns pixels in BGRA format (because it's the format used in
FreeType2), so it needs to be converted to RGBA before passing to
gfx_init_texture_with_pixels.
This adds `USE_GLES` compile-time flag. If it's defined, gfx_init()
requests an OpenGL ES >=3.0 context.
This also makes the following changes to make it work with OpenGL ES:
- The USE_GLES flag also switches shader's #version directive, which is
now provided separately from the .glsl file.
- Implicit conversion between int and float is not supported in GLSL ES.
- Use GL_RGB in gfx_copy_main_surface. Because main_surface is in GL_RGB
format, using GL_RGBA generates GL_INVALID_OPERATION in OpenGL ES.
Major differences from DrawDungeon.hll are:
- DGN, DTX, TES are loaded from individual files, not from a DLF archive
- 2D map functions are not used
- (unimplemented) Spinning motion of event markers
- (unimplemented) Additional 3D object types (polygon models and roofs)
It was introduced to flip texture image rendered by DrawDungeon when
presenting on the screen. In GALZOO this approach does not work because
dungeon texture is also used as the source image of gfx functions.
After this, DrawDungeon directly generates vertically flipped image, by
tweaking the projection matrix.