1:1 source port of the engine and game code; Windows build and system layer; docs. No game files or SDK headers.

This commit is contained in:
CRTkafa 2026-10-22 16:30:40 +08:00
parent c3b032a45a
commit 0ecb47e9cb
3871 changed files with 91080 additions and 1640063 deletions

36
port/external/openal/CAException.h vendored Normal file
View file

@ -0,0 +1,36 @@
// Port of pflib/external/openal/CAException.h (Apple Core Audio utility class, Playground SDK 4.0): the exception
// type that carries an OSStatus error code. Header-only in both builds: the constructor and the empty, non-virtual
// destructor are inline, so the class has no vtable; it is just mError (size 4).
//
// Game code: the game keeps one out-of-line copy of the (inline) destructor, game @0x001926c4 (D1, empty); the
// constructor is inlined at every throw site (a throw site allocates the exception, stores the error and throws
// with this destructor as the cleanup). sdk @0x18c4 (constructor) / @0x18d4 (destructor) in
// parity-out/sdk/dbgobj/CAMutex.o and sdk @0x1e38 / @0x1e48 in CAGuard.o.
//
// CATry / CACatch / CASwallowException are kept as declared (the ported code does not use them so far).
#ifndef CAEXCEPTION_H_INCLUDED
#define CAEXCEPTION_H_INCLUDED
#include <CoreAudio/CoreAudioTypes.h>
class CAException
{
public:
CAException(OSStatus inError) : mError(inError) {}
CAException(const CAException& inException) : mError(inException.mError) {}
CAException& operator=(const CAException& inException) { mError = inException.mError; return *this; }
~CAException() {}
OSStatus GetError() const { return mError; }
protected:
OSStatus mError;
};
#define CATry try{
#define CACatch }catch(const CAException& inException) {} catch(...) {}
#define CASwallowException(inExpression) try { inExpression; } catch(...) {}
#endif