<commit_before>/***********************************************************************************
**
** OrionWindow.cpp
**
** Copyright (C) August 2016 Hotride
**
************************************************************************************
*/
//----------------------------------------------------------------------------------
#include "OrionWindow.h"
#include "OrionUO.h"
#include "Wisp/WispApplication.h"
#include "Wisp/WispLogger.h"
#include "GLEngine/GLEngine.h"
#include "Globals.h"
#include <tchar.h>
#include "Resource.h"
#include "Screen stages/BaseScreen.h"
#include "SelectedObject.h"
#include "PressedObject.h"
#include "Constants.h"
#include "Managers/ConfigManager.h"
#include "Game objects/ObjectOnCursor.h"
#include "ClickObject.h"
//----------------------------------------------------------------------------------
COrionWindow g_OrionWindow;
//----------------------------------------------------------------------------------
int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
{
	INITLOGGER("uolog.txt");

	if (!g_OrionWindow.Create(hInstance, L"Orion UO Client", L"Ultima Online", true, 640, 480, LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ORIONUO)), LoadCursor(hInstance, MAKEINTRESOURCE(IDC_CURSOR1))))
		return 0;

	g_OrionWindow.ShowWindow(true);
	g_OrionWindow.NoResize = true;

	return g_App.Run(hInstance);
}
//----------------------------------------------------------------------------------
COrionWindow::COrionWindow()
: WISP_WINDOW::CWindow()
{
}
//----------------------------------------------------------------------------------
COrionWindow::~COrionWindow()
{
}
//----------------------------------------------------------------------------------
void COrionWindow::SetRenderTimerDelay(const int &delay)
{
	WISP_THREADED_TIMER::CThreadedTimer *timer = GetThreadedTimer(RENDER_TIMER_ID);

	if (timer != NULL)
		timer->ChangeDelay(delay);
}
//----------------------------------------------------------------------------------
bool COrionWindow::OnCreate()
{
	if (!g_GL.Install())
	{
		LOG("Error install OpenGL\n");
		MessageBoxA(m_Handle, "Error install OpenGL", "Error install OpenGL!", MB_OK);
		return false;<commit_msg>Added global exception handler for logging.<commit_after>/***********************************************************************************
**
** OrionWindow.cpp
**
** Copyright (C) August 2016 Hotride
**
************************************************************************************
*/
//----------------------------------------------------------------------------------
#include "OrionWindow.h"
#include "OrionUO.h"
#include "Wisp/WispApplication.h"
#include "Wisp/WispLogger.h"
#include "GLEngine/GLEngine.h"
#include "Globals.h"
#include <tchar.h>
#include "Resource.h"
#include "Screen stages/BaseScreen.h"
#include "SelectedObject.h"
#include "PressedObject.h"
#include "Constants.h"
#include "Managers/ConfigManager.h"
#include "Game objects/ObjectOnCursor.h"
#include "ClickObject.h"
#include <iostream>
//----------------------------------------------------------------------------------
COrionWindow g_OrionWindow;
//----------------------------------------------------------------------------------
int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
{
	INITLOGGER("uolog.txt");

	try {
		if (!g_OrionWindow.Create(hInstance, L"Orion UO Client", L"Ultima Online", true, 640, 480, LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ORIONUO)), LoadCursor(hInstance, MAKEINTRESOURCE(IDC_CURSOR1))))
			return 0;

		g_OrionWindow.ShowWindow(true);
		g_OrionWindow.NoResize = true;
	}
	catch (std::exception& ex) {
		LOG("ex.what()\n", ex.what());
	}
	catch (...) {
		LOG("Caught unknown exception.\n");
	}



	return g_App.Run(hInstance);
}
//----------------------------------------------------------------------------------
COrionWindow::COrionWindow()
: WISP_WINDOW::CWindow()
{
}
//----------------------------------------------------------------------------------
COrionWindow::~COrionWindow()
{
}
//----------------------------------------------------------------------------------
void COrionWindow::SetRenderTimerDelay(const int &delay)
{
	WISP_THREADED_TIMER::CThreadedTimer *timer = GetThreadedTimer(RENDER_TIMER_ID);

	if (timer != NULL)
		timer->ChangeDelay(delay);
}
//----------------------------------------------------------------------------------
bool COrionWindow::OnCreate()
{
	if (!g_GL.Install())
	{
		LOG("Error install OpenGL\n");
		MessageBoxA(m_Handle, "Error install OpenGL", "Error install OpenGL!", MB_OK);
		return false;
{'fraction_non_alphanumeric': 0.42597402597402595, 'fraction_numerical': 0.005194805194805195, 'mean_word_length': 1.8917396745932415, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5734978', 'n_tokens_mistral': 1297, 'n_tokens_neox': 1227, 'n_words': 224}