FreeBASIC  0.91.0
gfx_joystick.c File Reference
#include "../fb_gfx.h"
#include "fb_gfx_dos.h"
#include <pc.h>
#include <go32.h>
Include dependency graph for gfx_joystick.c:

Go to the source code of this file.

Macros

#define JOY_PORT   0x201
 
#define JOY_AXIS1   0x1
 
#define JOY_AXIS2   0x2
 
#define JOY_AXIS3   0x4
 
#define JOY_AXIS4   0x8
 
#define JOY_COUNT   100000
 
#define CALCPOS(pos, min, max)   (((((float)(pos) - (float)(min)) * 2.0) / ((float)(max) - (float)(min) + 1.0)) - 1.0)
 

Functions

FBCALL int fb_GfxGetJoystick (int id, ssize_t *buttons, float *a1, float *a2, float *a3, float *a4, float *a5, float *a6, float *a7, float *a8)
 

Variables

static int detected = TRUE
 
static int min_x1 = JOY_COUNT
 
static int min_y1 = JOY_COUNT
 
static int min_x2 = JOY_COUNT
 
static int min_y2 = JOY_COUNT
 
static int max_x1 = 0
 
static int max_y1 = 0
 
static int max_x2 = 0
 
static int max_y2 = 0
 
__dpmi_regs regs
 

Macro Definition Documentation

#define CALCPOS (   pos,
  min,
  max 
)    (((((float)(pos) - (float)(min)) * 2.0) / ((float)(max) - (float)(min) + 1.0)) - 1.0)

Definition at line 15 of file gfx_joystick.c.

#define JOY_AXIS1   0x1

Definition at line 9 of file gfx_joystick.c.

#define JOY_AXIS2   0x2

Definition at line 10 of file gfx_joystick.c.

#define JOY_AXIS3   0x4

Definition at line 11 of file gfx_joystick.c.

#define JOY_AXIS4   0x8

Definition at line 12 of file gfx_joystick.c.

#define JOY_COUNT   100000

Definition at line 13 of file gfx_joystick.c.

#define JOY_PORT   0x201

Definition at line 8 of file gfx_joystick.c.

Function Documentation

FBCALL int fb_GfxGetJoystick ( int  id,
ssize_t *  buttons,
float *  a1,
float *  a2,
float *  a3,
float *  a4,
float *  a5,
float *  a6,
float *  a7,
float *  a8 
)

Definition at line 24 of file gfx_joystick.c.

Here is the caller graph for this function:

Variable Documentation

int detected = TRUE
static

Definition at line 17 of file gfx_joystick.c.

int max_x1 = 0
static

Definition at line 20 of file gfx_joystick.c.

int max_x2 = 0
static

Definition at line 20 of file gfx_joystick.c.

int max_y1 = 0
static

Definition at line 20 of file gfx_joystick.c.

int max_y2 = 0
static

Definition at line 20 of file gfx_joystick.c.

int min_x1 = JOY_COUNT
static

Definition at line 19 of file gfx_joystick.c.

int min_x2 = JOY_COUNT
static

Definition at line 19 of file gfx_joystick.c.

int min_y1 = JOY_COUNT
static

Definition at line 19 of file gfx_joystick.c.

int min_y2 = JOY_COUNT
static

Definition at line 19 of file gfx_joystick.c.

__dpmi_regs regs

Definition at line 22 of file gfx_joystick.c.