⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 extosdlib.h

📁 GM5621原代码
💻 H
📖 第 1 页 / 共 3 页
字号:
    VT_FuncMax = (1 << 6),
    VT_Calculate = (1 << 7)
};

typedef void  far	(*AdjustFuncType)	(void);
typedef BYTE  far	(*ByteMinMaxFunc)	(void);
typedef SBYTE far	(*SByteMinMaxFunc)	(void);
typedef WORD  far	(*WordMinMaxFunc)	(void);
typedef SWORD far	(*SWordMinMaxFunc)	(void);
typedef BYTE  far	(*StepFuncType)		(void);

typedef void  far   (*UserAdjFuncType)   (BYTE*);

typedef struct ST_OSD_UADJ_ACTION_CTRLStruct
{
	WORD	AdjusterID;
	UserAdjFuncType UserAdjAction;
}ST_OSD_UADJ_ACTION_CTRL;



//
// Adjuster engine functions
//
void far gm_InitAe( AdjEngineInitType * Sp_AdjEngineInit);
void far gm_IncAdjuster (void);
void far gm_DecAdjuster (void);
void far gm_SetAdjuster (void);
void far gm_SetAdjusterValue (WORD W_Offset, WORD W_Value);
void far gm_UserAdjAction(void);
SDWORD far gm_GetAdjusterMax (WORD W_Offset);
SDWORD far gm_GetAdjusterMin (WORD W_Offset);
SDWORD far gm_GetAdjusterValue (WORD W_Offset);



//****************************************************************
//  Drawing Functions
//****************************************************************
// Common
void far gm_OsdSetDirection(void);
void far gm_EraseControl(void);
void far gm_LoadControlChars(void);
void far gm_FindLangOffsets (WORD *glyph_offset, WORD *hrdw_offset, BYTE ROM *glyph_indices, BYTE ROM *hrdw_indices);
void far gm_LoadColorsInvisibleState (void);


// Dialog & Tile
void far gm_LoadColorsDialog  (void);
void far gm_DrawDialog  (void);
void far gm_EraseDialog  (void);
void far gm_ShowOsd (void);
void far gm_HideOsd (void);
void far gm_AllocateTile(void);
void far gm_DeAllocateTile(void);
void far gm_ShowTile(void);
void far gm_HideTile(void);
void far gm_PositionDialog(void); // repositions all active tiles within the dialog
void far gm_PositionAdjDialog(BOOL HorAdj, WORD PosAdj);
BYTE ROM* far gm_GetTileActionOperand (void);


// Bitmap
void far gm_LoadBitmap(void);
void far gm_DrawBitmap(void);
void far gm_SelectBitmapButton(void);
void far gm_UnselectBitmapButton(void);
void far gm_LoadBitmapBase (ST_OSD_BITMAPBUTTON_CTRL ROM* bmp);
void far gm_DrawBitmapBase (ST_OSD_BITMAPBUTTON_CTRL ROM* bmp, BYTE CSIndex );
void far DisableThreeColorBitmapButton (void);


// Text
void far gm_DrawStaticText (void);
void far gm_SelectTextButton (void);
void far gm_UnselectTextButton (void);
void far gm_DrawTextBase (ST_OSD_STATICTEXT_CTRL ROM* text, BYTE CSIndex );
void far gm_DrawDynamicStringBase( GeneralControl ROM *Ctrl, BYTE *glyph_string, BYTE h_align, BYTE v_align, 
                                  BYTE hw_index, BYTE ColIndex);
void far DisableThreeColorTextButton(void);
void far DrawDynamicText(void);
void far DrawDynamicTextBase (ST_OSD_DYNAMICTEXT_CTRL ROM*, BYTE);
BYTE Chars2Glyphs(char far*, BYTE *, BYTE ROM *);

// TextEditor
void far ActionTextEditor(void);
void far DrawTextEditor(void);

/*
// ChangeChannel
void far PressedKeyChangeChannel(void);
void far DrawChangeChannel(void);
void far InitChangeChannel(void);
*/
void far GetCharHeightAndSpace(BYTE B_GlphTbl, WORD *pW_Height, WORD *pW_CharSpace);

