AminetAminet
Search:
84736 packages online
About
Recent
Browse
Search
Upload
Setup
Services

util/libs/libhjw-aros.lha

Mirror:Random
Showing: m68k-amigaos iconppc-amigaos iconppc-morphos iconi386-aros iconi386-amithlon iconppc-warpup iconppc-powerup icongeneric icon
No screenshot available
Short:Wrapper Library for joysticks
Author:HunoPPC
Type:util/libs
Version:1.0.0
Architecture:i386-aros
Distribution:Aminet
Date:2012-03-24
Download:util/libs/libhjw-aros.lha - View contents
Readme:util/libs/libhjw-aros.readme
Downloads:874

HunoJoyWrapper Library version 1.0.0

Joystick/Joypad library 

Prerequisite:

Installing static libraries ==> libSDL_image.a and libSDL.a and their include files

Concept idea of this library:

* Easy integration of joystick/joypad support in any application or SDL game without needing to be an expert in programmation

* Easy preferences system with button swapping assignations, directional axis swappings, Joypads/Joystick automatic count detection, information about joysticks/joypads names

* Drivers internal owners of some joysticks

* Complete support of any joystick/joypad


Simple setting :

To incorporate this library in your code, first you have to:

* Copy the library from the archive in lib/libHJW.a to your SDK in the "newlib/lib" directory

* Copy the includes directory of the library (named "libHJW") to the newlib/include directory of your SDK

* To link the library, you just have to add this line in your code:
#include "libHJW/HunoJoyWrapper.h"

In order to compile:
	-lHWJ -lSDL_image


This library is "freeware" but is in no way OpenSource.

Rules regarding the integration of this library in any engine are as follow :

* You have to join the "Freeware_licenseLibHJW.txt" file in your program's directory
* You have to activate the logo at startup of your program or game (see below regarding the integration of the logo).
* You have to add the executable "Testing-JoysticksHWJlib.exe" in your directory.
* You have to add a link to the archive in your readme as well as a link to my site (http://www.clubevolution4.com/HunoPortSDL/)
* Source code and makefile of the modified part integrating joystick/joypad support must be included in the archive in order to help potential developpers thanks to your examples
* You have to send me a mail with the name of your application or game in which you have added the library, it will allow me to update my list of applications/games supporting "libHWJ"


How to initialise the library:

In order to initialise, you have to declare in main:
	extern SDL_Event event;


In order to initalize the LOGO:

//Initialize the wrapper and the logo (about the logo, you have to declare the surface of the screen, usually "screen" but this inot compulsory, developpers like to change). Important: the logo doesn't have any OpenGL rendering, you must use it in 2D, thanks.
	InitHunoJoyWrapper();
	InitLogoHJW (Display); 

Call an axial direction function:

//Declare in the events for the 1st player:
  Uint8* joyHJW;
  joyHJW = GetJoyStateHJW();

//In order to declare a button or an axis for the 1st player for example:
	joyHJW[JOY_HJW_DOWN]/ / ===> example of integration in a code: (keys [SDLK_DOWN] | | joyHJW [JOY_HJW_DOWN]) / / ===> The first statement is the original one (so the keyboard event) then the second integration of the first joystick <===

// All possibilities:
	JOY_HJW_UP
	JOY_HJW_DOWN
	JOY_HJW_LEFT
	JOY_HJW_RIGHT
	JOY_HJW_B0
	JOY_HJW_B1
	JOY_HJW_B2
	JOY_HJW_B3
	JOY_HJW_B4
	JOY_HJW_B5
	JOY_HJW_B6
	JOY_HJW_B7
	JOY_HJW_B8
	JOY_HJW_B9
	JOY_HJW_B10
	JOY_HJW_B11
	JOY_HJW_B12
	JOY_HJW_B13
	JOY_HJW_B14
	JOY_HJW_B15
	JOY_HJW_B16
	JOY_HJW_B17
	JOY_HJW_B18
	JOY_HJW_B19

//Declare in the events for the 2nd player:
  Uint8* joyHJW2;
  joyHJW2 = GetJoyState2HJW();


//In order to declare a button or an axis for the 2nd player for example:
	joyHJW2[JOY2_HJW_DOWN]/ / ===> example of integration in a code: (keys2 [SDLK_DOWN] | | joyHJW2 [JOY2_HJW_DOWN]) / / ===> The first statement is the original one (so the keyboard event) then the second integration of the second joystick <===

// All possibilities:
	JOY2_HJW_UP
	JOY2_HJW_DOWN
	JOY2_HJW_LEFT
	JOY2_HJW_RIGHT
	JOY2_HJW_B0
	JOY2_HJW_B1
	JOY2_HJW_B2
	JOY2_HJW_B3
	JOY2_HJW_B4
	JOY2_HJW_B5
	JOY2_HJW_B6
	JOY2_HJW_B7
	JOY2_HJW_B8
	JOY2_HJW_B9
	JOY2_HJW_B10
	JOY2_HJW_B11
	JOY2_HJW_B12
	JOY2_HJW_B13
	JOY2_HJW_B14
	JOY2_HJW_B15
	JOY2_HJW_B16
	JOY2_HJW_B17
	JOY2_HJW_B18
	JOY2_HJW_B19

// At the end of the main, free the library
	ShutdownHunoJoyWrapper ();
 

Keyboard shortcuts for the Joystick Test GUI
=> ESCAPE to quit
=> F5 to reload the config file after modifications

List of drivers currently supported natively:

Driver USB Joystick Adaptator HAMA Single adaptator Playstation
Driver Twin USB Joystick APM Adaptator Playstation
Driver ThrustMaster Dual Analog 3.2
Driver WingMan Precision USB
Driver Joystick FreeBox USB
Driver Joystick Cyborg V.1
Driver MadCatz Call of Duty GamePad
Driver Logitech(R) Precision(TM) Gamepad
Driver Saitek P220 Gamepad
Driver Saitek P990 Dual Analog Pad
Driver Teckmo mobility 2 IN 1 Gamepad
Driver TechMobility Mega World Gamepad
Driver Speedlink Strike2 GreenAsia Inc Gamepad

=============>Generic driver for a minimum operating a joystick having no driver<==============

Generic Driver for HunoJoyWrapper


----IMPORTANT----
In order for me to add new drivers into the library, please send me : both infosJoystick.dat and InfosJoystick2.dat files (they are created at program's launch and are deleted at program's close).
You also have to configure your Joystick/JoyPad with the configuration GUI  (to map the buttons at the right place) and then send me the file HunoJoyWrapper.cfg
You can send me the 3 file at the following address : nouvel.hugues (AT) free.fr
Thank you.



Uploaded using: archives.aros-exec.org


Contents of util/libs/libhjw-aros.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[unknown]                 6863    9490  72.3% -lh5- 09c1 Mar 17 09:27 LibHJW-AROS/HunoJoyWrapper-lib-AROS.info
[unknown]                 6636    9490  69.9% -lh5- a6f5 Mar 17 09:27 LibHJW-AROS/HunoJoyWrapper-lib-AROS/data.info
[unknown]                15119   57856  26.1% -lh5- f26f Mar 16 17:22 LibHJW-AROS/HunoJoyWrapper-lib-AROS/data/button.ttf
[unknown]              1142567 1554038  73.5% -lh5- 991c Mar 16 17:22 LibHJW-AROS/HunoJoyWrapper-lib-AROS/data/hjw.wav
[unknown]                90600  126364  71.7% -lh5- 615e Mar 16 17:22 LibHJW-AROS/HunoJoyWrapper-lib-AROS/data/text.ttf
[unknown]                 6813    9490  71.8% -lh5- ae4b Mar 17 09:27 LibHJW-AROS/HunoJoyWrapper-lib-AROS/Exemple.info
[unknown]                 7526   53745  14.0% -lh5- 7bd6 Mar 16 17:22 LibHJW-AROS/HunoJoyWrapper-lib-AROS/Exemple/KeyboardModified.cpp
[unknown]                 5652    8318  67.9% -lh5- 0573 Mar 17 09:20 LibHJW-AROS/HunoJoyWrapper-lib-AROS/Exemple/KeyboardModified.cpp.info
[unknown]                 7230   49553  14.6% -lh5- 0833 Mar 16 17:22 LibHJW-AROS/HunoJoyWrapper-lib-AROS/Exemple/KeyboardOriginal.cpp
[unknown]                 5752    8318  69.2% -lh5- a8b4 Mar 17 09:20 LibHJW-AROS/HunoJoyWrapper-lib-AROS/Exemple/KeyboardOriginal.cpp.info
[unknown]                 2653    6399  41.5% -lh5- 72b9 Mar 16 17:22 LibHJW-AROS/HunoJoyWrapper-lib-AROS/Freeware_licenseLibHJW.txt
[unknown]                17079   21246  80.4% -lh5- 4307 Mar 17 09:27 LibHJW-AROS/HunoJoyWrapper-lib-AROS/Freeware_licenseLibHJW.txt.info
[unknown]                 6815    9490  71.8% -lh5- 5a9c Mar 17 09:27 LibHJW-AROS/HunoJoyWrapper-lib-AROS/include.info
[unknown]                 3065    7734  39.6% -lh5- a2e1 Mar 16 17:22 LibHJW-AROS/HunoJoyWrapper-lib-AROS/include/libHJW/HunoJoyWrapper.h
[unknown]                 6862    9490  72.3% -lh5- 2ba7 Mar 17 09:27 LibHJW-AROS/HunoJoyWrapper-lib-AROS/lib.info
[unknown]               153734  682370  22.5% -lh5- 2df8 Mar 24 00:54 LibHJW-AROS/HunoJoyWrapper-lib-AROS/lib/libHJW.a
[unknown]                 2121    5253  40.4% -lh5- bb04 Mar 17 10:18 LibHJW-AROS/HunoJoyWrapper-lib-AROS/libHJW_En.txt
[unknown]                17101   21246  80.5% -lh5- e92d Mar 17 09:27 LibHJW-AROS/HunoJoyWrapper-lib-AROS/libHJW_En.txt.info
[unknown]                 2395    5950  40.3% -lh5- e7d9 Mar 17 10:19 LibHJW-AROS/HunoJoyWrapper-lib-AROS/libHJW_FR.txt
[unknown]                17112   21246  80.5% -lh5- c3d8 Mar 17 09:27 LibHJW-AROS/HunoJoyWrapper-lib-AROS/libHJW_FR.txt.info
[unknown]                 6643    9490  70.0% -lh5- abce Mar 17 09:27 LibHJW-AROS/HunoJoyWrapper-lib-AROS/LogoHJWLib.info
[unknown]                23611   23656  99.8% -lh5- fef9 Mar 16 17:22 LibHJW-AROS/HunoJoyWrapper-lib-AROS/LogoHJWLib/HJWlib-logo.png
[unknown]                13028   13082  99.6% -lh5- 806b Mar 17 09:14 LibHJW-AROS/HunoJoyWrapper-lib-AROS/LogoHJWLib/HJWlib-logo.png.info
[unknown]               952926 2926348  32.6% -lh5- 31a9 Mar 24 01:12 LibHJW-AROS/HunoJoyWrapper-lib-AROS/Testing-JoysticksHWJlib.exe
[unknown]                48653   63390  76.8% -lh5- 64a4 Mar 17 09:27 LibHJW-AROS/HunoJoyWrapper-lib-AROS/Testing-JoysticksHWJlib.exe.info
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total        25 files 2568556 5713052  45.0%            Mar 24 12:42
Page generated in 0.02 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>