<commit_before>//
// class Enviro implementation
//
// Main functionality of the Enviro application
//
// Copyright (c) 2001-2002 Virtual Terrain Project
// Free for all uses, see license.txt for details.
//

#include "vtlib/vtlib.h"
#include "vtlib/core/Building3d.h"
#include "vtlib/core/Fence3d.h"
#include "vtlib/core/NavEngines.h"
#include "vtlib/core/Route.h"
#include "vtlib/core/SkyDome.h"
#include "vtlib/core/DynTerrain.h"
#include "vtlib/core/TerrainScene.h"

#include "vtdata/boost/directory.h"
#include "vtdata/FilePath.h"
#include "vtdata/vtLog.h"

#include "Enviro.h"
#include "Options.h"
#include "Hawaii.h"
#include "Nevada.h"
#include "TransitTerrain.h"
#include "Globe.h"

#define ORTHO_HEIGHT		40000	// 40 km in the air
#define INITIAL_SPACE_DIST	3.1f

//
// This is a 'singleton', the only instance of the global application object
//
Enviro g_App;

extern void ShowPopupMenu(const IPoint2 &pos);

///////////////////////////////////////////////////////////

Enviro::Enviro()
{
	m_mode = MM_NONE;
	m_state = AS_Initializing;
	m_iInitStep = 0;

	m_bActiveFence = false;
	m_pCurFence = NULL;
	m_CurFenceType = FT_WIRE;
	m_fFenceHeight = 1.5f;
	m_fFenceSpacing = 2.5f;

	m_bOnTerrain = false;
	m_bShowTime = false;
	m_bGlobeFlat = false;
	m_fGlobeFac = 1.0f;
	m_fGlobeDir = 0.0f;

	m_pTerrainPicker = NULL;
	m_pGlobePicker = NULL;
	m_pCursorMGeom = NULL;

	m_pArc = NULL;
	m_pArcMesh = NULL;
	m_fArcLength = 0.0;

	m_fMessageTime = 0.0f;

	// plants
	m_pPlantList = NULL;
	m_PlantOpt.m_iMode = 0;
	m_PlantOpt.m_iSpecies = 0;
	m_PlantOpt.m_fHeight = 2.0f;
	m_PlantOpt.m_iVariance = 20;
	m_PlantOpt.m_fSpacing = 2.0f;

	m_bDragging = false;
	m_bSelectedStruct = false;
	m_bSelectedPlant = false;
}

Enviro::~Enviro()
{
}

void Enviro::Startup()
{
	m_pTerrainScene = new vtTerrainScene();

	g_Log._StartLog("debug.txt");
	VTLOG("\nEnviro\nBuild:");
#if _DEBUG
	VTLOG(" Debug");
#else
	VTLOG(" Release");
#endif
#if UNICODE
	VTLOG(" Unicode");
#endif
	VTLOG("\n\n");
}

void Enviro::Shutdown()
{
	VTLOG("Shutdown.\n");
	delete m_pPlantList;<commit_msg>chg to _DEBUG || DEBUG<commit_after>//
// class Enviro implementation
//
// Main functionality of the Enviro application
//
// Copyright (c) 2001-2002 Virtual Terrain Project
// Free for all uses, see license.txt for details.
//

#include "vtlib/vtlib.h"
#include "vtlib/core/Building3d.h"
#include "vtlib/core/Fence3d.h"
#include "vtlib/core/NavEngines.h"
#include "vtlib/core/Route.h"
#include "vtlib/core/SkyDome.h"
#include "vtlib/core/DynTerrain.h"
#include "vtlib/core/TerrainScene.h"

#include "vtdata/boost/directory.h"
#include "vtdata/FilePath.h"
#include "vtdata/vtLog.h"

#include "Enviro.h"
#include "Options.h"
#include "Hawaii.h"
#include "Nevada.h"
#include "TransitTerrain.h"
#include "Globe.h"

#define ORTHO_HEIGHT		40000	// 40 km in the air
#define INITIAL_SPACE_DIST	3.1f

//
// This is a 'singleton', the only instance of the global application object
//
Enviro g_App;

extern void ShowPopupMenu(const IPoint2 &pos);

///////////////////////////////////////////////////////////

Enviro::Enviro()
{
	m_mode = MM_NONE;
	m_state = AS_Initializing;
	m_iInitStep = 0;

	m_bActiveFence = false;
	m_pCurFence = NULL;
	m_CurFenceType = FT_WIRE;
	m_fFenceHeight = 1.5f;
	m_fFenceSpacing = 2.5f;

	m_bOnTerrain = false;
	m_bShowTime = false;
	m_bGlobeFlat = false;
	m_fGlobeFac = 1.0f;
	m_fGlobeDir = 0.0f;

	m_pTerrainPicker = NULL;
	m_pGlobePicker = NULL;
	m_pCursorMGeom = NULL;

	m_pArc = NULL;
	m_pArcMesh = NULL;
	m_fArcLength = 0.0;

	m_fMessageTime = 0.0f;

	// plants
	m_pPlantList = NULL;
	m_PlantOpt.m_iMode = 0;
	m_PlantOpt.m_iSpecies = 0;
	m_PlantOpt.m_fHeight = 2.0f;
	m_PlantOpt.m_iVariance = 20;
	m_PlantOpt.m_fSpacing = 2.0f;

	m_bDragging = false;
	m_bSelectedStruct = false;
	m_bSelectedPlant = false;
}

Enviro::~Enviro()
{
}

void Enviro::Startup()
{
	m_pTerrainScene = new vtTerrainScene();

	g_Log._StartLog("debug.txt");
	VTLOG("\nEnviro\nBuild:");
#if _DEBUG || DEBUG
	VTLOG(" Debug");
#else
	VTLOG(" Release");
#endif
#if UNICODE
	VTLOG(" Unicode");
#endif
	VTLOG("\n\n");
}

void Enviro::Shutdown()
{
	VTLOG("Shutdown.\n");
	delete m_pPlantList;
{'fraction_non_alphanumeric': 0.1653012048192771, 'fraction_numerical': 0.019759036144578312, 'mean_word_length': 3.7988439306358384, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7194177', 'n_tokens_mistral': 1860, 'n_tokens_neox': 1791, 'n_words': 353}