// Long Value
void far gm_DrawLongValue (void);
void far gm_SelectLongValueButton(void);
void far gm_DrawNonPropLongValue(void);
void far gm_SelectNonPropLongValueButton(void);
void far gm_DrawLongValueBase (ST_OSD_LONGVALUE_CTRL ROM* long_value, BYTE CSIndex);
void far gm_DrawNonPropLongValueBase(ST_OSD_NONPROPLONGVALUE_CTRL ROM* long_value, BYTE CSIndex);

// Hexidecimal long value
void far DrawLongValueHexBase(ST_OSD_LONGVALUEHEX_CTRL ROM* Sp_long_value, BYTE CSIndex);
void far DrawHex(void);
void far SelectHex(void);

// Timing Info
void far gm_DrawTimingInfo (void);
void far gm_DrawResolutionTimingInfo (void);
void far gm_DrawVFreqTimingInfo(void);
void far gm_DrawHFreqTimingInfo(void);
void far gm_DrawTimingInfoBase(ST_OSD_TIMINGINFO_CTRL ROM* timing_info, BYTE part_control, BYTE precision);


// Slider
void far gm_DrawSlider(void);
void far gm_SelectSliderButton(void);
void far gm_DrawVerticalSlider(void);
void far gm_SelectVerticalSliderButton(void);
void far gm_DrawSliderBase  (ST_OSD_SLIDER_CTRL ROM* slider, BYTE CSIndex, BYTE B_dir);


// Frame & Rectangle
void far gm_DrawRectangle(void);
void far gm_SelectRectangleButton(void);
void far gm_DrawFrame(void);
void far gm_DrawShadow (void);

void far gm_DrawRectangleBase(ST_OSD_RECTANGLEBUTTON_CTRL ROM* rectangle, BYTE CSIndex);
void far gm_DrawFrameBase(ST_OSD_FRAME_CTRL ROM* frame, BYTE CSIndex);

// Tab Control
void far gm_DrawTabControl(void);
void far gm_SelectTabControl(void);
void far gm_UnselectTabControl(void);



//****************************************************************
//  Color Management
//****************************************************************
BYTE ROM * far gm_CM_LoadColors     (BYTE ROM *ColorMap, BYTE CSIndex);
BYTE ROM * far gm_CM_GetAttrsPtr    (BYTE ROM *ColorMap, BYTE CSIndex);
BYTE ROM * far gm_CM_GetCSPtr       (BYTE ROM *ColorMap, BYTE CSIndex);
void far gm_CF_LoadColors           (BYTE ROM *CSPtr);



//*****************************************************************
//  Primitives
//*****************************************************************
// Init functions need to be combined in to OsdC_Init
void far gm_OsdC_Init               (BYTE fontX, BYTE fontY, BYTE osdDir);
void far gm_InitControls			(ControlsInitType* Sp_ControlsInit);

void far gm_OsdC_SetDirection       (BYTE dir);
BYTE far gm_OsdC_GetDirection       (void);
void far gm_OsdC_SelectRectangle    (BYTE rectId);
void far gm_OsdC_RectSetup          (BYTE rectWidth, BYTE rectHeight, WORD AddrFont1BPP, WORD AddrFontX1BPP, WORD AddrFont2BPP, WORD AddrFont4BPP, WORD AddrAttr, WORD AddrCCF);
void far gm_OsdC_PositionRectangle  (WORD xPxlPos, WORD yPxlPos, WORD xSize, WORD ySize);
void far gm_OsdC_SetStretch         (BYTE Stretch);
void far gm_OsdC_Show               (void);
void far gm_OsdC_Hide               (void);
void far gm_OsdC_BlendLevel         (BYTE blendIndex, BYTE blendVal);
void far gm_OsdC_LoadColor          (BYTE index_Table, BYTE size, BYTE ROM* pntTbl);
void far gm_OsdC_LoadAttributes     (BYTE index_Table, BYTE size, WORD ROM* pntTbl);
void far gm_OsdC_SetWinBkgnd        (BYTE idWindow, BYTE color, WORD xPixel, WORD yPixel, WORD width, WORD height);
void far gm_OsdC_Highlight          (BYTE flag, BYTE color, WORD xPos, WORD yPos, WORD width, WORD height);
void far gm_OsdC_ClrWinBkgnd        (BYTE idWindow);
void far gm_OsdC_SetBlinkOnOffPeriods  (BYTE blinkOnPeriod, BYTE blinkOffPeriod );
void far gm_OsdC_CCFFill            (WORD addr, WORD length, WORD value);

