OpenKH / OpenKh

Kingdom Hearts libraries, tools, game engine and documentation
https://openkh.dev
Apache License 2.0
302 stars 83 forks source link

General improvements, better Linux support, a few more formats, Godot integration #1096

Open Frozenreflex opened 3 months ago

Frozenreflex commented 3 months ago

Draft, as I am still working on stuff

I'm on Linux, using OpenKH as a library in Godot, and these are the modifications and improvements I've made.

Better Linux support

While System.Drawing is usable on Linux in .NET 6 using libgdiplus, it's deprecated, and in 7 and onwards it's completely non-functional (thanks microsoft) and throws when you try to use it. As a patchwork fix, I replaced it with IronDrawing, but in the future I'd like to replace it with something else.

I also removed the extraneous Windows stuff attached to the KH1 library.

CVBL

Implementation based on the CVBL Converter python scripts in the openkh discord server

Better SCD implementation

Functional SCD implementation based on KHPCSoundTools, StreamFiles contains the raw encrypted stream, while MediaFiles contains the real media file. Tested using KH2 Sora's battle voice lines, with values from MediaFiles being piped into Godot's AudioStreamOggVorbis.LoadFromBuffer method