0 Members and 1 Guest are viewing this topic.
/******************************************************************************************************* CKI.pp Maxime Bezanilla 23/02/2016La dll doit être chargée par Orbiter, puis récupérer des informations du port USB( en provenancedu cockpit) pour modifier les données du jeu dans Orbiter.Eventuellement, elle fera aussi le retour d'information pour les afficheurs.version: 2016/02/24 14:00******************************************************************************************************///####################################################################################################//#define STRICT#define ORBITER_MODULE/* if not using cki.h #include <windows.h>#include <stdio.h>#include <mmeapi.h>#include <winsock.h>#include "OrbiterAPI.h"#include "soundlib.h"#include "apolloguidance.h"#include "dsky.h"#include "connector.h"#include "CSMconnector.h"#include "CSMcomputer.h"#include "toggleswitch.h"#include "IMU.h"#include "saturn.h"#include "resource.h"*/#include "stdafx.h"#include "cki.h"#include <iostream>#include <string>#include <fstream>HINSTANCE g_hInst; // module instance handle//***************** entry point ********************\\DLLCLBK void InitModule (HINSTANCE hDLL){ g_hInst = hDLL;};//***************** exit point ****************\DLLCLBK void ExitModule (HINSTANCE hDLL){}DLLCLBK void opcPreStep(double simt, double simdt, double mjd){ mainFunc();};void mainFunc(){ int i; int j; OBJHANDLE hv = oapiGetFocusObject(); //vessel handle VESSEL2 v = VESSEL2(hv, 1); for (i = 100; i < 110; i++) { for (j = 100; j < 110; j++) { v.clbkPanelMouseEvent(IDB_CSM_MAIN_PANEL, PANEL_MOUSE_LBDOWN, i, j); Sleep(30); v.clbkPanelMouseEvent(IDB_CSM_MAIN_PANEL, PANEL_MOUSE_LBUP, i, j); Sleep(30); }; };};
/*******************************************************************************************************CKI.hMaxime Bezanilla23/02/2016version: 2016/02/24 14:00******************************************************************************************************///####################################################################################################//#include <windows.h>#include <stdio.h>#include "stdafx.h"#include <mmeapi.h>#include <winsock.h>#include "OrbiterAPI.h"#include "soundlib.h"#include "apolloguidance.h"#include "dsky.h"#include "connector.h"#include "CSMconnector.h"#include "CSMcomputer.h"#include "toggleswitch.h"#include "IMU.h"#include "saturn.h"#include "resource.h"void mainFunc();