It should return the maximum Z value among all sprites, not among
visible sprites.
This fixes a bug in Rance VI where some UI elements are incorrectly
Z-ordered.
Before this, floating markers were rendered as OpenGL's point sprites.
But point sprites has an implementation-dependent maximum size, and
Intel driver's maximum (256 pixels) is too small for us.
After this, markers are drawn with the same shaders as normal objects,
using the billboarding technique.
Before this, all objects that share a texture were drawn at once.
Objects were not depth-sorted, so if a transparent object was drawn
first, objects behind it were not drawn.
After this, dungeon is drawn for each cell, sorted by distance from
the camera position. To reduce the number of cells to be drawn, PVS
(Potentially Visible Set) stored in dgn files is used.
This fixes Rance VI which passes SACT2.SP_SaveCG and
SACT2.SP_SetCGFromFile absolute paths like
`system.GetSaveFolderName() + "\\" + "ScreenA.qnt"`.
Also, now savedir_path() uses unix_path() rather than sjis2utf().
Implement a system for allocating anonymous channels so that libraries
can play sounds without having to manage channels.
A library that uses audio_play_sound must ensure that audio_update is
called periodically to garbage collect finished channels.
Create a separate interface for managing the scene. The sact_sprite
interface is implemented on top of this, as is GoatGUIEngine (which is
now independent of sact_sprite).
This will allow more specialized graphics interfaces to be implemented
without adding to the complexity of the sact_sprite interace. (For
example, GoatGUIEngine needs to store multiple textures per sprite for
button states; this is not supported by sact_sprite.)
Implement a new interface for managing archives. This is mainly to
support loading afa archives alongside ald archives.
Also included here is some code for creating an index for afa CG
archives (the numbers used to reference CGs in afa archives correspond
to the file name, not the position in the archive).
Used in Shaman's Sanctuary. Mostly identical to StoatSpriteEngine, but
with a few additions and some removed functions (notably, the
MultiSprite functions were removed).
Implement:
SH_SASSIGN_STRUCTSREF
SH_SASSIGN_GLOBALSREF
SH_STRUCTSREF_NE_STR0
SH_GLOBALSREF_NE_STR0
SH_LOC_LT_IMM_OR_LOC_GE_IMM
Also, fix an bug in A_EMPTY and SH_IF_STRUCT_A_NOT_EMPTY.