BYTE ROM* far gm_OsdC_FindGlyphHdr  (BYTE glphTbl, BYTE glyph );
void far gm_OsdC_PutChar            (BYTE xPos, BYTE yPos, BYTE index);
void far gm_OsdC_SetAttr            (BYTE xPos, BYTE yPos, BYTE attribute);
BYTE far gm_OsdC_GetAttr            (BYTE xPos, BYTE yPos);

void far gm_OsdC_FillRect           (BYTE xPos, BYTE yPos, BYTE width, BYTE height, BYTE charIndex, BYTE colorAttr);
void far gm_OsdC_FillRect_Char      (BYTE xPos, BYTE yPos, BYTE width, BYTE height, BYTE character);
void far gm_OsdC_FillRect_Attrib    (BYTE xPos, BYTE yPos, BYTE width, BYTE height, BYTE attribute);
void far gm_OsdC_SetIcon_Attrib     (BYTE xPos, BYTE yPos, BYTE width , BYTE height, BYTE ROM *pntTbl);
void far gm_OsdC_DrawIcon           (BYTE xPos, BYTE yPos, BYTE width, BYTE height, BYTE ROM* pntTbl, BYTE ROM *pColorAttrib, WORD mask);

void far gm_OsdC_LoadIcon             (BYTE B_Bpp, BYTE B_IndexChar, WORD W_Size, BYTE ROM* Bp_SrcIcon);
void far gm_OsdC_LoadIconCompressed   (BYTE tblId, BYTE indexTable, BYTE ROM *pSrc );
void far gm_OsdC_LoadBitMapCompressed (BYTE ROM *Bp_Src, BYTE ROM* Bp_HwIndexes, BYTE ROM* Bp_ColorAttributes);
void far gm_OsdC_LoadGlyph            (BYTE tblId, BYTE glyph, BYTE tbl_Bpp, BYTE hwCharIndex );
void far gm_OsdC_Render               ( BYTE ROM* glyph_string, BYTE ROM* hrdw_string, BYTE hrdw_lo,
                                       BYTE hrdw_to, BYTE hrdw_len, BYTE hrdw_cmpr);

BYTE far gm_OsdC_BytesPerFont       (BYTE bpp );
WORD far gm_OsdC_FontTblBA          (BYTE bpp );
WORD far gm_OsdC_LinearAddr         (BYTE xPos, BYTE yPos );
WORD far gm_OsdC_FontAddress        (BYTE B_Bpp, BYTE B_HwIndex);
BYTE far gm_OsdC_BytesPerFontNormal (BYTE bpp);



//*****************************************************************
//                  DECOMPRESSION
//*****************************************************************
WORD far gm_GMCA_Cycle_Decompress (BYTE ROM* Bp_Src, BYTE LoadFuncId);
WORD far gm_DecompLoadStandard (BYTE *Bp_Src, WORD W_Size);
WORD far gm_LoadBitMapPart (BYTE *Bp_Src, WORD W_Size);
WORD far gm_LoadGammaPart (BYTE *Bp_Src, WORD W_Size);
void far gm_DecompressInit  (BYTE *Bp_Buffer);



//*****************************************************************
//                  ROTATION
//*****************************************************************
void far gm_LoadFont (BYTE* Bp_Dest, BYTE* Bp_Src, BYTE B_Bpp);
void far gm_Rotate1Bpp(BYTE* Bp_Src, BYTE* Bp_Dest, BYTE B_WidthSrcBuffer, WORD W_WidthDestBuffer, BYTE B_PixelCount);
void far gm_GeneralRotate1Bpp(BYTE* Bp_Src, BYTE* Bp_Dest, BYTE B_WidthSrcBuffer);
void far gm_RotateText1bpp(BYTE* Bp_Src, BYTE* Bp_Dest, BYTE B_WidthSrcBuffer, BYTE B_OrderX);



//*****************************************************************
//                  UTILS
//*****************************************************************
void far gm_PostEvent(void);
BYTE far GetOsdUserEvent(void);

