コード例 #1
0
ファイル: Textures.cpp プロジェクト: ClericX/Projects
void CTextures::LoadBackground(unsigned int MapID, unsigned int BackgroundID)
{
	CBackgrounds *Background = new CBackgrounds();

	char MapIDString[10];
	char BackgroundIDString[10];
	_itoa(MapID, MapIDString, 10);
	_itoa(BackgroundID, BackgroundIDString, 10);

	string Path;

	Path = MapDir;
	Path += MapIDString;
	Path += "/";
	Path += "Background";
	Path += "/";
	Path += BackgroundIDString;
	Path += PNGExtentionStr;

	Background->MapID = MapID;
	Background->BackgroundID = BackgroundID;

	Background->SetLT( InitCore( Path ) );
	
	LoadedBackgrounds.push_back( Background );
}
コード例 #2
0
ファイル: Textures.cpp プロジェクト: ClericX/Projects
void CTextures::LoadPlatform(unsigned int MapID, unsigned int PlatformID)
{
	CPlatforms *Platform = new CPlatforms();

	char MapIDString[10];
	char PlatformIDString[10];
	_itoa(MapID, MapIDString, 10);
	_itoa(PlatformID, PlatformIDString, 10);

	string Path;

	Path = MapDir;
	Path += MapIDString;
	Path += "/";
	Path += "Platform";
	Path += "/";
	Path += PlatformIDString;
	Path += PNGExtentionStr;

	Platform->MapID = MapID;
	Platform->PlatformID = PlatformID;

	Platform->SetLT( InitCore( Path ) );
	
	LoadedPlatforms.push_back( Platform );
}
コード例 #3
0
ファイル: Engine.cpp プロジェクト: subr3v/s-engine
void Init(HINSTANCE hInstance, int nCmdShow)
{
	// Make sure everything is zero-ed out.
	memset(&EngineModules, 0, sizeof(FEngineModules));

	InitCore(hInstance, nCmdShow);
	InitRendering();
	InitImGui();
}
コード例 #4
0
// *****************************************************
// InitCommros()
//
//  This function is used to initalize commros and the
//  neccessary communication hardware.
// *****************************************************
void InitCommros()
{
	//Initalize commros and reset all internal variables
	InitCore(&commros);

	//Map serial port functions to commros
	SetByteProtocolCallBacks(&commros,&SCIDataAvailable,&SCITransmitByte,&SCIReceiveByte);

	//Initialize the serial port so it is ready for receiving and transmitting data
	SetupSerialPort();

	//Inform anyone listening on the serial port that the we are awake
	SendResetMessage(&commros,0);
}
コード例 #5
0
ファイル: Textures.cpp プロジェクト: ClericX/Projects
void CTextures::LoadItem(unsigned int ID)
{
	CItems *Item = new CItems();

	char ItemIDString[10];
	_itoa(ID, ItemIDString, 10);

	string Path;

	Path = App.CurrentDirectory;
	Path += ItemDir;
	Path += ItemIDString;
	Path += "/";
	Path += "0";
	Path += PNGExtentionStr;

	Item->ItemID = ID;
	Item->SetLT( InitCore( Path ) );
	
	LoadedItems.push_back( Item );
}
コード例 #6
0
ファイル: Textures.cpp プロジェクト: ClericX/Projects
void CTextures::LoadPortal(unsigned int ID)
{
	CPortals *Portal = new CPortals();

	char PortalIDString[10];
	_itoa(ID, PortalIDString, 10);

	string Path;

	Path = MapDir;
	Path += "Portal/";
	Path += PortalIDString;
	Path += "/";
	Path += "0";
	Path += PNGExtentionStr;

	Portal->PortalID = ID;
	Portal->SetLT( InitCore( Path ) );
	
	LoadedPortals.push_back( Portal );
}
コード例 #7
0
ファイル: dwhcidevice.cpp プロジェクト: aniket-deole/circle
boolean CDWHCIDevice::Initialize (void)
{
	DataMemBarrier ();

	assert (m_pInterruptSystem != 0);
	assert (m_pTimer != 0);

	CDWHCIRegister VendorId (DWHCI_CORE_VENDOR_ID);
	if (VendorId.Read () != 0x4F54280A)
	{
		CLogger::Get ()->Write (FromDWHCI, LogError, "Unknown vendor 0x%0X", VendorId.Get ());
		return FALSE;
	}

	if (!PowerOn ())
	{
		CLogger::Get ()->Write (FromDWHCI, LogError, "Cannot power on");
		return FALSE;
	}
	
	// Disable all interrupts
	CDWHCIRegister AHBConfig (DWHCI_CORE_AHB_CFG);
	AHBConfig.Read ();
	AHBConfig.And (~DWHCI_CORE_AHB_CFG_GLOBALINT_MASK);
	AHBConfig.Write ();
	
	assert (m_pInterruptSystem != 0);
	m_pInterruptSystem->ConnectIRQ (ARM_IRQ_USB, InterruptStub, this);

	if (!InitCore ())
	{
		CLogger::Get ()->Write (FromDWHCI, LogError, "Cannot initialize core");
		return FALSE;
	}
	
	EnableGlobalInterrupts ();
	
	if (!InitHost ())
	{
		CLogger::Get ()->Write (FromDWHCI, LogError, "Cannot initialize host");
		return FALSE;
	}

	// The following calls will fail if there is no device or no supported device connected
	// to root port. This is not an error because the system may run without an USB device.

	if (!EnableRootPort ())
	{
		CLogger::Get ()->Write (FromDWHCI, LogWarning, "No device connected to root port");
		return TRUE;
	}

	if (!m_RootPort.Initialize ())
	{
		CLogger::Get ()->Write (FromDWHCI, LogWarning, "Cannot initialize root port");
		return TRUE;
	}
	
	DataMemBarrier ();

	return TRUE;
}
コード例 #8
0
ファイル: tini.cpp プロジェクト: darkphase/FastCopy
void TInifile::Init(const char *_ini_file)
{
	InitCore(IsUTF8(_ini_file) ? U8toW(_ini_file) : AtoW(_ini_file));
}
コード例 #9
0
ファイル: tini.cpp プロジェクト: darkphase/FastCopy
void TInifile::Init(const WCHAR *_ini_file)
{
	InitCore(wcsdup(_ini_file));
}