コード例 #1
0
void TextMessageInit( void )
{
	int fileSize;
	byte *pMemFile;

	// Clear out any old data that's sitting around.
	if ( gMessageTable )
	{
		free( gMessageTable );
		gMessageTable = NULL;
	}

	pMemFile = COM_LoadTempFile( "scripts/titles.txt", &fileSize );

	if ( pMemFile )
		TextMessageParse( pMemFile, fileSize );

	int i;

	for ( i = 0; i < MAX_NETMESSAGE; i++ )
	{
		gNetworkTextMessage[ i ].pMessage = 
			gNetworkTextMessageBuffer[ i ];
	}
}
コード例 #2
0
ファイル: tmessage.cpp プロジェクト: Adidasman1/rehlds
/* <c5b2e> ../engine/tmessage.c:464 */
NOXREF void TextMessageInit(void)
{
	int fileSize;
	unsigned char *pMemFile;

	if (gMessageTable)
	{
		Mem_Free(gMessageTable);
		gMessageTable = NULL;
	}

	pMemFile = COM_LoadTempFile("titles.txt", &fileSize);

	if (pMemFile)
		TextMessageParse(pMemFile, fileSize);
}