/* Format.h */ #ifndef __FORMAT__ #define __FORMAT__ #include "SubApp.h" #include "RunScript.h" // in Format.c enum { numBuffers = 8, maxBufferLines = 50 }; struct Buffer { GrafPtr port; // pointer to grafport GrafPort bufPort; // offscreen bitmap grafport Ptr bits; // offscreen bitmap data SInt16 state; // current drawing state (-1 = done, 0 = start, >0 = drawing) Boolean inUse; // true if buffer in use SubLinePtr line; // line being drawn SInt16 breaks[maxBufferLines]; SInt16 ascent[maxBufferLines]; SInt16 height[maxBufferLines]; SInt16 widths[maxBufferLines]; SInt32 nLines; }; typedef struct Buffer Buffer; extern Buffer buffer[numBuffers+1]; extern RGBColor palet[10][16]; extern Rect lastBox; // bounding box of last subtitle for VA/VU extern SInt16 jacoWidth; // width of JACOsub coordinate space extern SInt16 jacoHeight; // height of JACOsub coordinate space extern SInt16 jacoTop; // top of JACOsub coordinate space //void DrawSubLine( SubLinePtr line, Boolean drawIt ); // obsolete void FormatInit( void ); void FormatFinal( void ); void ResetFormatCompile( void ); // resets script format stuff at start of compile void ResetFormatRun( void ); // resets script format stuff at start of run void StartBuffer( UInt16 buf, SubLinePtr line ); // start work on a buffer void DoBuffer( UInt16 buf ); // do some work on a buffer void DrawBufferLine( SubLinePtr line ); // draw buffer, finishing up work if needed void DoneBuffer( UInt16 buf ); // release a buffer UInt16 GetBuffer( void ); // get next unused buffer if any void DefineFont( UInt16 i, Str255 s, UInt16 size); #endif /* __FORMAT__ */