Commit Graph
17 Commits
Author SHA1 Message Date
Nunuhara Cabbage 912a73d42a Implement HLLs for English version of Rance VI 2022-04-10 18:24:47 -07:00
Nunuhara Cabbage 96356094d9 Get loop info and volume from .bgi file
Music should now correctly loop in games that use .ogg audio.
2021-10-01 21:14:25 -07:00
kichikuou b5f226ff79 Fix SACT2.SP_GetMaxZ
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.
2021-06-12 10:38:16 +09:00
Nunuhara Cabbage a4e642783b Implement ChipmunkSpriteEngine.SP_GetFontWidth
Used in Shaman's Sanctuary.
2021-05-24 11:09:49 -07:00
kichikuou ea513ca727 Implement SACT2.SaveCG
Used in Rance VI.
2021-05-22 17:07:14 +09:00
Nunuhara Cabbage dd985a3769 Refactor sprite/scene management code
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.)
2021-05-21 18:56:33 -07:00
Nunuhara Cabbage 92b81f21ee Add stubs for ChipmunkSpriteEngine
Used in Shaman's Sanctuary. Mostly identical to StoatSpriteEngine, but
with a few additions and some removed functions (notably, the
MultiSprite functions were removed).
2021-05-15 18:55:24 -07:00
Nunuhara Cabbage 20e25a8860 SACT2: Don't allocate sprite in getter functions
SACT2.SP_Get* functions shouldn't allocate a sprite if the given sprite
number isn't allocated.
2021-05-10 20:27:33 -07:00
Nunuhara Cabbage 9202454ed1 Add stubs for StoatSpriteEngine.SYSTEM_* functions
Also implement StoatSpriteEngine.SP_DeleteAll
2021-05-03 17:41:53 -07:00
Nunuhara Cabbage b986789b64 Initial implementation of StoatSpriteEngine
Implement the SP_SetText* and MultiSprite_* functions added by
StoatSpriteEngine (as well as the TRANS_* functions introduced in
SACTDX). Enough to get to the opening movie in Vanish!
2021-05-02 16:07:06 -07:00
Nunuhara Cabbage 863666ed6d Move StoatSpriteEngine impl to separate file
Also clean up some redundant functions in hll/SACT2.c
2021-05-01 22:04:49 -07:00
Nunuhara Cabbage 4f75f2d7ed Refactor sact_graphics.c
Split the code from sact_graphics.c into sprite.c and hll/SACT2.c.
sprite.c contains an index-independent sprite/scene interface, whereas
hll/SACT2.c handles the indexing of sprites.

This is to better support the StoatSpriteEngine.MultiSprite_* functions,
which use a different indexing system.
2021-05-01 13:55:08 -07:00
Nunuhara Cabbage 2bda2b0ea8 SACT2: only render when scene changes
Track dirty status of scene. This cuts the CPU usage roughly in half at
idle. Could be improved further with damage tracking.
2020-09-06 11:06:43 -07:00
Nunuhara Cabbage b04b0c3018 Implement system.Reset 2020-08-25 17:47:45 -07:00
Nunuhara Cabbage 9e0ae18a05 Add stubs for SengokuRanceFont.dll
And enough implementation to run up to the intro without crashing.
2020-04-05 19:36:42 -07:00
Nunuhara Cabbage 6a4d11f3de Use libffi for library calls
Use libffi to portably call arbitrary functions at runtime, rather than
forcing library functions to use a standard prototype.
2020-01-07 22:48:29 -08:00
Nunuhara Cabbage 5d6f148e1b Reorganize project file structure
- Create separate directories for source and header files.
- Build code shared between xsystem4 and aindump as a static library.
- Create header dirs gfx/ system4/ and vm/
- Make CG.c/h usable without a running VM
2019-12-31 17:50:40 -08:00