<commit_before>//#include <fenv.h>
#include <errno.h>

#include <Ogre.h>
#include <OgreArchiveFactory.h>

#ifdef NO_PLUGINS
#  include "OgreOctreePlugin.h"
#  include "OgreGLPlugin.h"
#  include "OgreParticleFXPlugin.h"
#  ifdef WIN32
#    include "OgreD3D9Plugin.h"
#  endif
#endif

#ifdef WIN32
#  include "win32/MouseDirectInput8.h"
#  include "win32/KeyboardDirectInput8.h"
#  include "win32/KeyboardWinAPI.h"
#else
#  include "linux/KeyboardX11.h"
#  include "linux/MouseX11.h"
#endif

#include "Grit.h"
#include "BackgroundMeshLoader.h"
#include "CentralisedLog.h"
#include "LuaParticleSystem.h"

CentralisedLog clog;

Grit *grit = NULL;

#include "console_colour.h"

int already_fatal = 0;

void app_fatal()
{
        if (!already_fatal) {
                already_fatal = 1;
                delete grit;
        }

        abort();
}


int main(int argc, const char **argv)
{

        try {


                Ogre::LogManager *lmgr = OGRE_NEW Ogre::LogManager();
                Ogre::Log *ogre_log = OGRE_NEW Ogre::Log("",false,true);
                ogre_log->addListener(&clog);
                lmgr->setDefaultLog(ogre_log);
                lmgr->setLogDetail(Ogre::LL_NORMAL);

                #ifdef FE_NOMASK_ENV
                //feenableexcept(FE_INVALID);
                //feenableexcept(FE_DIVBYZERO | FE_INVALID);
                #endif

                #ifdef NO_PLUGINS
                        Ogre::Root* ogre = OGRE_NEW Ogre::Root("","","");

                        Ogre::GLPlugin *gl = OGRE_NEW Ogre::GLPlugin();
                        ogre->installPlugin(gl);

                        Ogre::OctreePlugin *octree =
                                OGRE_NEW Ogre::OctreePlugin();
                        ogre->installPlugin(octree);

                        Ogre::ParticleFXPlugin *pfx =
                                OGRE_NEW Ogre::ParticleFXPlugin();
                        ogre->installPlugin(pfx);

                        #ifdef WIN32
                        Ogre::D3D9Plugin *d3d9 = OGRE_NEW Ogre::D3D9Plugin();
                        ogre->installPlugin(d3d9);
                        #endif
                #else
                        Ogre::Root* ogre = OGRE_NEW Ogre::Root("plugins.cfg","","");
                #endif

                BackgroundMeshLoader *bml = new BackgroundMeshLoader();

                #ifdef WIN32
                bool use_d3d9 = getenv("GRIT_GL")==NULL;
                bool use_dinput = getenv("GRIT_DINPUT")!=NULL;
                #else
                bool use_d3d9 = false;
                #endif

                bool use_vsync = getenv("GRIT_NOVSYNC")==NULL;
                bool use_fullscreen = getenv("GRIT_FULLSCREEN")!=NULL;

                if (use_d3d9) {
                        Ogre::RenderSystem *rs =
                                ogre->getRenderSystemByName("Direct3D9 Rendering Subsystem");
                        rs->setConfigOption("Allow NVPerfHUD","Yes");
                        //rs->setConfigOption("Anti aliasing","None");
                        rs->setConfigOption("Floating-point mode","Consistent");
                        rs->setConfigOption("Full Screen",use_fullscreen?"Yes":"No");<commit_msg>Turn off AA explicitly<commit_after>//#include <fenv.h>
#include <errno.h>

#include <Ogre.h>
#include <OgreArchiveFactory.h>

#ifdef NO_PLUGINS
#  include "OgreOctreePlugin.h"
#  include "OgreGLPlugin.h"
#  include "OgreParticleFXPlugin.h"
#  ifdef WIN32
#    include "OgreD3D9Plugin.h"
#  endif
#endif

#ifdef WIN32
#  include "win32/MouseDirectInput8.h"
#  include "win32/KeyboardDirectInput8.h"
#  include "win32/KeyboardWinAPI.h"
#else
#  include "linux/KeyboardX11.h"
#  include "linux/MouseX11.h"
#endif

#include "Grit.h"
#include "BackgroundMeshLoader.h"
#include "CentralisedLog.h"
#include "LuaParticleSystem.h"

CentralisedLog clog;

Grit *grit = NULL;

#include "console_colour.h"

int already_fatal = 0;

void app_fatal()
{
        if (!already_fatal) {
                already_fatal = 1;
                delete grit;
        }

        abort();
}


int main(int argc, const char **argv)
{

        try {


                Ogre::LogManager *lmgr = OGRE_NEW Ogre::LogManager();
                Ogre::Log *ogre_log = OGRE_NEW Ogre::Log("",false,true);
                ogre_log->addListener(&clog);
                lmgr->setDefaultLog(ogre_log);
                lmgr->setLogDetail(Ogre::LL_NORMAL);

                #ifdef FE_NOMASK_ENV
                //feenableexcept(FE_INVALID);
                //feenableexcept(FE_DIVBYZERO | FE_INVALID);
                #endif

                #ifdef NO_PLUGINS
                        Ogre::Root* ogre = OGRE_NEW Ogre::Root("","","");

                        Ogre::GLPlugin *gl = OGRE_NEW Ogre::GLPlugin();
                        ogre->installPlugin(gl);

                        Ogre::OctreePlugin *octree =
                                OGRE_NEW Ogre::OctreePlugin();
                        ogre->installPlugin(octree);

                        Ogre::ParticleFXPlugin *pfx =
                                OGRE_NEW Ogre::ParticleFXPlugin();
                        ogre->installPlugin(pfx);

                        #ifdef WIN32
                        Ogre::D3D9Plugin *d3d9 = OGRE_NEW Ogre::D3D9Plugin();
                        ogre->installPlugin(d3d9);
                        #endif
                #else
                        Ogre::Root* ogre = OGRE_NEW Ogre::Root("plugins.cfg","","");
                #endif

                BackgroundMeshLoader *bml = new BackgroundMeshLoader();

                #ifdef WIN32
                bool use_d3d9 = getenv("GRIT_GL")==NULL;
                bool use_dinput = getenv("GRIT_DINPUT")!=NULL;
                #else
                bool use_d3d9 = false;
                #endif

                bool use_vsync = getenv("GRIT_NOVSYNC")==NULL;
                bool use_fullscreen = getenv("GRIT_FULLSCREEN")!=NULL;

                if (use_d3d9) {
                        Ogre::RenderSystem *rs =
                                ogre->getRenderSystemByName("Direct3D9 Rendering Subsystem");
                        rs->setConfigOption("Allow NVPerfHUD","Yes");
                        rs->setConfigOption("FSAA","None");
                        rs->setConfigOption("Floating-point mode","Consistent");
                        rs->setConfigOption("Full Screen",use_fullscreen?"Yes":"No");
{'fraction_non_alphanumeric': 0.11521603005635567, 'fraction_numerical': 0.012523481527864746, 'mean_word_length': 1.6631929970821175, 'pattern_counts': {'":': 2, '<': 11, '<?xml version=': 0, '>': 35, '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': '3269619', 'n_tokens_mistral': 2051, 'n_tokens_neox': 1885, 'n_words': 321}