//*****************************************************************
//                  Memory control
//*****************************************************************
void far gm_AllocateMemoryControl(void);
void far gm_DeallocateMemoryControl(void);    // PDR 9595 Deallocate function for memory control
void far SetRAMBuffer(void);                 // PDR 9403 Memory control to allow instant auto use osd ram
//*****************************************************************
//                  Application interfaces
//*****************************************************************
//  State Machine
#define InitSm                          gm_InitSm
#define SelectThread                    gm_SelectThread
#define OsdEventHandler                 gm_OsdEventHandler
#define OsdGetActionOperand             gm_OsdGetActionOperand
#define OsdGetCurrentSATOffsetByte      gm_OsdGetCurrentSATOffsetByte
#define OsdGetCurrentSATOffset          gm_OsdGetCurrentSATOffset
#define OsdGetCurrentSATOffsetWord      gm_OsdGetCurrentSATOffsetWord
#define OsdGetCurrentSATOffsetDWord     gm_OsdGetCurrentSATOffsetDWord
#define OsdGetCurrentStateTranslTable   gm_OsdGetCurrentStateTranslTable
#define DecState                        gm_DecState
#define DecStateBy                      gm_DecStateBy
#define GoToState                       gm_GoToState
#define IncState                        gm_IncState
#define IncStateBy                      gm_IncStateBy

//  Adjuster Engine
#define InitAe                          gm_InitAe
#define IncAdjuster                     gm_IncAdjuster
#define DecAdjuster                     gm_DecAdjuster
#define SetAdjuster                     gm_SetAdjuster
#define SetAdjusterValue                gm_SetAdjusterValue
#define GetAdjusterMax                  gm_GetAdjusterMax
#define GetAdjusterMin                  gm_GetAdjusterMin
#define GetAdjusterValue                gm_GetAdjusterValue

// Common
#define GetTileActionOperand            gm_GetTileActionOperand
#define EraseControl                    gm_EraseControl
#define OsdSetDirection                 gm_OsdSetDirection
#define LoadControlChars                gm_LoadControlChars
#define FindLangOffsets                 gm_FindLanfOffsets
#define LoadColorsInvisibleState        gm_LoadColorsInvisibleState

// Dialog & Tile
#define LoadColorsDialog                gm_LoadColorsDialog
#define DrawDialog                      gm_DrawDialog
#define EraseDialog                     gm_EraseDialog
#define PositionDialog                  gm_PositionDialog
#define PositionAdjDialog               gm_PositionAdjDialog
#define ShowOsd                         gm_ShowOsd
#define HideOsd                         gm_HideOsd
#define AllocateTile                    gm_AllocateTile
#define DeallocateTile                  gm_DeAllocateTile
#define ShowTile                        gm_ShowTile
#define HideTile                        gm_HideTile
#define EnableTile                      gm_ShowTile // temporary
#define DisableTile                      gm_HideTile // temporary

// Bitmap
#define LoadBitmap                      gm_LoadBitmap
#define DrawBitmap                      gm_DrawBitmap
#define SelectBitmapButton              gm_SelectBitmapButton
#define UnselectBitmapButton            gm_UnselectBitmapButton
#define LoadBitmapBase                  gm_LoadBitmapBase
#define DrawBitmapBase                  gm_DrawBitmapBase

// Text
#define DrawStaticText                  gm_DrawStaticText
#define SelectTextButton                gm_SelectTextButton
#define UnselectTextButton              gm_UnselectTextButton
#define DrawTextBase                    gm_DrawTextBase
#define DrawDynamicStringBase           gm_DrawDynamicStringBase

// Long Value
#define DrawLongValue                   gm_DrawLongValue
#define SelectLongValueButton           gm_SelectLongValueButton
#define DrawNonPropLongValue            gm_DrawNonPropLongValue
#define SelectNonPropLongValueButton    gm_SelectNonPropLongValueButton
#define DrawLongValueBase               gm_DrawLongValueBase
#define DrawNonPropLongValueBase        gm_DrawNonPropLongValueBase

// Timing Info
#define DrawTimingInfo                  gm_DrawTimingInfo
#define DrawResolutionTimingInfo        gm_DrawResolutionTimingInfo
#define DrawVFreqTimingInfo             gm_DrawVFreqTimingInfo
#define DrawHFreqTimingInfo             gm_DrawHFreqTimingInfo
#define DrawTimingInfoBase              gm_DrawTimingInfoBase

// Slider
#define DrawSlider                      gm_DrawSlider
#define SelectSliderButton              gm_SelectSliderButton
#define DrawVerticalSlider              gm_DrawVerticalSlider
#define SelectVerticalSliderButton      gm_SelectVerticalSliderButton
#define DrawSliderBase                  gm_DrawSliderBase

