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.
Create pixel-only textures as RGB (no alpha). This fixes some issues
with DrawGraph functions writing to an alpha channel that shouldn't
exist (e.g. causes black screen in Haru Urare).
This doesn't fix the analogous issue for CGs which shouldn't have an
alpha channel.
This is a serialization interface for a particular struct type. I've
implemented it somewhat generically, only checking that the name of the
struct matches the expected type. The actual structure of the objects
passed in is not checked, and in fact this structure differs between
games.
The serialized data produced by ADVSceneKeeper.Save should be identical
to what's produced by AnteaterADVEngine.dll from Shaman's Sanctuary.
In addition to DrawDungeon.c, this adds the following files in
{src,include}/dungeon/:
- dgn.{h,c}: Parser for .dgn (map data)
- dtx.{h,c}: Parser for .dtx (textures)
- tes.{h,c}: Parser for .tes (sound IDs associated with textures)
- dungeon.{h,c}: Renderer main routines
- mesh.{h,c}: Renderer for walls and stairs
- skybox.{h,c}: Renderer for background cubemap
- event_markers.{h,c}: Renderer for event markers
And the following changes are made to the existing graphics code:
- sact_Update() calls dungeon_update(), so that event markers animate
- gfx_render_texture() renders vertically flipped image when
texture.flip_y == true (see the comment in dungeon_context_create())
Some features are not implemented yet, including 2D maps and door
animation.
This makes cglm a dependency.
Ensure that sact_get_sprite always returns a sprite object if sprite
number is not negative. SACT2 functions in general should work before
pixel data is attached to a sprite.
This also fixes the default for the 'show' property (true) and changes
the logic for adding/removing sprites from the scene to be less
error-prone (checked whenever a sprite is dirtied).
These functions were originally part of StoatSpriteEngine but were moved
to a separate library in Shaman's Sanctuary. This implementation should
be fully compatible with AnteaterADVEngine.dll, even if the game were to
inspect the serialized data produced by ADVLogList_Save.
Also added here is a minimal implementation of CrayfishLogViewer.hll.
This is a debug API but it's useful for creating test cases that can
run on both System40.exe and xsystem when system.Output is not
available.