Пример #1
0
/**
**  Pre menu setup.
*/
void PreMenuSetup()
{
	//
	//  Initial menus require some gfx.
	//
	SetDefaultTextColors(FontYellow, FontWhite);

	LoadFonts();

	InitVideoCursors();

	if (MenuRace.empty()) {
		//Wyrmgus start
//		LoadCursors(PlayerRaces.Name[0]);
		LoadCursors();
		//Wyrmgus end
	} else {
		//Wyrmgus start
//		LoadCursors(MenuRace);
		LoadCursors();
		//Wyrmgus end
	}

	InitSettings();

	InitUserInterface();
	UI.Load();
}
Пример #2
0
/* Init most of all firms of client
 */
void InitUser (struct client * user, struct clientlist *clList, int fd)
{
	//user->number = clList->cnt; It's not need.fn better GetUserId()
	user->next = NULL;

	user->contact = (struct settings*)malloc(sizeof(struct settings));
	InitSettings (user->contact, fd, clList->cnt);

	user->f = (struct userFlags *) malloc (sizeof(struct userFlags));
	InitFlags (user->f);

	user->sell = (struct auction *) malloc (sizeof(struct auction));
	InitBuyOrSell (user->sell);

	user->buy = (struct auction *) malloc (sizeof(struct auction));
	InitBuyOrSell (user->buy);

	user->data = (struct stuff *) malloc (sizeof(struct stuff));
	InitStuff (user->data);

	user->buf = (struct buffer * ) malloc (sizeof(struct buffer));
	InitBuffer (user->buf);

	user->cmd = (struct command * ) malloc (sizeof(struct command));
	InitCommand (user->cmd);
	
}
Пример #3
0
int main( int argc, char *argv[]) {
  if (argc < 2) {
	printf("Usage: NTHREADS\n");
	return 0;
  }

  NTHREADS = atoi(argv[1]);

  InitSettings   ();
  InitCoordinates(INPARAMS numMoles, BOXSIZE, perturb);

  InitVelocities (INPARAMS timeStep);
  InitForces     ();

  CREATE_TM_THREADS( NTHREADS );

  do_libtm_work();

  DESTROY_TM_THREADS( NTHREADS );

  printf("\n");

  free(x);
  free(f);
  free(vh);
  free(inter);

  return 0;
}
Пример #4
0
Settings::Settings(QString path)
{
    _path = path;

    InitSettings();
    LoadSettings();
}
Пример #5
0
lua_State *
Lua::NewFullState()
{
  lua_State *L = NewBasicState();

  InitLog(L);
  InitPersistent(L);
  InitTimer(L);
  InitMap(L);
  InitBlackboard(L);
  InitDialogs(L);
  InitLegacy(L);
  InitAirspace(L);
  InitTask(L);
  InitSettings(L);
  InitWind(L);
  InitLogger(L);
  InitTracking(L);
  InitReplay(L);
  InitInputEvent(L);

  {
    SetPackagePath(L,
                   WideToUTF8Converter(LocalPath(_T("lua" DIR_SEPARATOR_S "?.lua")).c_str()));
  }

  return L;
}
Пример #6
0
BOOL CPPageAdvanced::OnInitDialog()
{
    __super::OnInitDialog();

    if (CFont* pFont = m_list.GetFont()) {
        LOGFONT logfont;
        pFont->GetLogFont(&logfont);
        logfont.lfWeight = FW_BOLD;
        m_fontBold.CreateFontIndirect(&logfont);
    }

    SetRedraw(FALSE);
    m_list.SetExtendedStyle(m_list.GetExtendedStyle() | LVS_EX_FULLROWSELECT | LVS_EX_AUTOSIZECOLUMNS | LVS_EX_DOUBLEBUFFER | LVS_EX_INFOTIP);
    m_list.InsertColumn(COL_NAME, ResStr(IDS_PPAGEADVANCED_COL_NAME), LVCFMT_LEFT);
    m_list.InsertColumn(COL_VALUE, ResStr(IDS_PPAGEADVANCED_COL_VALUE), LVCFMT_RIGHT);

    GetDlgItem(IDC_EDIT1)->ShowWindow(SW_HIDE);
    GetDlgItem(IDC_COMBO1)->ShowWindow(SW_HIDE);
    GetDlgItem(IDC_RADIO1)->ShowWindow(SW_HIDE);
    GetDlgItem(IDC_RADIO2)->ShowWindow(SW_HIDE);
    GetDlgItem(IDC_BUTTON1)->ShowWindow(SW_HIDE);

    InitSettings();

    for (int i = 0; i < m_list.GetHeaderCtrl()->GetItemCount(); ++i) {
        m_list.SetColumnWidth(i, LVSCW_AUTOSIZE_USEHEADER);
    }
    SetRedraw(TRUE);
    return TRUE;
}
Пример #7
0
//!***************************************************************
//! @details:
//! constructor
//!
//!***************************************************************
Game::Game()
: m_map(0), m_mainCamera(0), m_mouseListener(0), m_keyListener(0), m_player(0), m_quit(false)
{
	// create the engine
	m_engine = new FIFE::Engine();

	// create view controller
	m_viewController = new ViewController();

	// apply game settings
	InitSettings();

	// initialize the engine
	m_engine->init();

	// create default gui
	FIFE::FifechanManager* guiManager = new FIFE::FifechanManager();

	// setup the gui
	guiManager->setDefaultFont(
		m_engine->getSettings().getDefaultFontPath(),
		m_engine->getSettings().getDefaultFontSize(),
		m_engine->getSettings().getDefaultFontGlyphs()
	);
		
	guiManager->init(
		m_engine->getRenderBackend()->getName(),
		m_engine->getRenderBackend()->getScreenWidth(),
		m_engine->getRenderBackend()->getScreenHeight()
	);

	m_engine->setGuiManager(guiManager);
	m_engine->getEventManager()->addSdlEventListener(guiManager);
}
Пример #8
0
// Call all functions to initialise UI
// @input:
// @output:
void MainWindow::InitUI()
{
	ui->setupUi(this);

	InitSettings();
	InitStatusBar();
	InitImgsLabels();
}
Пример #9
0
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
	if(DLL_PROCESS_ATTACH==fdwReason)
	{
		hInstance = hinstDLL;
		
		InitSettings();

		if(tSettings.bDebug || tSettings.bPlayOnline) {
		
			// Check the GTA version
			if(DetermineGTAVersion() != VICE_10) {
				MessageBox(0,"Incorrect gta-vc.exe version detected.\nYou must use GTA:VC 1.0 to play VC:MP","VC:MP Error",MB_OK);
				SetForegroundWindow(HWND_DESKTOP);
				ExitProcess(1);
			}

			dwGameLoop = (DWORD)TheGameLoop;
			dwRenderLoop = (DWORD)TheRenderLoop;

			pGame = new CGame();
			pGame->StartGame();

			SubclassGameWindow();

			// Time to hook directx...

			// Grab the real IDirect3D8 * from the game.
			pD3D = (IDirect3D8 *)pGame->GetD3D();

			// Grab the real IDirect3DDevice8 * from the game.
			pD3DDevice = (IDirect3DDevice8 *)pGame->GetD3DDevice();

			// Create instances of our hook classes and force GTA to
			// chew on them.
			//pD3DHook = new IDirect3D8Hook;
			pD3DDeviceHook = new IDirect3DDevice8Hook;

			//pGame->setD3D((DWORD)pD3DHook); <- not working, crash in CheckDeviceFormat.
			
			pGame->SetD3DDevice((DWORD)pD3DDeviceHook);
				
			// Create instances of the chat and input classes.
			pChatWindow = new CChatWindow(pD3DDevice);
			pCmdWindow = new CCmdWindow(pD3DDevice);

			pScoreBoard = new CScoreBoard();
			pNetStats = new CNetStats();

			SetupCommands();			
		}
		// else they must want to play single
		// player or they got the command line
		// arguments wrong.
	}

	return TRUE;
}
Пример #10
0
int main(int argc, const char **argv)
{
	VariantMap settings;
	settings["appName"] = "Puzzle Moppet";
	settings["windowTitle"] = "Puzzle Moppet Configuration";
	settings["screenWidth"] = 250;
	settings["screenHeight"] = 330;
#ifndef __APPLE__
	// Software renderer doesn't seem to work on Mac...
	settings["softwareMode"] = true;
#endif
	
	IEngine *engine = CreateEngine(argc, argv, &settings);
	
	IrrlichtDevice *device = engine->GetIrrlichtDevice();
	
	// Filesystem...
	// Irrlicht needs this so it can load textures from same dir as font xml.
	engine->GetIrrlichtDevice()->getFileSystem()->addFileArchive("../projects/ConfigApp/");
	
	// Show the cursor
	device->getCursorControl()->setVisible(true);
	
	// Pause World, not needed for GUI app.
	// (pausing World also disables mouse centring)
	engine->GetWorld()->Pause();
	
	// Load GUI
	gui::IGUIEnvironment *guienv = device->getGUIEnvironment();
	ASSERT( guienv->loadGUI("gui.xml") );
	
	// Get pointers to important elements within the loaded GUI.
	// Ideally in the future we'll have a layout manager and won't need the GUI
	// defined in xml.
	FindGUIElementPointers();
	
	// Default font
	guienv->getSkin()->setFont( guienv->getFont("lucida.xml") );
	
	// Change background colour...
	engine->GetRenderSystem()->SetBackgroundCol(video::SColor(0, 200,200,200));
	
	// Receive GUI events.
	// This prevents Litha Engine from receiving GUI events, but that doesn't matter.
	IEventReceiver *eventReceiver = new EventReceiver(engine);
	guienv->setUserEventReceiver(eventReceiver);
	
	// Init
	InitSettings();
	InitGUI();
	
	engine->Run();
	engine->drop();
	delete eventReceiver;
	
	return 0;
}
Пример #11
0
// Open the port. Returns 0 on success, or a negative error number.
// Establishes default comms settings, but calls OnOpen virtual function to
// change the default settings (including the port number).
// DEFAULTS: COM1; 2400baud; 8 Data bits; 1 Stop Bit; No Parity; No Handshaking.
int JHCommBase::Open()
{
	char fn[10];
	DCB dcb;
	COMMTIMEOUTS cto;
	COMMPROP cp;
	COMMSETTINGS cs;

	InitSettings(&cs, &dcb, &cto);
	OnOpen(&cs, &dcb, &cto);
	dcb.DCBlength = sizeof(dcb);
	cto.ReadIntervalTimeout = MAXDWORD;
	cto.ReadTotalTimeoutConstant = 0;
	cto.ReadTotalTimeoutMultiplier = 0;
	sprintf_s(fn, 10, "\\\\.\\COM%u", cs.PortNumber);
	hPort = CreateFileA(fn, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0);
	if (hPort == INVALID_HANDLE_VALUE)
	{
		switch (GetLastError())
		{
		case 5:
			return -107;
		default:
			return -100;
		}
	}
	if (!SetCommTimeouts(hPort, &cto)) {Close(); return -101;};
	if ((cs.rxQueueSize != 0) || (cs.txQueueSize != 0))
		if (!SetupComm(hPort, cs.rxQueueSize, cs.txQueueSize)) {Close(); return -102;};
	if ((dcb.XoffLim == 0) || (dcb.XonLim == 0))
	{
		if (!GetCommProperties(hPort, &cp))	cp.dwCurrentRxQueue = 0;
		if (cp.dwCurrentRxQueue > 0)
		{
			//If we can determine the queue size, default to 1/10th, 8/10ths, 1/10th.
			//Note that HighWater is measured from top of queue.
			dcb.XoffLim = dcb.XonLim = (short)((int)cp.dwCurrentRxQueue / 10);
		}
		else
		{
			//If we do not know the queue size, set very low defaults for safety.
			dcb.XoffLim = dcb.XonLim = 8;
		}
	}
	if (!SetCommState(hPort, &dcb)) {Close(); return -103;};
	hRxEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
	if (NULL == hRxEvent) {Close(); return -104;};
	hTxEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
	if (NULL == hTxEvent) {Close(); return -105;};
	rxmode = 0;
	hRxThread = CreateThread(NULL, 0, RxThread, (LPVOID)this, 0, NULL);
	if (NULL == hRxThread) {Close(); return -106;};
	sendcount = 0;
	//OutputDebugString("Port Opened");
	return 0;
}
Пример #12
0
bool qPBReaderEpub::Open()
{
   TRSCOPE(epub, "qPBReaderEpub::Open");

   Clean();

   // compute MD5 to get config file and temporary directory

   _sMD5 = qPBReaderUtils::MD5(_sFile);

   bool bOk = !_sMD5.isEmpty();

   if (bOk)
   {
      _sTempDir = qPBReaderConfig::GetTempDir() + "/" + _sMD5;
      TRACE << "temp dir " << ENC(_sTempDir) << endl;

      bOk = InitSettings(qPBReaderConfig::GetDataDir() + "/" + _sMD5 + ".cfg");
   }

   // extract epub file

   if (bOk && qgetenv("qPBReaderDisableEpubExtraction").isEmpty())
   {
      bOk = qPBReaderUnzip::ExtractAllTo(_sFile, _sTempDir);
   }

   // analyze epub. Won't be completely performed if settings are present.

   if (bOk)
   {
      bOk = AnalyzeDocStructure();
   }

   // keep the input file name in config, useful when data
   // will be checked for entries to removed
   // will avoid deleting file if epub has been moved and reopened
   // since first open

   if (bOk)
   {
      QFile f(_sFile);
      _pSettings->SaveEpubFileName(QFileInfo(f).absoluteFilePath());
   }

   // don't stay partially initialized in case of error

   if (!bOk)
   {
      Clean();
   }

   TRACE << TRANAME << " " << VAR(bOk) << endl;

   return bOk;
}
Пример #13
0
Settings::Settings(QString path)
{
    _path = path;

    InitSettings();
    LoadSettings();

    if (_pathPlayer.isEmpty())
        TryToFindPlayer();
}
Пример #14
0
void VoxelMipmapRenderPass::Init ()
{
	ShaderManager::Instance ()->AddComputeShader ("VOXEL_MIPMAP_PASS_COMPUTE_SHADER",
		"Assets/Shaders/Voxelize/voxelMipmapCompute.glsl");

	/*
	 * Initialize voxel mipmap settings
	*/

	InitSettings ();
}
Пример #15
0
INT_PTR StartupSilence()
{
	InitSettings();
	HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
	mir_forkthread((pThreadFunc)AdvSt, NULL);
	CreateServiceFunction(SS_SERVICE_NAME, SturtupSilenceEnabled);
	CreateServiceFunction(SS_SILENCE_CONNECTION, SilenceConnection);
	IsMenu();
	HookEvent(ME_OPT_INITIALISE, InitializeOptions);
	return 0;
}
void VoxelRadianceInjectionRenderPass::Init ()
{
	ShaderManager::Instance ()->AddComputeShader ("VOXEL_RADIANCE_INJECTION_PASS_COMPUTE_SHADER",
		"Assets/Shaders/Voxelize/voxelRadianceInjectionCompute.glsl");

	/*
	 * Initialize voxel radiance injection settings
	*/

	InitSettings ();
}
Пример #17
0
void main(void)
{
	/* Configure the oscillator for the device */
	ConfigureOscillator();



	/* Initialize I/O and Peripherals for application */
	 InitApp();

	W5200_nRESET = 0;
	__delay_us(5);
	W5200_nRESET = 1;
	__delay_ms(50);
	__delay_ms(50);
	__delay_ms(50);
	__delay_ms(50);
	
	/* Initialize application settings */
	InitSettings();
	
	/* Initialize TCP server */
	initServer(&macAddress, &gateway, &netmask);
	startServer(&localEndpoint);

        LED = 1;

    while(1)
    {
		if(clientConnected())
		{
			if(dataAvailable())
			{
				uint16_t length = getReceivedLength();
				if(length > MAX_BUFFER)
				{
					// Limit maximum buffer size to avoid ram saturation due to packet flooding, a normal communication is shorter anyway
					length = MAX_BUFFER;
				}
				
				uint8_t buffer[MAX_BUFFER];
				getReceivedData(buffer, length);
				
				parseCommand(buffer[0], buffer, length);
				
				stopServer();
				startServer(&localEndpoint);
			}
			checkClientDisconnection();
		}		
    }

}
Пример #18
0
void VisionApp::ReadyToRun(void)
{
	InitSettings();

	fIdentThread = spawn_thread(Identity, "the_spirits_within", B_LOW_PRIORITY, NULL);
	if (fIdentThread >= B_OK) resume_thread(fIdentThread);

	if (!CheckStartupNetworks()) {
		fSetupWin = new SetupWindow();
		fSetupWin->Show();
	}
}
AudioOutputPulseAudio::AudioOutputPulseAudio(const AudioSettings &settings) :
    AudioOutputBase(settings),
    pcontext(NULL), pstream(NULL), mainloop(NULL),
    m_aosettings(NULL)
{
    volume_control.channels = 0;
    for (unsigned int i = 0; i < PA_CHANNELS_MAX; ++i)
        volume_control.values[i] = PA_VOLUME_MUTED;

    InitSettings(settings);
    if (settings.init)
        Reconfigure(settings);
}
Пример #20
0
extern OSStatus MySyncPaneFromTicket (
    MyCustomContext context, 
    PMPrintSession session
)