// Frame & Rectangle
#define DrawRectangle                   gm_DrawRectangle
#define SelectRectangleButton           gm_SelectRectangleButton
#define DrawFrame                       gm_DrawFrame
#define DrawShadow                      gm_DrawShadow
#define DrawRectangleBase               gm_DrawRectangleBase
#define DrawFrameBase                   gm_DrawFrameBase

// Tab Control
#define DrawTabControl                  gm_DrawTabControl
#define SelectTabControl                gm_SelectTabControl
#define UnselectTabControl              gm_UnselectTabControl

//  Color Management
#define CM_LoadColors                   gm_CM_LoadColors
#define CM_GetAttrsPtr                  gm_CM_GetAttrsPtr
#define CM_GetCSPtr                     gm_CM_GetCSPtr
#define CF_LoadColors                   gm_CF_LoadColors

// Memory control class
#define AllocateMemoryControl				 gm_AllocateMemoryControl
#define DeallocateMemoryControl			 gm_DeallocateMemoryControl  // PDR 9595 Deallocate function for memory control

//  Primitives
// Init needs to be combined using the structure
#define OsdC_Init                       gm_OsdC_Init
#define InitControls                    gm_InitControls

#define OsdC_SetDirection               gm_OsdC_SetDirection
#define OsdC_GetDirection               gm_OsdC_GetDirection
#define OsdC_SelectRectangle            gm_OsdC_SelectRectangle
#define OsdC_RectSetup                  gm_OsdC_RectSetup
#define OsdC_PositionRectangle          gm_OsdC_PositionRectangle
#define OsdC_SetStretch                 gm_OsdC_SetStretch
#define OsdC_Show                       gm_OsdC_Show
#define OsdC_Hide                       gm_OsdC_Hide
#define OsdC_BlendLevel                 gm_OsdC_BlendLevel
#define OsdC_LoadColor                  gm_OsdC_LoadColor
#define OsdC_LoadAttributes             gm_OsdC_LoadAttributes
#define OsdC_SetWinBkgnd                gm_OsdC_SetWinBkgnd
#define OsdC_Highlight                  gm_OsdC_Highlight
#define OsdC_ClrWinBkgnd                gm_OsdC_ClrWinBkgnd
#define OsdC_SetBlinkOnOffPeriods       gm_OsdC_SetBlinkOnOffPeriods 
#define OsdC_CCFFill                    gm_OsdC_CCFFill

#define OsdC_FindGlyphHdr               gm_OsdC_FindGlyphHdr
#define OsdC_PutChar                    gm_OsdC_PutChar
#define OsdC_SetAttr                    gm_OsdC_SetAttr
#define OsdC_GetAttr                    gm_OsdC_GetAttr

#define OsdC_FillRect                   gm_OsdC_FillRect
#define OsdC_FillRect_Char              gm_OsdC_FillRect_Char
#define OsdC_FillRect_Attrib            gm_OsdC_FillRect_Attrib
#define OsdC_SetIcon_Attrib             gm_OsdC_SetIcon_Attrib
#define OsdC_DrawIcon                   gm_OsdC_DrawIcon

#define OsdC_LoadIcon                   gm_OsdC_LoadIcon
#define OsdC_LoadIconCompressed         gm_OsdC_LoadIconCompressed
#define OsdC_LoadBitMapCompressed       gm_OsdC_LoadBitMapCompressed
#define OsdC_LoadGlyph                  gm_OsdC_LoadGlyph
#define OsdC_Render                     gm_OsdC_Render

#define OsdC_BytesPerFont               gm_OsdC_BytesPerFont
#define OsdC_FontAddress                gm_OsdC_FontAddress
#define OsdC_FontTblBA                  gm_OsdC_FontTblBA
#define OsdC_LinearAddr                 gm_OsdC_LinearAddr

// decompression
#define GMCA_Cycle_Decompress           gm_GMCA_Cycle_Decompress
#define DecompLoadStandart              gm_DecompLoadStandart
#define LoadBitMapPart                  gm_LoadBitMapPart
#define LoadGammaPart                   gm_LoadGammaPart
#define DecompressInit                  gm_DecompressInit


#endif//#ifndef __EXTOSDLIB_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -