コード例 #1
0
ファイル: console.c プロジェクト: cybersphinx/wzgraphicsmods
/** Sets the system up */
void	initConsoleMessages( void )
{
	int TextLineSize = iV_GetTextLineSize();
	messageIndex = 0;

	/* Console can extend to half screen height */
	if (TextLineSize)
	{
		maxDrop = ((pie_GetVideoBufferHeight() / TextLineSize)/2);
	}
	else
	{
		debug(LOG_FATAL, "Something is wrong with the fonts? Aborting.");
		abort();
	}

	if(maxDrop>32) maxDrop = 32;

	consoleDrop = maxDrop;//MAX_DROP;

	dropState = DROP_CLOSED;

	/* No active messages to begin with */
	numActiveMessages = 0;

	lastDropChange = 0;

	bConsoleDropped = false;

	/* Linked list is empty */
	consoleMessages = NULL;

	/* Setup how long messages are displayed for... */
	setConsoleMessageDuration(DEFAULT_MESSAGE_DURATION);

	/* No box under the text */
	setConsoleBackdropStatus(true);

	/* Turn on the console display */
	enableConsoleDisplay(true);

	/* Set left justification as default */
	setDefaultConsoleJust(LEFT_JUSTIFY);

	/*	Set up the console size and postion
		x,y,width */
	setConsoleSizePos(16, 16, pie_GetVideoBufferWidth()-32);

	setConsoleLineInfo(MAX_CONSOLE_MESSAGES/4 + 4);

	/* We're not initially having permanent messages */
	setConsolePermanence(false,true);

	/* Allow new messages */
	permitNewConsoleMessages(true);
}
コード例 #2
0
ファイル: init.cpp プロジェクト: tomworld10/warzone2100
// --- Miscellaneous Initialisation stuff that really should be done each restart
static void	initMiscVars(void)
{
	selectedPlayer = 0;
	realSelectedPlayer = 0;
	godMode = false;

	radarOnScreen = true;
	enableConsoleDisplay(true);

	setSelectedGroup(UBYTE_MAX);
	processDebugMappings(false);
}
コード例 #3
0
ファイル: init.cpp プロジェクト: kerbys/warzone2100
// --- Miscellaneous Initialisation stuff that really should be done each restart
static void	initMiscVars(void)
{
	selectedPlayer = 0;
	realSelectedPlayer = 0;
	godMode = false;

	radarOnScreen = true;
	radarPermitted = true;
	allowDesign = true;
	enableConsoleDisplay(true);

	setSelectedGroup(UBYTE_MAX);
	for (unsigned n = 0; n < MAX_PLAYERS; ++n)
	{
		processDebugMappings(n, false);
	}
}
コード例 #4
0
ファイル: init.cpp プロジェクト: perim/warzone2100
// --- Miscellaneous Initialisation stuff that really should be done each restart
static void initMiscVars()
{
	selectedPlayer = 0;
	realSelectedPlayer = 0;
	godMode = false;

	radarOnScreen = true;
	radarPermitted = true;
	allowDesign = true;
	includeRedundantDesigns = false;
	enableConsoleDisplay(true);

	for (unsigned n = 0; n < MAX_PLAYERS; ++n)
	{
		processDebugMappings(n, false);
	}
}
コード例 #5
0
ファイル: console.cpp プロジェクト: C1annad/warzone2100
/** Sets the system up */
void	initConsoleMessages(void)
{
	iV_SetFont(font_regular);
	linePitch = iV_GetTextLineSize();						// NOTE: if font changes, this must also be changed!
	bConsoleDropped = false;
	setConsoleMessageDuration(DEFAULT_MESSAGE_DURATION);	// Setup how long messages are displayed for
	setConsoleBackdropStatus(true);							// No box under the text
	enableConsoleDisplay(true);								// Turn on the console display

	//	Set up the main console size and position x,y,width
	setConsoleSizePos(16, 32, pie_GetVideoBufferWidth() - 32);
	historyConsole.topX = HISTORYBOX_X;
	historyConsole.topY = HISTORYBOX_Y;
	historyConsole.width = pie_GetVideoBufferWidth() - 32;
	setConsoleLineInfo(MAX_CONSOLE_MESSAGES / 4 + 4);
	setConsolePermanence(false, true);						// We're not initially having permanent messages
	permitNewConsoleMessages(true);							// Allow new messages
}