shuffle and clean up includes - builds on windows properly again
This commit is contained in:
@@ -31,20 +31,14 @@
|
|||||||
* @brief Classic controller expansion device.
|
* @brief Classic controller expansion device.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "classic.h"
|
||||||
|
#include "dynamics.h"
|
||||||
|
#include "events.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
#include <Winsock2.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "definitions.h"
|
|
||||||
#include "wiiuse_internal.h"
|
|
||||||
#include "dynamics.h"
|
|
||||||
#include "events.h"
|
|
||||||
#include "classic.h"
|
|
||||||
|
|
||||||
static void classic_ctrl_pressed_buttons(struct classic_ctrl_t* cc, short now);
|
static void classic_ctrl_pressed_buttons(struct classic_ctrl_t* cc, short now);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
#define DEFINITIONS_H_INCLUDED
|
#define DEFINITIONS_H_INCLUDED
|
||||||
|
|
||||||
/* this is wiiuse - used to distinguish from third party programs using wiiuse.h */
|
/* this is wiiuse - used to distinguish from third party programs using wiiuse.h */
|
||||||
|
#include <stdio.h>
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
|
|
||||||
#define WIIMOTE_PI 3.14159265f
|
#define WIIMOTE_PI 3.14159265f
|
||||||
|
|||||||
@@ -35,6 +35,9 @@
|
|||||||
* motion sensing.
|
* motion sensing.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "dynamics.h"
|
||||||
|
#include "ir.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
@@ -43,10 +46,6 @@
|
|||||||
#include <float.h>
|
#include <float.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "definitions.h"
|
|
||||||
#include "wiiuse_internal.h"
|
|
||||||
#include "ir.h"
|
|
||||||
#include "dynamics.h"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Calculate the roll, pitch, yaw.
|
* @brief Calculate the roll, pitch, yaw.
|
||||||
|
|||||||
31
src/events.c
31
src/events.c
@@ -34,30 +34,27 @@
|
|||||||
* that are sent from the wiimote to us.
|
* that are sent from the wiimote to us.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#ifndef WIN32
|
|
||||||
#include <sys/time.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#else
|
|
||||||
#include <winsock2.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
#include "definitions.h"
|
|
||||||
#include "io.h"
|
|
||||||
#include "wiiuse_internal.h"
|
#include "wiiuse_internal.h"
|
||||||
|
#include "events.h"
|
||||||
|
#include "io.h"
|
||||||
#include "dynamics.h"
|
#include "dynamics.h"
|
||||||
#include "ir.h"
|
#include "ir.h"
|
||||||
#include "nunchuk.h"
|
#include "nunchuk.h"
|
||||||
#include "classic.h"
|
#include "classic.h"
|
||||||
#include "guitar_hero_3.h"
|
#include "guitar_hero_3.h"
|
||||||
#include "wiiboard.h"
|
#include "wiiboard.h"
|
||||||
#include "events.h"
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#ifndef WIN32
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
static void idle_cycle(struct wiimote_t* wm);
|
static void idle_cycle(struct wiimote_t* wm);
|
||||||
static void clear_dirty_reads(struct wiimote_t* wm);
|
static void clear_dirty_reads(struct wiimote_t* wm);
|
||||||
|
|||||||
@@ -31,20 +31,15 @@
|
|||||||
* @brief Guitar Hero 3 expansion device.
|
* @brief Guitar Hero 3 expansion device.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "guitar_hero_3.h"
|
||||||
|
|
||||||
|
#include "dynamics.h"
|
||||||
|
#include "events.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
#include <Winsock2.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "definitions.h"
|
|
||||||
#include "wiiuse_internal.h"
|
|
||||||
#include "dynamics.h"
|
|
||||||
#include "events.h"
|
|
||||||
#include "guitar_hero_3.h"
|
|
||||||
|
|
||||||
static void guitar_hero_3_pressed_buttons(struct guitar_hero_3_t* gh3, short now);
|
static void guitar_hero_3_pressed_buttons(struct guitar_hero_3_t* gh3, short now);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
5
src/io.c
5
src/io.c
@@ -30,14 +30,11 @@
|
|||||||
* @file
|
* @file
|
||||||
* @brief Handles device I/O (non-OS specific).
|
* @brief Handles device I/O (non-OS specific).
|
||||||
*/
|
*/
|
||||||
|
#include "io.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "definitions.h"
|
|
||||||
#include "wiiuse_internal.h"
|
|
||||||
#include "io.h"
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get initialization data from the wiimote.
|
* @brief Get initialization data from the wiimote.
|
||||||
|
|||||||
@@ -33,18 +33,14 @@
|
|||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|
||||||
|
#include "io.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <windows.h>
|
|
||||||
#include <hidsdi.h>
|
#include <hidsdi.h>
|
||||||
#include <setupapi.h>
|
#include <setupapi.h>
|
||||||
|
|
||||||
#include "definitions.h"
|
|
||||||
#include "wiiuse_internal.h"
|
|
||||||
#include "io.h"
|
|
||||||
|
|
||||||
|
|
||||||
int wiiuse_find(struct wiimote_t** wm, int max_wiimotes, int timeout) {
|
int wiiuse_find(struct wiimote_t** wm, int max_wiimotes, int timeout) {
|
||||||
GUID device_id;
|
GUID device_id;
|
||||||
HANDLE dev;
|
HANDLE dev;
|
||||||
|
|||||||
6
src/ir.c
6
src/ir.c
@@ -31,6 +31,8 @@
|
|||||||
* @brief Handles IR data.
|
* @brief Handles IR data.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "ir.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
@@ -38,10 +40,6 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "definitions.h"
|
|
||||||
#include "wiiuse_internal.h"
|
|
||||||
#include "ir.h"
|
|
||||||
|
|
||||||
static int get_ir_sens(struct wiimote_t* wm, char** block1, char** block2);
|
static int get_ir_sens(struct wiimote_t* wm, char** block1, char** block2);
|
||||||
static void interpret_ir_data(struct wiimote_t* wm);
|
static void interpret_ir_data(struct wiimote_t* wm);
|
||||||
static void fix_rotated_ir_dots(struct ir_dot_t* dot, float ang);
|
static void fix_rotated_ir_dots(struct ir_dot_t* dot, float ang);
|
||||||
|
|||||||
@@ -31,15 +31,14 @@
|
|||||||
* @brief Nunchuk expansion device.
|
* @brief Nunchuk expansion device.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "nunchuk.h"
|
||||||
|
#include "dynamics.h"
|
||||||
|
#include "events.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include "definitions.h"
|
|
||||||
#include "wiiuse_internal.h"
|
|
||||||
#include "dynamics.h"
|
|
||||||
#include "events.h"
|
|
||||||
#include "nunchuk.h"
|
|
||||||
|
|
||||||
static void nunchuk_pressed_buttons(struct nunchuk_t* nc, byte now);
|
static void nunchuk_pressed_buttons(struct nunchuk_t* nc, byte now);
|
||||||
|
|
||||||
|
|||||||
@@ -31,20 +31,14 @@
|
|||||||
* @brief Wii Fit Balance Board device.
|
* @brief Wii Fit Balance Board device.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
#ifdef WIN32
|
#include "wiiboard.h"
|
||||||
#include <Winsock2.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "definitions.h"
|
|
||||||
#include "wiiuse_internal.h"
|
|
||||||
#include "dynamics.h"
|
#include "dynamics.h"
|
||||||
#include "events.h"
|
#include "events.h"
|
||||||
#include "wiiboard.h"
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
static uint16_t big_to_lil(uint16_t num)
|
static uint16_t big_to_lil(uint16_t num)
|
||||||
{
|
{
|
||||||
|
|||||||
11
src/wiiuse.c
11
src/wiiuse.c
@@ -35,20 +35,17 @@
|
|||||||
* of the API.
|
* of the API.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "wiiuse_internal.h"
|
||||||
|
#include "events.h"
|
||||||
|
#include "io.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#else
|
|
||||||
#include <Winsock2.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "definitions.h"
|
|
||||||
#include "wiiuse_internal.h"
|
|
||||||
#include "events.h"
|
|
||||||
#include "io.h"
|
|
||||||
|
|
||||||
static int g_banner = 0;
|
static int g_banner = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -44,7 +44,9 @@
|
|||||||
#ifndef WIIUSE_INTERNAL_H_INCLUDED
|
#ifndef WIIUSE_INTERNAL_H_INCLUDED
|
||||||
#define WIIUSE_INTERNAL_H_INCLUDED
|
#define WIIUSE_INTERNAL_H_INCLUDED
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifdef WIN32
|
||||||
|
#include <Winsock2.h>
|
||||||
|
#else
|
||||||
#include <arpa/inet.h> /* htons() */
|
#include <arpa/inet.h> /* htons() */
|
||||||
#include <bluetooth/bluetooth.h>
|
#include <bluetooth/bluetooth.h>
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user