summaryrefslogtreecommitdiffhomepage
path: root/clientfiles/very-important-source-code/tester/main.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-10-29 11:05:27 +0100
committerStanislaw Halik <sthalik@misaki.pl>2015-10-29 11:05:27 +0100
commit232c2ba8aca7900eaa950c48813ddfaca8a749a8 (patch)
treec08da2e256be5b5e80fac3f611f956fef275f142 /clientfiles/very-important-source-code/tester/main.cpp
parent7128fe581ee2ed25fe8e43ec2be9644e2539e2ad (diff)
parent06a0a71f27134a86d19612fd786bfc2ca6f4c4bb (diff)
Merge branch 'unstable' into trackhat
* unstable: fix vtable mess xargs sed -i -e s/'FaceTrackNoIR Error/Error/g' support rift 0.2.5, 0.4.2, 0.8.0 rift: finish 0.2.5 support buffer flush rename "clientfiles/" to "contrib/" as customary add dropbox uploader to contrib add description on wiki for camera offset
Diffstat (limited to 'clientfiles/very-important-source-code/tester/main.cpp')
-rw-r--r--clientfiles/very-important-source-code/tester/main.cpp100
1 files changed, 0 insertions, 100 deletions
diff --git a/clientfiles/very-important-source-code/tester/main.cpp b/clientfiles/very-important-source-code/tester/main.cpp
deleted file mode 100644
index 95ca0d9b3..000000000
--- a/clientfiles/very-important-source-code/tester/main.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-#define WIN32_LEAN_AND_MEAN
-
-#include <windows.h>
-#include <stdio.h>
-#include <stdint.h>
-#include "resource.h"
-#include "rest.h"
-#include "npifc.h"
-
-HINSTANCE hInst;
-UINT_PTR timer = 0;
-
-VOID CALLBACK TimerProcedure(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
-{
- (void) uMsg;
- (void) idEvent;
- (void) dwTime;
- tir_data_t td;
- npifc_getdata(&td);
- SetDlgItemInt(hwnd, IDC_PITCH, td.pitch, true);
- SetDlgItemInt(hwnd, IDC_ROLL, td.roll, true);
- SetDlgItemInt(hwnd, IDC_YAW, td.yaw, true);
-
- SetDlgItemInt(hwnd, IDC_X1, td.tx, true);
- SetDlgItemInt(hwnd, IDC_Y1, td.ty, true);
- SetDlgItemInt(hwnd, IDC_Z1, td.tz, true);
-
- SetDlgItemInt(hwnd, IDC_X2, td.padding[0], true);
- SetDlgItemInt(hwnd, IDC_Y2, td.padding[1], true);
- SetDlgItemInt(hwnd, IDC_Z2, td.padding[2], true);
- SetDlgItemInt(hwnd, IDC_X3, td.padding[3], true);
- SetDlgItemInt(hwnd, IDC_Y3, td.padding[4], true);
- SetDlgItemInt(hwnd, IDC_Z3, td.padding[5], true);
- SetDlgItemInt(hwnd, IDC_S, td.status, true);
- SetDlgItemInt(hwnd, IDC_F, td.frame, true);
-}
-
-BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- (void) lParam;
- switch(uMsg)
- {
- case WM_INITDIALOG:
- SetDlgItemInt(hwndDlg, IDC_APPID, 2307, true);
- return TRUE;
-
- case WM_CLOSE:
- EndDialog(hwndDlg, 0);
- return TRUE;
-
- case WM_COMMAND:
- switch(LOWORD(wParam))
- {
- /*
- * TODO: Add more control ID's, when needed.
- */
- case IDQUIT:
- npifc_close();
- EndDialog(hwndDlg, 0);
- return TRUE;
- case IDSTART:
- int ok;
- int num = GetDlgItemInt(hwndDlg, IDC_APPID, (BOOL*)&ok, false);
- if(!ok){
- num = 2307;
- }
- game_desc_t gd;
- if(timer != 0){
- KillTimer(hwndDlg, timer);
- timer = 0;
- }
- if(game_data_get_desc(num, &gd)){
- printf("Application ID: %d - %s\n", num, gd.name);
- if(npifc_init(hwndDlg, num)){
- timer = SetTimer(hwndDlg, 0, 50, TimerProcedure);
- }
- }else{
- printf("Unknown Application ID: %d\n", num);
- }
- break;
-
- }
- }
-
- return FALSE;
-}
-
-
-int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
-{
- (void) hPrevInstance;
- (void) lpCmdLine;
- (void) nShowCmd;
- hInst = hInstance;
-
- // The user interface is a modal dialog box
- return DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG1), NULL, (DLGPROC)DialogProc);
-}
-
-