Commit Graph
998 Commits
Author SHA1 Message Date
Nunuhara Cabbage efdcd5d898 Merge pull request #33 from kichikuou/bezier
Implement Math.BezierCurve
2021-06-12 23:34:02 -07:00
kichikuou 09adefe478 Implement Math.BezierCurve
Used in GALZOO Island.
2021-06-13 14:19:38 +09: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 14018b62eb Merge pull request #32 from kichikuou/DrawSimpleText
Implement DrawSimpleText HLL
2021-06-12 21:38:16 -07:00
kichikuou 66d6fc38da Implement DrawSimpleText HLL
Used in GALZOO Island.
2021-06-13 13:14:57 +09:00
Nunuhara Cabbage c1667c5e9f Merge pull request #31 from kichikuou/SpriteCopyAMap
Implement DrawGraph.SpriteCopyAMap
2021-06-12 21:10:02 -07:00
kichikuou 4d139a0ddd Implement DrawGraph.SpriteCopyAMap
Used in GALZOO Island.
2021-06-13 11:43:27 +09: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 741717a325 Merge pull request #30 from kichikuou/SP_GetMaxZ
Fix SACT2.SP_GetMaxZ
2021-06-11 19:40:28 -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 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 d99437e414 Merge pull request #29 from kichikuou/dungeon
More DrawDungeon improvements
2021-06-06 16:16:56 -07:00
kichikuou 1522c85e46 DrawDungeon: Tweak fog parameters 2021-06-06 14:22:33 +09:00
kichikuou 7a9cc95eef DrawDungeon: Don't warn for functions that can be safely ignored 2021-06-06 14:22:33 +09:00
kichikuou b7a1127f19 DrawDungeon: Implement SetDrawMapRadar
Some map symbols are not visible unless the radar flag is set.
2021-06-06 14:22:33 +09:00
kichikuou d41d28b35d DrawDungeon: Fix minor issues
- Fix crash when dungeon_map_set_walked is called with x=0 or z=0
- Stairs' existence should be checked using stairs_texture, not
  stairs_orientation
2021-06-06 14:22:33 +09:00
kichikuou 7f326527a0 DrawDungeon: Draw map in the center of target texture
This fixes an issue where the map is drawn outside of the target
texture's boundaries.
2021-06-06 14:22:33 +09:00
kichikuou 2ad6eba94f DrawDungeon: Implement SetDoor[NWSE]Angle
Now door animation works.
2021-06-06 14:22:33 +09:00
Nunuhara Cabbage 74c1b38fa4 Merge branch 'master' of https://github.com/nunuhara/xsystem4 2021-05-30 18:49:49 -07:00
Nunuhara Cabbage 3b72131767 Merge pull request #28 from kichikuou/dungeon
DrawDungeon improvements
2021-05-30 18:49:03 -07:00
kichikuou c54f2493d1 DrawDungeon: Use billboarding for floating event markers
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.
2021-05-30 21:31:08 +09:00
kichikuou 98798a6ab9 DrawDungeon: A major rewrite of dungeon renderer
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.
2021-05-30 21:28:22 +09:00
Nunuhara Cabbage 9983ff2bc9 Implement GoatGUIEngine text rendering 2021-05-24 12:36:55 -07:00
Nunuhara Cabbage 815c1f20f0 Default font types > 1 to 0 2021-05-24 11:15:50 -07:00
Nunuhara Cabbage a4e642783b Implement ChipmunkSpriteEngine.SP_GetFontWidth
Used in Shaman's Sanctuary.
2021-05-24 11:09:49 -07:00
Nunuhara Cabbage e78a208bbd Add asset_cg_exists function 2021-05-24 11:00:56 -07:00
Nunuhara Cabbage 8eb91a235c Merge pull request #27 from kichikuou/DrawDungeon
DrawDungeon improvements
2021-05-23 10:45:21 -07:00
kichikuou d92c5ab39d DrawDungeon: Use cglm's mat4 type in render function parameters
Pure refactoring, no behavior changes.
2021-05-23 14:52:42 +09:00
kichikuou ca116fc3bc DrawDungeon: Add marker for event type 140 (red star) 2021-05-23 14:11:18 +09:00
kichikuou 93f624aa43 Implement DrawDungeon.CalcConquer 2021-05-23 14:11:18 +09:00
kichikuou fa5ed2db35 Implement DrawDungeon.{Load,Save}WalkData
Also fixes compiler warnings in map.c.
2021-05-23 14:11:18 +09:00
kichikuou d48c9fb5af Fix crash in dungeon_set_* when removing objects 2021-05-23 14:10:58 +09:00
Nunuhara Cabbage 29b6193542 Merge pull request #26 from kichikuou/rance6-save
Implement / fix things enough to perform save in Rance VI
2021-05-22 08:47:20 -07:00
kichikuou 021f74285c Implement SR_REF2 instruction
Used in CConfig@Save of Rance VI.
2021-05-22 17:07:14 +09:00
kichikuou ce004ee3cc Make {gamedir,savedir}_path accept absolute paths
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().
2021-05-22 17:07:14 +09:00
kichikuou ea513ca727 Implement SACT2.SaveCG
Used in Rance VI.
2021-05-22 17:07:14 +09: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 7eb6216b80 Add audio_play_sound function
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.
2021-05-21 23:30:16 -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 439a393836 Merge pull request #25 from kichikuou/leak
Fix texture leak in sprite_set_cg(_from_file)
2021-05-21 12:46:28 -07:00
kichikuou 2c262f7060 Fix texture leak in sprite_set_cg(_from_file) 2021-05-21 22:34:03 +09: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