Commit Graph
31 Commits
Author SHA1 Message Date
kichikuou ade7ea9235 Fix signature mismatch in HLL_EXPORT functions
Notable changes:

* The numerator / denominator parameters of AddMotion[HV]GaugeRate are
  int in GoatGUIEngine but float in GUIEngine and PartsEngine.
* AnteaterADVEngine.ADVLogList_AddText has second parameter
  (int WindowNo) since Oyako Rankan.

This also avoids using non-void functions where a void function is
expected. It is fine in most ABIs, but raises a runtime error in wasm32.
2024-08-07 09:14:38 +09:00
Nunuhara Cabbage d06d0ff8b5 GoatGUIEngine: fix rotate
Angles are given in radians in GoatGUIEngine.
2024-07-31 20:55:00 -07:00
Nunuhara Cabbage bc04af131a parts: implement miscellaneous functions 2024-07-31 07:35:10 -07:00
kichikuou 3496f45e39 parts: add basic implementation of Flash type
Sprite objects and sounds are not implemented yet.
2023-06-17 11:32:14 +09:00
Nunuhara Cabbage f7cf2264fa Fix multiple issues with resetting HLLs
Clear PartsEngine/SACT2/CharSpriteManager/audio state when resetting the
VM.

Fixes #113
2023-04-14 16:00:40 -07:00
Nunuhara Cabbage 983944a776 Implement PartsEngine Save/Load
The format should not be considered stable at this point, as PartsEngine
support is still experimental and subject to change. But it's useful to
have these functions for testing purposes.
2023-04-14 10:30:36 -07:00
Nunuhara Cabbage 2237bb814c Implement various HLL functions for Rance Quest
Most of the functionality of gfx_render_texture (draw method, blend
rate) is moved into sprite_render, since this was the only place using
it.
The draw method and blend rate are now stored in sact_sprite objects
instead of textures.
sact_sprite now has two renderers: the old SACT2 renderer (with blend
rate as the only shader parameter) and the new ChipmunkSpriteEngine
renderer, which supports multiply/add colors and the "surface area"
feature from PartsEngine.

Rance Quest now runs up to the first Flash-related function call
(Flash?!?!).
2023-02-12 15:59:36 -08:00
Nunuhara Cabbage 6b62e1db23 Fix CG loading functions for Rance Quest
Rance Quest uses strings for CG names, but the strings contain numbers
which should be converted to integers for lookup.
2023-02-11 16:36:05 -08:00
Nunuhara Cabbage d2539b978e GoatGUIEngine.GetPartsCGName 2023-01-08 11:32:02 -08:00
Nunuhara Cabbage 25695c3e86 parts: implement GUIEngine numerals
Implement Parts_SetNumeralLinedCGNumberWidthWidthList and
Parts_SetNumeralLength.

Also fix bugs where changing numeral properties would not update the
texture until the number was reset.
2022-06-18 10:53:43 -07:00
Nunuhara Cabbage eaa0baad7f Handle library incompatibilities
Add a mechanism for libraries to resolve incompatibilities between
library versions before linking.

This is currently used for ChipmunkSpriteEngine and GoatGUIEngine,
where early versions used integer IDs when loading CGs (later versions
use strings).
2022-06-06 08:49:12 -07:00
Nunuhara Cabbage 5b2f9d7536 Refactor GoatGUIEngine and add misc. stubs
Refactor GoatGUIEngine into various files under src/parts/.
The external interface to this code is the functions prefixed with PE_
and generally following the naming of the HLL functions which they
implement.

The reason for this is that there are multiple HLL libraries that
implement more or less the same GUI interface (GoatGUIEngine, GUIEngine
and PartsEngine).

Also added here are a number of miscellaneous stubbed-out HLL functions
that are used by Rance 01 (which now runs up to the point where it tries
to create the title menu).
2022-01-30 10:12:20 -08: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
Nunuhara Cabbage bb8497e343 GoatGUIEngine: fix motion on child parts
Properly handle motions on non-root parts.
2021-07-15 20:25:12 -07:00
Nunuhara Cabbage db0922606a GoatGUIEngine: don't render hidden parts 2021-07-12 10:23:01 -07:00
Nunuhara Cabbage 8ce4ed64cf GoatGUIEngine.SetOnCursorShowLinkPartsNumber 2021-07-12 10:20:27 -07:00
Nunuhara Cabbage 28fbe3d95b GoatGUIEngine: add stub for vibration motion
Also fix a dangling pointer bug where child parts were not re-parented
to the scene after their parent was released.
2021-06-12 21:57:21 -07:00
Nunuhara Cabbage 5464e6c35a GoatGUIEngine: implement sound motion type 2021-06-12 10:33:15 -07:00
Nunuhara Cabbage 6d8eaf90d4 GoatGUIEngine: implement hgauge/vgauge motion type 2021-06-12 10:03:49 -07:00
Nunuhara Cabbage b759070020 GoatGUIEngine: implement numeral motion type 2021-06-12 09:38:21 -07:00
Nunuhara Cabbage 7e3e67c009 Implement GoatGUIEngine.SetNumeralCG 2021-06-12 09:28:23 -07:00
Nunuhara Cabbage aba692be6b GoatGUIEngine: implement CG motion type 2021-06-11 23:40:39 -07:00
Nunuhara Cabbage a3dc6fcd4d GoatGUIEngine: implement gauge parts 2021-06-11 20:46:09 -07:00
Nunuhara Cabbage a0fb7b7bc5 GoatGUIEngine: implement numeral parts 2021-06-11 19:41:24 -07:00
Nunuhara Cabbage d9de9b962b GoatGUIEngine: fix text location issues 2021-06-10 19:30:08 -07:00
Nunuhara Cabbage 0cc3f4de21 Implement GoatGUIEngine.SetParentsPartsNumber
The parts list is now a tree, and only a single sprite is registered in
the global scene. GoatGUIEngine now manages rendering order of its own
sprites internally.
2021-06-06 19:01:49 -07:00
Nunuhara Cabbage 9983ff2bc9 Implement GoatGUIEngine text rendering 2021-05-24 12:36:55 -07:00
Nunuhara Cabbage 9c26a80acf Various GoatGUIEngine improvements
* button states (default, hovered, clicked)
* on-cursor and on-click sound playback
* "LoopCG" animations
2021-05-21 23:56:26 -07: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 b1c55d6f03 Implement basic GoatGUIEngine input handling 2021-05-21 15:22:16 -07:00
Nunuhara Cabbage eba29786bc Partial implementation of GoatGUIEngine
Enough to get to the main menu in Shaman's Sanctuary.
2021-05-20 18:19:52 -07:00