{
    OSStatus result = noErr;
    PMTicketRef ticket = NULL;

    result = MyGetTicket (session, kPDE_PMPrintSettingsRef, &ticket);
    if (result == noErr)
    {
        CFDataRef xmlData = NULL;
        CFDictionaryRef dict = NULL;

        result = PMTicketGetCFData (
            ticket, 
            kPMTopLevel, 
            kPMTopLevel, 
            kAppPrintDialogPDEOnlyKey, 
            &xmlData
        );
        if (result == noErr)
        {
            dict = CFPropertyListCreateFromXMLData (
                        kCFAllocatorDefault,
                        xmlData,
                        kCFPropertyListImmutable,
                        NULL
                        );
            if (dict)
            {
                InternSettings(dict, &context->settings);
                CFRelease(dict);
            }
            else
                result = kPMKeyNotFound;    // bad XML?
        }
        if (result == kPMKeyNotFound)
        {
            InitSettings(&context->settings);
            result = noErr;
        }
    }

    if (result == noErr)
        SyncPaneFromSettings(context);
    
    MyDebugMessage("MySyncPane", result);
    return result;
}
void BloomVerticalBlurContainerRenderSubPass::Init ()
{
	/*
	 * Initialize bloom settings
	*/

	InitSettings ();

	/*
	 *
	*/

	VerticalGaussianBlurContainerRenderSubPass::Init ();
}
void SSAOContainerRenderSubPass::Init ()
{
	/*
	 * Initialize screen space ambient occlusion settings
	*/

	InitSettings ();

	/*
	 *
	*/

	PostProcessContainerRenderSubPass::Init ();
}
Пример #23
0
TBarApp::TBarApp()
	:	BApplication(kDeskbarSignature),
		fSettingsFile(NULL),
		fPreferencesWindow(NULL)
{
	InitSettings();
	InitIconPreloader();

	fBarWindow = new TBarWindow();
	fBarView = fBarWindow->BarView();

	be_roster->StartWatching(this);

	gLocalizedNamePreferred
		= BLocaleRoster::Default()->IsFilesystemTranslationPreferred();

	sBarTeamInfoList.MakeEmpty();

	BList teamList;
	int32 numTeams;
	be_roster->GetAppList(&teamList);
	numTeams = teamList.CountItems();
	for (int32 i = 0; i < numTeams; i++) {
		app_info appInfo;
		team_id tID = (team_id)teamList.ItemAt(i);
		if (be_roster->GetRunningAppInfo(tID, &appInfo) == B_OK) {
			AddTeam(appInfo.team, appInfo.flags, appInfo.signature,
				&appInfo.ref);
		}
	}

	sSubscribers.MakeEmpty();

	fSwitcherMessenger = BMessenger(new TSwitchManager(fSettings.switcherLoc));

	fBarWindow->Show();

	// Call UpdatePlacement() after the window is shown because expanded apps
	// need to resize the window.
	if (fBarWindow->Lock()) {
		fBarView->UpdatePlacement();
		fBarWindow->Unlock();
	}

	// this messenger now targets the barview instead of the
	// statusview so that all additions to the tray
	// follow the same path
	fStatusViewMessenger = BMessenger(fBarWindow->FindView("BarView"));
}
Пример #24
0
void qPBReaderEpub::Clean()
{
   // remove temporary files

   if (!_sTempDir.isEmpty() && qgetenv("qPBReaderLeaveTempEpub").isEmpty())
   {
      qPBReaderUtils::Rmdir(_sTempDir);
   }

   // forget

   _sMD5.clear();
   _sTempDir.clear();
   InitSettings();
   _pCurrentOpf->Clear();
   _nActiveOpf = -1;
}
Пример #25
0
AudioOutputPulseAudio::AudioOutputPulseAudio(const AudioSettings &settings) :
    AudioOutputBase(settings),
    pcontext(NULL), pstream(NULL), mainloop(NULL),
    m_aosettings(NULL)
{
    volume_control.channels = 0;
    for (unsigned int i = 0; i < PA_CHANNELS_MAX; ++i)
        volume_control.values[i] = PA_VOLUME_MUTED;

    // unecessary initialization to keep coverity happy
    memset(&sample_spec, 0, sizeof(sample_spec));
    memset(&channel_map, 0, sizeof(channel_map));

    InitSettings(settings);
    if (settings.init)
        Reconfigure(settings);
}
Пример #26
0
CodecInst::CodecInst()
    : mLog(nullptr)
    , fps_num(30)
    , fps_den(1)
    , mCLConv(true)
    , mSubmitter(nullptr)
{
    InitSettings();
    ReadRegistry();
    mLog = new Logger(!!mConfigTable[S_LOG]);
    mCLConv = !mConfigTable[S_DISABLE_OCL];
    if (mConfigTable[S_FPS_ENABLED])
    {
        fps_num = mConfigTable[S_FPS_NUM];
        fps_den = mConfigTable[S_FPS_DEN];
    }
#if _DEBUG
    BindDLLs();
#endif
}
Пример #27
0
int main(int argc, char** argv)
{
	// Initialize the window with double and depth buffering
	glutInit(&argc, argv);
	glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
	glutInitWindowSize(window_width, window_height);
	glutCreateWindow("Assignment 2 - Hierarchical Modeling");

	// Initialize the OpenGL settings
	InitSettings();

	// Set up the callback functions
	glutKeyboardFunc(KeyboardFunc);
	glutMouseFunc(MouseFunc);
	glutMotionFunc(MotionFunc);
	glutReshapeFunc(ReshapeFunc);
	glutDisplayFunc(DisplayFunc);

	// Start the main loop
	glutMainLoop();
}
Пример #28
0
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow)
{
	OutputDebugString("----- Bot Starting -----");

	InitSettings();
	
	pNetGame = new CNetGame(tSettings.szConnectHost,atoi(tSettings.szConnectPort),
				tSettings.szNickName,tSettings.szConnectPass);
	
	while(1) {
		pNetGame->Process();
		Sleep(200);

		if( pNetGame->GetGameState() == GAMESTATE_CONNECTED &&
			!pNetGame->GetRakClient()->IsConnected() ) {
				break;
		}
	}

	OutputDebugString("----- BOT: End -----");
	return 0;
}
Пример #29
0
VOID Main( VOID )
    {
    BOOL  ExitProg = FALSE;

    SavedImage = DosAllocFarMem( 4000 );
    ScrSetMode();
    InitSettings();

    while( ChgSettings() )
	{
	SaveVideo();
	ActivateSignal();

	// for( Counter = 0; Counter <= 255; Counter++ )
	    // for( SubCounter = 0; SubCounter <= 255; SubCounter++ )
		// SetFrequency( 0, SubCounter, Counter );

	RestoreVideo();
	}

    ScrRestoreMode();
    DosFreeFarMem( SavedImage );
    }
Пример #30
0
int main( int argc, char *argv[])
{
    if (argc < 2)
    {
        printf("Usage: ./moldyn NUM_THREADS\n");
        return 1;
    }
    NTHREADS = atoi(argv[1]);
    int i;

    InitSettings   ();
    InitCoordinates(INPARAMS numMoles, BOXSIZE, perturb);
    InitVelocities (INPARAMS timeStep);
    InitForces     ();

    //Mike: added this to compensate for moving updatecoordinates to the end
    FirstCoordinates();


    barrier_init(&barrier, NTHREADS);

    pthread_attr_t attr;
    pthread_attr_init(&attr);
    pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM);
    pthread_t* threads = new pthread_t[ NTHREADS-1 ];
    for( i = 1; i < NTHREADS; i++ )
        pthread_create( &threads[i-1], &attr, do_thread_work, (void*)i );

    do_thread_work ((void *)0);

    for( i = 1; i < NTHREADS; i++ )
        pthread_join( threads[i-1], NULL );

    printf("\n");

    return 0;
}