📄 dialog.c
字号:
//******************************************************************
//
// Copyright (C) 2003. GENESIS MICROCHIP INC.
// All rights reserved. No part of this program may be reproduced.
//
// Genesis Microchip Inc., 165 Commerce Valley Dr. West
// Thornhill, Ontario, Canada, L3T 7V8
// Genesis Microchip Corp., 2150 Gold Street
// Alviso, CA 95002 USA
//
//================================================================
//
// MODULE: Dialog.c
//
// USAGE:
//
//******************************************************************************
#include "inc\all.h"
#include "..\OsdLib\extOsdLib.h"
// fixed byte address of 1BPP font table in case of disabling tiles
// #define NO_TILES_1BPP_FONT_TBL_ADDR 1024 /* by VeniaminK PDR6848*/
xdata BYTE g_CurrentDialogColorAttr;
// PDR #6755
#if (TILE_SUPPORT == 0)
ST_OSD_DIALOG_CTRL ROM * xdata g_CurrentDialog;
#endif
void OsdC_Render(BYTE *glyph_string, BYTE *hrdw_string)
{
#if (Font_X == 16) && (Font_Y == 16)
OsdC_Render16x16(glyph_string, hrdw_string);
#elif (Font_X == 16) && (Font_Y > 8) && (Font_Y < 19)
OsdC_Render16xXX(glyph_string, hrdw_string);
#else
#error Current firmware support limited to fonts 16x18, 16x16, 16x14, 16x12, 16x10
OsdC_RenderGeneric(glyph_string, hrdw_string);
#endif
}
#ifdef Action_DrawDialog_WB_Used
void DrawDialog()
{
ST_OSD_DIALOG_CTRL ROM* Sp_Dlg;
BYTE i;
#ifdef DEBUG_OSD
gm_Print("Draw Dialog", 0);
#endif
gm_GetActionOperand();
Sp_Dlg = (ST_OSD_DIALOG_CTRL ROM *) ActionOp;
#if (TILE_SUPPORT == 0)
// if tiles aren't supported, set color attributes (it is used to erase controls)
g_CurrentDialogColorAttr = Sp_Dlg->ColorAttrib;
SelectRectangle(0);
g_CurrentDialog = Sp_Dlg; // PDR #6755
OsdC_RectSetup (Sp_Dlg->XSize,
Sp_Dlg->YSize,
/*NO_TILES_1BPP_FONT_TBL_ADDR*/Sp_Dlg->ChrTbl1Bpp * 2, // ChrTbl1Bpp * 2 /* by VeniaminK PDR6848*/
/*(WORD)Sp_Dlg->XSize * Sp_Dlg->YSize*/Sp_Dlg->ChrTbl2Bpp * 2, // ChrTbl2Bpp * 2 /* by VeniaminK PDR6848*/
0);
OsdC_PositionOsd (UserPrefHPosOSD,
UserPrefVPosOSD,
Sp_Dlg->XSize,
Sp_Dlg->YSize,
0, //Sp_Tile->XPos,
0, //Sp_Tile->YPos,
0);
OsdC_FillRect( 0,
0,
Sp_Dlg->XSize,
Sp_Dlg->YSize,
SPACE_INDEX,
g_CurrentDialogColorAttr);
#endif
for (i = 0; i < ((ST_OSD_DIALOG_CTRL *) ActionOp)->FragmNum; ++i)
{
ST_OSD_CLUT* pClut = ((ST_OSD_DIALOG_CTRL *) ActionOp)->ColorRef + i;
OsdC_LoadColor (
#ifdef OLD_PRIMITIVES
(WORD ROM*)(pClut->Bp_Clut + 1),
#else//#ifdef OLD_PRIMITIVES
(BYTE ROM*)(pClut->Bp_Clut + 1),
#endif//#else//#ifdef OLD_PRIMITIVES
pClut->Bp_Clut [0],
pClut->B_StartPosition
);
}
}
#endif //#ifdef Action_DrawDialog_WB_Used
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -