feat(battle-engine): CRI Atom/Mana audio+movie shim (3916->3526)

Hand-model the CRI ADX2 (audio) + CRI Mana (movie) SDK surface exercised by the copied
audio/movie engine files (AudioManager/Voice/Se/Effect/MoviePlayer). No decomp source
exists; signatures mirror the real CRI API as called at the sites (arg counts/types from
the call sites). All no-op, cosmetic, off the battle path. Reconciled with the empty CRI
stubs already in SdkStubs (CriAtomExAcb/CriAtomExPlayback/CriManaMovieMaterial).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-06-05 22:08:36 -04:00
parent 4b9a603cd4
commit 9cd3f40a2f
3 changed files with 105 additions and 10 deletions

View File

@@ -0,0 +1,100 @@
// AUTHORED SHIM (not copied). CRI ADX2 (Atom) audio + CRI Mana (movie) middleware.
// A precompiled SDK with no decompiled source, referenced by the copied audio/movie
// engine files (Cute/AudioManager.cs, Voice.cs, Se.cs, Effect.cs, MoviePlayer.cs).
// Pure cosmetic surface — never on the battle-resolution path; every member is a no-op
// returning a safe default. Signatures mirror the real CRI API as exercised by the
// decomp (arg counts/types taken from the call sites) so the copied code compiles.
using System;
namespace CriWare
{
// ---- CRI Atom (audio) ----
public class CriAtomExPlayer
{
public void SetFadeOutTime(int ms) { }
public void SetFadeInTime(int ms) { }
public void SetFadeInStartOffset(int ms) { }
public void SetStartTime(long ms) { }
public void ResetFaderParameters() { }
public void Update(CriAtomExPlayback playback) { }
}
public struct CriAtomExPlayback
{
public bool GetNumPlayedSamples(out long numSamples, out int samplingRate)
{ numSamples = 0L; samplingRate = 0; return false; }
}
public class CriAtomExAcb : IDisposable
{
public void Dispose() { }
public bool GetCueInfo(int index, out CriAtomEx.CueInfo cueInfo)
{ cueInfo = default; return false; }
}
public static class CriAtomEx
{
public struct CueInfo { public long length; }
}
public class CriAtomCueSheet { }
public class CriAtomSource : UnityEngine.MonoBehaviour
{
public enum Status { Stop, Prep, Playing, PlayEnd, Removed, Removing, Error }
public Status status => Status.Stop;
public CriAtomExPlayer player { get; } = new CriAtomExPlayer();
public bool loop;
public bool playOnStart;
public float volume;
public bool use3dPositioning;
public string cueSheet;
public string cueName;
public CriAtomExPlayback Play() => default;
public CriAtomExPlayback Play(int cueId) => default;
public CriAtomExPlayback Play(string cue) => default;
public CriAtomExPlayback Play(string sheet, string cue) => default;
public void Stop() { }
public void Pause(bool sw) { }
public void Pause() { }
public void SetAisacControl(string name, float value) { }
public void SetAisacControl(uint id, float value) { }
}
public static class CriAtom
{
public static CriAtomCueSheet AddCueSheet(string name, string acbPath, string awbPath) => null;
public static CriAtomCueSheet GetCueSheet(string name) => null;
public static void RemoveCueSheet(string name) { }
public static CriAtomExAcb GetAcb(string acbName) => null;
public static void AttachDspBusSetting(string name) { }
}
// ---- CRI Mana (movie) ---- (CriManaMovieMaterial lives in External/SdkStubs.cs)
public class CriFsBinder { }
}
namespace CriWare.CriMana
{
public struct MovieInfo
{
public uint framerateN;
public uint totalFrames;
}
public class Player
{
public enum Status { Stop, Decheader, WaitPrep, Prep, Ready, Playing, PlayEnd, Error, StopProcessing }
public Status status => Status.Stop;
public MovieInfo movieInfo => default;
public long GetTime() => 0L;
public bool IsPaused() => false;
public void Pause(bool sw) { }
public void Prepare() { }
public void Start() { }
public void Stop() { }
public void SetFile(CriFsBinder binder, string moviePath) { }
public void SetSeekPosition(int frameNumber) { }
public void SetVolume(float volume) { }
}
}

View File

@@ -3,18 +3,18 @@
// resolution path. Namespaces must merely exist (anchors); the few types referenced
// by member get a minimal no-op surface. Members grow only as the compile loop demands.
// ---- CriWare audio + movie ----
// ---- CriWare audio + movie (CRI types with members live in External/CriShim.cs) ----
namespace CriWare
{
public class CriAtomExAcb { }
public class CriAtomExPlayback { }
internal class _ShimAnchor { }
}
namespace CriWare.CriMana
{
public class CriManaMovieMaterial
public class CriManaMovieMaterial : UnityEngine.MonoBehaviour
{
public enum MaxFrameDrop { Disable, One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten }
public MaxFrameDrop maxFrameDrop;
public Player player { get; } = new Player();
}
internal class _ShimAnchor { }
}

View File

@@ -18,12 +18,7 @@ namespace UnityEngine.Networking
public class UnityWebRequest : IDisposable { public void Dispose() { } }
}
// ---- CRI Atom audio middleware ----
namespace CriWare
{
public class CriAtomSource { }
public class CriAtom { }
}
// ---- CRI Atom/Mana audio+movie middleware: see External/CriShim.cs ----
// ---- Steamworks.NET ----
namespace Steamworks